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 (15)

Structs:

GObject.ObjectClass (5)

get_badge_number ()

get_child ()

get_icon_name ()

get_name ()

get_needs_attention ()

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_title (title)

set_use_underline (use_underline)

set_visible (visible)

Virtual Methods

Inherited:

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

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

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_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_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 page 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.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>].