UI module

Node

structsince 0.31.0Source

One widget in the tree. App code reads it through widget's result and the test helpers; the library fills it in.

Fields

id: u64
parent: *Node
children: [..] *Node
seen: int
the frame that last declared this node
kind: Node_Kind
Declared every frame.
role: Role
axis: Axis
style: Style
text: string
text_style: Text_Style
label: string
names the widget to tests and a later accessibility export
value: string
the widget's current value, for the same
focusable: bool
key_name: string
the text of the key call that named this node this frame, for warnings (debug only)
pointer: bool
takes mouse input (hover, press)
scrolls: bool
a scroll container
paint: Paint_Proc
paint_data: *void
valid while the frame's build runs and until the next frame
paint_size: Vector2
natural size of a LEAF
natural: Vector2
Computed by layout.
rect: Rect
clip: Rect
the visible part, after the clips of ancestors
content: Vector2
size of a scroll container's content
scroll_x: float
Kept between frames.
scroll_y: float
warned_zero_size: bool
a zero-size focusable has been reported
state: *void
see state
state_free: (data: *void)
state_size: int
repeats: Table(u64, int)
call sites seen under this node this frame

See also