]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/tooltip.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk1/tooltip.cpp
3 // Purpose: wxToolTip implementation
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // For compilers that support precompilation, includes "wx.h".
10 #include "wx/wxprec.h"
14 #include "wx/tooltip.h"
17 #include "wx/window.h"
20 #include "wx/gtk1/private.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
26 static GtkTooltips
*ss_tooltips
= NULL
;
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 IMPLEMENT_ABSTRACT_CLASS(wxToolTip
, wxObject
)
34 wxToolTip::wxToolTip( const wxString
&tip
)
40 void wxToolTip::SetTip( const wxString
&tip
)
46 void wxToolTip::Apply( wxWindow
*win
)
52 ss_tooltips
= gtk_tooltips_new();
58 m_window
->ApplyToolTip( ss_tooltips
, NULL
);
60 m_window
->ApplyToolTip( ss_tooltips
, m_text
);
63 void wxToolTip::Enable( bool flag
)
65 if (!ss_tooltips
) return;
68 gtk_tooltips_enable( ss_tooltips
);
70 gtk_tooltips_disable( ss_tooltips
);
73 void wxToolTip::SetDelay( long msecs
)
78 gtk_tooltips_set_delay( ss_tooltips
, (int)msecs
);
81 void wxToolTip::SetAutoPop( long WXUNUSED(msecs
) )
85 void wxToolTip::SetReshow( long WXUNUSED(msecs
) )