Expand description
Text input field — single-line or multiline. The widget itself
owns layout / draw; the runtime side of text editing
(insert, delete, cursor movement, selection, clipboard)
lives in the event_loop::text_editing private module.
Structs§
- Resolve the font size into a concrete logical px.
Some( len )resolves againstCanvas::viewport_logical— the font space, so× dpi_scaleat raster yields the right physical size — exactly like the button label;Nonefollows the widget-scaling mode at the theme default. Shared by the draw and hit-test paths, which all carry a canvas. A run of a multiline field’s value drawn in a colour of its own, as a syntax highlighter marks keywords, strings and comments.rangeis in bytes of the value and should fall on character boundaries; runs are expected in order and not overlapping, and what no run covers takes the field’s colour. - A text input field.
Functions§
- Hit rect for the eye icon at the right edge of a
TextEditconfigured withTextEdit::password_toggle. Returned in the same coordinate space as the field’srect. Pointer / touch dispatch consult this before falling through to cursor placement — a tap inside the zone fires the toggle message instead of moving the caret.