]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/tooltip.h
remove wxComboBox-specific hack, override DoSetToolTip() in wxComboBox itself instead
[wxWidgets.git] / include / wx / gtk / tooltip.h
CommitLineData
90b1b133
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: tooltip.h
ff8bfdbb 3// Purpose: wxToolTip class
90b1b133
RR
4// Author: Robert Roebling
5// Id: $Id$
371a5b4e 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
90b1b133
RR
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKTOOLTIPH__
11#define __GTKTOOLTIPH__
12
90b1b133 13#include "wx/defs.h"
ff8bfdbb 14#include "wx/string.h"
90b1b133 15#include "wx/object.h"
90b1b133
RR
16
17//-----------------------------------------------------------------------------
ff8bfdbb 18// forward declarations
90b1b133
RR
19//-----------------------------------------------------------------------------
20
b5dbe15d
VS
21class WXDLLIMPEXP_FWD_CORE wxToolTip;
22class WXDLLIMPEXP_FWD_CORE wxWindow;
90b1b133
RR
23
24//-----------------------------------------------------------------------------
25// wxToolTip
26//-----------------------------------------------------------------------------
27
20123d49 28class WXDLLIMPEXP_CORE wxToolTip : public wxObject
90b1b133
RR
29{
30public:
f7ce0e4a
VZ
31 wxToolTip( const wxString &tip );
32
ff8bfdbb 33 // globally change the tooltip parameters
301cd871
RR
34 static void Enable( bool flag );
35 static void SetDelay( long msecs );
becac1ef
VZ
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);
90b1b133 40
ff8bfdbb
VZ
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
f7ce0e4a
VZ
48
49 // wxGTK-only from now on
50
51 // this forwards back to wxWindow::ApplyToolTip()
ff8bfdbb
VZ
52 void Apply( wxWindow *win );
53
f7ce0e4a
VZ
54 // this just sets the given tooltip for the specified widget
55 //
56 // tip must be already UTF-8 encoded
6e5f6c7c 57 static void Apply(GtkWidget *w, const gchar *tip);
f7ce0e4a 58
ff8bfdbb 59private:
b1170810 60 wxString m_text;
301cd871 61 wxWindow *m_window;
b342f8f0
RD
62
63 DECLARE_ABSTRACT_CLASS(wxToolTip)
90b1b133
RR
64};
65
66#endif // __GTKTOOLTIPH__