API Reference for Enthought Tool Suite 2.7.1
Defines the standard menu bar for use with Traits UI windows and panels, and standard actions and buttons.
When theuser clicks the Apply button, all changes made in the window are applied to the model. This option is meaningful only for modal windows.
ApplyButton = Action(name = 'Apply')
When the user clicks the Cancel button, all changes made in the window are discarded; if the window is live, the model is restored to the values it held before the window was opened. The window is then closed.
CancelButton = Action(name = 'Cancel')
The standard "close window" action
CloseAction = Action(name = 'Close', action = '_on_close')
The standard "show help" action
HelpAction = Action(name = 'Help', action = 'show_help')
When the user clicks the Help button, the current help handler is invoked. If the default help handler is used, a pop-up window is displayed, which contains the help text for the top-level Group (if any), and for the items in the view. If the default help handler has been overridden, the action is determined by the custom help handler. See enthought.traits.ui.help.
HelpButton = Action(name = 'Help')
LiveButtons = [ UndoButton, RevertButton, OKButton, CancelButton, HelpButton ]
ModalButtons = [ ApplyButton, RevertButton, OKButton, CancelButton, HelpButton ]
NoButton = Action(name = '')
The window has no command buttons.
NoButtons = [ NoButton ]
When the user clicks the OK button, all changes made in the window are applied to the model, and the window is closed.
OKButton = Action(name = 'OK')
OKCancelButtons = [ OKButton, CancelButton ]
The standard "redo last undo" action
RedoAction = Action(name = 'Redo', action = '_on_redo', defined_when = 'ui.history is not None', enabled_when = 'ui.history.can_redo')
The standard "revert all changes" action
RevertAction = Action(name = 'Revert', action = '_on_revert', defined_when = 'ui.history is not None', enabled_when = 'ui.history.can_undo')
When the user clicks the Revert button, all changes made in the window are cancelled and the original values are restored. If the changes have been applied to the model (because the user clicked Apply or because the window is live), the model data is restored as well. The window remains open.
RevertButton = Action(name = 'Revert')
Menu separator
Separator = ActionGroup
The standard Traits UI menu bar
StandardMenuBar = MenuBar(Menu(CloseAction, name = 'File'), Menu(UndoAction, RedoAction, RevertAction, name = 'Edit'), Menu(HelpAction, name = 'Help'))
The standard "undo last change" action
UndoAction = Action(name = 'Undo', action = '_on_undo', defined_when = 'ui.history is not None', enabled_when = 'ui.history.can_undo')
Appears as two buttons: Undo and Redo. When Undo is clicked, the most recent change to the data is cancelled, restoring the previous value. Redo cancels the most recent "undo" operation.
UndoButton = Action(name = 'Undo')
| Local name | Refers to |
|---|---|
| ActionGroup | enthought.pyface.action.group.Group |
| Menu | enthought.pyface.action.menu_manager.MenuManager |
| MenuBar | enthought.pyface.action.menu_bar_manager.MenuBarManager |
| PyFaceAction | enthought.pyface.action.action.Action |
| Str | enthought.traits.traits.Str |
| ToolBar | enthought.pyface.action.tool_bar_manager.ToolBarManager |
Copyright © 2002-2008 Enthought, Inc.