]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/tooltip.h
added wxUSE_COMBOBCONTROL and wxUSE_OWNERDRAWNCOMBOBOX to wx/setup.h files
[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
65571936 9// Licence: wxWindows licence
3a19e16d
VZ
10///////////////////////////////////////////////////////////////////////////////
11
20ceebaa
MW
12#ifndef _WX_MSW_TOOLTIP_H_
13#define _WX_MSW_TOOLTIP_H_
14
4a6b1d28
VZ
15#include "wx/object.h"
16
6f4968e2 17class WXDLLEXPORT wxToolTip : public wxObject
3a19e16d
VZ
18{
19public:
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
16f6dfd8 33 // controlling tooltip behaviour: globally change tooltip parameters
3a19e16d 34 // enable or disable the tooltips globally
16f6dfd8 35 static void Enable(bool flag);
3a19e16d 36 // set the delay after which the tooltip appears
16f6dfd8 37 static void SetDelay(long milliseconds);
3a19e16d 38
8614c467
VZ
39 // implementation only from now on
40 // -------------------------------
41
42 // should be called in responde to WM_MOUSEMOVE
4453b38d 43 static void RelayEvent(WXMSG *msg);
3a19e16d 44
1306e7d6
VZ
45 // add a window to the tooltip control
46 void Add(WXHWND hwnd);
47
0c5405b7
VZ
48 // remove any tooltip from the window
49 static void Remove(WXHWND hwnd);
50
3a19e16d 51private:
8614c467
VZ
52 // the one and only one tooltip control we use - never access it directly
53 // but use GetToolTipCtrl() which will create it when needed
f048e32f
VZ
54 static WXHWND ms_hwndTT;
55
56 // create the tooltip ctrl if it doesn't exist yet and return its HWND
8614c467 57 static WXHWND GetToolTipCtrl();
3a19e16d
VZ
58
59 // remove this tooltip from the tooltip control
60 void Remove();
61
62 wxString m_text; // tooltip text
63 wxWindow *m_window; // window we're associated with
b342f8f0
RD
64
65 DECLARE_ABSTRACT_CLASS(wxToolTip)
22f3361e 66 DECLARE_NO_COPY_CLASS(wxToolTip)
3a19e16d 67};
d098a357 68
20ceebaa 69#endif // _WX_MSW_TOOLTIP_H_