C# Класс AvalonStudio.TextEditor.Document.UndoStack

Наследование: INotifyPropertyChanged
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ClearAll ( ) : void

Clears both the undo and redo stack.

ClearRedoStack ( ) : void

Call this method, if you want to clear the redo stack

DiscardOriginalFileMarker ( ) : void

Discards the current "original" marker.

EndUndoGroup ( ) : void

Stops grouping changes.

MarkAsOriginalFile ( ) : void

Marks the current state as original. Discards any previous "original" markers.

Push ( IUndoableOperation operation ) : void

Call this method to push an UndoableOperation on the undostack. The redostack will be cleared if you use this method.

PushOptional ( IUndoableOperation operation ) : void

Call this method to push an UndoableOperation on the undostack. However, the operation will be only stored if the undo group contains a non-optional operation. Use this method to store the caret position/selection on the undo stack to prevent having only actions that affect only the caret and not the document.

Redo ( ) : void

Call this method to redo the last undone operation

StartContinuedUndoGroup ( object groupDescriptor = null ) : void

Starts grouping changes, continuing with the previously closed undo group if possible. Maintains a counter so that nested calls are possible. If the call to StartContinuedUndoGroup is a nested call, it behaves exactly as StartUndoGroup(), only top-level calls can continue existing undo groups.

StartUndoGroup ( ) : void

Starts grouping changes. Maintains a counter so that nested calls are possible.

StartUndoGroup ( object groupDescriptor ) : void

Starts grouping changes. Maintains a counter so that nested calls are possible.

Undo ( ) : void

Call this method to undo the last operation on the stack

Приватные методы

Метод Описание
CallEndUpdateOnAffectedDocuments ( ) : void
EnforceSizeLimit ( ) : void
FileModified ( int newElementsOnUndoStack ) : void
NotifyPropertyChanged ( string propertyName ) : void
Push ( IUndoableOperation operation, bool isOptional ) : void
Push ( TextDocument document, DocumentChangeEventArgs e ) : void
RecalcIsOriginalFile ( ) : void
RegisterAffectedDocument ( TextDocument document ) : void
RunRedo ( IUndoableOperation op ) : void
RunUndo ( IUndoableOperation op ) : void
ThrowIfUndoGroupOpen ( ) : void

Throws an InvalidOperationException if an undo group is current open.

Описание методов

ClearAll() публичный Метод

Clears both the undo and redo stack.
public ClearAll ( ) : void
Результат void

ClearRedoStack() публичный Метод

Call this method, if you want to clear the redo stack
public ClearRedoStack ( ) : void
Результат void

DiscardOriginalFileMarker() публичный Метод

Discards the current "original" marker.
public DiscardOriginalFileMarker ( ) : void
Результат void

EndUndoGroup() публичный Метод

Stops grouping changes.
public EndUndoGroup ( ) : void
Результат void

MarkAsOriginalFile() публичный Метод

Marks the current state as original. Discards any previous "original" markers.
public MarkAsOriginalFile ( ) : void
Результат void

Push() публичный Метод

Call this method to push an UndoableOperation on the undostack. The redostack will be cleared if you use this method.
public Push ( IUndoableOperation operation ) : void
operation IUndoableOperation
Результат void

PushOptional() публичный Метод

Call this method to push an UndoableOperation on the undostack. However, the operation will be only stored if the undo group contains a non-optional operation. Use this method to store the caret position/selection on the undo stack to prevent having only actions that affect only the caret and not the document.
public PushOptional ( IUndoableOperation operation ) : void
operation IUndoableOperation
Результат void

Redo() публичный Метод

Call this method to redo the last undone operation
public Redo ( ) : void
Результат void

StartContinuedUndoGroup() публичный Метод

Starts grouping changes, continuing with the previously closed undo group if possible. Maintains a counter so that nested calls are possible. If the call to StartContinuedUndoGroup is a nested call, it behaves exactly as StartUndoGroup(), only top-level calls can continue existing undo groups.
public StartContinuedUndoGroup ( object groupDescriptor = null ) : void
groupDescriptor object /// An object that is stored with the undo group. /// If this is not a top-level undo group, the parameter is ignored. ///
Результат void

StartUndoGroup() публичный Метод

Starts grouping changes. Maintains a counter so that nested calls are possible.
public StartUndoGroup ( ) : void
Результат void

StartUndoGroup() публичный Метод

Starts grouping changes. Maintains a counter so that nested calls are possible.
public StartUndoGroup ( object groupDescriptor ) : void
groupDescriptor object /// An object that is stored with the undo group. /// If this is not a top-level undo group, the parameter is ignored. ///
Результат void

Undo() публичный Метод

Call this method to undo the last operation on the stack
public Undo ( ) : void
Результат void