]>
Commit | Line | Data |
---|---|---|
3a19e16d VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: msw/tooltip.h | |
3 | // Purpose: wxToolTip class - tooltip control | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 31.01.99 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin | |
9 | // Licence: wxWindows license | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | class wxToolTip : public wxObject | |
13 | { | |
14 | public: | |
15 | // ctor & dtor | |
16 | wxToolTip(const wxString &tip); | |
17 | virtual ~wxToolTip(); | |
18 | ||
19 | // accessors | |
20 | // tip text | |
21 | void SetTip(const wxString& tip); | |
22 | const wxString& GetTip() const { return m_text; } | |
23 | ||
24 | // the window we're associated with | |
25 | void SetWindow(wxWindow *win); | |
26 | wxWindow *GetWindow() const { return m_window; } | |
27 | ||
16f6dfd8 | 28 | // controlling tooltip behaviour: globally change tooltip parameters |
3a19e16d | 29 | // enable or disable the tooltips globally |
16f6dfd8 | 30 | static void Enable(bool flag); |
3a19e16d | 31 | // set the delay after which the tooltip appears |
16f6dfd8 | 32 | static void SetDelay(long milliseconds); |
3a19e16d VZ |
33 | |
34 | // implementation | |
35 | void RelayEvent(WXMSG *msg); | |
36 | ||
37 | private: | |
d098a357 | 38 | static WXHWND hwndTT; |
3a19e16d VZ |
39 | // create the tooltip ctrl for our parent frame if it doesn't exist yet |
40 | // and return its window handle | |
41 | WXHWND GetToolTipCtrl(); | |
42 | ||
43 | // remove this tooltip from the tooltip control | |
44 | void Remove(); | |
45 | ||
46 | wxString m_text; // tooltip text | |
47 | wxWindow *m_window; // window we're associated with | |
48 | }; | |
d098a357 | 49 |