Skip to main content

Module widget

Module widget 

Source

Structs§

EventContext
Context available during event handling.
LayoutContext
Context available during layout.
LayoutResponse
A widget’s reply to a parent’s layout query.
PaintContext
Context available during painting.
WidgetPlacement
Placement of a child widget during layout.
WidgetTreeView
Read-only view of the widget tree’s geometry passed to Widget::after_paint. Wraps a borrow of the arena so a parent widget can read the layout-resolved bounds of any descendant (typically by ids it memoised during build) once their paint pass has committed.

Enums§

CursorIcon
Cursor icon for the mouse pointer.
PendingChild
A child that is either pre-registered (ID) or waiting to be inserted. Used by the inline child() builder pattern: deferred children are stored inside the container and resolved recursively when BuildContext::add() inserts the container into the arena.
StackAxis
The main (distribution) axis of the linear stack currently negotiating a child’s layout, if any. Set by HStack/VStack while they query children so an orientation-agnostic flexible child (notably Spacer) can place its minimum length on the main axis only and report 0 on the cross axis — otherwise it imposes a spurious cross-axis floor on the stack. None when the parent is not a linear stack (or in test contexts).

Traits§

Widget
The full Widget trait for Level 2 (custom rendering) widgets.