### Class

# Gtk GridLayout

#### Description [src]

    final class Gtk.GridLayout : Gtk.LayoutManager
    {
      /* No available fields */
    }

Arranges child widgets in rows and columns.

Children have an “attach point” defined by the horizontal and vertical index of the cell they occupy; children can span multiple rows or columns. The layout properties for setting the attach points and spans are set using the `GtkGridLayoutChild` associated to each child widget.

The behaviour of `GtkGridLayout` when several children occupy the same grid cell is undefined.

`GtkGridLayout` can be used like a `GtkBoxLayout` if all children are attached to the same row or column; however, if you only ever need a single row or column, you should consider using `GtkBoxLayout`.

#### Ancestors

- GtkLayoutManager
- GObject

#### Constructors

###### gtk_grid_layout_new

Creates a new `GtkGridLayout`.

#### Instance methods

###### gtk_grid_layout_get_baseline_row

Retrieves the row set with gtk_grid_layout_set_baseline_row().

###### gtk_grid_layout_get_column_homogeneous

Checks whether all columns of `grid` should have the same width.

###### gtk_grid_layout_get_column_spacing

Retrieves the spacing set with gtk_grid_layout_set_column_spacing().

###### gtk_grid_layout_get_row_baseline_position

Returns the baseline position of `row`.

###### gtk_grid_layout_get_row_homogeneous

Checks whether all rows of `grid` should have the same height.

###### gtk_grid_layout_get_row_spacing

Retrieves the spacing set with gtk_grid_layout_set_row_spacing().

###### gtk_grid_layout_set_baseline_row

Sets which row defines the global baseline for the entire grid.

###### gtk_grid_layout_set_column_homogeneous

Sets whether all columns of `grid` should have the same width.

###### gtk_grid_layout_set_column_spacing

Sets the amount of space to insert between consecutive columns.

###### gtk_grid_layout_set_row_baseline_position

Sets how the baseline should be positioned on `row` of the grid, in case that row is assigned more space than is requested.

###### gtk_grid_layout_set_row_homogeneous

Sets whether all rows of `grid` should have the same height.

###### gtk_grid_layout_set_row_spacing

Sets the amount of space to insert between consecutive rows.

##### 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`.

###### gtk_layout_manager_get_layout_child

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

###### gtk_layout_manager_get_request_mode

Retrieves the request mode of `manager`.

###### gtk_layout_manager_get_widget

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

###### gtk_layout_manager_layout_changed

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

###### gtk_layout_manager_measure

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

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

Please see GObject for a full list of methods.

#### Properties

###### Gtk.GridLayout:baseline-row

The row to align to the baseline, when `GtkWidget:valign` is set to `GTK_ALIGN_BASELINE`.

###### Gtk.GridLayout:column-homogeneous

Whether all the columns in the grid have the same width.

###### Gtk.GridLayout:column-spacing

The amount of space between to consecutive columns.

###### Gtk.GridLayout:row-homogeneous

Whether all the rows in the grid have the same height.

###### Gtk.GridLayout:row-spacing

The amount of space between to consecutive rows.

#### 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.

#### Class structure

    struct GtkGridLayoutClass {
      GtkLayoutManagerClass parent_class;

    }

No description available.

###### Class members

`parent_class: GtkLayoutManagerClass`

  No description available.