]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/tipwin.h
36d7834ec0d868cf16866ca1b6aab90373a50c88
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxTipWindow
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 Shows simple text in a popup tip window on creation.
13 This is used by wxSimpleHelpProvider to show popup help.
14 The window automatically destroys itself when the user clicks on it or it
17 You may also use this class to emulate the tooltips when you need finer
18 control over them than what the standard tooltips provide.
23 class wxTipWindow
: public wxWindow
27 Constructor. The tip is shown immediately after the window is constructed.
30 The parent window, must be non-@NULL
32 The text to show, may contain the new line characters
34 The length of each line, in pixels. Set to a very large
35 value to avoid wrapping lines
37 Simply passed to SetTipWindowPtr() below, please see its
38 documentation for the description of this parameter
40 If non-@NULL, passed to SetBoundingRect() below, please see its
41 documentation for the description of this parameter
43 wxTipWindow(wxWindow
* parent
, const wxString
& text
,
44 wxCoord maxLength
= 100,
45 wxTipWindow
** windowPtr
= NULL
,
46 wxRect
* rectBounds
= NULL
);
49 By default, the tip window disappears when the user clicks the mouse or presses
50 a keyboard key or if it loses focus in any other way - for example because the
51 user switched to another application window.
53 Additionally, if a non-empty @a rectBound is provided, the tip window will
54 also automatically close if the mouse leaves this area. This is useful to
55 dismiss the tip mouse when the mouse leaves the object it is associated with.
58 The bounding rectangle for the mouse in the screen coordinates
60 void SetBoundingRect(const wxRect
& rectBound
);
63 When the tip window closes itself (which may happen at any moment and
64 unexpectedly to the caller) it may @NULL out the pointer pointed to by
65 @a windowPtr. This is helpful to avoid dereferencing the tip window which
66 had been already closed and deleted.
68 void SetTipWindowPtr(wxTipWindow
** windowPtr
);