Gtk.StackSwitcher

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Box Gtk.Box Gtk.StackSwitcher Gtk.StackSwitcher Gtk.Box->Gtk.StackSwitcher Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Example

../_images/StackSwitcher.png
Subclasses:

None

Methods

Inherited:

Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

get_stack ()

set_stack (stack)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Name

Type

Flags

Short Description

icon-size

int

r/w/en

Symbolic size to use for named icon

stack

Gtk.Stack

r/w/c

Stack

Child Properties

Inherited:

Gtk.Box (5)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

widget

Gtk.Box

r

Class Details

class Gtk.StackSwitcher(*args, **kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

Gtk.StackSwitcherClass

The Gtk.StackSwitcher widget acts as a controller for a Gtk.Stack; it shows a row of buttons to switch between the various pages of the associated stack widget.

All the content for the buttons comes from the child properties of the Gtk.Stack; the button visibility in a Gtk.StackSwitcher widget is controlled by the visibility of the child in the Gtk.Stack.

It is possible to associate multiple Gtk.StackSwitcher widgets with the same Gtk.Stack widget.

The Gtk.StackSwitcher widget was added in 3.10.

CSS nodes

Gtk.StackSwitcher has a single CSS node named stackswitcher and style class .stack-switcher.

When circumstances require it, Gtk.StackSwitcher adds the .needs-attention style class to the widgets representing the stack pages.

classmethod new()[source]
Returns:

a new Gtk.StackSwitcher.

Return type:

Gtk.Widget

Create a new Gtk.StackSwitcher.

New in version 3.10.

get_stack()[source]
Returns:

the stack, or None if none has been set explicitly.

Return type:

Gtk.Stack or None

Retrieves the stack. See Gtk.StackSwitcher.set_stack().

New in version 3.10.

set_stack(stack)[source]
Parameters:

stack (Gtk.Stack or None) – a Gtk.Stack

Sets the stack to control.

New in version 3.10.

Property Details

Gtk.StackSwitcher.props.icon_size
Name:

icon-size

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Use the “icon-size” property to change the size of the image displayed when a Gtk.StackSwitcher is displaying icons.

New in version 3.20.

Gtk.StackSwitcher.props.stack
Name:

stack

Type:

Gtk.Stack

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

Stack