]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/tooltip.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/tooltip.h
3 // Purpose: wxToolTip class - tooltip control
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_PALMOS_TOOLTIP_H_
13 #define _WX_PALMOS_TOOLTIP_H_
15 class WXDLLEXPORT wxToolTip
: public wxObject
19 wxToolTip(const wxString
&tip
);
24 void SetTip(const wxString
& tip
);
25 const wxString
& GetTip() const { return m_text
; }
27 // the window we're associated with
28 void SetWindow(wxWindow
*win
);
29 wxWindow
*GetWindow() const { return m_window
; }
31 // controlling tooltip behaviour: globally change tooltip parameters
32 // enable or disable the tooltips globally
33 static void Enable(bool flag
);
34 // set the delay after which the tooltip appears
35 static void SetDelay(long milliseconds
);
37 // implementation only from now on
38 // -------------------------------
40 // should be called in responde to WM_MOUSEMOVE
41 void RelayEvent(WXMSG
*msg
);
44 // the one and only one tooltip control we use - never access it directly
45 // but use GetToolTipCtrl() which will create it when needed
46 static WXHWND ms_hwndTT
;
48 // create the tooltip ctrl if it doesn't exist yet and return its HWND
49 static WXHWND
GetToolTipCtrl();
51 // remove this tooltip from the tooltip control
54 // add a window to the tooltip control
55 void Add(WXHWND hwnd
);
57 wxString m_text
; // tooltip text
58 wxWindow
*m_window
; // window we're associated with
60 DECLARE_ABSTRACT_CLASS(wxToolTip
)
61 DECLARE_NO_COPY_CLASS(wxToolTip
)
64 #endif // _WX_PALMOS_TOOLTIP_H_