Gtk.CenterLayout

g GObject.Object GObject.Object Gtk.LayoutManager Gtk.LayoutManager GObject.Object->Gtk.LayoutManager Gtk.CenterLayout Gtk.CenterLayout Gtk.LayoutManager->Gtk.CenterLayout

Subclasses:

None

Methods

Inherited:

Gtk.LayoutManager (6), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_baseline_position ()

get_center_widget ()

get_end_widget ()

get_orientation ()

get_shrink_center_last ()

get_start_widget ()

set_baseline_position (baseline_position)

set_center_widget (widget)

set_end_widget (widget)

set_orientation (orientation)

set_shrink_center_last (shrink_center_last)

set_start_widget (widget)

Virtual Methods

Inherited:

Gtk.LayoutManager (6), GObject.Object (7)

Properties

Name

Type

Flags

Short Description

shrink-center-last

bool

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gtk.CenterLayout(**kwargs)
Bases:

Gtk.LayoutManager

Abstract:

No

Structure:

Gtk.CenterLayoutClass

GtkCenterLayout 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.

classmethod new()[source]
Returns:

the newly created GtkCenterLayout

Return type:

Gtk.LayoutManager

Creates a new GtkCenterLayout.

get_baseline_position()[source]
Returns:

The current baseline position of self.

Return type:

Gtk.BaselinePosition

Returns the baseline position of the layout.

get_center_widget()[source]
Returns:

the current center widget of self

Return type:

Gtk.Widget or None

Returns the center widget of the layout.

get_end_widget()[source]
Returns:

the current end widget of self

Return type:

Gtk.Widget or None

Returns the end widget of the layout.

get_orientation()[source]
Returns:

The current orientation of self

Return type:

Gtk.Orientation

Gets the current orienration of the layout manager.

get_shrink_center_last()[source]
Returns:

whether to shrink the center widget after others

Return type:

bool

Gets whether self shrinks the center widget after other children.

New in version 4.12.

get_start_widget()[source]
Returns:

The current start widget of self

Return type:

Gtk.Widget or None

Returns the start widget of the layout.

set_baseline_position(baseline_position)[source]
Parameters:

baseline_position (Gtk.BaselinePosition) – the new baseline position

Sets the new baseline position of self

set_center_widget(widget)[source]
Parameters:

widget (Gtk.Widget or None) – the new center widget

Sets the new center widget of self.

To remove the existing center widget, pass None.

set_end_widget(widget)[source]
Parameters:

widget (Gtk.Widget or None) – the new end widget

Sets the new end widget of self.

To remove the existing center widget, pass None.

set_orientation(orientation)[source]
Parameters:

orientation (Gtk.Orientation) – the new orientation

Sets the orientation of self.

set_shrink_center_last(shrink_center_last)[source]
Parameters:

shrink_center_last (bool) – whether to shrink the center widget after others

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.

New in version 4.12.

set_start_widget(widget)[source]
Parameters:

widget (Gtk.Widget or None) – the new start widget

Sets the new start widget of self.

To remove the existing start widget, pass None.

Property Details

Gtk.CenterLayout.props.shrink_center_last
Name:

shrink-center-last

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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.

New in version 4.12.