pub struct BoxNode {
pub id: Option<String>,
pub children: Vec<BoxChild>,
pub background: Option<PaintChoice>,
pub border: Option<BoxBorder>,
pub at: Option<f64>,
pub duration: Option<f64>,
pub inset: Option<Inset>,
pub css: BTreeMap<String, Value>,
}Expand description
A box laid out by CSS flexbox (the default) or grid, filling the node’s area. Its fields are
the engine layout’s container fields as CSS writes them (flex_direction, gap,
"8px 16px" paddings, "repeat(3, 1fr)" tracks); background and border take theme
colors.
Text, shapes, colors and boxes among its children are drawn by the layout itself. Any other child (a video, a group, a sequence) gets a place in the layout and is drawn there, clipped to its rounded corners; such a place keeps still.
Fields§
§id: Option<String>The node’s name, for other nodes to refer to.
children: Vec<BoxChild>The children, in paint order.
background: Option<PaintChoice>What covers the box, rounded by border_radius.
border: Option<BoxBorder>A border inside the box.
at: Option<f64>Seconds from the parent’s start (an overlay’s: the video’s). Ignored in a sequence.
duration: Option<f64>Length in seconds. Default: the longest picture child’s, else what its parent gives it.
inset: Option<Inset>Pixels kept clear inside the parent’s area. A nested box places itself by its item fields.
css: BTreeMap<String, Value>The other container fields of an engine layout box, by name. A length may be a theme
length, {"$theme": "margin", "scale": 2}: margin, title_size, subtitle_size,
body_size, caption_size or label_size, times scale (default 1).