]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/textctrl.cpp
fixing osx_carbon
[wxWidgets.git] / src / x11 / textctrl.cpp
index 96d2ea1e5eccb3c0cd4263d90d1258f7d2628675..d37b6670680ca3a6c23facb05ce649bef8df2a6c 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.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
 
 #endif
 
-#include "wx/utils.h"
-#include "wx/settings.h"
-#include "wx/panel.h"
 #include "wx/clipbrd.h"
 #include "wx/tokenzr.h"
 #include "wx/clipbrd.h"
 #include "wx/tokenzr.h"
-#include "wx/dcclient.h"
 
 #include "wx/univ/inphand.h"
 #include "wx/univ/renderer.h"
 
 #include "wx/univ/inphand.h"
 #include "wx/univ/renderer.h"
@@ -131,9 +131,7 @@ WX_DEFINE_OBJARRAY(wxSourceLineArray);
 //  wxTextCtrl
 //-----------------------------------------------------------------------------
 
 //  wxTextCtrl
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl)
-
-BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
+BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
     EVT_PAINT(wxTextCtrl::OnPaint)
     EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
     EVT_CHAR(wxTextCtrl::OnChar)
     EVT_PAINT(wxTextCtrl::OnPaint)
     EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
     EVT_CHAR(wxTextCtrl::OnChar)
@@ -277,7 +275,7 @@ wxString wxTextCtrl::GetValue() const
     return ret;
 }
 
     return ret;
 }
 
-void wxTextCtrl::SetValue(const wxString& value)
+void wxTextCtrl::DoSetValue(const wxString& value, int flags)
 {
     m_modified = false;
 
 {
     m_modified = false;
 
@@ -343,6 +341,9 @@ void wxTextCtrl::SetValue(const wxString& value)
     MyAdjustScrollbars();
 
     Refresh();
     MyAdjustScrollbars();
 
     Refresh();
+
+    if ( flags & SetValue_SendEvent )
+        SendTextUpdatedEvent();
 }
 
 int wxTextCtrl::GetLineLength(long lineNo) const
 }
 
 int wxTextCtrl::GetLineLength(long lineNo) const
@@ -1555,7 +1556,7 @@ void wxTextCtrl::DrawLine( wxDC &dc, int x, int y, const wxString &line2, int li
 
         size_t pos = 0;
         wxString token( GetNextToken( line, pos ) );
 
         size_t pos = 0;
         wxString token( GetNextToken( line, pos ) );
-        while (!token.IsNull())
+        while ( !token.empty() )
         {
             if (m_keywords.Index( token ) != wxNOT_FOUND)
             {
         {
             if (m_keywords.Index( token ) != wxNOT_FOUND)
             {
@@ -1898,7 +1899,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
                 event.SetEventObject(this);
                 event.SetString(GetValue());
                 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())
             }
 
             if (IsSingleLine())
@@ -2372,18 +2373,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
 void wxTextCtrl::OnSetFocus( wxFocusEvent& event )
 {
     // To hide or show caret, as appropriate