Skip to content

TextStudioPlanView

StructTextStudioTextStudio
public readonly struct TextStudioPlanView

Read-only semantic plan consumed by renderers and integrations.

public TextStudioTextUnit GetTextUnit(int unitIndex)

Gets semantic-unit metadata, or a default value for an invalid index.

Parameters

Name Type
unitIndex System.Int32

Returns

TextStudio.TextStudioTextUnit

public int GetResolvedStart(int unitIndex)

Gets the unit’s start index in resolved plain text.

Parameters

Name Type
unitIndex System.Int32

Returns

System.Int32

public int GetResolvedLength(int unitIndex)

Gets the unit’s UTF-16 length in resolved plain text.

Parameters

Name Type
unitIndex System.Int32

Returns

System.Int32

public int GetUnitIndexForResolvedChar(int resolvedCharIndex)

Maps a resolved UTF-16 character index to its semantic text unit.

Parameters

Name Type
resolvedCharIndex System.Int32

Returns

System.Int32

public int GetUnitIndexForDisplayChar(int displayCharIndex)

Maps a display-text UTF-16 index to its semantic text unit, ignoring retained native markup.

Parameters

Name Type
displayCharIndex System.Int32

Returns

System.Int32

public int GetResolvedIndexForDisplayChar(int displayCharIndex)

Maps a display-text UTF-16 index to resolved plain text.

Parameters

Name Type
displayCharIndex System.Int32

Returns

System.Int32

public int GetUnitBoundaryForResolvedChar(int resolvedCharIndex)

Maps a resolved character boundary to the corresponding semantic-unit boundary.

Parameters

Name Type
resolvedCharIndex System.Int32

Returns

System.Int32

public char GetPrimaryChar(int unitIndex)

Gets the first UTF-16 code unit of a semantic unit, or a null character when unavailable.

Parameters

Name Type
unitIndex System.Int32

Returns

System.Char

public string GetUnitText(int unitIndex)

Allocates and returns the resolved substring represented by a semantic unit.

Parameters

Name Type
unitIndex System.Int32

Returns

System.String

public bool IsWhiteSpaceUnit(int unitIndex)

Reports whether every resolved character in a semantic unit is whitespace.

Parameters

Name Type
unitIndex System.Int32

Returns

System.Boolean

public bool IsLineBreakUnit(int unitIndex)

Reports whether a semantic unit begins with a line-break character.

Parameters

Name Type
unitIndex System.Int32

Returns

System.Boolean

public bool IsPunctuationUnit(int unitIndex)

Reports whether a semantic unit begins with Unicode punctuation.

Parameters

Name Type
unitIndex System.Int32

Returns

System.Boolean

public bool IsCreated { get; }

Returns

System.Boolean

public string CanonicalText { get; }

Returns

System.String

public uint SourceVersion { get; }

Returns

System.UInt32

public string ResolvedText { get; }

Returns

System.String

public string DisplayText { get; }

Returns

System.String

public int TokenCount { get; }

Returns

System.Int32

public int GlyphRunCount { get; }

Returns

System.Int32

public int WordCount { get; }

Returns

System.Int32

public int LineCount { get; }

Returns

System.Int32

public int ParagraphCount { get; }

Returns

System.Int32

public int EffectBindingCount { get; }

Returns

System.Int32

public int CharacterSubstitutionBindingCount { get; }

Returns

System.Int32

public int ActionMarkerCount { get; }

Returns

System.Int32

public int ExtensionTagCount { get; }

Returns

System.Int32

public int InstantRangeCount { get; }

Returns

System.Int32

public int RegionMapCount { get; }

Returns

System.Int32

public int VisibleGlyphCount { get; }

Returns

System.Int32

public int TextUnitCount { get; }

Returns

System.Int32

public TextStudioReadOnlyBuffer<TextToken> Tokens { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextToken}

public TextStudioReadOnlyBuffer<GlyphRun> GlyphRuns { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.GlyphRun}

public TextStudioReadOnlyBuffer<WordRange> WordRanges { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.WordRange}

public TextStudioReadOnlyBuffer<LineRange> LineRanges { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.LineRange}

public TextStudioReadOnlyBuffer<ParagraphRange> ParagraphRanges { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.ParagraphRange}

public TextStudioReadOnlyBuffer<EffectBinding> EffectBindings { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.EffectBinding}

public TextStudioReadOnlyBuffer<CharacterSubstitutionBinding> CharacterSubstitutionBindings { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.CharacterSubstitutionBinding}

public TextStudioReadOnlyBuffer<ActionMarker> ActionMarkers { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.ActionMarker}

public TextStudioReadOnlyBuffer<TextStudioExtensionTag> ExtensionTags { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioExtensionTag}

public TextStudioReadOnlyBuffer<TextStudioInstantRange> InstantRanges { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioInstantRange}

public TextStudioReadOnlyBuffer<RegionToGlyphMap> RegionMaps { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.RegionToGlyphMap}

public TextStudioReadOnlyBuffer<int> GlyphToWordIndex { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Int32}

public TextStudioReadOnlyBuffer<int> GlyphToLineIndex { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Int32}

public TextStudioReadOnlyBuffer<int> GlyphToParagraphIndex { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Int32}

public TextStudioReadOnlyBuffer<TextStudioTextUnit> TextUnits { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioTextUnit}

public TextStudioReadOnlyBuffer<int> ResolvedCharToTextUnitIndex { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Int32}

public TextStudioReadOnlyBuffer<int> DisplayCharToTextUnitIndex { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Int32}

public TextStudioReadOnlyBuffer<int> DisplayCharToResolvedCharIndex { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Int32}

public TextStudioReadOnlyBuffer<DecorationBits> CharDecorations { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.DecorationBits}