TabPage#

class TabPage(**properties: Any)#

Superclasses: Object

Implemented Interfaces: Accessible

An auxiliary class used by TabView.

Methods#

class TabPage
get_child() Widget#

Gets the child of self.

get_icon() Icon | None#

Gets the icon of self.

get_indicator_activatable() bool#

Gets whether the indicator of self is activatable.

get_indicator_icon() Icon | None#

Gets the indicator icon of self.

get_indicator_tooltip() str#

Gets the tooltip of the indicator icon of self.

Added in version 1.2.

get_keyword() str | None#

Gets the search keyword of self.

Added in version 1.3.

get_live_thumbnail() bool#

Gets whether to live thumbnail is enabled self.

Added in version 1.3.

get_loading() bool#

Gets whether self is loading.

get_needs_attention() bool#

Gets whether self needs attention.

get_parent() TabPage | None#

Gets the parent page of self.

See add_page and close_page.

get_pinned() bool#

Gets whether self is pinned.

See set_page_pinned.

get_selected() bool#

Gets whether self is selected.

get_thumbnail_xalign() float#

Gets the horizontal alignment of the thumbnail for self.

Added in version 1.3.

get_thumbnail_yalign() float#

Gets the vertical alignment of the thumbnail for self.

Added in version 1.3.

get_title() str#

Gets the title of self.

get_tooltip() str | None#

Gets the tooltip of self.

invalidate_thumbnail() None#

Invalidates thumbnail for self.

If an TabOverview is open, the thumbnail representing self will be immediately updated. Otherwise it will be update when opening the overview.

Does nothing if live_thumbnail is set to TRUE.

See also invalidate_thumbnails.

Added in version 1.3.

set_icon(icon: Icon | None = None) None#

Sets the icon of self.

TabBar and TabOverview display the icon next to the title, unless loading is set to TRUE.

AdwTabBar also won’t show the icon if the page is pinned and [propertyTabPage:indicator-icon] is set.

Parameters:

icon – the icon of self

set_indicator_activatable(activatable: bool) None#

Sets whether the indicator of self is activatable.

If set to TRUE, indicator_activated will be emitted when the indicator icon is clicked.

If indicator_icon is not set, does nothing.

Parameters:

activatable – whether the indicator is activatable

set_indicator_icon(indicator_icon: Icon | None = None) None#

Sets the indicator icon of self.

A common use case is an audio or camera indicator in a web browser.

TabBar will show it at the beginning of the tab, alongside icon representing icon or loading spinner.

If the page is pinned, the indicator will be shown instead of icon or spinner.

TabOverview will show it at the at the top part of the thumbnail.

indicator_tooltip can be used to set the tooltip on the indicator icon.

If indicator_activatable is set to TRUE, the indicator icon can act as a button.

Parameters:

indicator_icon – the indicator icon of self

set_indicator_tooltip(tooltip: str) None#

Sets the tooltip of the indicator icon of self.

The tooltip can be marked up with the Pango text markup language.

See indicator_icon.

Added in version 1.2.

Parameters:

tooltip – the indicator tooltip of self

set_keyword(keyword: str) None#

Sets the search keyword for self.

TabOverview can search pages by their keywords in addition to their titles and tooltips.

Keywords allow to include e.g. page URLs into tab search in a web browser.

Added in version 1.3.

Parameters:

keyword – the search keyword

set_live_thumbnail(live_thumbnail: bool) None#

Sets whether to enable live thumbnail for self.

When set to TRUE, self's thumbnail in TabOverview will update immediately when self is redrawn or resized.

If it’s set to FALSE, the thumbnail will only be live when the self is selected, and otherwise it will be static and will only update when invalidate_thumbnail or invalidate_thumbnails is called.

Added in version 1.3.

Parameters:

live_thumbnail – whether to enable live thumbnail

set_loading(loading: bool) None#

Sets whether self is loading.

If set to TRUE, TabBar and TabOverview will display a spinner in place of icon.

If the page is pinned and indicator_icon is set, loading status will not be visible with AdwTabBar.

Parameters:

loading – whether self is loading

set_needs_attention(needs_attention: bool) None#

Sets whether self needs attention.

TabBar will display a line under the tab representing the page if set to TRUE. If the tab is not visible, the corresponding edge of the tab bar will be highlighted.

TabOverview will display a dot in the corner of the thumbnail if set to TRUE.

TabButton will display a dot if any of the pages that aren’t selected have needs_attention set to TRUE.

Parameters:

needs_attention – whether self needs attention

set_thumbnail_xalign(xalign: float) None#

Sets the horizontal alignment of the thumbnail for self.

If the page is so wide that TabOverview can’t display it completely and has to crop it, horizontal alignment will determine which part of the page will be visible.

For example, 0.5 means the center of the page will be visible, 0 means the start edge will be visible and 1 means the end edge will be visible.

The default horizontal alignment is 0.

Added in version 1.3.

Parameters:

xalign – the new value

set_thumbnail_yalign(yalign: float) None#

Sets the vertical alignment of the thumbnail for self.

If the page is so tall that TabOverview can’t display it completely and has to crop it, vertical alignment will determine which part of the page will be visible.

For example, 0.5 means the center of the page will be visible, 0 means the top edge will be visible and 1 means the bottom edge will be visible.

The default vertical alignment is 0.

Added in version 1.3.

Parameters:

yalign – the new value

set_title(title: str) None#

TabBar will display it in the center of the tab unless it’s pinned, and will use it as a tooltip unless tooltip is set.

TabOverview will display it below the thumbnail unless it’s pinned, or inside the card otherwise, and will use it as a tooltip unless tooltip is set.

Sets the title of self.

Parameters:

title – the title of self

set_tooltip(tooltip: str) None#

Sets the tooltip of self.

The tooltip can be marked up with the Pango text markup language.

If not set, TabBar and TabOverview will use title as a tooltip instead.

Parameters:

tooltip – the tooltip of self

Properties#

class TabPage
props.child: Widget#

The type of the None singleton.

props.icon: Icon#

The type of the None singleton.

props.indicator_activatable: bool#

The type of the None singleton.

props.indicator_icon: Icon#

The type of the None singleton.

props.indicator_tooltip: str#

The type of the None singleton.

Added in version 1.2.

props.keyword: str#

The type of the None singleton.

Added in version 1.3.

props.live_thumbnail: bool#

The type of the None singleton.

Added in version 1.3.

props.loading: bool#

The type of the None singleton.

props.needs_attention: bool#

The type of the None singleton.

props.parent: TabPage#

The type of the None singleton.

props.pinned: bool#

The type of the None singleton.

props.selected: bool#

The type of the None singleton.

props.thumbnail_xalign: float#

The type of the None singleton.

Added in version 1.3.

props.thumbnail_yalign: float#

The type of the None singleton.

Added in version 1.3.

props.title: str#

The type of the None singleton.

props.tooltip: str#

The type of the None singleton.