X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6519b40fe9f5e4706e02497fe01ff71c65079d6..cc4d5638c66a409e421420ed7110917755a66788:/src/x11/textctrl.cpp diff --git a/src/x11/textctrl.cpp b/src/x11/textctrl.cpp index 8f8aa99e48..492d37e5df 100644 --- a/src/x11/textctrl.cpp +++ b/src/x11/textctrl.cpp @@ -2,7 +2,6 @@ // Name: src/x11/textctrl.cpp // Purpose: // Author: Robert Roebling -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -131,8 +130,6 @@ WX_DEFINE_OBJARRAY(wxSourceLineArray); // wxTextCtrl //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) - BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_PAINT(wxTextCtrl::OnPaint) EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) @@ -277,7 +274,7 @@ wxString wxTextCtrl::GetValue() const return ret; } -void wxTextCtrl::ChangeValue(const wxString& value) +void wxTextCtrl::DoSetValue(const wxString& value, int flags) { m_modified = false; @@ -343,6 +340,9 @@ void wxTextCtrl::ChangeValue(const wxString& value) MyAdjustScrollbars(); Refresh(); + + if ( flags & SetValue_SendEvent ) + SendTextUpdatedEvent(); } int wxTextCtrl::GetLineLength(long lineNo) const @@ -1555,7 +1555,7 @@ void wxTextCtrl::DrawLine( wxDC &dc, int x, int y, const wxString &line2, int li size_t pos = 0; wxString token( GetNextToken( line, pos ) ); - while (!token.IsNull()) + while ( !token.empty() ) { if (m_keywords.Index( token ) != wxNOT_FOUND) { @@ -1895,10 +1895,10 @@ void wxTextCtrl::OnChar( wxKeyEvent &event ) { if (m_windowStyle & wxTE_PROCESS_ENTER) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); event.SetEventObject(this); event.SetString(GetValue()); - if (GetEventHandler()->ProcessEvent(event)) return; + if (HandleWindowEvent(event)) return; } if (IsSingleLine()) @@ -2372,18 +2372,6 @@ wxSize wxTextCtrl::DoGetBestSize() const } } -// ---------------------------------------------------------------------------- -// freeze/thaw -// ---------------------------------------------------------------------------- - -void wxTextCtrl::Freeze() -{ -} - -void wxTextCtrl::Thaw() -{ -} - void wxTextCtrl::OnSetFocus( wxFocusEvent& event ) { // To hide or show caret, as appropriate