Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gtk_center_box_new () |
void | gtk_center_box_set_start_widget () |
void | gtk_center_box_set_center_widget () |
void | gtk_center_box_set_end_widget () |
GtkWidget * | gtk_center_box_get_start_widget () |
GtkWidget * | gtk_center_box_get_center_widget () |
GtkWidget * | gtk_center_box_get_end_widget () |
void | gtk_center_box_set_baseline_position () |
GtkBaselinePosition | gtk_center_box_get_baseline_position () |
#define | GTK_CENTER_BOX() |
#define | GTK_CENTER_BOX_CLASS() |
#define | GTK_IS_CENTER_BOX() |
#define | GTK_IS_CENTER_BOX_CLASS() |
#define | GTK_CENTER_BOX_GET_CLASS() |
The GtkCenterBox widget arranges three children in a horizontal or vertical arrangement, keeping the middle child centered as well as possible.
To add children to GtkCenterBox, use gtk_center_box_set_start_widget()
,
gtk_center_box_set_center_widget()
and gtk_center_box_set_end_widget()
.
The sizing and positioning of children can be influenced with the align and expand properties of the children.
The GtkCenterBox implementation of the GtkBuildable interface supports placing children in the 3 positions by specifying “start”, “center” or “end” as the “type” attribute of a <child> element.
GtkCenterBox uses a single CSS node with name box.
In horizontal orientation, the nodes of the children are always arranged from left to right. So :first-child will always select the leftmost child, regardless of text direction.
In vertical orientation, the are arranged from top to bottom.
GtkWidget *
gtk_center_box_new (void
);
Creates a new GtkCenterBox.
Since: 3.92
void gtk_center_box_set_start_widget (GtkCenterBox *self
,GtkWidget *child
);
Sets the start widget.
Since: 3.92
void gtk_center_box_set_center_widget (GtkCenterBox *self
,GtkWidget *child
);
Sets the center widget.
Since: 3.92
void gtk_center_box_set_end_widget (GtkCenterBox *self
,GtkWidget *child
);
Sets the end widget.
Since: 3.92
GtkWidget *
gtk_center_box_get_start_widget (GtkCenterBox *self
);
Gets the start widget.
Since: 3.92
GtkWidget *
gtk_center_box_get_center_widget (GtkCenterBox *self
);
Gets the center widget.
Since: 3.92
GtkWidget *
gtk_center_box_get_end_widget (GtkCenterBox *self
);
Gets the end widget.
Since: 3.92
void gtk_center_box_set_baseline_position (GtkCenterBox *self
,GtkBaselinePosition position
);
Sets the baseline position of a center box.
This 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
position
is used to allocate the baseline wrt. the extra space
available.
Since: 3.92
GtkBaselinePosition
gtk_center_box_get_baseline_position (GtkCenterBox *self
);
Gets the value set by gtk_center_box_set_baseline_position()
.
Since: 3.92
#define GTK_CENTER_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CENTER_BOX, GtkCenterBox))
#define GTK_CENTER_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CENTER_BOX, GtkCenterBoxClass))
#define GTK_IS_CENTER_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CENTER_BOX))
#define GTK_IS_CENTER_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CENTER_BOX))