]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/tooltip.h
Added wxWindow::GTKHandleRealized() virtual method to wxGTK.
[wxWidgets.git] / include / wx / gtk / tooltip.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/tooltip.h
3 // Purpose: wxToolTip class
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTKTOOLTIP_H_
11 #define _WX_GTKTOOLTIP_H_
12
13 #include "wx/string.h"
14 #include "wx/object.h"
15
16 //-----------------------------------------------------------------------------
17 // forward declarations
18 //-----------------------------------------------------------------------------
19
20 class WXDLLIMPEXP_FWD_CORE wxWindow;
21
22 //-----------------------------------------------------------------------------
23 // wxToolTip
24 //-----------------------------------------------------------------------------
25
26 class WXDLLIMPEXP_CORE wxToolTip : public wxObject
27 {
28 public:
29 wxToolTip( const wxString &tip );
30
31 // globally change the tooltip parameters
32 static void Enable( bool flag );
33 static void SetDelay( long msecs );
34 // set the delay after which the tooltip disappears or how long the tooltip remains visible
35 static void SetAutoPop(long msecs);
36 // set the delay between subsequent tooltips to appear
37 static void SetReshow(long msecs);
38
39 // get/set the tooltip text
40 void SetTip( const wxString &tip );
41 wxString GetTip() const { return m_text; }
42
43 wxWindow *GetWindow() const { return m_window; }
44
45 // Implementation
46 void GTKSetWindow(wxWindow* win);
47 static void GTKApply(GtkWidget* widget, const char* tip);
48
49 private:
50 wxString m_text;
51 wxWindow *m_window;
52
53 DECLARE_ABSTRACT_CLASS(wxToolTip)
54 };
55
56 #endif // _WX_GTKTOOLTIP_H_