X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb743cab53102c1d2d636acd173112233835f3f7..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/mac/carbon/tooltip.cpp diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index 365edd5b60..91856f165d 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -27,39 +27,7 @@ // global data //----------------------------------------------------------------------------- -class wxMacToolTipTimer ; - -class wxMacToolTip -{ -public : - wxMacToolTip() ; - ~wxMacToolTip() ; - - void Setup( WindowRef window , const wxString& text , const wxPoint& localPosition ) ; - void Draw() ; - void Clear() ; - - long GetMark() - { return m_mark ; } - - bool IsShown() - { return m_shown ; } - -private : - wxString m_label ; - wxPoint m_position ; - Rect m_rect ; - WindowRef m_window ; - PicHandle m_backpict ; - bool m_shown ; - long m_mark ; - wxMacToolTipTimer* m_timer ; - -#if TARGET_CARBON - wxMacCFStringHolder m_helpTextRef ; -#endif -} ; - +#if wxUSE_TIMER class wxMacToolTipTimer : public wxTimer { public: @@ -77,6 +45,7 @@ protected: wxMacToolTip* m_tip; long m_mark ; }; +#endif // wxUSE_TIMER //----------------------------------------------------------------------------- // wxToolTip @@ -143,6 +112,14 @@ void wxToolTip::SetDelay( long msecs ) s_ToolTipDelay = msecs ; } +void wxToolTip::SetAutoPop( long WXUNUSED(msecs) ) +{ +} + +void wxToolTip::SetReshow( long WXUNUSED(msecs) ) +{ +} + void wxToolTip::RelayEvent( wxWindow *win , wxMouseEvent &event ) { if ( s_ShowToolTips ) @@ -181,19 +158,22 @@ void wxToolTip::RemoveToolTips() } // --- mac specific - +#if wxUSE_TIMER wxMacToolTipTimer::wxMacToolTipTimer( wxMacToolTip *tip , int msec ) { m_tip = tip; m_mark = tip->GetMark() ; Start(msec, true); } +#endif // wxUSE_TIMER wxMacToolTip::wxMacToolTip() { m_window = NULL ; m_backpict = NULL ; +#if wxUSE_TIMER m_timer = NULL ; +#endif m_mark = 0 ; m_shown = false ; } @@ -208,21 +188,23 @@ void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& m_window =win; s_ToolTipWindowRef = m_window ; m_backpict = NULL ; - +#if wxUSE_TIMER if ( m_timer ) delete m_timer ; m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ; +#endif // wxUSE_TIMER } wxMacToolTip::~wxMacToolTip() { +#if wxUSE_TIMER if ( m_timer ) { delete m_timer ; m_timer = NULL; } - +#endif // wxUSE_TIMER if ( m_backpict ) Clear() ; } @@ -265,13 +247,13 @@ void wxToolTip::NotifyWindowDelete( WXHWND win ) void wxMacToolTip::Clear() { m_mark++ ; - +#if wxUSE_TIMER if ( m_timer ) { delete m_timer ; m_timer = NULL ; } - +#endif // wxUSE_TIMER if ( !m_shown ) return ;