Paragraph index of the caret (the selection's moving end).
Byte offset of the caret within its paragraph.
Paragraph index of the anchor (the selection's fixed end).
Byte offset of the anchor within its paragraph.
Whether a non-empty range is selected.
Whether the selection is a collapsed caret (no range selected).
Copy the selection into the engine's clipboard.
Copy the selection into the clipboard, then delete it.
Insert the clipboard contents at the caret, replacing any selection.
Collapse the selection to the caret.
Place a collapsed caret at (paragraph, byteOffset).
Select the byte range [start, end) within one paragraph.
Move the caret by unit in direction; extend grows the selection instead of
collapsing it. Line-based units need a laid-out document (a live viewport).
Move one character left.
Move one character right.
Move one word left.
Move one word right.
Move up one line (needs a laid-out document).
Move down one line (needs a laid-out document).
Move to the start of the line (needs a laid-out document).
Move to the end of the line (needs a laid-out document).
Move to the start of the document.
Move to the end of the document.
The document's caret and selection. Positions are
(paragraph, byteOffset)pairs. Reads reflect the current state; every mutator chains and repaints the attached viewport.