Table of Contents

Class RichTextProjection

Namespace
RichEdit.Core
Assembly
RichEdit.Core.dll

An explicit plain-text projection of a rich subtree, with mappings tied to exactly one immutable snapshot.

public sealed class RichTextProjection
Inheritance
RichTextProjection
Inherited Members

Properties

Blocks

Gets the exact top-level blocks included in this projection.

public ImmutableArray<RichNodeId> Blocks { get; }

Property Value

ImmutableArray<RichNodeId>

Objects

Gets authored object positions, distinguishing them from literal placeholder characters in text.

public ImmutableArray<RichProjectedObject> Objects { get; }

Property Value

ImmutableArray<RichProjectedObject>

Paragraphs

Gets paragraphs in projection order.

public ImmutableArray<RichProjectedParagraph> Paragraphs { get; }

Property Value

ImmutableArray<RichProjectedParagraph>

Root

Gets the projected story, block, table cell, or list item. Addresses still belong to the owning story.

public RichNodeId Root { get; }

Property Value

RichNodeId

Separators

Gets structural separator positions and kinds.

public ImmutableArray<RichProjectedSeparator> Separators { get; }

Property Value

ImmutableArray<RichProjectedSeparator>

Snapshot

Gets the immutable snapshot described by this mapping.

public RichDocumentSnapshot Snapshot { get; }

Property Value

RichDocumentSnapshot

Story

Gets the projected story identity.

public RichNodeId Story { get; }

Property Value

RichNodeId

Text

Gets explicit plain text, including paragraph, cell, row, and soft-break separators.

public TextSnapshot Text { get; }

Property Value

TextSnapshot

Methods

GetOffset(RichTextPoint)

Maps a validated structural point into this snapshot's explicit text projection.

public int GetOffset(RichTextPoint point)

Parameters

point RichTextPoint

Returns

int

GetPoint(int, CaretAffinity)

Maps a projection boundary to a paragraph point. Structural-only gaps return null.

public RichTextPoint? GetPoint(int offset, CaretAffinity affinity = CaretAffinity.Downstream)

Parameters

offset int
affinity CaretAffinity

Returns

RichTextPoint?