#pragma implementation "tooltip.h"
#endif
-#include "wx/setup.h"
+#include "wx/defs.h"
#if wxUSE_TOOLTIPS
wxMacToolTipTimer* m_timer ;
} ;
-class wxMacToolTipTimer : wxTimer
+class wxMacToolTipTimer : public wxTimer
{
public:
- wxMacToolTipTimer(wxMacToolTip* tip, int iMilliseconds) ;
-
- void Notify()
- {
- if ( m_mark == m_tip->GetMark() )
- m_tip->Draw() ;
-
- }
-
+ wxMacToolTipTimer() {} ;
+ wxMacToolTipTimer(wxMacToolTip* tip, int iMilliseconds) ;
+ virtual ~wxMacToolTipTimer() {} ;
+ void Notify()
+ {
+ if ( m_mark == m_tip->GetMark() )
+ m_tip->Draw() ;
+ }
protected:
- wxMacToolTip* m_tip;
- long m_mark ;
+ wxMacToolTip* m_tip;
+ long m_mark ;
};
//-----------------------------------------------------------------------------
static wxWindow* s_LastWindowEntered = NULL ;
static wxRect2DInt s_ToolTipArea ;
static WindowRef s_ToolTipWindowRef = NULL ;
+
+IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject)
+
wxToolTip::wxToolTip( const wxString &tip )
{
m_text = tip;
{
m_mark++ ;
Clear() ;
- m_position = localPosition ;
+ m_position = localPosition ;
m_label = wxMacMakeMacStringFromPC( text ) ;
m_window = window ;
s_ToolTipWindowRef = window ;
*/
#endif
{
- wxMacPortStateHelper help( GetWindowPort( m_window ) );
+ wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
m_shown = true ;
void wxMacToolTip::Clear()
{
m_mark++ ;
+ if ( m_timer )
+ {
+ delete m_timer ;
+ m_timer = NULL ;
+ }
if ( !m_shown )
return ;
if ( m_window == s_ToolTipWindowRef && m_backpict )
{
- wxMacPortStateHelper help( GetWindowPort(m_window) ) ;
+ wxMacPortStateHelper help( (GrafPtr) GetWindowPort(m_window) ) ;
m_shown = false ;