Skip to main content

Module layout

Module layout 

Source

Structs§

LayoutNode
Rect

Enums§

Align
FlexDir

Functions§

compute
Compute layout starting at (0,0) with given available size. Returns the root LayoutNode with absolute coordinates.
find_by_id
Find the resolved rect of the (first) node tagged id (see Widget::id). Meant for baking a widget tree’s computed positions into some other system at “measure time” (e.g. a mod reporting real-slot pixel offsets to its host) — a WinForms-style measure-then-use pass, not a per-frame call.
hit_test
Hit-test: find deepest clickable, enabled node at (mx, my).
set_focus
Walk tree and set focused = true on the node whose id matches, false on all others.