Table of Contents

Class UndoRedoStack

Namespace
TinyLife.Tools
Assembly
Tiny Life.dll

The undo-redo stack controls undo and redo operations for various Tool activities. To add a new UndoableAction to the stack, use Add(UndoableAction) or, more commonly, AddAndExecute(UndoableAction).

public static class UndoRedoStack
Inheritance
UndoRedoStack
Inherited Members

Methods

Add(UndoableAction)

Adds the given UndoableAction to the undo-redo stack. This also clears all redoable actions out of the redo stack.

public static void Add(UndoableAction action)

Parameters

action UndoableAction

The action to add.

AddAndExecute(UndoableAction)

Adds the given UndoableAction to the undo-redo stack and executes its "redo" action right away. This is useful for when the redo action is also the action that is executed initially, which is the case most of the time. This also clears all redoable actions out of the redo stack.

public static void AddAndExecute(UndoableAction action)

Parameters

action UndoableAction

The action to add and execute.

Clear()

Clears this undo-redo stack, clearing the internal undo and redo stacks.

public static void Clear()

Redo()

Redoes this undo-redo stack, redoing the most recently undone UndoableAction and pushing it back onto the undo stack.

public static void Redo()

Undo()

Undoes this undo-redo stack, undoing the most recent UndoableAction and pushing it onto the redo stack.

public static void Undo()