X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9eddec696f06d65a80e7339b2fae14fcb55f8383..50f3c41d61bd9ae69f215bad923f562d509e063c:/src/mac/carbon/textctrl.cpp?ds=sidebyside diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 70bbef2d7a..24f9fdf83e 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -23,6 +23,8 @@ #include "wx/button.h" #include "wx/menu.h" #include "wx/settings.h" + #include "wx/msgdlg.h" + #include "wx/toplevel.h" #endif #ifdef __DARWIN__ @@ -32,8 +34,6 @@ #include #endif -#include "wx/msgdlg.h" - #if wxUSE_STD_IOSTREAM #if wxUSE_IOSTREAMH #include @@ -42,7 +42,6 @@ #endif #endif -#include "wx/toplevel.h" #include "wx/filefn.h" #include "wx/sysopt.h" @@ -415,9 +414,9 @@ private : }; -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_ERASE_BACKGROUND( wxTextCtrl::OnEraseBackground ) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) EVT_CHAR(wxTextCtrl::OnChar) @@ -1019,6 +1018,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) } if ( ( key >= 0x20 && key < WXK_START ) || + ( key >= WXK_NUMPAD0 && key <= WXK_DIVIDE ) || key == WXK_RETURN || key == WXK_DELETE || key == WXK_BACK) @@ -1555,7 +1555,7 @@ void wxMacUnicodeTextControl::SetSelection( long from , long to ) if ( value ) { wxMacCFStringHolder cf(value) ; - textLength = cf.AsString().Length() ; + textLength = cf.AsString().length() ; } if ((from == -1) && (to == -1)) @@ -1589,6 +1589,7 @@ void wxMacUnicodeTextControl::WriteText( const wxString& str ) CFStringRef value = cf ; SetData( 0, kControlEditTextInsertCFStringRefTag, &value ); } + else #endif { wxString val = GetStringValue() ; @@ -2209,7 +2210,7 @@ void wxMacMLTEControl::SetTXNData( const wxString& st, TXNOffset start, TXNOffse { #if wxUSE_UNICODE #if SIZEOF_WCHAR_T == 2 - size_t len = st.Len() ; + size_t len = st.length() ; TXNSetData( m_txn, kTXNUnicodeTextData, (void*)st.wc_str(), len * 2, start, end ); #else wxMBConvUTF16 converter ;