Skip to main content

Module caret

Module caret 

Source
Expand description

Shared caret geometry for text fields and document renderers.

Enums§

CaretHeight
How tall the app-wide block caret stands.
CaretShape
The app-wide caret shape. Terminal cursors follow their terminal instead.
InactiveCaret
What the app-wide block caret paints as while its window is inactive.

Functions§

character_advance
The next grapheme’s shaped advance, or no character at a hard/soft line end.
cover
The colour paint_covered draws the glyph at offset of runs in, under a solid caret over the opaque page: theme::ink_over the caret, from the Layers::surface there, as a selected glyph is.
paint_covered
Paints the glyphs layout shaped for range again, in color: what a solid block covers, painted over the block and the line. at is the top left of the first one’s slot, on a row line_height tall.
recoloured
runs cut at range’s edges, the pieces inside it in color.
zero_width
The shaped width of 0 in font: a wide caret’s width where no character follows it.