Adw.ViewStackPage

g Adw.ViewStackPage Adw.ViewStackPage GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible GObject.Object GObject.Object GObject.Object->Adw.ViewStackPage Gtk.Accessible->Adw.ViewStackPage

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gtk.Accessible (18)

Structs:

GObject.ObjectClass (5)

get_badge_number ()

get_child ()

get_icon_name ()

get_name ()

get_needs_attention ()

get_section_title ()

get_starts_section ()

get_title ()

get_use_underline ()

get_visible ()

set_badge_number (badge_number)

set_icon_name (icon_name)

set_name (name)

set_needs_attention (needs_attention)

set_section_title (section_title)

set_starts_section (starts_section)

set_title (title)

set_use_underline (use_underline)

set_visible (visible)

Virtual Methods

Inherited:

GObject.Object (7), Gtk.Accessible (7)

Properties

Inherited:

Gtk.Accessible (1)

Name

Type

Flags

Short Description

badge-number

int

r/w/en

child

Gtk.Widget

r/w/co

icon-name

str

r/w/en

name

str

r/w/en

needs-attention

bool

r/w/en

section-title

str

r/w/en

starts-section

bool

r/w/en

title

str

r/w/en

use-underline

bool

r/w/en

visible

bool

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Adw.ViewStackPage(**kwargs)
Bases:

GObject.Object, Gtk.Accessible

Abstract:

No

Structure:

Adw.ViewStackPageClass

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

get_badge_number()
Returns:

the badge number for this page

Return type:

int

Gets the badge number for this page.

get_child()
Returns:

the child to which self belongs

Return type:

Gtk.Widget

Gets the stack child to which self belongs.

get_icon_name()
Returns:

the icon name of the page

Return type:

str or None

Gets the icon name of the page.

get_name()
Returns:

the name of the page

Return type:

str or None

Gets the name of the page.

get_needs_attention()
Returns:

whether the page needs attention

Return type:

bool

Gets whether the page requires the user attention.

get_section_title()
Returns:

the section title

Return type:

str or None

Gets the section title for self.

New in version 1.9.

get_starts_section()
Returns:

whether self starts a section

Return type:

bool

Gets whether self starts a section.

New in version 1.9.

get_title()
Returns:

the page title

Return type:

str or None

Gets the page title.

get_use_underline()
Returns:

whether underlines in the page title indicate mnemonics

Return type:

bool

Gets whether underlines in the page title indicate mnemonics.

get_visible()
Returns:

whether self is visible

Return type:

bool

Gets whether self is visible in its AdwViewStack.

This is independent from the [property`Gtk`.Widget:visible] property of its widget.

set_badge_number(badge_number)
Parameters:

badge_number (int) – the new value to set

Sets the badge number for this page.

[class`ViewSwitcher`] can display it as a badge next to the page icon. It is commonly used to display a number of unread items within the page.

It can be used together with [property`ViewStack`{age}:py:data::needs-attention<Adw.ViewStackPage.props.needs_attention>].

set_icon_name(icon_name)
Parameters:

icon_name (str or None) – the icon name

Sets the icon name of the page.

set_name(name)
Parameters:

name (str or None) – the page name

Sets the name of the page.

set_needs_attention(needs_attention)
Parameters:

needs_attention (bool) – the new value to set

Sets whether the page requires the user attention.

[class`ViewSwitcher`] will display it as a dot next to the page icon.

set_section_title(section_title)
Parameters:

section_title (str or None) – the section title

Sets the section title for self.

Does nothing unless [property`ViewStackPage`:py:data::starts-section<Adw.ViewStackPage.props.starts_section>] is set.

New in version 1.9.

set_starts_section(starts_section)
Parameters:

starts_section (bool) – whether self starts a section

Sets whether self starts a section.

If set to TRUE, [property`ViewStack`:py:data::pages<Adw.ViewStackPage.props.pages>] will have a section starting from this page.

If [property`ViewStackPage`:py:data::section-title<Adw.ViewStackPage.props.section_title>] is set, it should be used as a title for the section.

New in version 1.9.

set_title(title)
Parameters:

title (str or None) – the page title

Sets the page title.

set_use_underline(use_underline)
Parameters:

use_underline (bool) – the new value to set

Sets whether underlines in the page title indicate mnemonics.

set_visible(visible)
Parameters:

visible (bool) – whether self is visible

Sets whether self is visible in its AdwViewStack.

This is independent from the [property`Gtk`.Widget:visible] property of [property`ViewStackPage`:py:data::child<Adw.ViewStackPage.props.child>].

Property Details

Adw.ViewStackPage.props.badge_number
Name:

badge-number

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The badge number for this page.

[class`ViewSwitcher`] can display it as a badge next to the page icon. It is commonly used to display a number of unread items within the page.

It can be used together with [property`ViewStack`{age}:py:data::needs-attention<Adw.ViewStackPage.props.needs_attention>].

Adw.ViewStackPage.props.child
Name:

child

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The stack child to which the page belongs.

Adw.ViewStackPage.props.icon_name
Name:

icon-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The icon name of the child page.

Adw.ViewStackPage.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The name of the child page.

Adw.ViewStackPage.props.needs_attention
Name:

needs-attention

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the page requires the user attention.

[class`ViewSwitcher`] will display it as a dot next to the page icon.

Adw.ViewStackPage.props.section_title
Name:

section-title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Section title for this page.

Does nothing unless [property`ViewStackPage`:py:data::starts-section<Adw.ViewStackPage.props.starts_section>] is set.

New in version 1.9.

Adw.ViewStackPage.props.starts_section
Name:

starts-section

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether this page starts a section.

If set to TRUE, [property`ViewStack`:py:data::pages<Adw.ViewStackPage.props.pages>] will have a section starting from this page.

If [property`ViewStackPage`:py:data::section-title<Adw.ViewStackPage.props.section_title>] is set, it should be used as a title for the section.

New in version 1.9.

Adw.ViewStackPage.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The title of the child page.

Adw.ViewStackPage.props.use_underline
Name:

use-underline

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether an embedded underline in the title indicates a mnemonic.

Adw.ViewStackPage.props.visible
Name:

visible

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether this page is visible.

This is independent from the [property`Gtk`.Widget:visible] property of [property`ViewStackPage`:py:data::child<Adw.ViewStackPage.props.child>].