C# 클래스 AvalonStudio.TextEditor.Document.UndoStack

상속: INotifyPropertyChanged
파일 보기 프로젝트 열기: VitalElement/AvalonStudio 1 사용 예제들

공개 메소드들

메소드 설명
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