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