Adw.ViewStackPages

g Adw.ViewStackPages Adw.ViewStackPages GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel Gtk.SectionModel Gtk.SectionModel GObject.GInterface->Gtk.SectionModel Gtk.SelectionModel Gtk.SelectionModel GObject.GInterface->Gtk.SelectionModel GObject.Object GObject.Object GObject.Object->Adw.ViewStackPages Gio.ListModel->Adw.ViewStackPages Gtk.SectionModel->Adw.ViewStackPages Gtk.SelectionModel->Adw.ViewStackPages

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ListModel (4), Gtk.SectionModel (2), Gtk.SelectionModel (11)

Structs:

GObject.ObjectClass (5)

get_selected_page ()

set_selected_page (page)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ListModel (3), Gtk.SectionModel (1), Gtk.SelectionModel (9)

Properties

Name

Type

Flags

Short Description

item-type

GObject.GType

r

n-items

int

r

selected-page

Adw.ViewStackPage

r/w/en

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1), Gtk.SectionModel (1), Gtk.SelectionModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1), Gtk.SectionModel (1), Gtk.SelectionModel (1)

Class Details

class Adw.ViewStackPages(**kwargs)
Bases:

GObject.Object, Gio.ListModel, Gtk.SectionModel, Gtk.SelectionModel

Abstract:

No

Structure:

Adw.ViewStackPagesClass

An auxiliary class used by [class`ViewStack`].

See [property`ViewStack`:py:data::pages<Adw.ViewStackPages.props.pages>].

New in version 1.4.

get_selected_page()
Returns:

the stack page

Return type:

Adw.ViewStackPage or None

Gets the [class`ViewStackPage`] for the visible child of a view stack

Gets the [class`ViewStackPage`] for the visible child of the associated stack.

Returns NULL if there’s no selected page.

New in version 1.4.

set_selected_page(page)
Parameters:

page (Adw.ViewStackPage) – a stack page within the associated stack

Sets the visible child in the associated [class`ViewStack`].

See [property`ViewStack`:py:data::visible-child<Adw.ViewStackPages.props.visible_child>].

New in version 1.4.

Property Details

Adw.ViewStackPages.props.item_type
Name:

item-type

Type:

GObject.GType

Default Value:

<GType AdwViewStackPage>

Flags:

READABLE

The type of the items. See [method`Gio`.ListModel.get_item_type].

New in version 1.9.

Adw.ViewStackPages.props.n_items
Name:

n-items

Type:

int

Default Value:

0

Flags:

READABLE

The number of items. See [method`Gio`.ListModel.get_n_items].

New in version 1.9.

Adw.ViewStackPages.props.selected_page
Name:

selected-page

Type:

Adw.ViewStackPage

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The selected [class`ViewStackPage`] within the [class`ViewStackPages`].

This can be used to keep an up-to-date view of the [class`ViewStackPage`] for The visible [class`ViewStackPage`] within the associated [class`ViewStackPages`].

This can be used to keep an up-to-date view of the visible child.

New in version 1.4.