It derives from <GtkWidget>.
Arranges child widgets into a single row or column.
Whether it is a row or column depends on the value of its
orientable:orientation
property. Within the other dimension, all children are allocated the
same size. The widget:halign and
widget:valign properties can be
used on the children to influence their allocation.
Use repeated calls to box:append to pack
widgets into a <GtkBox> from start to end. Use
box:remove to remove widgets from the
<GtkBox>. box:insert-child-after can be used to add a child
at a particular position.
Use box:set-homogeneous to specify
whether or not all children of the <GtkBox> are forced
to get the same amount of space.
Use box:set-spacing to determine how much
space will be minimally placed between all children in the
<GtkBox>. Note that spacing is added between
the children.
Use box:reorder-child-after to
move a child to a different place in the box.
<GtkBox> uses a single CSS node with name box.
Until GTK 4.10, <GtkBox> used the
Gtk.AccessibleRole.group role.
Starting from GTK 4.12, <GtkBox> uses the
Gtk.AccessibleRole.generic role.
parent-instanceThe position of the child that determines the baseline.
This is only relevant if the box is in vertical orientation.
Its value is a 32-bit integer.
Set it with (set! (box:baseline-child self) value).
How to position baseline-aligned widgets if extra space is available.
Its value is a <GtkBaselinePosition> (or,
to set it, one of its symbols).
Set it with (set! (box:baseline-position self) value).
Whether the children should all be the same size.
Its value is a boolean.
Set it with (set! (box:homogeneous self) value).
The amount of space between children.
Its value is a 32-bit integer.
Set it with (set! (box:spacing self) value).
Adds a child at the end.
Passed: a <GtkBox>.
a box
Passed: a <GtkWidget>.
the widget to append
Gets the value set by box:set-baseline-child.
Passed: a <GtkBox>.
a box
Returned: a 32-bit integer.
the baseline child
Gets the value set by box:set-baseline-position.
Passed: a <GtkBox>.
a box
Returned: a <GtkBaselinePosition>.
the baseline position
Returns whether the box is homogeneous.
In a homogeneous box all children are the same size.
Passed: a <GtkBox>.
a box
Returned: a boolean.
true if the box is homogeneous
Gets the value set by box:set-spacing.
Passed: a <GtkBox>.
a box
Returned: a 32-bit integer.
spacing between children
Inserts a child at a specific position.
The child is added after sibling in the list of self children.
If sibling is NULL, the child is placed at the
beginning.
Passed: a <GtkBox>.
a box
Passed: a <GtkWidget>.
the widget to insert
Passed, or left out: a <GtkWidget>, or #f.
the sibling after which to insert child
Creates a new box.
Passed: a <GtkOrientation>, or one of its
symbols.
the box’s orientation
Passed: a 32-bit integer.
the number of pixels to place between children
Returned: a <GtkWidget>.
a new <GtkBox>.
Adds a child at the beginning.
Passed: a <GtkBox>.
a box
Passed: a <GtkWidget>.
the widget to prepend
Removes a child widget from the box.
The child must have been added before with box:append, box:prepend, or
box:insert-child-after.
Passed: a <GtkBox>.
a box
Passed: a <GtkWidget>.
the child to remove
Moves a child to a different position.
The child is moved to the position after sibling in the list of self children.
If sibling is NULL, the child is placed at the beginning.
Passed: a <GtkBox>.
a box
Passed: a <GtkWidget>.
the widget to move, must be a child of self
Passed, or left out: a <GtkWidget>, or #f.
the sibling to move child after
Sets the baseline child of a box.
This affects only vertical boxes.
Passed: a <GtkBox>.
a box
Passed: a 32-bit integer.
a child position, or -1
Sets the baseline position of a box.
This affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then position is used to allocate the baseline with respect to the extra space available.
Passed: a <GtkBox>.
a box
Passed: a <GtkBaselinePosition>, or one
of its symbols.
the baseline position
Sets whether or not all children are given equal space in the box.
Passed: a <GtkBox>.
a box
Passed: a boolean.
true to create equal allotments, false for variable allotments