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 [classGtk.GridLayoutChild] 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.
<group>Layout containers</group>
Baseline_Row_Property : constant Glib.Properties.Property_Int;
The row to align to the baseline, when GtkWidget:valign is set to Gtk.Widget.Align_Baseline.
Column_Homogeneous_Property : constant Glib.Properties.Property_Boolean;
Whether all the columns in the grid have the same width.
Column_Property : constant Glib.Properties.Property_Int;
The column to place the child in.
Column_Spacing_Property : constant Glib.Properties.Property_Int;
The amount of space between to consecutive columns.
Column_Span_Property : constant Glib.Properties.Property_Int;
The number of columns the child spans to.
function Get_Baseline_Row
(Grid : not null access Gtk_Grid_Layout_Record) return Glib.Gint
Retrieves the row set with Gtk.Grid_Layout.Set_Baseline_Row.
the global baseline row
function Get_Column
(Child : not null access Gtk_Grid_Layout_Child_Record)
return Glib.Gint
Retrieves the column number to which Child attaches its left side.
the column number
function Get_Column_Homogeneous
(Grid : not null access Gtk_Grid_Layout_Record) return Boolean
Checks whether all columns of Grid should have the same width.
True if the columns are homogeneous, and False otherwise
function Get_Column_Spacing
(Grid : not null access Gtk_Grid_Layout_Record) return Guint
Retrieves the spacing set with Gtk.Grid_Layout.Set_Column_Spacing.
the spacing between consecutive columns
function Get_Column_Span
(Child : not null access Gtk_Grid_Layout_Child_Record)
return Glib.Gint
Retrieves the number of columns that Child spans to.
the number of columns
function Get_Row
(Child : not null access Gtk_Grid_Layout_Child_Record)
return Glib.Gint
Retrieves the row number to which Child attaches its top side.
the row number
function Get_Row_Baseline_Position
(Grid : not null access Gtk_Grid_Layout_Record;
Row : Glib.Gint) return Gtk.Enums.Gtk_Baseline_Position
Returns the baseline position of Row. If no value has been set with [methodGtk.GridLayout.set_row_baseline_position], the default value of Gtk.Enums.Baseline_Position_Center is returned.
a row index
the baseline position of Row
function Get_Row_Homogeneous
(Grid : not null access Gtk_Grid_Layout_Record) return Boolean
Checks whether all rows of Grid should have the same height.
True if the rows are homogeneous, and False otherwise
function Get_Row_Spacing
(Grid : not null access Gtk_Grid_Layout_Record) return Guint
Retrieves the spacing set with Gtk.Grid_Layout.Set_Row_Spacing.
the spacing between consecutive rows
function Get_Row_Span
(Child : not null access Gtk_Grid_Layout_Child_Record)
return Glib.Gint
Retrieves the number of rows that Child spans to.
the number of row
function Get_Type return Glib.GType
function Grid_Layout_Child_Get_Type return Glib.GType
type Gtk_Grid_Layout is access all Gtk_Grid_Layout_Record'Class;
type Gtk_Grid_Layout_Child is access all Gtk_Grid_Layout_Child_Record'Class;
type Gtk_Grid_Layout_Child_Record is new Gtk_Layout_Child_Record with null record;
function Gtk_Grid_Layout_New return Gtk_Grid_Layout
Creates a new GtkGridLayout.
type Gtk_Grid_Layout_Record is new Gtk_Layout_Manager_Record with null record;
procedure Gtk_New (Grid : out Gtk_Grid_Layout)
Creates a new GtkGridLayout. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Initialize
(Grid : not null access Gtk_Grid_Layout_Record'Class)
Creates a new GtkGridLayout. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
Row_Homogeneous_Property : constant Glib.Properties.Property_Boolean;
Whether all the rows in the grid have the same height.
Row_Property : constant Glib.Properties.Property_Int;
The row to place the child in.
Row_Spacing_Property : constant Glib.Properties.Property_Int;
The amount of space between to consecutive rows.
Row_Span_Property : constant Glib.Properties.Property_Int;
The number of rows the child spans to.
procedure Set_Baseline_Row
(Grid : not null access Gtk_Grid_Layout_Record;
Row : Glib.Gint)
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 Grid.
the row index
procedure Set_Column
(Child : not null access Gtk_Grid_Layout_Child_Record;
Column : Glib.Gint)
Sets the column number to attach the left side of Child.
the attach point for Child
procedure Set_Column_Homogeneous
(Grid : not null access Gtk_Grid_Layout_Record;
Homogeneous : Boolean)
Sets whether all columns of Grid should have the same width.
True to make columns homogeneous
procedure Set_Column_Spacing
(Grid : not null access Gtk_Grid_Layout_Record;
Spacing : Guint)
Sets the amount of space to insert between consecutive columns.
the amount of space between columns, in pixels
procedure Set_Column_Span
(Child : not null access Gtk_Grid_Layout_Child_Record;
Span : Glib.Gint)
Sets the number of columns Child spans to.
the span of Child
procedure Set_Row
(Child : not null access Gtk_Grid_Layout_Child_Record;
Row : Glib.Gint)
Sets the row to place Child in.
the row for Child
procedure Set_Row_Baseline_Position
(Grid : not null access Gtk_Grid_Layout_Record;
Row : Glib.Gint;
Pos : Gtk.Enums.Gtk_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.
a row index
a GtkBaselinePosition
procedure Set_Row_Homogeneous
(Grid : not null access Gtk_Grid_Layout_Record;
Homogeneous : Boolean)
Sets whether all rows of Grid should have the same height.
True to make rows homogeneous
procedure Set_Row_Spacing
(Grid : not null access Gtk_Grid_Layout_Record;
Spacing : Guint)
Sets the amount of space to insert between consecutive rows.
the amount of space between rows, in pixels
procedure Set_Row_Span
(Child : not null access Gtk_Grid_Layout_Child_Record;
Span : Glib.Gint)
Sets the number of rows Child spans to.
the span of Child