Description

An object implementing the Undo-Redo manager, used to track the state of parts of the system, in order to be able to Undo and/or Redo operations

Remarks

When this object is attached to an image (McImage.UndoStack), the context (ordering and stored information) is relative to the image.

Members

Methods
Flush

Drops all states in the Undo stack, and the Redo stack

PopRedo

Drops the top state of the Redo stack without performing the redo

PopUndo

Drops the top state of the Undo stack without performing the undo

Push

Saves the state of an undoable object for a future Undo operation.

Redo

Will save the undoable on top of the Undo stack, update the undoable with the top of the Redo stack, and drop the top of the Redo stack. The operation will fail if the Redo stack is empty.

This function will fire two events: AboutToRedo and RedoDone.

Undo

Will save the undoable on top of the Redo stack, update the undoable with the top of the Undo stack, and drop the top of the Undo stack.

This function will fire two events: AboutToUndo and UndoDone.


Properties
CanRedoRead-only property

Read-only property, checks whether or not a Redo may be performed.

CanUndoRead-only property

Read-only property, checks whether or not an Undo may be performed.

DisabledRead-write property

Read-write property, allows the freezing of Push, Undo or Redo operations the undo-redo manager.

MaxSizeRead-write property

Reflects and sets the maximum number of undo states kept.

RedoTopStateContextRead-only property

Read-only property providing the atributes of the top state of the stack

RedoTopStateDescriptionRead-only property

Read-only property providing the atributes of the top state of the stack

RedoTopStateIDRead-only property

Read-only property providing the atributes of the top state of the stack

RedoTopStateOperationRead-only property

Read-only property providing the atributes of the top state of the stack

RedoTopStateOwnerRead-only property

Read-only property providing the atributes of the top state of the stack

RedoTopStateUndoableRead-only property

Read-only property providing the atributes of the top state of the stack

RedoTopStateValueRead-only property

Read-only property providing the atributes of the top state of the stack

UndoTopStateContextRead-only property

Read-only property providing the atributes of the top state of the stack

UndoTopStateDescriptionRead-only property

Read-only property providing the atributes of the top state of the stack

UndoTopStateIDRead-only property

Read-only property providing the atributes of the top state of the stack

UndoTopStateOperationRead-only property

Read-only property providing the atributes of the top state of the stack

UndoTopStateOwnerRead-only property

Read-only property providing the atributes of the top state of the stack

UndoTopStateUndoableRead-only property

Read-only property providing the atributes of the top state of the stack

UndoTopStateValueRead-only property

Read-only property providing the atributes of the top state of the stack


Events
AboutToPush

Notifies a Push is about to happen on the undo-redo manager

AboutToRedo

Notifies a Redo is about to happen on the undo-redo manager

AboutToUndo

Notifies a Undo is about to happen on the undo-redo manager

PushDone

Notifies a Push happened on the undo-redo manager

RedoDone

Notifies a Redo happened on the undo-redo manager

UndoDone

Notifies a Undo happened on the undo-redo manager