Skip to content

Spacing

Elements

The two nodes that exist to take up room, or to refuse to.

Import

cpp
#include "gbui/widgets/spacing.hpp"

Example

Divider

divider · Elements

Nothing is downloaded until you press it.

cpp
NodeId divider(Ui& ui, Direction containerDirection);

A hairline. Horizontal in a column, vertical in a row: pass the direction of the container it sits in.

Spacer

spacer · Elements

Nothing is downloaded until you press it.

cpp
NodeId spacer(Ui& ui, float grow = 1.0f);

Fills the free space on the main axis — the flexible gap between a title and the actions on the far side of a toolbar.

Released under the LGPL-3.0-or-later licence.