Class TextInputContext
- Namespace
- TextEdit.Core
- Assembly
- TextEdit.Core.dll
A synchronous input-rule callback's immutable input and proposed dependent changes.
public sealed class TextInputContext
- Inheritance
-
TextInputContext
- Inherited Members
Remarks
All proposals address Input. A callback must not mutate a live editor or retain this builder for later use.
Properties
Before
Gets the committed source before native input.
public TextSnapshot Before { get; }
Property Value
BeforeSelections
Gets selections before the originating input.
public TextSelectionSet BeforeSelections { get; }
Property Value
Input
Gets source after the originating input, before any rule proposals.
public TextSnapshot Input { get; }
Property Value
InputChanges
Gets the sequential replacements made by originating input.
public ImmutableArray<TextReplacement> InputChanges { get; }
Property Value
IsCompositionCommit
Gets whether this input commits a completed native composition.
public bool IsCompositionCommit { get; }
Property Value
Selections
Gets selections after originating input, before dependent changes.
public TextSelectionSet Selections { get; }
Property Value
Methods
Replace(TextSpan, string)
Proposes a dependent replacement against Input. Overlapping proposals reject the entire plan.
public void Replace(TextSpan range, string text)
Parameters
SetSelections(TextSelectionSet)
Proposes all resulting selections in final coordinates. Only one rule can set them.
public void SetSelections(TextSelectionSet selections)
Parameters
selectionsTextSelectionSet