pyface.action.action_controller module¶
The default action controller for menus, menu bars and tool bars.
- class pyface.action.action_controller.ActionController[source]¶
Bases:
HasTraits
The default action controller for menus, menu bars and tool bars.
- perform(action, event)[source]¶
Control an action invocation.
- Parameters
action (Action) – The action to perform.
event (ActionEvent) – The event that triggered the action.
- Returns
result – The result of the action’s perform method (usually None).
- Return type
Any
Can add an action to a menu
Called when an action is added to the a menu/menubar.
- Parameters
action (Action) – The action added to the menu.