1999-01-25 13:57:06 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-20 00:14:35 +00:00
|
|
|
// Name: wx/gtk/tooltip.h
|
1999-02-01 14:40:53 +00:00
|
|
|
// Purpose: wxToolTip class
|
1999-01-25 13:57:06 +00:00
|
|
|
// Author: Robert Roebling
|
|
|
|
// Id: $Id$
|
2003-03-17 10:34:04 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-01-25 13:57:06 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-03-23 17:36:10 +00:00
|
|
|
#ifndef _WX_GTKTOOLTIP_H_
|
|
|
|
#define _WX_GTKTOOLTIP_H_
|
1999-01-25 13:57:06 +00:00
|
|
|
|
1999-02-01 14:40:53 +00:00
|
|
|
#include "wx/string.h"
|
1999-01-25 13:57:06 +00:00
|
|
|
#include "wx/object.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
1999-02-01 14:40:53 +00:00
|
|
|
// forward declarations
|
1999-01-25 13:57:06 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
1999-01-25 13:57:06 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxToolTip
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxToolTip : public wxObject
|
1999-01-25 13:57:06 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-05-04 23:34:10 +00:00
|
|
|
wxToolTip( const wxString &tip );
|
|
|
|
|
1999-02-01 14:40:53 +00:00
|
|
|
// globally change the tooltip parameters
|
1999-02-01 06:44:35 +00:00
|
|
|
static void Enable( bool flag );
|
|
|
|
static void SetDelay( long msecs );
|
2007-08-15 12:57:36 +00:00
|
|
|
// set the delay after which the tooltip disappears or how long the tooltip remains visible
|
|
|
|
static void SetAutoPop(long msecs);
|
|
|
|
// set the delay between subsequent tooltips to appear
|
|
|
|
static void SetReshow(long msecs);
|
1999-01-25 13:57:06 +00:00
|
|
|
|
1999-02-01 14:40:53 +00:00
|
|
|
// get/set the tooltip text
|
|
|
|
void SetTip( const wxString &tip );
|
|
|
|
wxString GetTip() const { return m_text; }
|
|
|
|
|
|
|
|
wxWindow *GetWindow() const { return m_window; }
|
|
|
|
|
2011-03-23 17:36:10 +00:00
|
|
|
// Implementation
|
|
|
|
void GTKSetWindow(wxWindow* win);
|
|
|
|
static void GTKApply(GtkWidget* widget, const char* tip);
|
2006-05-04 23:34:10 +00:00
|
|
|
|
1999-02-01 14:40:53 +00:00
|
|
|
private:
|
1999-01-27 17:15:34 +00:00
|
|
|
wxString m_text;
|
1999-02-01 06:44:35 +00:00
|
|
|
wxWindow *m_window;
|
2001-07-14 03:23:30 +00:00
|
|
|
|
|
|
|
DECLARE_ABSTRACT_CLASS(wxToolTip)
|
1999-01-25 13:57:06 +00:00
|
|
|
};
|
|
|
|
|
2011-03-23 17:36:10 +00:00
|
|
|
#endif // _WX_GTKTOOLTIP_H_
|