Top |
Functions
GtkLayoutManager * | gtk_grid_layout_new () |
void | gtk_grid_layout_set_row_homogeneous () |
gboolean | gtk_grid_layout_get_row_homogeneous () |
void | gtk_grid_layout_set_row_spacing () |
guint | gtk_grid_layout_get_row_spacing () |
void | gtk_grid_layout_set_column_homogeneous () |
gboolean | gtk_grid_layout_get_column_homogeneous () |
void | gtk_grid_layout_set_column_spacing () |
guint | gtk_grid_layout_get_column_spacing () |
void | gtk_grid_layout_set_row_baseline_position () |
GtkBaselinePosition | gtk_grid_layout_get_row_baseline_position () |
void | gtk_grid_layout_set_baseline_row () |
int | gtk_grid_layout_get_baseline_row () |
void | gtk_grid_layout_child_set_column () |
int | gtk_grid_layout_child_get_column () |
void | gtk_grid_layout_child_set_row () |
int | gtk_grid_layout_child_get_row () |
void | gtk_grid_layout_child_set_column_span () |
int | gtk_grid_layout_child_get_column_span () |
void | gtk_grid_layout_child_set_row_span () |
int | gtk_grid_layout_child_get_row_span () |
Properties
int | baseline-row | Read / Write |
gboolean | column-homogeneous | Read / Write |
int | column-spacing | Read / Write |
gboolean | row-homogeneous | Read / Write |
int | row-spacing | Read / Write |
int | column | Read / Write |
int | column-span | Read / Write |
int | row | Read / Write |
int | row-span | Read / Write |
Object Hierarchy
GObject ├── GtkLayoutChild │ ╰── GtkGridLayoutChild ╰── GtkLayoutManager ╰── GtkGridLayout
Description
GtkGridLayout is a layout manager which arranges child widgets in rows and columns, with arbitrary positions and horizontal/vertical spans.
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 GtkGrid 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.
Functions
gtk_grid_layout_set_row_homogeneous ()
void gtk_grid_layout_set_row_homogeneous (GtkGridLayout *grid
,gboolean homogeneous
);
Sets whether all rows of grid
should have the same height.
gtk_grid_layout_get_row_homogeneous ()
gboolean
gtk_grid_layout_get_row_homogeneous (GtkGridLayout *grid
);
Checks whether all rows of grid
should have the same height.
gtk_grid_layout_set_row_spacing ()
void gtk_grid_layout_set_row_spacing (GtkGridLayout *grid
,guint spacing
);
Sets the amount of space to insert between consecutive rows.
gtk_grid_layout_get_row_spacing ()
guint
gtk_grid_layout_get_row_spacing (GtkGridLayout *grid
);
Retrieves the spacing set with gtk_grid_layout_set_row_spacing()
.
gtk_grid_layout_set_column_homogeneous ()
void gtk_grid_layout_set_column_homogeneous (GtkGridLayout *grid
,gboolean homogeneous
);
Sets whether all columns of grid
should have the same width.
gtk_grid_layout_get_column_homogeneous ()
gboolean
gtk_grid_layout_get_column_homogeneous
(GtkGridLayout *grid
);
Checks whether all columns of grid
should have the same width.
gtk_grid_layout_set_column_spacing ()
void gtk_grid_layout_set_column_spacing (GtkGridLayout *grid
,guint spacing
);
Sets the amount of space to insert between consecutive columns.
gtk_grid_layout_get_column_spacing ()
guint
gtk_grid_layout_get_column_spacing (GtkGridLayout *grid
);
Retrieves the spacing set with gtk_grid_layout_set_column_spacing()
.
gtk_grid_layout_set_row_baseline_position ()
void gtk_grid_layout_set_row_baseline_position (GtkGridLayout *grid
,int row
,GtkBaselinePosition pos
);
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_get_row_baseline_position ()
GtkBaselinePosition gtk_grid_layout_get_row_baseline_position (GtkGridLayout *grid
,int row
);
Returns the baseline position of row
as set by
gtk_grid_layout_set_row_baseline_position()
, or the default value
of GTK_BASELINE_POSITION_CENTER
.
gtk_grid_layout_set_baseline_row ()
void gtk_grid_layout_set_baseline_row (GtkGridLayout *grid
,int 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 grid
.
gtk_grid_layout_get_baseline_row ()
int
gtk_grid_layout_get_baseline_row (GtkGridLayout *grid
);
Retrieves the row set with gtk_grid_layout_set_baseline_row()
.
gtk_grid_layout_child_set_column ()
void gtk_grid_layout_child_set_column (GtkGridLayoutChild *child
,int column
);
Sets the column number to attach the left side of child
.
gtk_grid_layout_child_get_column ()
int
gtk_grid_layout_child_get_column (GtkGridLayoutChild *child
);
Retrieves the column number to which child
attaches its left side.
gtk_grid_layout_child_set_row ()
void gtk_grid_layout_child_set_row (GtkGridLayoutChild *child
,int row
);
Sets the row to place child
in.
gtk_grid_layout_child_get_row ()
int
gtk_grid_layout_child_get_row (GtkGridLayoutChild *child
);
Retrieves the row number to which child
attaches its top side.
gtk_grid_layout_child_set_column_span ()
void gtk_grid_layout_child_set_column_span (GtkGridLayoutChild *child
,int span
);
Sets the number of columns child
spans to.
gtk_grid_layout_child_get_column_span ()
int
gtk_grid_layout_child_get_column_span (GtkGridLayoutChild *child
);
Retrieves the number of columns that child
spans to.
gtk_grid_layout_child_set_row_span ()
void gtk_grid_layout_child_set_row_span (GtkGridLayoutChild *child
,int span
);
Sets the number of rows child
spans to.
gtk_grid_layout_child_get_row_span ()
int
gtk_grid_layout_child_get_row_span (GtkGridLayoutChild *child
);
Retrieves the number of rows that child
spans to.
Types and Values
GtkGridLayoutChild
typedef struct _GtkGridLayoutChild GtkGridLayoutChild;
Layout properties for children of GtkGridLayout.
Property Details
The “baseline-row”
property
“baseline-row” int
The row to align to the baseline, when “valign” is set
to GTK_ALIGN_BASELINE
.
Owner: GtkGridLayout
Flags: Read / Write
Allowed values: >= 0
Default value: 0
The “column-homogeneous”
property
“column-homogeneous” gboolean
Whether all the columns in the grid have the same width.
Owner: GtkGridLayout
Flags: Read / Write
Default value: FALSE
The “column-spacing”
property
“column-spacing” int
The amount of space between to consecutive columns.
Owner: GtkGridLayout
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
The “row-homogeneous”
property
“row-homogeneous” gboolean
Whether all the rows in the grid have the same height.
Owner: GtkGridLayout
Flags: Read / Write
Default value: FALSE
The “row-spacing”
property
“row-spacing” int
The amount of space between to consecutive rows.
Owner: GtkGridLayout
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
The “column”
property
“column” int
The column to place the child in.
Owner: GtkGridLayoutChild
Flags: Read / Write
Default value: 0
The “column-span”
property
“column-span” int
The number of columns the child spans to.
Owner: GtkGridLayoutChild
Flags: Read / Write
Allowed values: >= 1
Default value: 1
The “row”
property
“row” int
The row to place the child in.
Owner: GtkGridLayoutChild
Flags: Read / Write
Default value: 0