]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/tooltip.h
_MSC_VER => __VISUALC__ change
[wxWidgets.git] / include / wx / msw / tooltip.h
... / ...
CommitLineData
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
12class wxToolTip : public wxObject
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
28 // controlling tooltip behaviour: under MSW, these functions change the
29 // behaviour of the tooltips for all controls in the same frame as this
30 // one (it is an implementation limitation). Also, these functions won't
31 // do anything before the tooltip control is associated with a window, so
32 // SetWindow() should be called first
33 // enable or disable the tooltips globally
34 void Enable(bool flag);
35 // set the delay after which the tooltip appears
36 void SetDelay(long milliseconds);
37
38 // implementation
39 void RelayEvent(WXMSG *msg);
40
41private:
42 // create the tooltip ctrl for our parent frame if it doesn't exist yet
43 // and return its window handle
44 WXHWND GetToolTipCtrl();
45
46 // remove this tooltip from the tooltip control
47 void Remove();
48
49 wxString m_text; // tooltip text
50 wxWindow *m_window; // window we're associated with
51};
52