1999-07-29 01:11:30 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: msw/tooltip.h
|
|
|
|
// Purpose: wxToolTip class - tooltip control
|
1999-10-17 23:30:47 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-17 23:30:47 -04:00
|
|
|
// Created: 10/17/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-17 23:30:47 -04:00
|
|
|
// Copyright: (c) David Webster
|
2003-03-17 05:34:04 -05:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
class wxToolTip : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// ctor & dtor
|
2002-07-09 18:02:07 -04:00
|
|
|
wxToolTip(const wxString &rsTip);
|
1999-07-29 01:11:30 -04:00
|
|
|
virtual ~wxToolTip();
|
|
|
|
|
2002-07-09 18:02:07 -04:00
|
|
|
//
|
|
|
|
// Accessors
|
|
|
|
//
|
|
|
|
inline const wxString& GetTip(void) const { return m_sText; }
|
|
|
|
inline wxWindow* GetWindow(void) const { return m_pWindow; }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-07-09 18:02:07 -04:00
|
|
|
void SetTip(const wxString& rsTip);
|
|
|
|
inline void SetWindow(wxWindow* pWin) { m_pWindow = pWin; }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2003-10-03 12:58:17 -04:00
|
|
|
// controlling tooltip behaviour: globally change tooltip parameters
|
|
|
|
// enable or disable the tooltips globally
|
|
|
|
static void Enable(bool flag) {}
|
|
|
|
// set the delay after which the tooltip appears
|
|
|
|
static void SetDelay(long milliseconds) {}
|
|
|
|
|
2002-07-09 18:02:07 -04:00
|
|
|
//
|
|
|
|
// Implementation
|
|
|
|
//
|
|
|
|
void DisplayToolTipWindow(const wxPoint& rPos);
|
|
|
|
void HideToolTipWindow(void);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
private:
|
2002-07-09 18:02:07 -04:00
|
|
|
void Create(const wxString &rsTip);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-07-09 18:02:07 -04:00
|
|
|
HWND m_hWnd;
|
|
|
|
wxString m_sText; // tooltip text
|
|
|
|
wxWindow* m_pWindow; // window we're associated with
|
|
|
|
}; // end of CLASS wxToolTip
|
1999-07-29 01:11:30 -04:00
|
|
|
|