]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/tglbtn.cpp
move Ellipsize() to wxControl so it can be easily used by other controls
[wxWidgets.git] / src / gtk1 / tglbtn.cpp
index d8696cb8a5c678b61120218a0b7a2ec1a1a6e62e..a4f9d6da9e4c3483bc2ac00c542c01446438418d 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        wx/gtk1/tglbtn.cpp
+// Name:        src/gtk1/tglbtn.cpp
 // Purpose:     Definition of the wxToggleButton class, which implements a
 //              toggle button under wxGTK.
 // Author:      John Norris, minor changes by Axel Schlueter
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_TOGGLEBTN
+
 #include "wx/tglbtn.h"
-#include "wx/button.h"
 
-#if wxUSE_TOGGLEBTN
+#ifndef WX_PRECOMP
+    #include "wx/button.h"
+#endif
 
 #include "wx/gtk1/private.h"
 
@@ -40,7 +43,7 @@ static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxTog
     wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId());
     event.SetInt(cb->GetValue());
     event.SetEventObject(cb);
-    cb->GetEventHandler()->ProcessEvent(event);
+    cb->HandleWindowEvent(event);
 }
 }
 
@@ -358,4 +361,3 @@ wxToggleButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
 }
 
 #endif // wxUSE_TOGGLEBTN
-