]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/textctrl.cpp
reduce the margins around bitmaps to avoid truncating the label unnecessarily
[wxWidgets.git] / src / gtk1 / textctrl.cpp
index 06460bd944aeb45a64c8fb2f1ac3c64fddaa6e99..c2c52adef72fc7f341bc66c64c0ff68ed52d7a79 100644 (file)
@@ -13,6 +13,7 @@
 #include "wx/textctrl.h"
 
 #ifndef WX_PRECOMP
+    #include "wx/app.h"
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/utils.h"
@@ -119,7 +120,7 @@ gtk_insert_text_callback(GtkEditable *editable,
         wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, win->GetId());
         event.SetEventObject(win);
         event.SetString(win->GetValue());
-        win->GetEventHandler()->ProcessEvent( event );
+        win->HandleWindowEvent( event );
     }
 }
 }
@@ -145,7 +146,7 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
 
     wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() );
     event.SetEventObject( win );
-    win->GetEventHandler()->ProcessEvent( event );
+    win->HandleWindowEvent( event );
 }
 }
 
@@ -175,8 +176,6 @@ gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
 // which implicitly calls wxYield()) so we override GtkText::draw() and simply
 // don't do anything if we're inside wxYield()
 
-extern bool wxIsInsideYield;
-
 extern "C" {
     typedef void (*GtkDrawCallback)(GtkWidget *widget, GdkRectangle *rect);
 }
@@ -186,7 +185,7 @@ static GtkDrawCallback gs_gtk_text_draw = NULL;
 extern "C" {
 static void wxgtk_text_draw( GtkWidget *widget, GdkRectangle *rect)
 {
-    if ( !wxIsInsideYield )
+    if ( !wxTheApp->IsYielding() )
     {
         wxCHECK_RET( gs_gtk_text_draw != wxgtk_text_draw,
                      _T("infinite recursion in wxgtk_text_draw aborted") );
@@ -999,7 +998,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_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 ((key_event.GetKeyCode() == WXK_RETURN) && !(m_windowStyle & wxTE_MULTILINE))
@@ -1290,7 +1289,7 @@ wxSize wxTextCtrl::DoGetBestSize() const
 // freeze/thaw
 // ----------------------------------------------------------------------------
 
-void wxTextCtrl::Freeze()
+void wxTextCtrl::DoFreeze()
 {
     if ( HasFlag(wxTE_MULTILINE) )
     {
@@ -1298,7 +1297,7 @@ void wxTextCtrl::Freeze()
     }
 }
 
-void wxTextCtrl::Thaw()
+void wxTextCtrl::DoThaw()
 {
     if ( HasFlag(wxTE_MULTILINE) )
     {