]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/textctrl.cpp
more DC changes for wxX11
[wxWidgets.git] / src / x11 / textctrl.cpp
index 1fb326f439e4e4f8c94a9c7dbb659f1373b361c5..ffb7b4130127c2bd076cc922b733f03cd5ba0e92 100644 (file)
@@ -18,9 +18,9 @@
     #include "wx/utils.h"
     #include "wx/panel.h"
     #include "wx/dcclient.h"
+    #include "wx/settings.h"
 #endif
 
-#include "wx/settings.h"
 #include "wx/clipbrd.h"
 #include "wx/tokenzr.h"
 
@@ -131,9 +131,9 @@ WX_DEFINE_OBJARRAY(wxSourceLineArray);
 //  wxTextCtrl
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
 
-BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
+BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
     EVT_PAINT(wxTextCtrl::OnPaint)
     EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
     EVT_CHAR(wxTextCtrl::OnChar)
@@ -277,7 +277,7 @@ wxString wxTextCtrl::GetValue() const
     return ret;
 }
 
-void wxTextCtrl::SetValue(const wxString& value)
+void wxTextCtrl::DoSetValue(const wxString& value, int flags)
 {
     m_modified = false;
 
@@ -343,6 +343,9 @@ void wxTextCtrl::SetValue(const wxString& value)
     MyAdjustScrollbars();
 
     Refresh();
+
+    if ( flags & SetValue_SendEvent )
+        SendTextUpdatedEvent();
 }
 
 int wxTextCtrl::GetLineLength(long lineNo) const
@@ -1898,7 +1901,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
                 event.SetEventObject(this);
                 event.SetString(GetValue());
-                if (GetEventHandler()->ProcessEvent(event)) return;
+                if (HandleWindowEvent(event)) return;
             }
 
             if (IsSingleLine())