]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/tooltip.h
Added possibility of 2-step initialisation, and wxWIZARD_EX_HELPBUTTON style.
[wxWidgets.git] / include / wx / msw / tooltip.h
CommitLineData
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
6f4968e2 12class WXDLLEXPORT wxToolTip : public wxObject
3a19e16d
VZ
13{
14public:
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 33
8614c467
VZ
34 // implementation only from now on
35 // -------------------------------
36
37 // should be called in responde to WM_MOUSEMOVE
3a19e16d
VZ
38 void RelayEvent(WXMSG *msg);
39
40private:
8614c467
VZ
41 // the one and only one tooltip control we use - never access it directly
42 // but use GetToolTipCtrl() which will create it when needed
f048e32f
VZ
43 static WXHWND ms_hwndTT;
44
45 // create the tooltip ctrl if it doesn't exist yet and return its HWND
8614c467 46 static WXHWND GetToolTipCtrl();
3a19e16d
VZ
47
48 // remove this tooltip from the tooltip control
49 void Remove();
50
f048e32f
VZ
51 // add a window to the tooltip control
52 void Add(WXHWND hwnd);
53
3a19e16d
VZ
54 wxString m_text; // tooltip text
55 wxWindow *m_window; // window we're associated with
b342f8f0
RD
56
57 DECLARE_ABSTRACT_CLASS(wxToolTip)
3a19e16d 58};
d098a357 59