1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/tooltip.h
3 // Purpose: wxToolTip class - tooltip control
4 // Author: Stefan Csomor
7 // Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin, Stefan Csomor
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MAC_TOOLTIP_H_
12 #define _WX_MAC_TOOLTIP_H_
14 #include "wx/string.h"
17 class WXDLLIMPEXP_CORE wxToolTip
: public wxObject
21 wxToolTip(const wxString
&tip
);
26 void SetTip(const wxString
& tip
);
27 const wxString
& GetTip() const { return m_text
; }
29 // the window we're associated with
30 void SetWindow(wxWindow
*win
);
31 wxWindow
*GetWindow() const { return m_window
; }
33 // controlling tooltip behaviour: globally change tooltip parameters
34 // enable or disable the tooltips globally
35 static void Enable(bool flag
);
36 // set the delay after which the tooltip appears
37 static void SetDelay(long milliseconds
);
38 // set the delay after which the tooltip disappears or how long the tooltip remains visible
39 static void SetAutoPop(long milliseconds
);
40 // set the delay between subsequent tooltips to appear
41 static void SetReshow(long milliseconds
);
42 static void NotifyWindowDelete( WXHWND win
) ;
44 // implementation only from now on
45 // -------------------------------
47 // should be called in response to mouse events
48 static void RelayEvent(wxWindow
*win
, wxMouseEvent
&event
);
49 static void RemoveToolTips();
52 wxString m_text
; // tooltip text
53 wxWindow
*m_window
; // window we're associated with
54 DECLARE_ABSTRACT_CLASS(wxToolTip
)
57 #endif // _WX_MAC_TOOLTIP_H_