Skip to main content

Module selection_container

Module selection_container 

Source
Expand description

Selecting the read-only text inside a SelectionContainer.

A container keeps a SelectionRegistrar. Every Text composed inside it registers what it shows and where its content sits in the window, and draws its part of the selection behind its glyphs. The container turns pointer and key input into one TextSelection across those texts, in the order a person reads them.

Structsยง

SelectionEdge
One end of a selection: a byte offset into one registered text.
SelectionRegistrar
The texts of one SelectionContainer and the selection across them.
TextSelection
A selection across the texts of one container. anchor stays where the gesture started and focus follows the pointer, so either may come first in reading order.