traitsui.undo module¶
Defines the manager for Undo and Redo history for Traits user interface support.
-
class
traitsui.undo.
AbstractUndoItem
¶ Bases:
traits.has_traits.HasPrivateTraits
Abstract base class for undo items.
-
merge_undo
(undo_item)¶ Merges two undo items if possible.
-
redo
()¶ Re-does the change.
-
undo
()¶ Undoes the change.
-
-
class
traitsui.undo.
ListUndoItem
¶ Bases:
traitsui.undo.AbstractUndoItem
A change to a list, which can be undone.
-
merge_undo
(undo_item)¶ Merges two undo items if possible.
-
redo
()¶ Re-does the change.
-
undo
()¶ Undoes the change.
-
-
class
traitsui.undo.
UndoHistory
¶ Bases:
traits.has_traits.HasStrictTraits
Manages a list of undoable changes.
-
add
(undo_item, extend=False)¶ Adds an UndoItem to the history.
-
clear
()¶ Clears the undo history.
-
extend
(undo_item)¶ Extends the undo history.
If possible the method merges the new UndoItem with the last item in the history; otherwise, it appends the new item.
-
redo
()¶ Redoes an operation.
-
revert
()¶ Reverts all changes made so far and clears the history.
-
undo
()¶ Undoes an operation.
-
-
class
traitsui.undo.
UndoHistoryUndoItem
¶ Bases:
traitsui.undo.AbstractUndoItem
An undo item for the undo history.
-
redo
()¶ Re-does the change.
-
undo
()¶ Undoes the change.
-
-
class
traitsui.undo.
UndoItem
¶ Bases:
traitsui.undo.AbstractUndoItem
A change to an object trait, which can be undone.
-
merge_undo
(undo_item)¶ Merges two undo items if possible.
-
redo
()¶ Re-does the change.
-
undo
()¶ Undoes the change.
-