Expand description
The built-in widgets.
Each is a plain struct you can reach through
Ui::widget and Ui::widget_mut
to read or change it imperatively. How they look comes entirely from the
stylesheet; the widgets only know how to measure, react and paint their
own content.
Structsยง
- Blank
- A widget with nothing of its own: an empty box for the stylesheet to
paint. Used for
check,separatorandspacer. - Button
- A push button. Its children (usually a text label) are laid out in a row, so an icon element can sit next to the text.
- Checkbox
- A box that can be checked, followed by its children in a row.
- Container
- Lays its children out in a row or a column. Also what
panel,separator,spacerandcheckare made of; they differ only by tag, which is what the stylesheet sees. - Label
- A single line of text.
- Text
Input - A single-line text field.