2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: tipwin.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxTipWindow
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxTipWindow
|
|
|
|
@wxheader{tipwin.h}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
|
|
|
Shows simple text in a popup tip window on creation. This is used by
|
2008-03-08 08:52:38 -05:00
|
|
|
wxSimpleHelpProvider to show popup help. The
|
|
|
|
window automatically destroys itself when the user clicks on it or it loses the
|
|
|
|
focus.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
You may also use this class to emulate the tooltips when you need finer
|
|
|
|
control over them than what the standard tooltips provide.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{managedwnd}
|
|
|
|
*/
|
|
|
|
class wxTipWindow : public wxWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor. The tip is shown immediately after the window is constructed.
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param parent
|
2008-03-09 08:33:59 -04:00
|
|
|
The parent window, must be non-@NULL
|
2008-03-08 09:43:31 -05:00
|
|
|
@param text
|
2008-03-09 08:33:59 -04:00
|
|
|
The text to show, may contain the new line characters
|
2008-03-08 09:43:31 -05:00
|
|
|
@param maxLength
|
2008-03-09 08:33:59 -04:00
|
|
|
The length of each line, in pixels. Set to a very large
|
|
|
|
value to avoid wrapping lines
|
2008-03-08 09:43:31 -05:00
|
|
|
@param windowPtr
|
2008-03-09 08:33:59 -04:00
|
|
|
Simply passed to
|
|
|
|
SetTipWindowPtr below, please see its
|
|
|
|
documentation for the description of this parameter
|
2008-03-08 09:43:31 -05:00
|
|
|
@param rectBounds
|
2008-03-09 08:33:59 -04:00
|
|
|
If non-@NULL, passed to
|
|
|
|
SetBoundingRect below, please see its
|
|
|
|
documentation for the description of this parameter
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxTipWindow(wxWindow* parent, const wxString& text,
|
|
|
|
wxCoord maxLength = 100,
|
|
|
|
wxTipWindow** windowPtr,
|
2008-03-09 08:33:59 -04:00
|
|
|
wxRect* rectBounds = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
By default, the tip window disappears when the user clicks the mouse or presses
|
|
|
|
a keyboard key or if it loses focus in any other way - for example because the
|
|
|
|
user switched to another application window.
|
2008-03-09 08:33:59 -04:00
|
|
|
Additionally, if a non-empty @a rectBound is provided, the tip window will
|
2008-03-08 08:52:38 -05:00
|
|
|
also automatically close if the mouse leaves this area. This is useful to
|
|
|
|
dismiss the tip mouse when the mouse leaves the object it is associated with.
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param rectBound
|
2008-03-09 08:33:59 -04:00
|
|
|
The bounding rectangle for the mouse in the screen coordinates
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SetBoundingRect(const wxRect& rectBound);
|
|
|
|
|
|
|
|
/**
|
|
|
|
When the tip window closes itself (which may happen at any moment and
|
2008-03-08 09:43:31 -05:00
|
|
|
unexpectedly to the caller) it may @NULL out the pointer pointed to by
|
2008-03-08 08:52:38 -05:00
|
|
|
@e it windowPtr. This is helpful to avoid dereferencing the tip window which
|
|
|
|
had been already closed and deleted.
|
|
|
|
*/
|
|
|
|
void SetTipWindowPtr(wxTipWindow** windowPtr);
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|