GtkCenterLayout — A centering layout
GObject ╰── GtkLayoutManager ╰── GtkCenterLayout
#include <gtk/gtk.h>
A GtkCenterLayout is a layout manager that manages up to three children. The start widget is allocated at the start of the layout (left in LRT layouts and right in RTL ones), and the end widget at the end.
The center widget is centered regarding the full width of the layout's.
GtkLayoutManager *
gtk_center_layout_new (void
);
Creates a new GtkCenterLayout.
the newly created GtkCenterLayout
void gtk_center_layout_set_orientation (GtkCenterLayout *self
,GtkOrientation orientation
);
Sets the orientation of self
.
self | ||
orientation | the new orientation |
GtkOrientation
gtk_center_layout_get_orientation (GtkCenterLayout *self
);
Gets the current orienration of the layout manager.
self |
The current orientation of self
void gtk_center_layout_set_baseline_position (GtkCenterLayout *self
,GtkBaselinePosition baseline_position
);
Sets the new baseline position of self
self | ||
baseline_position | the new baseline position |
GtkBaselinePosition
gtk_center_layout_get_baseline_position
(GtkCenterLayout *self
);
Returns the baseline position of the layout.
self |
The current baseline position of self
.
void gtk_center_layout_set_start_widget (GtkCenterLayout *self
,GtkWidget *widget
);
Sets the new start widget of self
.
To remove the existing start widget, pass NULL
.
self | ||
widget | the new start widget. | [nullable] |
GtkWidget *
gtk_center_layout_get_start_widget (GtkCenterLayout *self
);
Returns the start widget fo the layout.
self |
The current start widget of self
.
[nullable][transfer none]
void gtk_center_layout_set_center_widget (GtkCenterLayout *self
,GtkWidget *widget
);
Sets the new center widget of self
.
To remove the existing center widget, pass NULL
.
self | ||
widget | the new center widget. | [nullable] |
GtkWidget *
gtk_center_layout_get_center_widget (GtkCenterLayout *self
);
Returns the center widget of the layout.
self |
the current center widget of self
.
[nullable][transfer none]
void gtk_center_layout_set_end_widget (GtkCenterLayout *self
,GtkWidget *widget
);
Sets the new end widget of self
.
To remove the existing center widget, pass NULL
.
self | ||
widget | the new end widget. | [nullable][transfer none] |
GtkWidget *
gtk_center_layout_get_end_widget (GtkCenterLayout *self
);
Returns the end widget of the layout.
self |
the current end widget of self
.
[nullable][transfer none]
typedef struct _GtkCenterLayout GtkCenterLayout;
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkCenterLayout.html