IEditorViewTextChangeOptions Interface
Provides the base requirements for options that are applied to an ITextChange, and are created from an IEditorView.
public interface IEditorViewTextChangeOptions : ITextChangeOptions
Properties
BlockEditRangeAdjustFunc
Gets or sets a function that can adjust a block selection line's character Range prior to modification.
Func<ITextViewLine, Range, Range> BlockEditRangeAdjustFunc { get; set; }
Property Value
- Func<ITextViewLine, Range, Range>:
A function that can adjust a block selection line's character Range prior to modification.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText.
This property is generally used to handle zero-width character Range scenarios during block edits.
CanApplyToBlockEdit
Gets or sets whether the text change can apply to each line in a block edit when applicable.
bool CanApplyToBlockEdit { get; set; }
Property Value
- bool:
trueif the text change can apply to each line in a block edit when applicable; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText.
CanApplyToMultipleSelections
Gets or sets whether the text change can apply to multiple selections.
bool CanApplyToMultipleSelections { get; set; }
Property Value
- bool:
trueif the text change can apply to multiple selections; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText.
When false, the text change will only apply to the primary selection when there are multiple selections.
IsBlock
Gets or sets whether the text change is a block change.
bool IsBlock { get; set; }
Property Value
- bool:
trueif the text change is a block change; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText.
SelectInsertedText
Gets or sets whether to select the text that is inserted into the document.
bool SelectInsertedText { get; set; }
Property Value
- bool:
trueif the inserted text should be selected; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText.
VirtualCharacterFill
Gets or sets whether when at a virtual character position, the text change will insert whitespace into the document to fill up to the insertion point's TextPosition.
bool VirtualCharacterFill { get; set; }
Property Value
- bool:
trueif whitespace will be inserted; otherwise,false. The default value istrue.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText.
It is generally used by text changes such as line feed insertion or open line actions.
ZeroLengthEditRangeAdjustFunc
Gets or sets a function that can adjust a zero-width selection's position range prior to modification.
Func<TextPosition, TextPositionRange> ZeroLengthEditRangeAdjustFunc { get; set; }
Property Value
- Func<TextPosition, TextPositionRange>:
A function that can adjust a zero-width selection's position range prior to modification.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText.