pyface.workbench.workbench_window module¶
A workbench window.
- class pyface.workbench.workbench_window.WorkbenchWindow[source]¶
Bases:
ApplicationWindow
A workbench window.
- open()[source]¶
Open the window.
Overridden to make the ‘opening’ event vetoable.
Return True if the window opened successfully; False if the open event was vetoed.
- close()[source]¶
Closes the window.
Overridden to make the ‘closing’ event vetoable.
Return True if the window closed successfully (or was not even open!), False if the close event was vetoed.
- add_editor(editor, title=None)[source]¶
Adds an editor.
If no title is specified, the editor’s name is used.
- close_view(view)[source]¶
Closes a view.
fixme: Currently views are never ‘closed’ in the same sense as an editor is closed. Views are merely hidden.
- create_editor(obj, kind=None)[source]¶
Create an editor for an object.
Return None if no editor can be created for the object.
- edit(obj, kind=None, use_existing=True)[source]¶
Edit an object.
‘kind’ is simply passed through to the window’s editor manager to allow it to create a particular kind of editor depending on context etc.
If ‘use_existing’ is True and the object is already being edited in the window then the existing editor will be activated (i.e., given focus, brought to the front, etc.).
If ‘use_existing’ is False, then a new editor will be created even if one already exists.
- get_editor(obj, kind=None)[source]¶
Return the editor that is editing an object.
Return None if no such editor exists.
- get_editor_by_id(id)[source]¶
Return the editor with the specified Id.
Return None if no such editor exists.
- get_part_by_id(id)[source]¶
Return the workbench part with the specified Id.
Return None if no such part exists.
- get_perspective_by_id(id)[source]¶
Return the perspective with the specified Id.
Return None if no such perspective exists.
- get_perspective_by_name(name)[source]¶
Return the perspective with the specified name.
Return None if no such perspective exists.