]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/textctrl.cpp
Added extra hit test style for more accurate reporting
[wxWidgets.git] / src / x11 / textctrl.cpp
index c3aee9d8be5aba2798a2c1a43a244478db17f4ee..02692fea0fbd8b0e5c93b95a6ae9cf45b289bbcf 100644 (file)
@@ -7,16 +7,22 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/textctrl.h"
 
-#include "wx/utils.h"
-#include "wx/intl.h"
-#include "wx/log.h"
-#include "wx/settings.h"
-#include "wx/panel.h"
+#ifndef WX_PRECOMP
+    #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/utils.h"
+    #include "wx/panel.h"
+    #include "wx/dcclient.h"
+    #include "wx/settings.h"
+#endif
+
 #include "wx/clipbrd.h"
 #include "wx/tokenzr.h"
-#include "wx/dcclient.h"
 
 #include "wx/univ/inphand.h"
 #include "wx/univ/renderer.h"
@@ -125,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)
@@ -271,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;
 
@@ -337,6 +343,9 @@ void wxTextCtrl::SetValue(const wxString& value)
     MyAdjustScrollbars();
 
     Refresh();
+
+    if ( flags & SetValue_SendEvent )
+        SendTextUpdatedEvent();
 }
 
 int wxTextCtrl::GetLineLength(long lineNo) const
@@ -1887,7 +1896,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
         }
         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);