ITextUndoHistory Interface
Contains undo transactions.
Namespace: Microsoft.VisualStudio.Text.Operations
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
Syntax
声明
Public Interface ITextUndoHistory _
Inherits IPropertyOwner
public interface ITextUndoHistory : IPropertyOwner
public interface class ITextUndoHistory : IPropertyOwner
type ITextUndoHistory =
interface
interface IPropertyOwner
end
public interface ITextUndoHistory extends IPropertyOwner
The ITextUndoHistory type exposes the following members.
Properties
Name | Description | |
---|---|---|
CanRedo | Determines whether a single redo is possible. | |
CanUndo | Determines whether a single undo is possible. | |
CurrentTransaction | Gets the current undo transaction in progress. | |
LastRedoTransaction | Gets the most recent (top) item of the RedoStack. | |
LastUndoTransaction | Gets the most recent (top) item of the UndoStack. | |
Properties | Gets the collection of properties controlled by the property owner. (Inherited from IPropertyOwner.) | |
RedoDescription | Gets the description of the most recent visible redo ITextUndoTransaction. | |
RedoStack | The redo stack for this history. It does not include any currently open or undo transactions. | |
State | Gets the current state of the undo history. | |
UndoDescription | Gets the description of the most recent visible undo ITextUndoTransaction. | |
UndoStack | The undo stack for this history. It does not include any currently open or redo transactions. |
Top
Methods
Name | Description | |
---|---|---|
CreateTransaction | Creates a new transaction, nests it in the previously current transaction, and marks it current. | |
Redo | Performs the specified number of redo operation and places the transactions on the undo stack. | |
Undo | Performs the specified number of undo operations and places the transactions on the redo stack. |
Top
Events
Name | Description | |
---|---|---|
UndoRedoHappened | Notifies consumers when an undo or a redo has happened on this history. | |
UndoTransactionCompleted | Notifies consumers when an ITextUndoTransaction is completed and added to the UndoStack. |
Top
Remarks
Typically only one undo transaction history at a time is available to the user.