UI module

panel

procedureextensionexperimentalsince 0.31.0Source

A column on the theme's panel colour.

Example↗
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
    for panel(.{ padding = 12 }) {
        label("Settings");
    }
});
assert(find_label(*ui, "Settings") != null);
panel :: (style: Style = .{}, loc := #caller_location) -> Container

A column on the theme's panel colour.

Parameters

style: Style = .{}
layout and paint options. A background set here replaces the panel colour.
loc := #caller_location
the call site. It identifies the widget from one frame to the next, so leave the default.

Returns

Example↗
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
    for panel(.{ padding = 12 }) {
        label("Settings");
    }
});
assert(find_label(*ui, "Settings") != null);

See also