Type: BCS.IUndoManager
Main API for the Undo/Redo manager
Properties
Enabled
- Description: Temporarily enables or disables the undo manager
- Type: Boolean
- Access: Read and Write
MaxStackSizeEnabled
- Description: True if the undo functionality is enabled, false otherwise
- Type: Boolean
- Access: Read and Write
RedoHistory
- Description: The Redo stack
- Type: IUndoStack
- Access: Read
SuppressHistoryNotifications
- Description: Disables or enables undo/redo history databinding change notifications
- Type: Boolean
- Access: Read and Write
UndoHistory
- Description: The Undo stack
- Type: IUndoStack
- Access: Read
Methods
Commit(System.String)
Commits the current changeset to the change history. This will clear the redo stack.
- Parameters:
- operationDescription: Description of the operation to commit. eg “Move”, “Rotate”, “Edit”
LoadSettings(BCS.SAF.IApplication)
Reloads the undo/redo settings from the application settings
- Parameters:
- application:
NewOperation
Begins tracking an undoable operation. This is equivalent to Commit(), but used for readability. Any previously uncommitted changes will be committed before starting the new operation.
ObjectAdded(BCS.IStorable)
Notify the undo manager an object has been added to the project
- Parameters:
- obj: The new object. Must be storable (xml serializable)
ObjectDeleted(BCS.IStorable)
Notify the undo manager an object has been deleted from the project
- Parameters:
- obj: The deleted object (xml serializable)
ObjectEditAfter(System.Guid,System.String,BCS.IUndoableEdit)
Notifies the undo manager a single property change has occurred.
- Parameters:
- id: Guid of the object that was modified
- propertyName: The name of the property that was changed
- edit: The value of the property after the change
ObjectEditBefore(System.Guid,System.String,BCS.IUndoableEdit)
Notifies the undo manager a single property change has occurred. Records the original value. Can be set only once per (object, property, operation)
- Parameters:
- id: Guid of the object that was modified
- propertyName: The name of the property that was changed
- edit: The original value of the property before the change
Redo
Performs a Redo.
RedoTo(System.Int32)
Redoes any changes until the state at redoableOperationId is reached
- Parameters:
- undoableOperationId: Id of the undoable operation to restore to
RemoveObjects(System.Collections.IList)
Creates a changelist containing all the items for deletion
- Parameters:
- list: List of deleted items
ResetHistory
Clears the Undo/Redo history.
SetUndoEnabled(System.Boolean)
Allows scoped setting of the undo manager via the ‘using’ statement. Enabled will be restored when block has finished exiting
- Returns:
- A disposable object to be used with the ‘using’ statement
TrackObject(BCS.IBaseObject)
Holds other objects the undo manager can track that are not directly stored in the project itself eg. 3D View objects
Undo
Performs an Undo.
UndoTo(System.Int32)
Undoes any changes until the state at undoableOperationId is reached
- Parameters:
- undoableOperationId: Id of the undoable operation to restore to