Click or drag to resize

GH_UndoServer Class

Provides access to a documents undo data.
Inheritance Hierarchy
SystemObject
  Grasshopper.Kernel.UndoGH_UndoServer

Namespace:  Grasshopper.Kernel.Undo
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public class GH_UndoServer : IGH_DebugDescription

The GH_UndoServer type exposes the following members.

Constructors
  NameDescription
Public methodGH_UndoServer
Initializes a new instance of the GH_UndoServer class
Top
Properties
  NameDescription
Public propertyFirstRedoName
Gets the name of the last item in the redo stack (the first item to be redone).
Public propertyFirstUndoName
Gets the name of the last item in the undo stack (the first item to be undone).
Public propertyMaxRecords
Gets or sets the maximum number of undo records that can be stored.
Public propertyRedoCount
Number of redo records currently in the stack.
Public propertyRedoGuids
Gets a sorted list of all the redo Guids in this server.
Public propertyRedoNames
Gets a sorted list of all the redo Guids in this server.
Public propertyUndoCount
Number of undo records currently in the stack.
Public propertyUndoGuids
Gets a sorted list of all the undo Guids in this server.
Public propertyUndoNames
Gets a sorted list of all the undo Guids in this server.
Top
Methods
  NameDescription
Public methodAppendToDebugLog
Public methodClear
Clear both undo and redo lists.
Public methodClearRedo
Clear the undo list.
Public methodClearUndo
Clear the redo list.
Public methodMergeRecords
Attempt to merge the N most recent records into one. The name of the merged record will be identical to the name of the oldest record.
Public methodPerformRedo
Performs a single Redo step if possible and migrates the record onto the undo stack. This function may throw all kinds of exceptions, if you're calling it from a UI thread, use a Try..Catch block to prevent crashes.
Public methodPerformUndo
Performs a single Undo step when possible and migrates the record onto the redo stack. This function may throw all kinds of exceptions, if you're calling it from a UI thread, use a Try..Catch block to prevent crashes.
Public methodPushUndoRecord(GH_UndoRecord)
Add a new undo record to the undo stack, this function clears the Redo stack.
Public methodPushUndoRecord(String, GH_UndoAction)
Add a new undo record to the undo stack, this function clears the Redo stack.
Public methodRemoveRecord
Remove the record with the specified ID from the undo or redo stack.
Top
See Also