vbox (cellium v0.1.0)

View Source

Vertical box container for stacking widgets vertically.

vbox is a layout container that arranges its children one after another from top to bottom. It handles automatic height distribution among expanding and fixed-size children.

Usage

DSL:

{vbox, [{id, main_layout}, {padding, 1}], [
    {header, [], "Title"},
    {text, [], "Content goes here"},
    {button, [{id, ok_btn}], "OK"}
]}

Functional:

vbox:new(main_layout)

Summary

Functions

Creates a new vertical box container.

Creates a new vertical 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 vertical box container.

new(Id, Children)

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

Creates a new vertical 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.