]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/tooltip.cpp
bf98adb334f135d2dc4a5d803d022aef61198fb3
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk1/tooltip.cpp
3 // Purpose: wxToolTip implementation
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
15 #include "wx/tooltip.h"
18 #include "wx/window.h"
21 #include "wx/gtk1/private.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
27 static GtkTooltips
*ss_tooltips
= NULL
;
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 IMPLEMENT_ABSTRACT_CLASS(wxToolTip
, wxObject
)
35 wxToolTip::wxToolTip( const wxString
&tip
)
41 void wxToolTip::SetTip( const wxString
&tip
)
47 void wxToolTip::Apply( wxWindow
*win
)
53 ss_tooltips
= gtk_tooltips_new();
59 m_window
->ApplyToolTip( ss_tooltips
, NULL
);
61 m_window
->ApplyToolTip( ss_tooltips
, m_text
);
64 void wxToolTip::Enable( bool flag
)
66 if (!ss_tooltips
) return;
69 gtk_tooltips_enable( ss_tooltips
);
71 gtk_tooltips_disable( ss_tooltips
);
74 void wxToolTip::SetDelay( long msecs
)
79 gtk_tooltips_set_delay( ss_tooltips
, (int)msecs
);
82 void wxToolTip::SetAutoPop( long WXUNUSED(msecs
) )
86 void wxToolTip::SetReshow( long WXUNUSED(msecs
) )