Class TaskManager

Represents a TaskManager object.

Hierarchy

  • TaskManager

Constructors

Properties

canUndoRedo: boolean = true

Determines whether undo/redo is allowed.

Default

true
skipUndo: boolean = false

Determines whether the next actions are recorded in the task manager.

Default

true
undoLimit: number = 0

Returns/sets the number of undo commands that can be performed. UndoLimit limits the size of the Undo buffer. Therefore, you can use this property to save memory. Setting UndoLimit to zero means that the size of the Undo buffer is unlimited.

Default

0

Methods

  • Add the following actions in the last group of actions. This 'add' mode will terminate when calling EndAction.

    Returns void

  • Start a group of actions that can be undone in one time. 'code' allows identifying a group of action. It is returned by the undoCode and redoCode properties. For instance, if, in your application, the user can open a dialog box allowing to change the image of the node, its color and its Text property, you will probably allow that user to undo these 3 basic actions in one time. To do that, add a call to beginAction before invoking the dialog box and a call to endAction just after the dialog box termination.

    Parameters

    • code: string

    Returns void

  • Indicates if there is an action that can be redone. Typically, this method allows to enable or disable the 'Redo' menu item of your application.

    Returns boolean

  • Indicates if there is an action that can be undone. Typically, this method allows to enable or disable the 'Undo' menu item of your application.

    Returns boolean

  • Clears the undo/redo buffer.

    Returns void

  • Terminate a group of actions that can be undone in one time.

    Returns void

  • Redo, if possible, the last action.

    Returns void

  • Returns the code of the next redoable action.

    Returns string

  • Returns the item involved in the next redoable action.

    Returns Item

  • Remove the last task that has been added in the undo/redo buffer.

    Returns void

  • Submit a task (or action) that can be undone and redone. 'task' is a task to include in the undo list

    Parameters

    Returns void

  • Undo the last action performed in flow.

    Returns void

  • Returns the code of the next undoable action.

    Returns string

  • Returns the item involved in the next undoable action.

    Returns Item

Generated using TypeDoc