Class TextComposition
- Namespace
- TextEdit.Core
- Assembly
- TextEdit.Core.dll
A view-owned provisional text root protected by one document input lease.
public sealed class TextComposition : IDisposable
- Inheritance
-
TextComposition
- Implements
- Inherited Members
Remarks
Updates never enter document history. Commit reconciles mirrored carets and input rules before publishing one transaction.
Properties
CanMirrorSecondarySelections
Gets whether the completed primary replacement can be replicated to secondary selections.
public bool CanMirrorSecondarySelections { get; }
Property Value
Generation
Gets a generation incremented by every provisional update.
public long Generation { get; }
Property Value
Selection
Gets the native primary selection in provisional coordinates.
public TextSelection Selection { get; }
Property Value
Snapshot
Gets provisional source with an invalid document revision.
public TextSnapshot Snapshot { get; }
Property Value
Methods
Cancel()
Discards provisional text, retaining the original document, selections, version, and history.
public void Cancel()
Commit(string?)
Commits final text, mirrored simple replacements, and input rules as one history unit.
public TextEditResult Commit(string? description = null)
Parameters
descriptionstring
Returns
Dispose()
Cancels an uncommitted composition.
public void Dispose()
Update(Action<TextDocumentEdit>, TextSelection)
Stages sequential native operations and their resulting primary selection.
public void Update(Action<TextDocumentEdit> update, TextSelection selection)
Parameters
updateAction<TextDocumentEdit>selectionTextSelection