X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/faa94f3ec822414d1d8842060c624b6cbde1feab..2cf3a6d7bef6f20bea35062dd3d4dbf0aec9efb5:/src/mac/classic/textctrl.cpp?ds=sidebyside diff --git a/src/mac/classic/textctrl.cpp b/src/mac/classic/textctrl.cpp index 7fcd94b547..cae116ab43 100644 --- a/src/mac/classic/textctrl.cpp +++ b/src/mac/classic/textctrl.cpp @@ -9,19 +9,33 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/defs.h" +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif #if wxUSE_TEXTCTRL +#include "wx/textctrl.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/dc.h" + #include "wx/button.h" + #include "wx/settings.h" + #include "wx/msgdlg.h" + #include "wx/toplevel.h" +#endif + #ifdef __DARWIN__ - #include - #include + #include + #include #else - #include + #include #endif -#include "wx/msgdlg.h" - #if wxUSE_STD_IOSTREAM #if wxUSE_IOSTREAMH #include @@ -30,21 +44,14 @@ #endif #endif -#include "wx/app.h" -#include "wx/dc.h" -#include "wx/button.h" -#include "wx/toplevel.h" -#include "wx/textctrl.h" #include "wx/notebook.h" #include "wx/tabctrl.h" -#include "wx/settings.h" #include "wx/filefn.h" -#include "wx/utils.h" #if defined(__BORLANDC__) && !defined(__WIN32__) - #include + #include #elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__DARWIN__) - #include + #include #endif #ifndef __DARWIN__ @@ -633,9 +640,9 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle ) -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) EVT_CHAR(wxTextCtrl::OnChar) EVT_MENU(wxID_CUT, wxTextCtrl::OnCut) @@ -655,7 +662,7 @@ static void SetTXNData( TXNObject txn , const wxString& st , TXNOffset start , T { #if wxUSE_UNICODE #if SIZEOF_WCHAR_T == 2 - size_t len = st.Len() ; + size_t len = st.length() ; TXNSetData( txn , kTXNUnicodeTextData, (void*)st.wc_str(), len * 2, start, end); #else @@ -1579,7 +1586,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) } if ( !IsEditable() && key != WXK_LEFT && key != WXK_RIGHT && key != WXK_DOWN && key != WXK_UP && key != WXK_TAB && - !( key == WXK_RETURN && ( (m_windowStyle & wxPROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) ) + !( key == WXK_RETURN && ( (m_windowStyle & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) ) /* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */ ) { @@ -1605,7 +1612,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) switch ( key ) { case WXK_RETURN: - if (m_windowStyle & wxPROCESS_ENTER) + if (m_windowStyle & wxTE_PROCESS_ENTER) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); event.SetEventObject( this );