Adw.TabPage¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/co/en |
|||
r |
|||
r |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Adw.TabPage(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An auxiliary class used by [class`TabView`].
- get_child()¶
- Returns:
the child of self
- Return type:
Gets the child of self.
- get_indicator_activatable()¶
- Returns:
whether the indicator is activatable
- Return type:
Gets whether the indicator of self is activatable.
- get_indicator_icon()¶
-
Gets the indicator icon of self.
- get_indicator_tooltip()¶
- Returns:
the indicator tooltip of self
- Return type:
Gets the tooltip of the indicator icon of self.
New in version 1.2.
- get_keyword()¶
-
Gets the search keyword of self.
New in version 1.3.
- get_live_thumbnail()¶
- Returns:
whether live thumbnail is enabled
- Return type:
Gets whether to live thumbnail is enabled self.
New in version 1.3.
- get_needs_attention()¶
- Returns:
whether self needs attention
- Return type:
Gets whether self needs attention.
- get_parent()¶
- Returns:
the parent page
- Return type:
Adw.TabPage
orNone
Gets the parent page of self.
See [method`TabView`.add_page] and [method`TabView`.close_page].
- get_pinned()¶
- Returns:
whether self is pinned
- Return type:
Gets whether self is pinned.
See [method`TabView`.set_page_pinned].
- get_thumbnail_xalign()¶
- Returns:
the horizontal alignment
- Return type:
Gets the horizontal alignment of the thumbnail for self.
New in version 1.3.
- get_thumbnail_yalign()¶
- Returns:
the vertical alignment
- Return type:
Gets the vertical alignment of the thumbnail for self.
New in version 1.3.
- invalidate_thumbnail()¶
Invalidates thumbnail for self.
If an [class`TabOverview`] is open, the thumbnail representing self will be immediately updated. Otherwise it will be update when opening the overview.
Does nothing if [property`TabPage`:py:data::live-thumbnail<Adw.TabPage.props.live_thumbnail>] is set to
TRUE
.See also [method`TabView`.invalidate_thumbnails].
New in version 1.3.
- set_icon(icon)¶
-
Sets the icon of self.
[class`TabBar`] and [class`TabOverview`] display the icon next to the title, unless [property`TabPage`:py:data::loading<Adw.TabPage.props.loading>] is set to
TRUE
.AdwTabBar
also won’t show the icon if the page is pinned and [propertyTabPage:indicator-icon] is set.
- set_indicator_activatable(activatable)¶
- Parameters:
activatable (
bool
) – whether the indicator is activatable
Sets whether the indicator of self is activatable.
If set to
TRUE
, [signal`TabView`:py:func:::indicator-activated<Adw.TabPage.signals.indicator_activated>] will be emitted when the indicator icon is clicked.If [property`TabPage`:py:data::indicator-icon<Adw.TabPage.props.indicator_icon>] is not set, does nothing.
- set_indicator_icon(indicator_icon)¶
-
Sets the indicator icon of self.
A common use case is an audio or camera indicator in a web browser.
[class`TabBar`] will show it at the beginning of the tab, alongside icon representing [property`TabPage`:py:data::icon<Adw.TabPage.props.icon>] or loading spinner.
If the page is pinned, the indicator will be shown instead of icon or spinner.
[class`TabOverview`] will show it at the at the top part of the thumbnail.
[property`TabPage`:py:data::indicator-tooltip<Adw.TabPage.props.indicator_tooltip>] can be used to set the tooltip on the indicator icon.
If [property`TabPage`:py:data::indicator-activatable<Adw.TabPage.props.indicator_activatable>] is set to
TRUE
, the indicator icon can act as a button.
- set_indicator_tooltip(tooltip)¶
- Parameters:
tooltip (
str
) – the indicator tooltip of self
Sets the tooltip of the indicator icon of self.
The tooltip can be marked up with the Pango text markup language.
See [property`TabPage`:py:data::indicator-icon<Adw.TabPage.props.indicator_icon>].
New in version 1.2.
- set_keyword(keyword)¶
- Parameters:
keyword (
str
) – the search keyword
Sets the search keyword for self.
[class`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.
New in version 1.3.
- set_live_thumbnail(live_thumbnail)¶
- Parameters:
live_thumbnail (
bool
) – whether to enable live thumbnail
Sets whether to enable live thumbnail for self.
When set to
TRUE
, self's thumbnail in [class`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 [method`TabPage`.invalidate_thumbnail] or [method`TabView`.invalidate_thumbnails] is called.New in version 1.3.
- set_loading(loading)¶
- Parameters:
loading (
bool
) – whether self is loading
Sets whether self is loading.
If set to
TRUE
, [class`TabBar`] and [class`TabOverview`] will display a spinner in place of icon.If the page is pinned and [property`TabPage`:py:data::indicator-icon<Adw.TabPage.props.indicator_icon>] is set, loading status will not be visible with
AdwTabBar
.
- set_needs_attention(needs_attention)¶
- Parameters:
needs_attention (
bool
) – whether self needs attention
Sets whether self needs attention.
[class`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.[class`TabOverview`] will display a dot in the corner of the thumbnail if set to
TRUE
.[class`TabButton`] will display a dot if any of the pages that aren’t selected have [property`TabPage`:py:data::needs-attention<Adw.TabPage.props.needs_attention>] set to
TRUE
.
- set_thumbnail_xalign(xalign)¶
- Parameters:
xalign (
float
) – the new value
Sets the horizontal alignment of the thumbnail for self.
If the page is so wide that [class`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.
New in version 1.3.
- set_thumbnail_yalign(yalign)¶
- Parameters:
yalign (
float
) – the new value
Sets the vertical alignment of the thumbnail for self.
If the page is so tall that [class`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.
New in version 1.3.
- set_title(title)¶
- Parameters:
title (
str
) – the title of self
[class`TabBar`] will display it in the center of the tab unless it’s pinned, and will use it as a tooltip unless [property`TabPage`:py:data::tooltip<Adw.TabPage.props.tooltip>] is set.
[class`TabOverview`] will display it below the thumbnail unless it’s pinned, or inside the card otherwise, and will use it as a tooltip unless [property`TabPage`:py:data::tooltip<Adw.TabPage.props.tooltip>] is set.
Sets the title of self.
- set_tooltip(tooltip)¶
- Parameters:
tooltip (
str
) – the tooltip of self
Sets the tooltip of self.
The tooltip can be marked up with the Pango text markup language.
If not set, [class`TabBar`] and [class`TabOverview`] will use [property`TabPage`:py:data::title<Adw.TabPage.props.title>] as a tooltip instead.
Property Details¶
- Adw.TabPage.props.child¶
- Name:
child
- Type:
- Default Value:
- Flags:
The child of the page.
- Adw.TabPage.props.icon¶
- Name:
icon
- Type:
- Default Value:
- Flags:
The icon of the page.
[class`TabBar`] and [class`TabOverview`] display the icon next to the title, unless [property`TabPage`:py:data::loading<Adw.TabPage.props.loading>] is set to
TRUE
.AdwTabBar
also won’t show the icon if the page is pinned and [propertyTabPage:indicator-icon] is set.
- Adw.TabPage.props.indicator_activatable¶
- Name:
indicator-activatable
- Type:
- Default Value:
- Flags:
Whether the indicator icon is activatable.
If set to
TRUE
, [signal`TabView`:py:func:::indicator-activated<Adw.TabPage.signals.indicator_activated>] will be emitted when the indicator icon is clicked.If [property`TabPage`:py:data::indicator-icon<Adw.TabPage.props.indicator_icon>] is not set, does nothing.
- Adw.TabPage.props.indicator_icon¶
- Name:
indicator-icon
- Type:
- Default Value:
- Flags:
An indicator icon for the page.
A common use case is an audio or camera indicator in a web browser.
[class`TabBar`] will show it at the beginning of the tab, alongside icon representing [property`TabPage`:py:data::icon<Adw.TabPage.props.icon>] or loading spinner.
If the page is pinned, the indicator will be shown instead of icon or spinner.
[class`TabOverview`] will show it at the at the top part of the thumbnail.
[property`TabPage`:py:data::indicator-tooltip<Adw.TabPage.props.indicator_tooltip>] can be used to set the tooltip on the indicator icon.
If [property`TabPage`:py:data::indicator-activatable<Adw.TabPage.props.indicator_activatable>] is set to
TRUE
, the indicator icon can act as a button.
- Adw.TabPage.props.indicator_tooltip¶
- Name:
indicator-tooltip
- Type:
- Default Value:
''
- Flags:
The tooltip of the indicator icon.
The tooltip can be marked up with the Pango text markup language.
See [property`TabPage`:py:data::indicator-icon<Adw.TabPage.props.indicator_icon>].
New in version 1.2.
- Adw.TabPage.props.keyword¶
- Name:
keyword
- Type:
- Default Value:
''
- Flags:
The search keyboard of the page.
[class`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.
New in version 1.3.
- Adw.TabPage.props.live_thumbnail¶
- Name:
live-thumbnail
- Type:
- Default Value:
- Flags:
Whether to enable live thumbnail for this page.
When set to
TRUE
, the page’s thumbnail in [class`TabOverview`] will update immediately when the page is redrawn or resized.If it’s set to
FALSE
, the thumbnail will only be live when the page is selected, and otherwise it will be static and will only update when [method`TabPage`.invalidate_thumbnail] or [method`TabView`.invalidate_thumbnails] is called.New in version 1.3.
- Adw.TabPage.props.loading¶
- Name:
loading
- Type:
- Default Value:
- Flags:
Whether the page is loading.
If set to
TRUE
, [class`TabBar`] and [class`TabOverview`] will display a spinner in place of icon.If the page is pinned and [property`TabPage`:py:data::indicator-icon<Adw.TabPage.props.indicator_icon>] is set, loading status will not be visible with
AdwTabBar
.
- Adw.TabPage.props.needs_attention¶
- Name:
needs-attention
- Type:
- Default Value:
- Flags:
Whether the page needs attention.
[class`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.[class`TabOverview`] will display a dot in the corner of the thumbnail if set to
TRUE
.[class`TabButton`] will display a dot if any of the pages that aren’t selected have this property set to
TRUE
.
- Adw.TabPage.props.parent¶
- Name:
parent
- Type:
- Default Value:
- Flags:
The parent page of the page.
See [method`TabView`.add_page] and [method`TabView`.close_page].
- Adw.TabPage.props.pinned¶
-
Whether the page is pinned.
See [method`TabView`.set_page_pinned].
- Adw.TabPage.props.selected¶
-
Whether the page is selected.
- Adw.TabPage.props.thumbnail_xalign¶
- Name:
thumbnail-xalign
- Type:
- Default Value:
0.0
- Flags:
The horizontal alignment of the page thumbnail.
If the page is so wide that [class`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.
New in version 1.3.
- Adw.TabPage.props.thumbnail_yalign¶
- Name:
thumbnail-yalign
- Type:
- Default Value:
0.0
- Flags:
The vertical alignment of the page thumbnail.
If the page is so tall that [class`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.
New in version 1.3.
- Adw.TabPage.props.title¶
- Name:
title
- Type:
- Default Value:
''
- Flags:
The title of the page.
[class`TabBar`] will display it in the center of the tab unless it’s pinned, and will use it as a tooltip unless [property`TabPage`:py:data::tooltip<Adw.TabPage.props.tooltip>] is set.
[class`TabOverview`] will display it below the thumbnail unless it’s pinned, or inside the card otherwise, and will use it as a tooltip unless [property`TabPage`:py:data::tooltip<Adw.TabPage.props.tooltip>] is set.
- Adw.TabPage.props.tooltip¶
- Name:
tooltip
- Type:
- Default Value:
''
- Flags:
The tooltip of the page.
The tooltip can be marked up with the Pango text markup language.
If not set, [class`TabBar`] and [class`TabOverview`] will use [property`TabPage`:py:data::title<Adw.TabPage.props.title>] as a tooltip instead.