ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_widget_panel_t Struct Reference

A container widget's child array + stack-layout parameters (#145). More...

#include <ra8_widget.h>

Detailed Description

A container widget's child array + stack-layout parameters (#145).

The flat container ops above (ra8_widget_layout_stack et al.) lay out one array of widgets inside a frame. A panel lifts that into a tree: a panel is itself a ra8_widget_t (bind it with ra8_widget_panel_init), so a panel can be a child of another panel – the dwm-style composition the issue asks for, where the screen is a tree of opt-in pieces. Rendering a panel lays its children out inside the panel's own rect and composites them; routing offers an input event to those children. Everything is caller-owned (the child array and the ra8_box scratch), so a panel allocates nothing (NASA Rule 3) and the same tree runs on the host and on the board.

Invariant
box_scratch holds at least count + 1 nodes.
children covers count entries.
Example:
static ra8_widget_t kids[2];
static ra8_box_t scratch[3];
ra8_widget_panel_t body = {.children = kids, .box_scratch = scratch,
.count = 2U, .box_cap = 3U,
ra8_widget_t panel = {};
(void)ra8_widget_panel_init(&panel, &body);
@ k_ra8_widget_axis_row
Horizontal stack (left -> right).
Definition ra8_widget.h:177
ra8_err_t ra8_widget_panel_init(ra8_widget_t *w, ra8_widget_panel_t *panel)
Bind a widget instance to a container panel.
One node in a box tree (caller-owned).
Definition ra8_box.h:90
A container widget's child array + stack-layout parameters (#145).
One widget instance (caller-owned, no allocation).
See also
ra8_widget_panel_init Bind a widget to a panel.
ra8_widget_panel_compose Run the top-level compose cycle.
Since
0.1.0

The documentation for this struct was generated from the following file: