2004-10-06 21:09:47 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2011-03-20 00:14:35 +00:00
|
|
|
// Name: wx/cocoa/tooltip.h
|
2004-10-06 21:09:47 +00:00
|
|
|
// Purpose: wxToolTip class - tooltip control
|
|
|
|
// Author: Ryan Norton
|
|
|
|
// Modified by:
|
|
|
|
// Created: 31.01.99
|
|
|
|
// Copyright: (c) Ryan Norton
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2005-09-25 20:49:40 +00:00
|
|
|
#ifndef _WX_COCOA_TOOLTIP_H_
|
|
|
|
#define _WX_COCOA_TOOLTIP_H_
|
|
|
|
|
2004-10-06 21:09:47 +00:00
|
|
|
#include "wx/object.h"
|
|
|
|
|
2004-10-08 01:26:43 +00:00
|
|
|
class wxWindow;
|
|
|
|
|
2004-10-06 21:09:47 +00:00
|
|
|
class wxToolTip : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// ctor & dtor
|
2004-10-08 01:26:43 +00:00
|
|
|
wxToolTip(const wxString &tip);
|
|
|
|
virtual ~wxToolTip();
|
2004-10-06 21:09:47 +00:00
|
|
|
|
|
|
|
// accessors
|
|
|
|
// tip text
|
2004-10-08 01:26:43 +00:00
|
|
|
void SetTip(const wxString& tip);
|
|
|
|
const wxString& GetTip() const;
|
2004-10-06 21:09:47 +00:00
|
|
|
|
|
|
|
// the window we're associated with
|
2004-10-08 01:26:43 +00:00
|
|
|
wxWindow *GetWindow() const;
|
2004-10-06 21:09:47 +00:00
|
|
|
|
|
|
|
// controlling tooltip behaviour: globally change tooltip parameters
|
|
|
|
// enable or disable the tooltips globally
|
2004-10-08 01:26:43 +00:00
|
|
|
static void Enable(bool flag);
|
2004-10-06 21:09:47 +00:00
|
|
|
// set the delay after which the tooltip appears
|
2004-10-08 01:26:43 +00:00
|
|
|
static void SetDelay(long milliseconds);
|
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 milliseconds);
|
|
|
|
// set the delay between subsequent tooltips to appear
|
|
|
|
static void SetReshow(long milliseconds);
|
2004-10-06 21:09:47 +00:00
|
|
|
|
|
|
|
private:
|
2004-10-08 01:26:43 +00:00
|
|
|
void SetWindow(wxWindow* window);
|
|
|
|
|
2004-10-06 21:09:47 +00:00
|
|
|
friend class wxWindow;
|
|
|
|
|
|
|
|
wxString m_text; // tooltip text
|
|
|
|
wxWindow *m_window; // window we're associated with
|
2009-08-21 10:41:26 +00:00
|
|
|
|
2004-10-06 21:09:47 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS(wxToolTip)
|
2005-09-25 20:49:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_COCOA_TOOLTIP_H_
|