:right-sidebar: True TabButton =================================================================== .. currentmodule:: gi.repository.Adw .. versionadded:: 1.3 .. class:: TabButton(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Actionable`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` A button that displays the number of :obj:`~gi.repository.Adw.TabView` pages. .. image:: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/tab-button.png ``AdwTabButton`` is a button that displays the number of pages in a given ``AdwTabView``\, as well as whether one of the inactive pages needs attention. It's intended to be used as a visible indicator when there's no visible tab bar, typically opening an :obj:`~gi.repository.Adw.TabOverview` on click, e.g. via the ``overview.open`` action name: .. code-block:: xml :dedent: view overview.open CSS nodes -------------------------------------------------------------------------------- ``AdwTabButton`` has a main CSS node with name ``tabbutton``\. Accessibility -------------------------------------------------------------------------------- ``AdwTabButton`` uses the ``GTK_ACCESSIBLE_ROLE_BUTTON`` role. Constructors ------------ .. rst-class:: interim-class .. class:: TabButton :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwTabButton``\. .. versionadded:: 1.3 Methods ------- .. rst-class:: interim-class .. class:: TabButton :no-index: .. method:: get_view() -> ~gi.repository.Adw.TabView | None Gets the tab view ``self`` displays. .. versionadded:: 1.3 .. method:: set_view(view: ~gi.repository.Adw.TabView | None = None) -> None Sets the tab view to display. .. versionadded:: 1.3 :param view: a tab view Properties ---------- .. rst-class:: interim-class .. class:: TabButton :no-index: .. attribute:: props.view :type: ~gi.repository.Adw.TabView The type of the None singleton. .. versionadded:: 1.3 Signals ------- .. rst-class:: interim-class .. class:: TabButton.signals :no-index: .. method:: activate() -> None Emitted to animate press then release. This is an action signal. Applications should never connect to this signal, but use the :obj:`~gi.repository.Adw.TabButton.signals.clicked` signal. .. versionadded:: 1.3 .. method:: clicked() -> None The type of the None singleton. .. versionadded:: 1.3