TextSelection Class

Definition

The text selection of a document session: an anchor and a focus caret in reading order, possibly on different pages, driven by press-drag, double- and triple-click, select-all and keyboard moves, read back as quads per page for the shell to draw and as text to copy. Pointer coordinates come from TryGetPageAt(in Viewport, Double, Double, out PagePoint) (PagePoint, default user space), so the selection is independent of zoom, rotation and layout mode.

public sealed class TextSelection

Remarks

ISO 32000-2 §9.4.4, §14.8.2.5 (reading order), §14.9.4 (replacement text). Spec #33 viewer capability 4. A page takes part once its selectable text is loaded (LoadPageAsync(Int32, CancellationToken)); gestures on a page not loaded yet do nothing. Begin(in PagePoint, SelectionGranularity), Extend(in PagePoint), Move(SelectionMove, Boolean) and GetQuads(Int32, Span<Quad>) allocate nothing, so a shell calls them on every pointer move. Not thread-safe: drive it from the UI thread; loading may run anywhere.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Constructors (2)

Properties (8)

Methods (11)

Events (1)