2.4. Layout helpers — splits, columns, docking, spacing

Stateful layout helpers — splits, columns, and a fixed-orientation sidebar — plus thin wrappers around ImGui’s column primitives. split_h / split_v divide the available region between two BeginChild panes separated by a draggable handle, with the split ratio persisted in SliderStateFloat. dock_left is a stable-position left sidebar (not real docking — that lives in imgui_internal.h and is off-limits) with a draggable right edge. The columns(N, ${col0}, ${col1}, …) call_macro expands to columns_open(N) / next_col() / columns_close() with one block literal per column, so the column count must match the block-arg count statically.

2.4.1. Call macros

columns

Function annotation columns

split_v

Function annotation split_v

dock_left

Function annotation dock_left

split_h

Function annotation split_h

2.4.2. Uncategorized

columns_open(n: int; id: string = ""; border: bool = true )

Open an N-column block. id (default empty) is the ImGui id-stack tag used for column-width persistence; border (default on) draws the vertical dividers. Primitive emitted by the columns(N, …) call_macro; callable directly when the column count or shape is dynamic.

Arguments:
  • n : int

  • id : string

  • border : bool

next_col()

Advance to the next column. Underlying primitive emitted by the columns(N, …) call_macro.

columns_close()

Close a columns block (return to single-column layout). Underlying primitive emitted by the columns(N, …) call_macro.

list_clipper(items_count: int; body: block<(start:int;end_:int):void> )

Cull a virtual list of items_count items to the visible region. The block fires once per visible chunk with [start, end_) indices; render exactly those rows inside the block.

Arguments:
  • items_count : int

  • body : block<(start:int;end_:int):void>