]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/spinctrl.cpp
forwarding style changes to documentViews, see #14578
[wxWidgets.git] / src / gtk1 / spinctrl.cpp
index 51c4c477cd102926d0d01bb43191be8cbdbe3387..9c60a0a0d54c3a91fa5621e2fa613a97f1504e44 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/gtk1/spinbutt.cpp
+// Name:        src/gtk1/spinctrl.cpp
 // Purpose:     wxSpinCtrl
 // Author:      Robert
 // Modified by:
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
     #include "wx/textctrl.h"    // for wxEVT_COMMAND_TEXT_UPDATED
+    #include "wx/math.h"
+    #include "wx/crt.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/gtk1/private.h"
 
 //-----------------------------------------------------------------------------
@@ -60,7 +61,7 @@ static void gtk_spinctrl_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win
     // values in range 5..50 is then, ummm, quite challenging (hint: you can't
     // enter 1!) (VZ)
     event.SetInt( (int)ceil(win->m_adjust->value) );
-    win->GetEventHandler()->ProcessEvent( event );
+    win->HandleWindowEvent( event );
 }
 }
 
@@ -82,7 +83,7 @@ gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win
 
     // see above
     event.SetInt( (int)ceil(win->m_adjust->value) );
-    win->GetEventHandler()->ProcessEvent( event );
+    win->HandleWindowEvent( event );
 }
 }
 
@@ -90,8 +91,6 @@ gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win
 // wxSpinCtrl
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl,wxControl)
-
 BEGIN_EVENT_TABLE(wxSpinCtrl, wxControl)
     EVT_CHAR(wxSpinCtrl::OnChar)
 END_EVENT_TABLE()
@@ -283,7 +282,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
         GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget);
         wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) );
         evt.SetString( val );
-        if (GetEventHandler()->ProcessEvent(evt)) return;
+        if (HandleWindowEvent(evt)) return;
     }
 
     event.Skip();