]>
Commit | Line | Data |
---|---|---|
6762286d | 1 | /////////////////////////////////////////////////////////////////////////////// |
233f5738 | 2 | // Name: wx/osx/tooltip.h |
6762286d SC |
3 | // Purpose: wxToolTip class - tooltip control |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 31.01.99 | |
6762286d SC |
7 | // Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin, Stefan Csomor |
8 | // Licence: wxWindows licence | |
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_MAC_TOOLTIP_H_ | |
12 | #define _WX_MAC_TOOLTIP_H_ | |
13 | ||
14 | #include "wx/string.h" | |
15 | #include "wx/event.h" | |
16 | ||
17 | class WXDLLIMPEXP_CORE wxToolTip : public wxObject | |
18 | { | |
19 | public: | |
20 | // ctor & dtor | |
21 | wxToolTip(const wxString &tip); | |
22 | virtual ~wxToolTip(); | |
23 | ||
24 | // accessors | |
25 | // tip text | |
26 | void SetTip(const wxString& tip); | |
27 | const wxString& GetTip() const { return m_text; } | |
28 | ||
29 | // the window we're associated with | |
30 | void SetWindow(wxWindow *win); | |
31 | wxWindow *GetWindow() const { return m_window; } | |
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 | static void NotifyWindowDelete( WXHWND win ) ; | |
43 | ||
44 | // implementation only from now on | |
45 | // ------------------------------- | |
46 | ||
47 | // should be called in response to mouse events | |
48 | static void RelayEvent(wxWindow *win , wxMouseEvent &event); | |
49 | static void RemoveToolTips(); | |
50 | ||
51 | private: | |
52 | wxString m_text; // tooltip text | |
53 | wxWindow *m_window; // window we're associated with | |
54 | DECLARE_ABSTRACT_CLASS(wxToolTip) | |
55 | }; | |
56 | ||
57 | #endif // _WX_MAC_TOOLTIP_H_ |