Undo Namespace
Namespace Avalonia.Controls.Documents.Undo
Types
- EmptyUndoUnit - Sentinel Avalonia.Controls.Documents.Undo.IUndoUnit returned by empty / no-op undo scopes
(when undo is disabled, or while a replay is in progress and
Avalonia.Controls.Documents.Undo.UndoManager.BeginUndoUnit(string,Nullable{Avalonia.Controls.Documents.Undo.SelectionSnapshot}) short-circuits to an empty
scope). Never appears on
Avalonia.Controls.Documents.TextModel.DocumentChangedEventArgs.UndoUnit — that
property is when no real unit was opened, so
nulland Avalonia.Controls.Documents.Undo.EmptyUndoUnit.Instance retain distinct semantics. - IUndoHistory - Reads the undo and redo stacks.
- IUndoManager - Records and replays document edits.
- IUndoScope - Scope returned by Avalonia.Controls.Documents.Undo.UndoManager.BeginUndoUnit(string,Nullable{Avalonia.Controls.Documents.Undo.SelectionSnapshot}). Disposing the scope commits the unit to the undo stack (or nests it inside a parent scope). Callers may attach a post-edit selection snapshot via Avalonia.Controls.Documents.Undo.IUndoScope.SetSelectionAfter(Nullable{Avalonia.Controls.Documents.Undo.SelectionSnapshot}) before disposing.
- IUndoUnit - Read-only metadata for an undo/redo operation. The reversal mechanics live on an internal contract, so a unit obtained from Avalonia.Controls.Documents.Undo.UndoManager.Undo or Avalonia.Controls.Documents.Undo.IUndoScope.Unit can be described but not replayed by a caller.
- NullUndoManager - An Avalonia.Controls.Documents.Undo.IUndoManager that records nothing.
- SelectionSnapshot - Value-type snapshot of a Avalonia.Controls.TextSelection captured at a point in time. Stores a frozen Avalonia.Controls.Documents.TextModel.TextPointer per endpoint together with the offset inside that endpoint's cached leaf and the child-index path from the document root down to that leaf.
- UndoManager - Manages undo/redo operations for a document. Set one on Avalonia.Controls.Documents.TextModel.TextDocument.UndoManager to record changes; leave that property , or set Avalonia.Controls.Documents.Undo.UndoManager.IsEnabled to , for a document that records nothing.