1.93 <GtkGridLayout>

Class: <GtkGridLayout>

It derives from <GtkLayoutManager>.

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

Properties

Property: grid-layout:baseline-row self

The row to align to the baseline, when widget:valign is set to baseline.

Its value is a 32-bit integer.

Set it with (set! (grid-layout:baseline-row self) value).

Property: grid-layout:column-homogeneous self

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

Its value is a boolean.

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

Property: grid-layout:column-spacing self

The amount of space between to consecutive columns.

Its value is a 32-bit integer.

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

Property: grid-layout:row-homogeneous self

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

Its value is a boolean.

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

Property: grid-layout:row-spacing self

The amount of space between to consecutive rows.

Its value is a 32-bit integer.

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

Procedures

Method: grid-layout:get-baseline-row self ⇒ %return
Method: get-baseline-row self ⇒ %return

Retrieves the row set with grid-layout:set-baseline-row.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

%return

Returned: a 32-bit integer.

the global baseline row

Method: grid-layout:get-column-homogeneous? self ⇒ %return
Method: get-column-homogeneous? self ⇒ %return

Checks whether all columns of self should have the same width.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

%return

Returned: a boolean.

#t if the columns are homogeneous, and #f otherwise

Method: grid-layout:get-column-spacing self ⇒ %return
Method: get-column-spacing self ⇒ %return

Retrieves the spacing set with grid-layout:set-column-spacing.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

%return

Returned: an unsigned 32-bit integer.

the spacing between consecutive columns

Method: grid-layout:get-row-baseline-position self row ⇒ %return
Method: get-row-baseline-position self row ⇒ %return

Returns the baseline position of row.

If no value has been set with grid-layout:set-row-baseline-position, the default value of center is returned.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

row

Passed: a 32-bit integer.

a row index

%return

Returned: a <GtkBaselinePosition>.

the baseline position of row

Method: grid-layout:get-row-homogeneous? self ⇒ %return
Method: get-row-homogeneous? self ⇒ %return

Checks whether all rows of self should have the same height.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

%return

Returned: a boolean.

#t if the rows are homogeneous, and #f otherwise

Method: grid-layout:get-row-spacing self ⇒ %return
Method: get-row-spacing self ⇒ %return

Retrieves the spacing set with grid-layout:set-row-spacing.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

%return

Returned: an unsigned 32-bit integer.

the spacing between consecutive rows

Procedure: grid-layout:new ⇒ %return

Creates a new <GtkGridLayout>.

%return

Returned: a <GtkLayoutManager>.

the newly created <GtkGridLayout>

Method: grid-layout:set-baseline-row self row
Method: set-baseline-row self row

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

Each row in the grid can have its own local baseline, but only one of those is global, meaning it will be the baseline in the parent of the self.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

row

Passed: a 32-bit integer.

the row index

Method: grid-layout:set-column-homogeneous self homogeneous
Method: set-column-homogeneous self homogeneous

Sets whether all columns of self should have the same width.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

homogeneous

Passed: a boolean.

#t to make columns homogeneous

Method: grid-layout:set-column-spacing self spacing
Method: set-column-spacing self spacing

Sets the amount of space to insert between consecutive columns.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

spacing

Passed: an unsigned 32-bit integer.

the amount of space between columns, in pixels

Method: grid-layout:set-row-baseline-position self row pos
Method: set-row-baseline-position self row pos

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

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

row

Passed: a 32-bit integer.

a row index

pos

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

a <GtkBaselinePosition>

Method: grid-layout:set-row-homogeneous self homogeneous
Method: set-row-homogeneous self homogeneous

Sets whether all rows of self should have the same height.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

homogeneous

Passed: a boolean.

#t to make rows homogeneous

Method: grid-layout:set-row-spacing self spacing
Method: set-row-spacing self spacing

Sets the amount of space to insert between consecutive rows.

self

Passed: a <GtkGridLayout>.

a <GtkGridLayout>

spacing

Passed: an unsigned 32-bit integer.

the amount of space between rows, in pixels