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