2004-10-06 17:09:47 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: cocoa/tooltip.h
|
|
|
|
// Purpose: wxToolTip class - tooltip control
|
|
|
|
// Author: Ryan Norton
|
|
|
|
// Modified by:
|
|
|
|
// Created: 31.01.99
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Ryan Norton
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "wx/object.h"
|
|
|
|
|
2004-10-07 21:26:43 -04:00
|
|
|
class wxWindow;
|
|
|
|
|
2004-10-06 17:09:47 -04:00
|
|
|
class wxToolTip : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// ctor & dtor
|
2004-10-07 21:26:43 -04:00
|
|
|
wxToolTip(const wxString &tip);
|
|
|
|
virtual ~wxToolTip();
|
2004-10-06 17:09:47 -04:00
|
|
|
|
|
|
|
// accessors
|
|
|
|
// tip text
|
2004-10-07 21:26:43 -04:00
|
|
|
void SetTip(const wxString& tip);
|
|
|
|
const wxString& GetTip() const;
|
2004-10-06 17:09:47 -04:00
|
|
|
|
|
|
|
// the window we're associated with
|
2004-10-07 21:26:43 -04:00
|
|
|
wxWindow *GetWindow() const;
|
2004-10-06 17:09:47 -04:00
|
|
|
|
|
|
|
// controlling tooltip behaviour: globally change tooltip parameters
|
|
|
|
// enable or disable the tooltips globally
|
2004-10-07 21:26:43 -04:00
|
|
|
static void Enable(bool flag);
|
2004-10-06 17:09:47 -04:00
|
|
|
// set the delay after which the tooltip appears
|
2004-10-07 21:26:43 -04:00
|
|
|
static void SetDelay(long milliseconds);
|
2004-10-06 17:09:47 -04:00
|
|
|
|
|
|
|
private:
|
2004-10-07 21:26:43 -04:00
|
|
|
void SetWindow(wxWindow* window);
|
|
|
|
|
2004-10-06 17:09:47 -04:00
|
|
|
friend class wxWindow;
|
|
|
|
|
|
|
|
wxString m_text; // tooltip text
|
|
|
|
wxWindow *m_window; // window we're associated with
|
|
|
|
|
|
|
|
DECLARE_ABSTRACT_CLASS(wxToolTip)
|
|
|
|
};
|