X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a8988cb339baf4fb5e8ebc8065e0324a9e96c208..76e7cfab8fdb0c7862fd07e427af54181717fc62:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index 24dca77ce6..7f7fabda87 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -4,7 +4,6 @@ // Author: David Webster // Modified by: // Created: 10/17/99 -// RCS-ID: $Id$ // Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -55,8 +54,6 @@ // event tables and other macros // ---------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) - BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) @@ -329,7 +326,8 @@ void wxTextCtrl::SetupColours() wxString wxTextCtrl::GetValue() const { wxString sStr = wxGetWindowText(GetHWND()); - char* zStr = sStr.char_str(); + wxCharBuffer buf(sStr.char_str()); + char* zStr = buf.data(); for ( ; *zStr; zStr++ ) { @@ -370,7 +368,7 @@ void wxTextCtrl::WriteText( ) { if (m_bIsMLE) - ::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM(rsValue.char_str()), MPARAM(0)); + ::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM(rsValue.wx_str()), MPARAM(0)); else ::WinSetWindowText(GetHwnd(), rsValue.c_str()); AdjustSpaceLimit(); @@ -717,7 +715,7 @@ void wxTextCtrl::MarkDirty() ::WinSendMsg(GetHwnd(), MLM_SETCHANGED, MPFROMLONG(TRUE), 0); else // EM controls do not have a SETCHANGED, what can we do?? - wxFAIL_MSG( _T("not implemented") ); + wxFAIL_MSG( wxT("not implemented") ); } // @@ -1045,10 +1043,10 @@ void wxTextCtrl::OnChar( case WXK_RETURN: if ( !(m_windowStyle & wxTE_MULTILINE) ) { - wxCommandEvent vEvent(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent vEvent(wxEVT_TEXT_ENTER, m_windowId); vEvent.SetEventObject(this); - if ( GetEventHandler()->ProcessEvent(vEvent)) + if ( HandleWindowEvent(vEvent)) return; } //else: multiline controls need Enter for themselves @@ -1070,7 +1068,7 @@ void wxTextCtrl::OnChar( vEventNav.SetWindowChange(false); vEventNav.SetEventObject(this); - if ( GetEventHandler()->ProcessEvent(vEventNav) ) + if ( HandleWindowEvent(vEventNav) ) return; } break; @@ -1094,7 +1092,7 @@ bool wxTextCtrl::OS2Command( ); vEvent.SetEventObject(this); - GetEventHandler()->ProcessEvent(vEvent); + HandleWindowEvent(vEvent); } break; @@ -1106,7 +1104,7 @@ bool wxTextCtrl::OS2Command( break; } - wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED + wxCommandEvent vEvent( wxEVT_TEXT ,m_windowId );