Gtk.BoxLayout
Description: Reference for Gtk.BoxLayout

### Class

# GtkBoxLayout

since: 4.0

#### Description [src]

    final class Gtk.BoxLayout : Gtk.LayoutManager
      implements Gtk.Orientable {
      /* No available fields */
    }

`GtkBoxLayout` is a layout manager that arranges children in a single row or column.

Whether it is a row or column depends on the value of its `GtkOrientable:orientation` property. Within the other dimension all children all allocated the same size. The `GtkBoxLayout` will respect the `GtkWidget:halign` and `GtkWidget:valign` properties of each child widget.

If you want all children to be assigned the same size, you can use the `GtkBoxLayout:homogeneous` property.

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

Available since: 4.0

#### Ancestors

- GtkLayoutManager
- GObject

#### Implements

- GtkOrientable

#### Constructors

###### gtk_box_layout_new

Creates a new `GtkBoxLayout`.

since: 4.0

#### Instance methods

###### gtk_box_layout_get_baseline_child

Gets the value set by gtk_box_layout_set_baseline_child().

since: 4.12

###### gtk_box_layout_get_baseline_position

Gets the value set by gtk_box_layout_set_baseline_position().

since: 4.0

###### gtk_box_layout_get_homogeneous

Returns whether the layout is set to be homogeneous.

since: 4.0

###### gtk_box_layout_get_spacing

Returns the space that `box_layout` puts between children.

since: 4.0

###### gtk_box_layout_set_baseline_child

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

since: 4.12

###### gtk_box_layout_set_baseline_position

Sets the baseline position of a box layout.

since: 4.0

###### gtk_box_layout_set_homogeneous

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

since: 4.0

###### gtk_box_layout_set_spacing

Sets how much spacing to put between children.

since: 4.0

##### Methods inherited from GtkLayoutManager (6)

###### gtk_layout_manager_allocate

Assigns the given `width`, `height`, and `baseline` to a `widget`, and computes the position and sizes of the children of the `widget` using the layout management policy of `manager`.

since: 4.0

###### gtk_layout_manager_get_layout_child

Retrieves a `GtkLayoutChild` instance for the `GtkLayoutManager`, creating one if necessary.

since: 4.0

###### gtk_layout_manager_get_request_mode

Retrieves the request mode of `manager`.

since: 4.0

###### gtk_layout_manager_get_widget

Retrieves the `GtkWidget` using the given `GtkLayoutManager`.

since: 4.0

###### gtk_layout_manager_layout_changed

Queues a resize on the `GtkWidget` using `manager`, if any.

since: 4.0

###### gtk_layout_manager_measure

Measures the size of the `widget` using `manager`, for the given `orientation` and size.

since: 4.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GtkOrientable (2)

###### gtk_orientable_get_orientation

Retrieves the orientation of the `orientable`.

since: 4.0

###### gtk_orientable_set_orientation

Sets the orientation of the `orientable`.

since: 4.0

#### Properties

###### Gtk.BoxLayout:baseline-child

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

since: 4.12

###### Gtk.BoxLayout:baseline-position

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

since: 4.0

###### Gtk.BoxLayout:homogeneous

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

since: 4.0

###### Gtk.BoxLayout:spacing

The space to put between the children.

since: 4.0

##### Properties inherited from GtkOrientable (1)

###### GtkOrientable:orientation

The orientation of the orientable.

since: 4.0

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0

#### Class structure

    struct GtkBoxLayoutClass {
      GtkLayoutManagerClass parent_class;

    }

No description available.

###### Class members

`parent_class: GtkLayoutManagerClass`
  No description available.