Gtk.StackSidebar

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.StackSidebar Gtk.StackSidebar Gtk.Widget->Gtk.StackSidebar

Subclasses:

None

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

get_stack ()

set_stack (stack)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

stack

Gtk.Stack

r/w/en

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Class Details

class Gtk.StackSidebar(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

A GtkStackSidebar uses a sidebar to switch between GtkStack pages.

In order to use a GtkStackSidebar, you simply use a GtkStack to organize your UI flow, and add the sidebar to your sidebar area. You can use [method`Gtk`.StackSidebar.set_stack] to connect the GtkStackSidebar to the GtkStack.

CSS nodes

GtkStackSidebar has a single CSS node with name stacksidebar and style class .sidebar.

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

classmethod new()[source]
Returns:

the new GtkStackSidebar

Return type:

Gtk.Widget

Creates a new GtkStackSidebar.

get_stack()[source]
Returns:

the associated GtkStack or None if none has been set explicitly

Return type:

Gtk.Stack or None

Retrieves the stack.

set_stack(stack)[source]
Parameters:

stack (Gtk.Stack) – a GtkStack

Set the GtkStack associated with this GtkStackSidebar.

The sidebar widget will automatically update according to the order and items within the given GtkStack.

Property Details

Gtk.StackSidebar.props.stack
Name:

stack

Type:

Gtk.Stack

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The stack.