TabPage#
Superclasses: Object
Implemented Interfaces: Accessible
An auxiliary class used by TabView.
Methods#
- class TabPage
-
- 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.
- invalidate_thumbnail() None#
Invalidates thumbnail for
self.If an
TabOverviewis open, the thumbnail representingselfwill be immediately updated. Otherwise it will be update when opening the overview.Does nothing if
live_thumbnailis set toTRUE.See also
invalidate_thumbnails.Added in version 1.3.
- set_icon(icon: Icon | None = None) None#
Sets the icon of
self.TabBarandTabOverviewdisplay the icon next to the title, unlessloadingis set toTRUE.AdwTabBaralso 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
selfis activatable.If set to
TRUE,indicator_activatedwill be emitted when the indicator icon is clicked.If
indicator_iconis 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.
TabBarwill show it at the beginning of the tab, alongside icon representingiconor loading spinner.If the page is pinned, the indicator will be shown instead of icon or spinner.
TabOverviewwill show it at the at the top part of the thumbnail.indicator_tooltipcan be used to set the tooltip on the indicator icon.If
indicator_activatableis set toTRUE, 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.TabOverviewcan 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 inTabOverviewwill update immediately whenselfis redrawn or resized.If it’s set to
FALSE, the thumbnail will only be live when theselfis selected, and otherwise it will be static and will only update wheninvalidate_thumbnailorinvalidate_thumbnailsis called.Added in version 1.3.
- Parameters:
live_thumbnail – whether to enable live thumbnail
- set_loading(loading: bool) None#
Sets whether
selfis loading.If set to
TRUE,TabBarandTabOverviewwill display a spinner in place of icon.If the page is pinned and
indicator_iconis set, loading status will not be visible withAdwTabBar.- Parameters:
loading – whether
selfis loading
- set_needs_attention(needs_attention: bool) None#
Sets whether
selfneeds attention.TabBarwill display a line under the tab representing the page if set toTRUE. If the tab is not visible, the corresponding edge of the tab bar will be highlighted.TabOverviewwill display a dot in the corner of the thumbnail if set toTRUE.TabButtonwill display a dot if any of the pages that aren’t selected haveneeds_attentionset toTRUE.- Parameters:
needs_attention – whether
selfneeds attention
- set_thumbnail_xalign(xalign: float) None#
Sets the horizontal alignment of the thumbnail for
self.If the page is so wide that
TabOverviewcan’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
TabOverviewcan’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#
TabBarwill display it in the center of the tab unless it’s pinned, and will use it as a tooltip unlesstooltipis set.TabOverviewwill display it below the thumbnail unless it’s pinned, or inside the card otherwise, and will use it as a tooltip unlesstooltipis set.Sets the title of
self.- Parameters:
title – the title of
self
Properties#
- class TabPage