1999-01-25 13:57:06 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: 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$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
1999-02-01 14:40:53 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-01-25 13:57:06 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKTOOLTIPH__
|
|
|
|
#define __GTKTOOLTIPH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1999-02-01 14:40:53 +00:00
|
|
|
#pragma interface
|
1999-01-25 13:57:06 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
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
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxToolTip;
|
1999-02-01 14:40:53 +00:00
|
|
|
class wxWindow;
|
1999-01-25 13:57:06 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxToolTip
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-02-01 14:40:53 +00:00
|
|
|
class wxToolTip : public wxObject
|
1999-01-25 13:57:06 +00:00
|
|
|
{
|
|
|
|
public:
|
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 );
|
1999-01-25 13:57:06 +00:00
|
|
|
|
1999-02-01 14:40:53 +00:00
|
|
|
wxToolTip( const wxString &tip );
|
|
|
|
|
|
|
|
// get/set the tooltip text
|
|
|
|
void SetTip( const wxString &tip );
|
|
|
|
wxString GetTip() const { return m_text; }
|
|
|
|
|
|
|
|
wxWindow *GetWindow() const { return m_window; }
|
|
|
|
bool IsOk() const { return m_window != NULL; }
|
|
|
|
|
|
|
|
// implementation
|
|
|
|
void Apply( wxWindow *win );
|
|
|
|
|
|
|
|
private:
|
1999-01-27 17:15:34 +00:00
|
|
|
wxString m_text;
|
1999-02-01 06:44:35 +00:00
|
|
|
wxWindow *m_window;
|
1999-01-25 13:57:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKTOOLTIPH__
|