Gtk.GridLayout
Description: Reference for Gtk.GridLayout

### Class

# GtkGridLayout

since: 4.0

#### Description [src]

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

`GtkGridLayout` is a layout manager which 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`.

Available since: 4.0

#### Ancestors

- GtkLayoutManager
- GObject

#### Constructors

###### gtk_grid_layout_new

Creates a new `GtkGridLayout`.

since: 4.0

#### Instance methods

###### gtk_grid_layout_get_baseline_row

Retrieves the row set with gtk_grid_layout_set_baseline_row().

since: 4.0

###### gtk_grid_layout_get_column_homogeneous

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

since: 4.0

###### gtk_grid_layout_get_column_spacing

Retrieves the spacing set with gtk_grid_layout_set_column_spacing().

since: 4.0

###### gtk_grid_layout_get_row_baseline_position

Returns the baseline position of `row`.

since: 4.0

###### gtk_grid_layout_get_row_homogeneous

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

since: 4.0

###### gtk_grid_layout_get_row_spacing

Retrieves the spacing set with gtk_grid_layout_set_row_spacing().

since: 4.0

###### gtk_grid_layout_set_baseline_row

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

since: 4.0

###### gtk_grid_layout_set_column_homogeneous

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

since: 4.0

###### gtk_grid_layout_set_column_spacing

Sets the amount of space to insert between consecutive columns.

since: 4.0

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

since: 4.0

###### gtk_grid_layout_set_row_homogeneous

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

since: 4.0

###### gtk_grid_layout_set_row_spacing

Sets the amount of space to insert between consecutive rows.

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.

#### Properties

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

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

since: 4.0

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

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

since: 4.0

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

The amount of space between to consecutive columns.

since: 4.0

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

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

since: 4.0

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

The amount of space between to consecutive rows.

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 GtkGridLayoutClass {
      GtkLayoutManagerClass parent_class;

    }

No description available.

###### Class members

`parent_class: GtkLayoutManagerClass`
  No description available.