Public Member Functions | Properties
UndoList Class Reference

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

List of all members.

Public Member Functions

bool Add (tkUndoOperation operationType, int LayerHandle, int ShapeIndex)
 Registers editing operation in undo list.
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.
void Clear ()
 Remove all operations from undo list.
void ClearForLayer (int LayerHandle)
 Clears all operations for particular layer from undo list.
int EndBatch ()
 Ends batch started by UndoList.BeginBatch command.
string get_ErrorMsg (int ErrorCode)
 Gets the description of the specific error code.
bool Redo (bool ZoomToShape=true)
 Reapplies a single operation in the list that was previously undone.
bool Undo (bool ZoomToShape=true)
 Reverts a single operation performed by user.

Properties

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

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

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.

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.
void UndoList.Clear ( )

Remove all operations from undo list.

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.

Ends batch started by UndoList.BeginBatch command.

Returns:
Returns number of operation in the batch.
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.
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.
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

string UndoList.Key [get, set]

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

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

int UndoList.RedoCount [get]

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

Returns total number of entries in undo list.

All opeations within batch are considered a single entries.

int UndoList.UndoCount [get]

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

 All Classes Files Functions Enumerations Properties Events