Skip to content
ben-sangster edited this page Oct 7, 2010 · 1 revision

Description

The Undo class provides an interface for recording and triggering undo and redo messages. Undo and redo actions may be nested. When an action is invoked all nested actions are invoked as well.

Functions

API

API Constants

  • UndoType
  • RedoType

API Functions

Found in "dmz/runtime/undo".

Bool isNestedHandle (Handle undoHandle)

  • Tests if handle is from a nested undo startRecord()

Number isInUndo ()

  • Returns undo state

Number isRecording ()

  • Returns recording state

Number getType ()

  • Returns one of undo.UndoType or undo.RedoType

Bool doNext (int type)

  • type is one of undo.UndoType or undo.RedoType

Handle startRecord (String name)

  • Start action recording.

Bool stopRecord (Handle undoHandle)

  • Stop recording associated with undoHandle.

Bool abortRecord (Handle undoHandle)

  • Abord action record. Also aborts nested action records for undoHandle.

Bool storeAction (Message msg, [Handle target], Data d)

  • Callback made to store an undo action.
  • Type - Message sent for undo action.
  • Target - Handle of the undo action target.
  • Value - Pointer to the Data object send with the undo action Message.

Clone this wiki locally