]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/tooltip.h
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / include / wx / cocoa / tooltip.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/tooltip.h
3 // Purpose: wxToolTip class - tooltip control
4 // Author: Ryan Norton
5 // Modified by:
6 // Created: 31.01.99
7 // Copyright: (c) Ryan Norton
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_COCOA_TOOLTIP_H_
12 #define _WX_COCOA_TOOLTIP_H_
13
14 #include "wx/object.h"
15
16 class wxWindow;
17
18 class wxToolTip : public wxObject
19 {
20 public:
21 // ctor & dtor
22 wxToolTip(const wxString &tip);
23 virtual ~wxToolTip();
24
25 // accessors
26 // tip text
27 void SetTip(const wxString& tip);
28 const wxString& GetTip() const;
29
30 // the window we're associated with
31 wxWindow *GetWindow() const;
32
33 // controlling tooltip behaviour: globally change tooltip parameters
34 // enable or disable the tooltips globally
35 static void Enable(bool flag);
36 // set the delay after which the tooltip appears
37 static void SetDelay(long milliseconds);
38 // set the delay after which the tooltip disappears or how long the tooltip remains visible
39 static void SetAutoPop(long milliseconds);
40 // set the delay between subsequent tooltips to appear
41 static void SetReshow(long milliseconds);
42
43 private:
44 void SetWindow(wxWindow* window);
45
46 friend class wxWindow;
47
48 wxString m_text; // tooltip text
49 wxWindow *m_window; // window we're associated with
50
51 DECLARE_ABSTRACT_CLASS(wxToolTip)
52 };
53
54 #endif // _WX_COCOA_TOOLTIP_H_