]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/tipwin.h
minor corrections: document typeDefault, remove text copied from the header (closes...
[wxWidgets.git] / interface / wx / tipwin.h
CommitLineData
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
7c913512 11
78e87bf7
FM
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
15 loses the focus.
7c913512 16
23324ae1
FM
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.
7c913512 19
23324ae1
FM
20 @library{wxcore}
21 @category{managedwnd}
22*/
23class wxTipWindow : public wxWindow
24{
25public:
26 /**
27 Constructor. The tip is shown immediately after the window is constructed.
3c4f71cc 28
7c913512 29 @param parent
4cc4bfaf 30 The parent window, must be non-@NULL
7c913512 31 @param text
4cc4bfaf 32 The text to show, may contain the new line characters
7c913512 33 @param maxLength
4cc4bfaf
FM
34 The length of each line, in pixels. Set to a very large
35 value to avoid wrapping lines
7c913512 36 @param windowPtr
78e87bf7 37 Simply passed to SetTipWindowPtr() below, please see its
4cc4bfaf 38 documentation for the description of this parameter
7c913512 39 @param rectBounds
78e87bf7 40 If non-@NULL, passed to SetBoundingRect() below, please see its
4cc4bfaf 41 documentation for the description of this parameter
23324ae1
FM
42 */
43 wxTipWindow(wxWindow* parent, const wxString& text,
44 wxCoord maxLength = 100,
a6052817 45 wxTipWindow** windowPtr = NULL,
4cc4bfaf 46 wxRect* rectBounds = NULL);
23324ae1
FM
47
48 /**
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.
78e87bf7 52
4cc4bfaf 53 Additionally, if a non-empty @a rectBound is provided, the tip window will
23324ae1
FM
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.
3c4f71cc 56
7c913512 57 @param rectBound
4cc4bfaf 58 The bounding rectangle for the mouse in the screen coordinates
23324ae1
FM
59 */
60 void SetBoundingRect(const wxRect& rectBound);
61
62 /**
63 When the tip window closes itself (which may happen at any moment and
7c913512 64 unexpectedly to the caller) it may @NULL out the pointer pointed to by
78e87bf7 65 @a windowPtr. This is helpful to avoid dereferencing the tip window which
23324ae1
FM
66 had been already closed and deleted.
67 */
68 void SetTipWindowPtr(wxTipWindow** windowPtr);
69};
e54c96f1 70