]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/tooltip.h
compilation fix for raw bitmaps (can't include wx/rawbmp.h from wx/bitmap.h as the...
[wxWidgets.git] / include / wx / palmos / tooltip.h
CommitLineData
ffecfa5a 1///////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/tooltip.h
ffecfa5a 3// Purpose: wxToolTip class - tooltip control
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12class WXDLLEXPORT 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: globally change tooltip parameters
29 // enable or disable the tooltips globally
30 static void Enable(bool flag);
31 // set the delay after which the tooltip appears
32 static void SetDelay(long milliseconds);
33
34 // implementation only from now on
35 // -------------------------------
36
37 // should be called in responde to WM_MOUSEMOVE
38 void RelayEvent(WXMSG *msg);
39
40private:
41 // the one and only one tooltip control we use - never access it directly
42 // but use GetToolTipCtrl() which will create it when needed
43 static WXHWND ms_hwndTT;
44
45 // create the tooltip ctrl if it doesn't exist yet and return its HWND
46 static WXHWND GetToolTipCtrl();
47
48 // remove this tooltip from the tooltip control
49 void Remove();
50
51 // add a window to the tooltip control
52 void Add(WXHWND hwnd);
53
54 wxString m_text; // tooltip text
55 wxWindow *m_window; // window we're associated with
56
57 DECLARE_ABSTRACT_CLASS(wxToolTip)
58 DECLARE_NO_COPY_CLASS(wxToolTip)
59};
60