:right-sidebar: True TabPage =================================================================== .. currentmodule:: gi.repository.Adw .. class:: TabPage(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible` An auxiliary class used by :obj:`~gi.repository.Adw.TabView`\. Methods ------- .. rst-class:: interim-class .. class:: TabPage :no-index: .. method:: get_child() -> ~gi.repository.Gtk.Widget Gets the child of ``self``\. .. method:: get_icon() -> ~gi.repository.Gio.Icon | None Gets the icon of ``self``\. .. method:: get_indicator_activatable() -> bool Gets whether the indicator of ``self`` is activatable. .. method:: get_indicator_icon() -> ~gi.repository.Gio.Icon | None Gets the indicator icon of ``self``\. .. method:: get_indicator_tooltip() -> str Gets the tooltip of the indicator icon of ``self``\. .. versionadded:: 1.2 .. method:: get_keyword() -> str | None Gets the search keyword of ``self``\. .. versionadded:: 1.3 .. method:: get_live_thumbnail() -> bool Gets whether to live thumbnail is enabled ``self``\. .. versionadded:: 1.3 .. method:: get_loading() -> bool Gets whether ``self`` is loading. .. method:: get_needs_attention() -> bool Gets whether ``self`` needs attention. .. method:: get_parent() -> ~gi.repository.Adw.TabPage | None Gets the parent page of ``self``\. See :obj:`~gi.repository.TabView.add_page` and :obj:`~gi.repository.TabView.close_page`\. .. method:: get_pinned() -> bool Gets whether ``self`` is pinned. See :obj:`~gi.repository.TabView.set_page_pinned`\. .. method:: get_selected() -> bool Gets whether ``self`` is selected. .. method:: get_thumbnail_xalign() -> float Gets the horizontal alignment of the thumbnail for ``self``\. .. versionadded:: 1.3 .. method:: get_thumbnail_yalign() -> float Gets the vertical alignment of the thumbnail for ``self``\. .. versionadded:: 1.3 .. method:: get_title() -> str Gets the title of ``self``\. .. method:: get_tooltip() -> str | None Gets the tooltip of ``self``\. .. method:: invalidate_thumbnail() -> None Invalidates thumbnail for ``self``\. If an :obj:`~gi.repository.Adw.TabOverview` is open, the thumbnail representing ``self`` will be immediately updated. Otherwise it will be update when opening the overview. Does nothing if :obj:`~gi.repository.Adw.TabPage.props.live_thumbnail` is set to ``TRUE``\. See also :obj:`~gi.repository.TabView.invalidate_thumbnails`\. .. versionadded:: 1.3 .. method:: set_icon(icon: ~gi.repository.Gio.Icon | None = None) -> None Sets the icon of ``self``\. :obj:`~gi.repository.Adw.TabBar` and :obj:`~gi.repository.Adw.TabOverview` display the icon next to the title, unless :obj:`~gi.repository.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. :param icon: the icon of ``self`` .. method:: set_indicator_activatable(activatable: bool) -> None Sets whether the indicator of ``self`` is activatable. If set to ``TRUE``\, :obj:`~gi.repository.Adw.TabView.signals.indicator_activated` will be emitted when the indicator icon is clicked. If :obj:`~gi.repository.Adw.TabPage.props.indicator_icon` is not set, does nothing. :param activatable: whether the indicator is activatable .. method:: set_indicator_icon(indicator_icon: ~gi.repository.Gio.Icon | None = None) -> None Sets the indicator icon of ``self``\. A common use case is an audio or camera indicator in a web browser. :obj:`~gi.repository.Adw.TabBar` will show it at the beginning of the tab, alongside icon representing :obj:`~gi.repository.Adw.TabPage.props.icon` or loading spinner. If the page is pinned, the indicator will be shown instead of icon or spinner. :obj:`~gi.repository.Adw.TabOverview` will show it at the at the top part of the thumbnail. :obj:`~gi.repository.Adw.TabPage.props.indicator_tooltip` can be used to set the tooltip on the indicator icon. If :obj:`~gi.repository.Adw.TabPage.props.indicator_activatable` is set to ``TRUE``\, the indicator icon can act as a button. :param indicator_icon: the indicator icon of ``self`` .. method:: 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 :obj:`~gi.repository.Adw.TabPage.props.indicator_icon`\. .. versionadded:: 1.2 :param tooltip: the indicator tooltip of ``self`` .. method:: set_keyword(keyword: str) -> None Sets the search keyword for ``self``\. :obj:`~gi.repository.Adw.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. .. versionadded:: 1.3 :param keyword: the search keyword .. method:: set_live_thumbnail(live_thumbnail: bool) -> None Sets whether to enable live thumbnail for ``self``\. When set to ``TRUE``\, ``self``\'s thumbnail in :obj:`~gi.repository.Adw.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 :obj:`~gi.repository.TabPage.invalidate_thumbnail` or :obj:`~gi.repository.TabView.invalidate_thumbnails` is called. .. versionadded:: 1.3 :param live_thumbnail: whether to enable live thumbnail .. method:: set_loading(loading: bool) -> None Sets whether ``self`` is loading. If set to ``TRUE``\, :obj:`~gi.repository.Adw.TabBar` and :obj:`~gi.repository.Adw.TabOverview` will display a spinner in place of icon. If the page is pinned and :obj:`~gi.repository.Adw.TabPage.props.indicator_icon` is set, loading status will not be visible with ``AdwTabBar``\. :param loading: whether ``self`` is loading .. method:: set_needs_attention(needs_attention: bool) -> None Sets whether ``self`` needs attention. :obj:`~gi.repository.Adw.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. :obj:`~gi.repository.Adw.TabOverview` will display a dot in the corner of the thumbnail if set to ``TRUE``\. :obj:`~gi.repository.Adw.TabButton` will display a dot if any of the pages that aren't selected have :obj:`~gi.repository.Adw.TabPage.props.needs_attention` set to ``TRUE``\. :param needs_attention: whether ``self`` needs attention .. method:: set_thumbnail_xalign(xalign: float) -> None Sets the horizontal alignment of the thumbnail for ``self``\. If the page is so wide that :obj:`~gi.repository.Adw.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. .. versionadded:: 1.3 :param xalign: the new value .. method:: set_thumbnail_yalign(yalign: float) -> None Sets the vertical alignment of the thumbnail for ``self``\. If the page is so tall that :obj:`~gi.repository.Adw.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. .. versionadded:: 1.3 :param yalign: the new value .. method:: set_title(title: str) -> None :obj:`~gi.repository.Adw.TabBar` will display it in the center of the tab unless it's pinned, and will use it as a tooltip unless :obj:`~gi.repository.Adw.TabPage.props.tooltip` is set. :obj:`~gi.repository.Adw.TabOverview` will display it below the thumbnail unless it's pinned, or inside the card otherwise, and will use it as a tooltip unless :obj:`~gi.repository.Adw.TabPage.props.tooltip` is set. Sets the title of ``self``\. :param title: the title of ``self`` .. method:: 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, :obj:`~gi.repository.Adw.TabBar` and :obj:`~gi.repository.Adw.TabOverview` will use :obj:`~gi.repository.Adw.TabPage.props.title` as a tooltip instead. :param tooltip: the tooltip of ``self`` Properties ---------- .. rst-class:: interim-class .. class:: TabPage :no-index: .. attribute:: props.child :type: ~gi.repository.Gtk.Widget The type of the None singleton. .. attribute:: props.icon :type: ~gi.repository.Gio.Icon The type of the None singleton. .. attribute:: props.indicator_activatable :type: bool The type of the None singleton. .. attribute:: props.indicator_icon :type: ~gi.repository.Gio.Icon The type of the None singleton. .. attribute:: props.indicator_tooltip :type: str The type of the None singleton. .. versionadded:: 1.2 .. attribute:: props.keyword :type: str The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.live_thumbnail :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.loading :type: bool The type of the None singleton. .. attribute:: props.needs_attention :type: bool The type of the None singleton. .. attribute:: props.parent :type: ~gi.repository.Adw.TabPage The type of the None singleton. .. attribute:: props.pinned :type: bool The type of the None singleton. .. attribute:: props.selected :type: bool The type of the None singleton. .. attribute:: props.thumbnail_xalign :type: float The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.thumbnail_yalign :type: float The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.title :type: str The type of the None singleton. .. attribute:: props.tooltip :type: str The type of the None singleton.