# Class TaskManager

Represents a TaskManager object.

#### Hierarchy

- TaskManager

- Defined in flow.ts:5221

#####
Index

### Constructors

constructor

### Properties

canUndoRedo
skipUndo
undoLimit

### Methods

addToLastAction
beginAction
canRedo
canUndo
clear
endAction
redo
redoCode
redoItem
removeLastTask
submitTask
undo
undoCode
undoItem

## Constructors

### constructor

- new TaskManager(): TaskManager

- #### Returns TaskManager

  - Defined in flow.ts:5256

## Properties

### canUndoRedo

canUndoRedo: boolean = true

Determines whether undo/redo is allowed.

#### Default

    true

- Defined in flow.ts:5240

### skipUndo

skipUndo: boolean = false

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

#### Default

    true

- Defined in flow.ts:5254

### undoLimit

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

- Defined in flow.ts:5249

## Methods

### addToLastAction

- addToLastAction(): void

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

  #### Returns void

  - Defined in flow.ts:5388

### beginAction

- beginAction(code): 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

  - Defined in flow.ts:5361

### canRedo

- canRedo(): boolean

- 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

  - Defined in flow.ts:5290

### canUndo

- canUndo(): 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

  - Defined in flow.ts:5283

### clear

- clear(): void

- Clears the undo/redo buffer.

  #### Returns void

  - Defined in flow.ts:5378

### endAction

- endAction(): void

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

  #### Returns void

  - Defined in flow.ts:5370

### redo

- redo(): void

- Redo, if possible, the last action.

  #### Returns void

  - Defined in flow.ts:5324

### redoCode

- redoCode(): string

- Returns the code of the next redoable action.

  #### Returns string

  - Defined in flow.ts:5266

### redoItem

- redoItem(): Item

- Returns the item involved in the next redoable action.

  #### Returns Item

  - Defined in flow.ts:5276

### removeLastTask

- removeLastTask(): void

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

  #### Returns void

  - Defined in flow.ts:5436

### submitTask

- submitTask(task): void

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

  #### Parameters

  - ##### task: Task

  #### Returns void

  - Defined in flow.ts:5394

### undo

- undo(): void

- Undo the last action performed in flow.

  #### Returns void

  - Defined in flow.ts:5295

### undoCode

- undoCode(): string

- Returns the code of the next undoable action.

  #### Returns string

  - Defined in flow.ts:5261

### undoItem

- undoItem(): Item

- Returns the item involved in the next undoable action.

  #### Returns Item

  - Defined in flow.ts:5271

Generated using TypeDoc