git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64833
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return wxPoint( m_x, m_y );
}
return wxPoint( m_x, m_y );
}
- bool DoEnable( bool enable );
+ bool Enable( bool enable );
- (void)setImplementation: (wxToolBarTool *) theImplementation;
- (wxToolBarTool*) implementation;
- (void) clickedAction: (id) sender;
- (void)setImplementation: (wxToolBarTool *) theImplementation;
- (wxToolBarTool*) implementation;
- (void) clickedAction: (id) sender;
+- (BOOL) validateToolbarItem:(NSToolbarItem *)theItem;
+- (BOOL)validateToolbarItem:(NSToolbarItem *)theItem
+{
+ wxUnusedVar(theItem);
+ return impl->IsEnabled() ? YES:NO;
+}
+
@end
@implementation wxNSToolbarDelegate
@end
@implementation wxNSToolbarDelegate
-bool wxToolBarTool::DoEnable( bool enable )
+bool wxToolBarTool::Enable( bool enable )
+ if ( wxToolBarToolBase::Enable( enable ) == false )
+ return false;
+
if ( IsControl() )
{
GetControl()->Enable( enable );
if ( IsControl() )
{
GetControl()->Enable( enable );
-void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
+void wxToolBar::DoEnableTool(wxToolBarToolBase * WXUNUSED(t), bool WXUNUSED(enable))
- if ( t != NULL )
- ((wxToolBarTool*)t)->DoEnable( enable );
+ // everything already done in the tool's Enable implementation
}
void wxToolBar::DoToggleTool(wxToolBarToolBase *t, bool toggle)
}
void wxToolBar::DoToggleTool(wxToolBarToolBase *t, bool toggle)