A container that lays its children out left to right.
- style: layout and paint options for the container.
- loc: the call site. It identifies the widget from one frame to the next, so leave the default.
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
for row(.{ gap = 10 }) {
label("left");
label("right");
}
});
assert(find_label(*ui, "right").rect.x > find_label(*ui, "left").rect.x);row :: (style: Style = .{}, loc := #caller_location) -> Container
A container that lays its children out left to right.
Parameters
- style: Style = .{}
- layout and paint options for the container.
- loc := #caller_location
- the call site. It identifies the widget from one frame to the next, so leave the default.
Returns
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
for row(.{ gap = 10 }) {
label("left");
label("right");
}
});
assert(find_label(*ui, "right").rect.x > find_label(*ui, "left").rect.x);