+bool wxStdToolbarInputHandler::HandleMouse(wxInputConsumer *consumer,
+ const wxMouseEvent& event)
+{
+ // don't let the base class press the disabled buttons but simply ignore
+ // all events on them
+ wxToolBar *tbar = wxStaticCast(consumer->GetInputWindow(), wxToolBar);
+ wxToolBarToolBase *tool = tbar->FindToolForPosition(event.GetX(), event.GetY());
+
+ if ( !tool || !tool->IsEnabled() )
+ return TRUE;
+
+ return wxStdButtonInputHandler::HandleMouse(consumer, event);
+}
+