UndoList Class Reference

Holds list of actions performed by user with interactive editing tools to enable undo functionality. More...

Collaboration diagram for UndoList:
Collaboration graph

Public Member Functions

bool Add (tkUndoOperation operationType, int LayerHandle, int ShapeIndex)
 Registers editing operation in undo list. More...
 
bool BeginBatch ()
 Starts batch which can hold one or more operation. UndoList.Undo and UndoList.Redo process all operations within batch as a single entity. More...
 
void Clear ()
 Remove all operations from undo list. More...
 
void ClearForLayer (int LayerHandle)
 Clears all operations for particular layer from undo list. More...
 
int EndBatch ()
 Ends batch started by UndoList.BeginBatch command. More...
 
string get_ErrorMsg (int ErrorCode)
 Gets the description of the specific error code. More...
 
bool Redo (bool ZoomToShape=true)
 Reapplies a single operation in the list that was previously undone. More...
 
bool Undo (bool ZoomToShape=true)
 Reverts a single operation performed by user. More...
 

Properties

string Key [get, set]
 A text string associated with object. Any value can be stored by developer in this property. More...
 
int LastErrorCode [get]
 Gets the code of last error which took place inside this object. More...
 
int RedoCount [get]
 Number operations performed by users that were undone but can be applied once again. More...
 
int TotalLength [get]
 Returns total number of entries in undo list. More...
 
int UndoCount [get]
 Number of operations performed by user that can be reverted with UndoList.Undo method. More...
 

Detailed Description

Holds list of actions performed by user with interactive editing tools to enable undo functionality.

New API 4.9.3:
Added in version 4.9.3

Member Function Documentation

◆ Add()

bool UndoList.Add ( tkUndoOperation  operationType,
int  LayerHandle,
int  ShapeIndex 
)

Registers editing operation in undo list.

Parameters
operationTypeType of undo operation (uoMoveShapes and uoRotateShapes aren't accepted here).
LayerHandleLayer handle the subject shape belongs to.
ShapeIndexIndex if subject shape.
Returns
True on success.

◆ BeginBatch()

bool UndoList.BeginBatch ( )

Starts batch which can hold one or more operation. UndoList.Undo and UndoList.Redo process all operations within batch as a single entity.

Returns
True on success, and false if there is a batch was already started.

◆ Clear()

void UndoList.Clear ( )

Remove all operations from undo list.

◆ ClearForLayer()

void UndoList.ClearForLayer ( int  LayerHandle)

Clears all operations for particular layer from undo list.

Parameters
LayerHandleLayer handle.

Should be called when certain layer is remove from map or editing session for it is finished.

◆ EndBatch()

int UndoList.EndBatch ( )

Ends batch started by UndoList.BeginBatch command.

Returns
Returns number of operation in the batch.

◆ get_ErrorMsg()

string UndoList.get_ErrorMsg ( int  ErrorCode)

Gets the description of the specific error code.

Parameters
ErrorCodeThe error code returned by LastErrorCode property.
Returns
String with the description.

◆ Redo()

bool UndoList.Redo ( bool  ZoomToShape = true)

Reapplies a single operation in the list that was previously undone.

Parameters
ZoomToShapeIf true, zooms to the subject shape in case it's outside the current map view.
Returns
True on success, i.e. there was at least one operation to redo.

◆ Undo()

bool UndoList.Undo ( bool  ZoomToShape = true)

Reverts a single operation performed by user.

Parameters
ZoomToShapeIf true, zooms to the subject shape in case it's outside the current map view.
Returns
True on success, i.e. there was at least one operation to undo

Property Documentation

◆ Key

string UndoList.Key
getset

A text string associated with object. Any value can be stored by developer in this property.

◆ LastErrorCode

int UndoList.LastErrorCode
get

Gets the code of last error which took place inside this object.

◆ RedoCount

int UndoList.RedoCount
get

Number operations performed by users that were undone but can be applied once again.

◆ TotalLength

int UndoList.TotalLength
get

Returns total number of entries in undo list.

All opeations within batch are considered a single entries.

◆ UndoCount

int UndoList.UndoCount
get

Number of operations performed by user that can be reverted with UndoList.Undo method.