다음을 통해 공유


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
Public property CanRedo Determines whether a single redo is possible.
Public property CanUndo Determines whether a single undo is possible.
Public property CurrentTransaction Gets the current undo transaction in progress.
Public property LastRedoTransaction Gets the most recent (top) item of the RedoStack.
Public property LastUndoTransaction Gets the most recent (top) item of the UndoStack.
Public property Properties Gets the collection of properties controlled by the property owner. (Inherited from IPropertyOwner.)
Public property RedoDescription Gets the description of the most recent visible redo ITextUndoTransaction.
Public property RedoStack The redo stack for this history. It does not include any currently open or undo transactions.
Public property State Gets the current state of the undo history.
Public property UndoDescription Gets the description of the most recent visible undo ITextUndoTransaction.
Public property UndoStack The undo stack for this history. It does not include any currently open or redo transactions.

Top

Methods

  Name Description
Public method CreateTransaction Creates a new transaction, nests it in the previously current transaction, and marks it current.
Public method Redo Performs the specified number of redo operation and places the transactions on the undo stack.
Public method Undo Performs the specified number of undo operations and places the transactions on the redo stack.

Top

Events

  Name Description
Public event UndoRedoHappened Notifies consumers when an undo or a redo has happened on this history.
Public event 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.

See Also

Reference

Microsoft.VisualStudio.Text.Operations Namespace