Gnome::Gtk4::CenterLayout
Description
Gnome::Gtk4::CenterLayout is a layout manager that manages up to three children.
The start widget is allocated at the start of the layout (left in left-to-right locales and right in right-to-left ones), and the end widget at the end.
The center widget is centered regarding the full width of the layout's.
Class initialization
new
:native-object
Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
new-centerlayout
Creates a new Gnome::Gtk4::CenterLayout.
method new-centerlayout ( --> Gnome::Gtk4::CenterLayout \)
Methods
get-baseline-position
Returns the baseline position of the layout.
method get-baseline-position (--> GtkBaselinePosition )
Return value; The current baseline position of $self
..
get-center-widget
Returns the center widget of the layout.
method get-center-widget (--> N-Object )
Return value; the current center widget of $self
.
get-end-widget
Returns the end widget of the layout.
method get-end-widget (--> N-Object )
Return value; the current end widget of $self
.
get-orientation
Gets the current orienration of the layout manager.
method get-orientation (--> GtkOrientation )
Return value; The current orientation of $self
.
get-shrink-center-last
Gets whether $self
shrinks the center widget after other children.
method get-shrink-center-last (--> Bool )
Return value; whether to shrink the center widget after others.
get-start-widget
Returns the start widget of the layout.
method get-start-widget (--> N-Object )
Return value; The current start widget of $self
.
set-baseline-position
Sets the new baseline position of $self
method set-baseline-position ( GtkBaselinePosition $baseline-position )
$baseline-position; the new baseline position.
set-center-widget
Sets the new center widget of $self
.
To remove the existing center widget, pass undefined.
method set-center-widget ( N-Object() $widget )
$widget; the new center widget.
set-end-widget
Sets the new end widget of $self
.
To remove the existing center widget, pass undefined.
method set-end-widget ( N-Object() $widget )
$widget; the new end widget.
set-orientation
Sets the orientation of $self
.
method set-orientation ( GtkOrientation $orientation )
$orientation; the new orientation.
set-shrink-center-last
Sets whether to shrink the center widget after other children.
By default, when there's no space to give all three children their natural widths, the start and end widgets start shrinking and the center child keeps natural width until they reach minimum width.
If set to False
, start and end widgets keep natural width and the center widget starts shrinking instead.
method set-shrink-center-last ( Bool() $shrink-center-last )
$shrink-center-last; whether to shrink the center widget after others.
set-start-widget
Sets the new start widget of $self
.
To remove the existing start widget, pass undefined.
method set-start-widget ( N-Object() $widget )
$widget; the new start widget.