Expand description
Structs§
- Context
- The event/update context
handle_eventand capture handlers reach for. - Drag
Mode - Drag-mode flags — control whether a view can be moved or resized interactively and the owner-boundary limits applied during the drag.
- DrawCtx
- The clipped, themed writer every view paints through.
- Group
- A view that owns and routes to a tree of child views.
- Grow
Mode - Grow-mode flags — control how each edge of the view tracks its owner when the owner is resized.
- Options
- The per-view option flags — fixed, build-time choices about how a view
behaves (selectable, framed, centered, pre/post-process, …), as opposed to
the live
Statebits. - Point
- A screen coordinate pair
(x, y). - Rect
- A rectangle defined by its top-left corner
a(inclusive) and bottom-right cornerb(exclusive). - State
- The per-view state flags — visibility, focus, selection, drag, and the rest of the activation/interaction bits a parent flips on its children.
- ViewId
- A lightweight, globally-unique view identity.
Copy, carries no reference into the tree, so it can be stored freely (sibling links, focus stacks, capture handlers). Identity isViewIdequality. - View
State - The data every view owns — origin, size, cursor, state/option/grow/drag flags, owner id, and more.
Enums§
- Deferred
- An effect on loop-owned state that a downward-borrowed view / capture handler
cannot perform inline. During dispatch the view tree is a live
&mutborrow stack (root → desktop → window → frame): a view cannot reach up or sideways — every ancestor is already&mut-borrowed above it, and a freshroot.find_mut(id)would alias that borrow. Nor does a view hold the program’s capture stack or command set. So any such effect is requested throughContext(which pushes a variant here) and applied by the loop after the dispatch unwinds and the root is free again. - Divider
Op - One operation on a splitter’s keyboard-resize session, brokered by id from
the window’s resize capture (which knows the splitter only by
ViewId). - Phase
- Focused-event dispatch phase.
- Select
Mode - Which select/deselect side effects
Group::set_currentapplies when changing the current view. - State
Flag - The state flags a parent group flips on a child through
View::set_state— the subset ofStatethat the focus / activation and visibility machinery drives, with side effects.