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
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2005-09-25 16:49:40 -04:00
|
|
|
#ifndef _WX_COCOA_TOOLTIP_H_
|
|
|
|
#define _WX_COCOA_TOOLTIP_H_
|
|
|
|
|
2004-10-06 17:09:47 -04:00
|
|
|
#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);
|
2007-08-15 08:57:36 -04:00
|
|
|
// set the delay after which the tooltip disappears or how long the tooltip remains visible
|
|
|
|
static void SetAutoPop(long milliseconds);
|
|
|
|
// set the delay between subsequent tooltips to appear
|
|
|
|
static void SetReshow(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)
|
2005-09-25 16:49:40 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_COCOA_TOOLTIP_H_
|