]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/tooltip.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxToolTip
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 This class holds information about a tooltip associated with a window (see
13 wxWindow::SetToolTip()).
15 The four static methods, wxToolTip::Enable(), wxToolTip::SetDelay()
16 wxToolTip::SetAutoPop() and wxToolTip::SetReshow() can be used to globally
17 alter tooltips behaviour.
22 class wxToolTip
: public wxObject
28 wxToolTip(const wxString
& tip
);
31 Enable or disable tooltips globally.
33 @note May not be supported on all platforms (eg. wxCocoa).
35 static void Enable(bool flag
);
40 wxString
GetTip() const;
43 Get the associated window.
45 wxWindow
* GetWindow() const;
48 Set the delay after which the tooltip disappears or how long a tooltip
51 @note May not be supported on all platforms (eg. wxCocoa, GTK).
53 static void SetAutoPop(long msecs
);
56 Set the delay after which the tooltip appears.
58 @note May not be supported on all platforms (eg. wxCocoa).
60 static void SetDelay(long msecs
);
63 Set tooltip maximal width in pixels.
65 By default, tooltips are wrapped at a suitably chosen width. You can
66 pass -1 as @a width to disable wrapping them completely, 0 to restore
67 the default behaviour or an arbitrary positive value to wrap them at
70 Notice that this function does not change the width of the tooltips
71 created before calling it.
73 @note Currently this function is wxMSW-only.
75 static void SetMaxWidth(int width
);
78 Set the delay between subsequent tooltips to appear.
80 @note May not be supported on all platforms (eg. wxCocoa, GTK).
82 static void SetReshow(long msecs
);
87 void SetTip(const wxString
& tip
);