]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/gtk1/tooltip.h | |
3 | // Purpose: wxToolTip class | |
4 | // Author: Robert Roebling | |
5 | // Copyright: (c) 1998 Robert Roebling | |
6 | // Licence: wxWindows licence | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | #ifndef __GTKTOOLTIPH__ | |
10 | #define __GTKTOOLTIPH__ | |
11 | ||
12 | #include "wx/defs.h" | |
13 | #include "wx/string.h" | |
14 | #include "wx/object.h" | |
15 | ||
16 | //----------------------------------------------------------------------------- | |
17 | // forward declarations | |
18 | //----------------------------------------------------------------------------- | |
19 | ||
20 | class WXDLLIMPEXP_FWD_CORE wxToolTip; | |
21 | class WXDLLIMPEXP_FWD_CORE wxWindow; | |
22 | ||
23 | //----------------------------------------------------------------------------- | |
24 | // wxToolTip | |
25 | //----------------------------------------------------------------------------- | |
26 | ||
27 | class WXDLLIMPEXP_CORE wxToolTip : public wxObject | |
28 | { | |
29 | public: | |
30 | // globally change the tooltip parameters | |
31 | static void Enable( bool flag ); | |
32 | static void SetDelay( long msecs ); | |
33 | // set the delay after which the tooltip disappears or how long the tooltip remains visible | |
34 | static void SetAutoPop(long msecs); | |
35 | // set the delay between subsequent tooltips to appear | |
36 | static void SetReshow(long msecs); | |
37 | ||
38 | wxToolTip( const wxString &tip ); | |
39 | ||
40 | // get/set the tooltip text | |
41 | void SetTip( const wxString &tip ); | |
42 | wxString GetTip() const { return m_text; } | |
43 | ||
44 | wxWindow *GetWindow() const { return m_window; } | |
45 | bool IsOk() const { return m_window != NULL; } | |
46 | ||
47 | // implementation | |
48 | void Apply( wxWindow *win ); | |
49 | ||
50 | private: | |
51 | wxString m_text; | |
52 | wxWindow *m_window; | |
53 | ||
54 | DECLARE_ABSTRACT_CLASS(wxToolTip) | |
55 | }; | |
56 | ||
57 | #endif // __GTKTOOLTIPH__ |