From 78d990152a01bd0a21a0425ab661cb43040b4d98 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Sun, 21 Sep 2008 00:51:44 +0000 Subject: [PATCH] Stubbed wxToolTip implementation to get code that uses it building. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/bakefiles/files.bkl | 3 +- include/wx/osx/cocoa/chkconf.h | 5 -- src/osx/cocoa/tooltip.mm | 86 ++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 src/osx/cocoa/tooltip.mm diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index ba56711f43..d9eae73eb9 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -2249,7 +2249,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/osx/carbon/settings.cpp src/osx/carbon/statbrma.cpp src/osx/carbon/tabctrl.cpp - src/osx/carbon/tooltip.cpp src/osx/carbon/utilscocoa.mm @@ -2288,6 +2287,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/osx/carbon/textctrl.cpp src/osx/carbon/tglbtn.cpp src/osx/carbon/toolbar.cpp + src/osx/carbon/tooltip.cpp src/osx/carbon/window.cpp src/html/htmlctrl/webkit/webkit.mm @@ -2515,6 +2515,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/osx/cocoa/textctrl.mm src/osx/cocoa/tglbtn.mm src/osx/cocoa/toolbar.mm + src/osx/cocoa/tooltip.mm src/osx/cocoa/window.mm src/generic/caret.cpp src/generic/clrpickerg.cpp diff --git a/include/wx/osx/cocoa/chkconf.h b/include/wx/osx/cocoa/chkconf.h index 9780efedf3..2fbda6ebf0 100644 --- a/include/wx/osx/cocoa/chkconf.h +++ b/include/wx/osx/cocoa/chkconf.h @@ -54,11 +54,6 @@ #define wxUSE_TASKBARICON 0 #endif -#if wxUSE_TOOLTIPS -#undef wxUSE_TOOLTIPS -#define wxUSE_TOOLTIPS 0 -#endif - #if wxUSE_DATAVIEWCTRL #undef wxUSE_DATAVIEWCTRL #define wxUSE_DATAVIEWCTRL 0 diff --git a/src/osx/cocoa/tooltip.mm b/src/osx/cocoa/tooltip.mm new file mode 100644 index 0000000000..4cb9e517c5 --- /dev/null +++ b/src/osx/cocoa/tooltip.mm @@ -0,0 +1,86 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/osx/carbon/tooltip.cpp +// Purpose: wxToolTip implementation +// Author: Stefan Csomor +// Id: $Id: tooltip.cpp 55419 2008-09-02 16:53:23Z SC $ +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#if wxUSE_TOOLTIPS + +#include "wx/tooltip.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/window.h" + #include "wx/dc.h" + #include "wx/timer.h" + #include "wx/nonownedwnd.h" +#endif // WX_PRECOMP + +#include "wx/geometry.h" +#include "wx/osx/uma.h" + +// FYI a link to help with implementing: http://www.cocoadev.com/index.pl?LittleYellowBox + + +//----------------------------------------------------------------------------- +// wxToolTip +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject) + + +wxToolTip::wxToolTip( const wxString &tip ) +{ + m_text = tip; + m_window = (wxWindow*) NULL; +} + +wxToolTip::~wxToolTip() +{ +} + +void wxToolTip::SetTip( const wxString &tip ) +{ + m_text = tip; +} + +void wxToolTip::SetWindow( wxWindow *win ) +{ + m_window = win ; +} + +void wxToolTip::Enable( bool flag ) +{ +} + +void wxToolTip::SetDelay( long msecs ) +{ +} + +void wxToolTip::SetAutoPop( long WXUNUSED(msecs) ) +{ +} + +void wxToolTip::SetReshow( long WXUNUSED(msecs) ) +{ +} + +void wxToolTip::RelayEvent( wxWindow *win , wxMouseEvent &event ) +{ +} + +void wxToolTip::RemoveToolTips() +{ +} + +// --- mac specific +void wxToolTip::NotifyWindowDelete( WXHWND win ) +{ +} + +#endif // wxUSE_TOOLTIPS -- 2.47.2