Top |
Functions
GtkLayoutManager * | gtk_box_layout_new () |
void | gtk_box_layout_set_homogeneous () |
gboolean | gtk_box_layout_get_homogeneous () |
void | gtk_box_layout_set_spacing () |
guint | gtk_box_layout_get_spacing () |
void | gtk_box_layout_set_baseline_position () |
GtkBaselinePosition | gtk_box_layout_get_baseline_position () |
Properties
GtkBaselinePosition | baseline-position | Read / Write |
gboolean | homogeneous | Read / Write |
int | spacing | Read / Write |
Description
A GtkBoxLayout is a layout manager that arranges the children of any widget using it into a single row or column, depending on the value of its “orientation” property. Within the other dimension all children all allocated the same size. The GtkBoxLayout will respect the “halign” and “valign” properties of each child widget.
If you want all children to be assigned the same size, you can use the “homogeneous” property.
If you want to specify the amount of space placed between each child, you can use the “spacing” property.
Functions
gtk_box_layout_new ()
GtkLayoutManager *
gtk_box_layout_new (GtkOrientation orientation
);
Creates a new box layout.
gtk_box_layout_set_homogeneous ()
void gtk_box_layout_set_homogeneous (GtkBoxLayout *box_layout
,gboolean homogeneous
);
Sets whether the box layout will allocate the same size to all children.
gtk_box_layout_get_homogeneous ()
gboolean
gtk_box_layout_get_homogeneous (GtkBoxLayout *box_layout
);
Returns whether the layout is set to be homogeneous.
Return: TRUE
if the layout is homogeneous
gtk_box_layout_set_spacing ()
void gtk_box_layout_set_spacing (GtkBoxLayout *box_layout
,guint spacing
);
Sets how much spacing to put between children.
gtk_box_layout_get_spacing ()
guint
gtk_box_layout_get_spacing (GtkBoxLayout *box_layout
);
Returns the space that box_layout
puts between children.
gtk_box_layout_set_baseline_position ()
void gtk_box_layout_set_baseline_position (GtkBoxLayout *box_layout
,GtkBaselinePosition position
);
Sets the baseline position of a box layout.
The baseline position affects only horizontal boxes with at least one
baseline aligned child. If there is more vertical space available than
requested, and the baseline is not allocated by the parent then the
given position
is used to allocate the baseline within the extra
space available.
gtk_box_layout_get_baseline_position ()
GtkBaselinePosition
gtk_box_layout_get_baseline_position (GtkBoxLayout *box_layout
);
Gets the value set by gtk_box_layout_set_baseline_position()
.
Property Details
The “baseline-position”
property
“baseline-position” GtkBaselinePosition
The position of the allocated baseline within the extra space allocated to each child of the widget using a box layout manager.
This property is only relevant for horizontal layouts containing at least one child with a baseline alignment.
Owner: GtkBoxLayout
Flags: Read / Write
Default value: GTK_BASELINE_POSITION_CENTER
The “homogeneous”
property
“homogeneous” gboolean
Whether the box layout should distribute the available space homogeneously among the children of the widget using it as a layout manager.
Owner: GtkBoxLayout
Flags: Read / Write
Default value: FALSE