From bf99a7849de5fc7df433a63ecbc8e712794bd6f4 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 17 Sep 2002 14:27:56 +0000 Subject: [PATCH] made MacSetupCursor virtual in order to allow wxTextCtrl to use MLTE native cursor handling git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/textctrl.h | 3 ++- include/wx/mac/window.h | 2 +- src/mac/carbon/textctrl.cpp | 8 +++++++- src/mac/textctrl.cpp | 8 +++++++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/include/wx/mac/textctrl.h b/include/wx/mac/textctrl.h index 1d9b218333..5c2c753c43 100644 --- a/include/wx/mac/textctrl.h +++ b/include/wx/mac/textctrl.h @@ -152,7 +152,8 @@ public: void OnUpdateRedo(wxUpdateUIEvent& event); virtual bool MacCanFocus() const { return true ; } - + virtual bool MacSetupCursor( const wxPoint& pt ) ; + virtual void MacSuperShown( bool show ) ; virtual bool Show(bool show = TRUE) ; diff --git a/include/wx/mac/window.h b/include/wx/mac/window.h index 6018e46219..cef26853e1 100644 --- a/include/wx/mac/window.h +++ b/include/wx/mac/window.h @@ -242,7 +242,7 @@ public: virtual void Update() ; // for compatibility void MacUpdateImmediately() { Update() ; } - bool MacSetupCursor( const wxPoint& pt ) ; + virtual bool MacSetupCursor( const wxPoint& pt ) ; // virtual bool MacSetPortDrawingParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindowMac* rootwin ) ; // virtual void MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin ) ; diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 4f8d67ae6d..e82348226f 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1606,7 +1606,13 @@ void wxTextCtrl::OnUpdateRedo(wxUpdateUIEvent& event) event.Enable( CanRedo() ); } - +bool wxTextCtrl::MacSetupCursor( const wxPoint& pt ) +{ + if ( m_macUsesTXN ) + return true ; + else + return wxWindow::MacSetupCursor( pt ) ; +} #endif // wxUSE_TEXTCTRL diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index 4f8d67ae6d..e82348226f 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -1606,7 +1606,13 @@ void wxTextCtrl::OnUpdateRedo(wxUpdateUIEvent& event) event.Enable( CanRedo() ); } - +bool wxTextCtrl::MacSetupCursor( const wxPoint& pt ) +{ + if ( m_macUsesTXN ) + return true ; + else + return wxWindow::MacSetupCursor( pt ) ; +} #endif // wxUSE_TEXTCTRL