1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxToolTip class
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKTOOLTIPH__
11 #define __GTKTOOLTIPH__
14 #include "wx/string.h"
15 #include "wx/object.h"
17 //-----------------------------------------------------------------------------
18 // forward declarations
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_FWD_CORE wxToolTip
;
22 class WXDLLIMPEXP_FWD_CORE wxWindow
;
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
28 class WXDLLIMPEXP_CORE wxToolTip
: public wxObject
31 wxToolTip( const wxString
&tip
);
33 // globally change the tooltip parameters
34 static void Enable( bool flag
);
35 static void SetDelay( long msecs
);
37 // get/set the tooltip text
38 void SetTip( const wxString
&tip
);
39 wxString
GetTip() const { return m_text
; }
41 wxWindow
*GetWindow() const { return m_window
; }
42 bool IsOk() const { return m_window
!= NULL
; }
45 // wxGTK-only from now on
47 // this forwards back to wxWindow::ApplyToolTip()
48 void Apply( wxWindow
*win
);
50 // this just sets the given tooltip for the specified widget
52 // tip must be already UTF-8 encoded
53 static void Apply(GtkWidget
*w
, const gchar
*tip
);
59 DECLARE_ABSTRACT_CLASS(wxToolTip
)
62 #endif // __GTKTOOLTIPH__