pyface.tasks.i_editor module

class pyface.tasks.i_editor.IEditor(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]

Bases: Interface

The base interface for all panes (central and dock) in a Task.

name = Str()

The editor’s user-visible name.

tooltip = Str()

The tooltip to show for the editor’s tab, if any.

control = Any()

The toolkit-specific control that represents the editor.

obj = Any()

The object that the editor is editing.

dirty = Bool()

Has the editor’s object been modified but not saved?

editor_area = Instance("pyface.tasks.i_editor_area_pane.IEditorAreaPane")

The editor area to which the editor belongs.

is_active = Bool()

Is the editor active in the editor area?

has_focus = Bool()

Does the editor currently have the focus?

closing = VetoableEvent()

Fired when the editor has been requested to close.

closed = Event()

Fired when the editor has been closed.

close()[source]

Close the editor.

create(parent)[source]

Create and set the toolkit-specific control that represents the editor.

destroy()[source]

Destroy the toolkit-specific control that represents the editor.

class pyface.tasks.i_editor.MEditor[source]

Bases: HasTraits

Mixin containing common code for toolkit-specific implementations.

close()[source]

Close the editor.