Remove obsolete VisualAge-related files.
[wxWidgets.git] / interface / wx / tooltip.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: tooltip.h
3 // Purpose: interface of wxToolTip
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
8 /**
9 @class wxToolTip
10
11 This class holds information about a tooltip associated with a window (see
12 wxWindow::SetToolTip()).
13
14 The four static methods, wxToolTip::Enable(), wxToolTip::SetDelay()
15 wxToolTip::SetAutoPop() and wxToolTip::SetReshow() can be used to globally
16 alter tooltips behaviour.
17
18 @library{wxcore}
19 @category{help}
20 */
21 class wxToolTip : public wxObject
22 {
23 public:
24 /**
25 Constructor.
26 */
27 wxToolTip(const wxString& tip);
28
29 /**
30 Enable or disable tooltips globally.
31
32 @note May not be supported on all platforms (eg. wxCocoa).
33 */
34 static void Enable(bool flag);
35
36 /**
37 Get the tooltip text.
38 */
39 wxString GetTip() const;
40
41 /**
42 Get the associated window.
43 */
44 wxWindow* GetWindow() const;
45
46 /**
47 Set the delay after which the tooltip disappears or how long a tooltip
48 remains visible.
49
50 @note May not be supported on all platforms (eg. wxCocoa, GTK).
51 */
52 static void SetAutoPop(long msecs);
53
54 /**
55 Set the delay after which the tooltip appears.
56
57 @note May not be supported on all platforms (eg. wxCocoa).
58 */
59 static void SetDelay(long msecs);
60
61 /**
62 Set tooltip maximal width in pixels.
63
64 By default, tooltips are wrapped at a suitably chosen width. You can
65 pass -1 as @a width to disable wrapping them completely, 0 to restore
66 the default behaviour or an arbitrary positive value to wrap them at
67 the given width.
68
69 Notice that this function does not change the width of the tooltips
70 created before calling it.
71
72 @note Currently this function is wxMSW-only.
73 */
74 static void SetMaxWidth(int width);
75
76 /**
77 Set the delay between subsequent tooltips to appear.
78
79 @note May not be supported on all platforms (eg. wxCocoa, GTK).
80 */
81 static void SetReshow(long msecs);
82
83 /**
84 Set the tooltip text.
85 */
86 void SetTip(const wxString& tip);
87 };
88