hbox (cellium v0.1.0)

View Source

Horizontal box container for stacking widgets horizontally.

hbox is a layout container that arranges its children side by side from left to right. It handles automatic width distribution among expanding and fixed-size children.

Usage

DSL:

{hbox, [{id, controls}], [
    {button, [{id, prev_btn}], "Prev"},
    {spacer, [{size, 2}]},
    {button, [{id, next_btn}], "Next"}
]}

Functional:

hbox:new(controls)

Summary

Functions

Creates a new horizontal box container.

Creates a new horizontal box container with children.

Delegates rendering to the generic container module.

Delegates focused rendering to the generic container module.

Functions

new(Id)

-spec new(term()) -> map().

Creates a new horizontal box container.

new(Id, Children)

-spec new(term(), list()) -> map().

Creates a new horizontal box container with children.

render(Widget, Buffer)

-spec render(map(), map()) -> map().

Delegates rendering to the generic container module.

render_focused(Widget, Buffer)

-spec render_focused(map(), map()) -> map().

Delegates focused rendering to the generic container module.