.section Widgets
.topic widget.wrapbox
.title WrapBox
.toc 0 WrapBox
.index WrapBox
.index wgtWrapBox

.h2 WrapBox

A flow/wrap layout container that arranges children left-to-right, wrapping to the next row when the available width is exceeded. Each row's height is the maximum child height in that row. Supports configurable spacing between items and rows, and per-row alignment for short rows.

Header: widgets/widgetWrapBox.h

.h3 Creation

.code
WidgetT *wrap = wgtWrapBox(parent);
wgtButton(wrap, "Tag 1");
wgtButton(wrap, "Tag 2");
wgtButton(wrap, "Tag 3");
.endcode

.h3 Macro

.table
  Macro                  Description
  -----                  -----------
  wgtWrapBox(parent)     Create a wrap box container.
.endtable

.h3 Properties

WrapBox uses the common WidgetT container fields for layout control:

.table
  Property     Description
  --------     -----------
  spacing      Gap between children in both the horizontal and vertical directions (tagged size). Default is 4 pixels.
  padding      Internal padding around children (tagged size). Default is 2 pixels.
.endtable

.h3 Properties (BASIC Interface)

.table
  Property     Type                         Access       Description
  --------     ----                         ------       -----------
  Alignment    Enum (Left, Center, Right)   Read/Write   Row alignment for rows that do not fill the full width.
.endtable

.h3 Events

WrapBox is a container widget. It uses the common events only. No widget-specific events are defined.
