]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/tooltip.h
added wxprec.h
[wxWidgets.git] / include / wx / mac / tooltip.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: mac/tooltip.h
3 // Purpose: wxToolTip class - tooltip control
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 31.01.99
7 // RCS-ID: $Id$
8 // Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin, Stefan Csomor
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12
13 class wxToolTip : public wxObject
14 {
15 public:
16 // ctor & dtor
17 wxToolTip(const wxString &tip);
18 virtual ~wxToolTip();
19
20 // accessors
21 // tip text
22 void SetTip(const wxString& tip);
23 const wxString& GetTip() const { return m_text; }
24
25 // the window we're associated with
26 void SetWindow(wxWindow *win);
27 wxWindow *GetWindow() const { return m_window; }
28
29 // controlling tooltip behaviour: globally change tooltip parameters
30 // enable or disable the tooltips globally
31 static void Enable(bool flag);
32 // set the delay after which the tooltip appears
33 static void SetDelay(long milliseconds);
34 static void NotifyWindowDelete( WXHWND win ) ;
35
36 // implementation only from now on
37 // -------------------------------
38
39 // should be called in response to mouse events
40 static void RelayEvent(wxWindow *win , wxMouseEvent &event);
41 static void RemoveToolTips();
42
43 private:
44 wxString m_text; // tooltip text
45 wxWindow *m_window; // window we're associated with
46 DECLARE_ABSTRACT_CLASS(wxToolTip)
47 };
48