]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: tipwin.h | |
e54c96f1 | 3 | // Purpose: interface of wxTipWindow |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxTipWindow | |
11 | @wxheader{tipwin.h} | |
7c913512 FM |
12 | |
13 | Shows simple text in a popup tip window on creation. This is used by | |
23324ae1 FM |
14 | wxSimpleHelpProvider to show popup help. The |
15 | window automatically destroys itself when the user clicks on it or it loses the | |
16 | focus. | |
7c913512 | 17 | |
23324ae1 FM |
18 | You may also use this class to emulate the tooltips when you need finer |
19 | control over them than what the standard tooltips provide. | |
7c913512 | 20 | |
23324ae1 FM |
21 | @library{wxcore} |
22 | @category{managedwnd} | |
23 | */ | |
24 | class wxTipWindow : public wxWindow | |
25 | { | |
26 | public: | |
27 | /** | |
28 | Constructor. The tip is shown immediately after the window is constructed. | |
3c4f71cc | 29 | |
7c913512 | 30 | @param parent |
4cc4bfaf | 31 | The parent window, must be non-@NULL |
7c913512 | 32 | @param text |
4cc4bfaf | 33 | The text to show, may contain the new line characters |
7c913512 | 34 | @param maxLength |
4cc4bfaf FM |
35 | The length of each line, in pixels. Set to a very large |
36 | value to avoid wrapping lines | |
7c913512 | 37 | @param windowPtr |
4cc4bfaf FM |
38 | Simply passed to |
39 | SetTipWindowPtr below, please see its | |
40 | documentation for the description of this parameter | |
7c913512 | 41 | @param rectBounds |
4cc4bfaf FM |
42 | If non-@NULL, passed to |
43 | SetBoundingRect below, please see its | |
44 | documentation for the description of this parameter | |
23324ae1 FM |
45 | */ |
46 | wxTipWindow(wxWindow* parent, const wxString& text, | |
47 | wxCoord maxLength = 100, | |
48 | wxTipWindow** windowPtr, | |
4cc4bfaf | 49 | wxRect* rectBounds = NULL); |
23324ae1 FM |
50 | |
51 | /** | |
52 | By default, the tip window disappears when the user clicks the mouse or presses | |
53 | a keyboard key or if it loses focus in any other way - for example because the | |
54 | user switched to another application window. | |
4cc4bfaf | 55 | Additionally, if a non-empty @a rectBound is provided, the tip window will |
23324ae1 FM |
56 | also automatically close if the mouse leaves this area. This is useful to |
57 | dismiss the tip mouse when the mouse leaves the object it is associated with. | |
3c4f71cc | 58 | |
7c913512 | 59 | @param rectBound |
4cc4bfaf | 60 | The bounding rectangle for the mouse in the screen coordinates |
23324ae1 FM |
61 | */ |
62 | void SetBoundingRect(const wxRect& rectBound); | |
63 | ||
64 | /** | |
65 | When the tip window closes itself (which may happen at any moment and | |
7c913512 | 66 | unexpectedly to the caller) it may @NULL out the pointer pointed to by |
23324ae1 FM |
67 | @e it windowPtr. This is helpful to avoid dereferencing the tip window which |
68 | had been already closed and deleted. | |
69 | */ | |
70 | void SetTipWindowPtr(wxTipWindow** windowPtr); | |
71 | }; | |
e54c96f1 | 72 |