]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tbarbase.cpp
standardized encoding names to windows-12xx and iso-8859-x forms
[wxWidgets.git] / src / common / tbarbase.cpp
index 3bb374eecb3138ed312a4dc8d3a4b12bf097f4c9..93e0bab7c7d989db72edcfb6ff2a02016dc074fa 100644 (file)
@@ -53,6 +53,8 @@
     END_EVENT_TABLE()
 #endif
 
+IMPLEMENT_CLASS(wxToolBarBase, wxControl)
+
 #include "wx/listimpl.cpp"
 
 WX_DEFINE_LIST(wxToolBarToolsList);
@@ -468,7 +470,12 @@ bool wxToolBarBase::OnLeftClick(int id, bool toggleDown)
 {
     wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, id);
     event.SetEventObject(this);
-    event.SetExtraLong((long) toggleDown);
+
+    // we use SetInt() to make wxCommandEvent::IsChecked() return toggleDown
+    event.SetInt((int)toggleDown);
+
+    // and SetExtraLong() for backwards compatibility
+    event.SetExtraLong((long)toggleDown);
 
     // Send events to this toolbar instead (and thence up the window hierarchy)
     GetEventHandler()->ProcessEvent(event);