2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: tooltip.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxToolTip
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxToolTip
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-05-08 20:46:34 +00:00
|
|
|
This class holds information about a tooltip associated with a window (see
|
|
|
|
wxWindow::SetToolTip()).
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-05-08 20:46:34 +00:00
|
|
|
The four static methods, wxToolTip::Enable(), wxToolTip::SetDelay()
|
|
|
|
wxToolTip::SetAutoPop() and wxToolTip::SetReshow() can be used to globally
|
2008-03-08 13:52:38 +00:00
|
|
|
alter tooltips behaviour.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxcore}
|
|
|
|
@category{help}
|
|
|
|
*/
|
|
|
|
class wxToolTip : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxToolTip(const wxString& tip);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Enable or disable tooltips globally.
|
2008-05-08 20:46:34 +00:00
|
|
|
|
|
|
|
@note May not be supported on all platforms (eg. wxCocoa).
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
static void Enable(bool flag);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the tooltip text.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
wxString GetTip() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the associated window.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
wxWindow* GetWindow() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-05-08 20:46:34 +00:00
|
|
|
Set the delay after which the tooltip disappears or how long a tooltip
|
|
|
|
remains visible.
|
|
|
|
|
|
|
|
@note May not be supported on all platforms (eg. wxCocoa, GTK, Palmos).
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
static void SetAutoPop(long msecs);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Set the delay after which the tooltip appears.
|
2008-05-08 20:46:34 +00:00
|
|
|
|
|
|
|
@note May not be supported on all platforms (eg. wxCocoa).
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
static void SetDelay(long msecs);
|
|
|
|
|
2009-01-23 13:26:20 +00:00
|
|
|
/**
|
|
|
|
Set tooltip maximal width in pixels.
|
|
|
|
|
|
|
|
By default, tooltips are wrapped at a suitably chosen width. You can
|
|
|
|
pass -1 as @a width to disable wrapping them completely, 0 to restore
|
|
|
|
the default behaviour or an arbitrary positive value to wrap them at
|
|
|
|
the given width.
|
|
|
|
|
|
|
|
Notice that this function does not change the width of the tooltips
|
|
|
|
created before calling it.
|
|
|
|
|
|
|
|
@note Currently this function is wxMSW-only.
|
|
|
|
*/
|
2009-02-01 19:56:06 +00:00
|
|
|
static void SetMaxWidth(int width);
|
2009-01-23 13:26:20 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
Set the delay between subsequent tooltips to appear.
|
2008-05-08 20:46:34 +00:00
|
|
|
|
|
|
|
@note May not be supported on all platforms (eg. wxCocoa, GTK, Palmos).
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
static void SetReshow(long msecs);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Set the tooltip text.
|
|
|
|
*/
|
|
|
|
void SetTip(const wxString& tip);
|
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|