1.17 <GtkBoxLayout>

Class: <GtkBoxLayout>

It derives from <GtkLayoutManager>.

Arranges children in 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 all allocated the same size. The <GtkBoxLayout> will respect the widget:halign and widget:valign properties of each child widget.

If you want all children to be assigned the same size, you can use the box-layout:homogeneous property.

If you want to specify the amount of space placed between each child, you can use the box-layout:spacing property.

Properties

Property: box-layout:baseline-child self

The child that determines the baseline of the box in vertical layout.

If the child does baseline positioning, then its baseline is lined up with the baseline of the box. If it doesn’t, then the bottom edge of the child is used.

Its value is a 32-bit integer.

Set it with (set! (box-layout:baseline-child self) value).

Property: box-layout:baseline-position self

The position of the allocated baseline within the extra space allocated to each child.

This property is only relevant for horizontal layouts containing at least one child with a baseline alignment.

Its value is a <GtkBaselinePosition> (or, to set it, one of its symbols).

Set it with (set! (box-layout:baseline-position self) value).

Property: box-layout:homogeneous self

Whether the box layout should distribute the available space equally among the children.

Its value is a boolean.

Set it with (set! (box-layout:homogeneous self) value).

Property: box-layout:spacing self

The space to put between the children.

Its value is a 32-bit integer.

Set it with (set! (box-layout:spacing self) value).

Procedures

Method: box-layout:get-baseline-child self ⇒ %return
Method: get-baseline-child self ⇒ %return

Gets the value set by box-layout:set-baseline-child.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

%return

Returned: a 32-bit integer.

the index of the child that determines the baseline in vertical layout, or -1

Method: box-layout:get-baseline-position self ⇒ %return
Method: get-baseline-position self ⇒ %return

Gets the value set by box-layout:set-baseline-position.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

%return

Returned: a <GtkBaselinePosition>.

the baseline position

Method: box-layout:get-homogeneous? self ⇒ %return
Method: get-homogeneous? self ⇒ %return

Returns whether the layout is set to be homogeneous.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

%return

Returned: a boolean.

#t if the layout is homogeneous

Method: box-layout:get-spacing self ⇒ %return
Method: get-spacing self ⇒ %return

Returns the space that self puts between children.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

%return

Returned: an unsigned 32-bit integer.

the spacing of the layout

Procedure: box-layout:new orientation ⇒ %return

Creates a new <GtkBoxLayout>.

orientation

Passed: a <GtkOrientation>, or one of its symbols.

the orientation for the new layout

%return

Returned: a <GtkLayoutManager>.

a new box layout

Method: box-layout:set-baseline-child self child
Method: set-baseline-child self child

Sets the index of the child that determines the baseline in vertical layout.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

child

Passed: a 32-bit integer.

the child position, or -1

Method: box-layout:set-baseline-position self position
Method: set-baseline-position self position

Sets the baseline position of a box layout.

The baseline position 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 the given position is used to allocate the baseline within the extra space available.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

position

Passed: a <GtkBaselinePosition>, or one of its symbols.

a <GtkBaselinePosition>

Method: box-layout:set-homogeneous self homogeneous
Method: set-homogeneous self homogeneous

Sets whether the box layout will allocate the same size to all children.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

homogeneous

Passed: a boolean.

#t to set the box layout as homogeneous

Method: box-layout:set-spacing self spacing
Method: set-spacing self spacing

Sets how much spacing to put between children.

self

Passed: a <GtkBoxLayout>.

a <GtkBoxLayout>

spacing

Passed: an unsigned 32-bit integer.

the spacing to apply between children