GTK prefix for internal tooltip methods
[wxWidgets.git] / include / wx / gtk / tooltip.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 __GTKTOOLTIPH__
11 #define __GTKTOOLTIPH__
12
13 #include "wx/defs.h"
14 #include "wx/string.h"
15 #include "wx/object.h"
16
17 //-----------------------------------------------------------------------------
18 // forward declarations
19 //-----------------------------------------------------------------------------
20
21 class WXDLLIMPEXP_FWD_CORE wxToolTip;
22 class WXDLLIMPEXP_FWD_CORE wxWindow;
23
24 //-----------------------------------------------------------------------------
25 // wxToolTip
26 //-----------------------------------------------------------------------------
27
28 class WXDLLIMPEXP_CORE wxToolTip : public wxObject
29 {
30 public:
31 wxToolTip( const wxString &tip );
32
33 // globally change the tooltip parameters
34 static void Enable( bool flag );
35 static void SetDelay( long msecs );
36 // set the delay after which the tooltip disappears or how long the tooltip remains visible
37 static void SetAutoPop(long msecs);
38 // set the delay between subsequent tooltips to appear
39 static void SetReshow(long msecs);
40
41 // get/set the tooltip text
42 void SetTip( const wxString &tip );
43 wxString GetTip() const { return m_text; }
44
45 wxWindow *GetWindow() const { return m_window; }
46 bool IsOk() const { return m_window != NULL; }
47
48
49 // this forwards back to wxWindow::GTKApplyToolTip()
50 void GTKApply( wxWindow *win );
51
52 // this just sets the given tooltip for the specified widget
53 // tip must be UTF-8 encoded
54 static void GTKApply(GtkWidget *w, const gchar *tip);
55
56 private:
57 wxString m_text;
58 wxWindow *m_window;
59
60 DECLARE_ABSTRACT_CLASS(wxToolTip)
61 };
62
63 #endif // __GTKTOOLTIPH__