:right-sidebar: True TabOverview =================================================================== .. currentmodule:: gi.repository.Adw .. versionadded:: 1.3 .. class:: TabOverview(**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.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` A tab overview for :obj:`~gi.repository.Adw.TabView`\. .. image:: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/tab-overview.png ``AdwTabOverview`` is a widget that can display tabs from an ``AdwTabView`` in a grid. ``AdwTabOverview`` shows a thumbnail for each tab. By default thumbnails are static for all pages except the selected one. They can be made always live by setting :obj:`~gi.repository.Adw.TabPage.props.live_thumbnail` to ``TRUE``\, or refreshed with :obj:`~gi.repository.TabPage.invalidate_thumbnail` or :obj:`~gi.repository.TabView.invalidate_thumbnails` otherwise. If the pages are too tall or too wide, the thumbnails will be cropped; use :obj:`~gi.repository.Adw.TabPage.props.thumbnail_xalign` and :obj:`~gi.repository.Adw.TabPage.props.thumbnail_yalign` to control which part of the page should be visible in this case. Pinned tabs are shown as smaller cards without thumbnails above the other tabs. Unlike in :obj:`~gi.repository.Adw.TabBar`\, they still have titles, as well as an unpin button. ``AdwTabOverview`` provides search in open tabs. It searches in tab titles and tooltips, as well as :obj:`~gi.repository.Adw.TabPage.props.keyword`\. If :obj:`~gi.repository.Adw.TabOverview.props.enable_new_tab` is set to ``TRUE``\, a new tab button will be shown. Connect to the :obj:`~gi.repository.Adw.TabOverview.signals.create_tab` signal to use it. :obj:`~gi.repository.Adw.TabOverview.props.secondary_menu` can be used to provide a secondary menu for the overview. Use it to add extra actions, e.g. to open a new window or undo closed tab. ``AdwTabOverview`` is intended to be used as the direct child of the window, with the rest of the window contents set as the :obj:`~gi.repository.Adw.TabOverview.props.child`\. The child is expected to contain an :obj:`~gi.repository.Adw.TabView`\. ``AdwTabOverview`` shows window buttons by default. They can be disabled by setting :obj:`~gi.repository.Adw.TabOverview.props.show_start_title_buttons` and/or :obj:`~gi.repository.Adw.TabOverview.props.show_start_title_buttons` and/or :obj:`~gi.repository.Adw.TabOverview.props.show_end_title_buttons` to ``FALSE``\. If search and window buttons are disabled, and secondary menu is not set, the header bar will be hidden. Actions -------------------------------------------------------------------------------- ``AdwTabOverview`` defines the ``overview.open`` and ``overview.close`` actions for opening and closing itself. They can be convenient when used together with :obj:`~gi.repository.Adw.TabButton`\. CSS nodes -------------------------------------------------------------------------------- ``AdwTabOverview`` has a single CSS node with name ``taboverview``\. Constructors ------------ .. rst-class:: interim-class .. class:: TabOverview :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwTabOverview``\. .. versionadded:: 1.3 Methods ------- .. rst-class:: interim-class .. class:: TabOverview :no-index: .. method:: get_child() -> ~gi.repository.Gtk.Widget | None Gets the child widget of ``self``\. .. versionadded:: 1.3 .. method:: get_enable_new_tab() -> bool Gets whether to new tab button is enabled for ``self``\. .. versionadded:: 1.3 .. method:: get_enable_search() -> bool Gets whether search in tabs is enabled for ``self``\. .. versionadded:: 1.3 .. method:: get_extra_drag_preferred_action() -> ~gi.repository.Gdk.DragAction Gets the current action during a drop on the extra_drop_target. .. versionadded:: 1.4 .. method:: get_extra_drag_preload() -> bool Gets whether drop data should be preloaded on hover. .. versionadded:: 1.3 .. method:: get_inverted() -> bool Gets whether thumbnails use inverted layout. .. versionadded:: 1.3 .. method:: get_open() -> bool Gets whether ``self`` is open. .. versionadded:: 1.3 .. method:: get_search_active() -> bool Gets whether search is currently active for ``self``\. See :obj:`~gi.repository.Adw.TabOverview.props.enable_search`\. .. versionadded:: 1.3 .. method:: get_secondary_menu() -> ~gi.repository.Gio.MenuModel | None Gets the secondary menu model for ``self``\. .. versionadded:: 1.3 .. method:: get_show_end_title_buttons() -> bool Gets whether end title buttons are shown in ``self``\'s header bar. .. versionadded:: 1.3 .. method:: get_show_start_title_buttons() -> bool Gets whether start title buttons are shown in ``self``\'s header bar. .. versionadded:: 1.3 .. method:: get_view() -> ~gi.repository.Adw.TabView | None Gets the tab view ``self`` controls. .. versionadded:: 1.3 .. method:: set_child(child: ~gi.repository.Gtk.Widget | None = None) -> None Sets the child widget of ``self``\. .. versionadded:: 1.3 :param child: the child widget .. method:: set_enable_new_tab(enable_new_tab: bool) -> None Sets whether to enable new tab button for ``self``\. Connect to the :obj:`~gi.repository.Adw.TabOverview.signals.create_tab` signal to use it. .. versionadded:: 1.3 :param enable_new_tab: whether to enable new tab button .. method:: set_enable_search(enable_search: bool) -> None Sets whether to enable search in tabs for ``self``\. Search matches tab titles and tooltips, as well as keywords, set via :obj:`~gi.repository.Adw.TabPage.props.keyword`\. Use keywords to search in e.g. page URLs in a web browser. During search, tab reordering and drag-n-drop are disabled. Use :obj:`~gi.repository.Adw.TabOverview.props.search_active` to check out if search is currently active. .. versionadded:: 1.3 :param enable_search: whether to enable search .. method:: set_extra_drag_preload(preload: bool) -> None Sets whether drop data should be preloaded on hover. See :obj:`~gi.repository.Gtk.DropTarget.props.preload`\. .. versionadded:: 1.3 :param preload: whether to preload drop data .. method:: set_inverted(inverted: bool) -> None Sets whether thumbnails use inverted layout. If set to ``TRUE``\, thumbnails will have the close or unpin button at the beginning and the indicator at the end rather than the other way around. .. versionadded:: 1.3 :param inverted: whether thumbnails use inverted layout .. method:: set_open(open: bool) -> None Sets whether the to open ``self``\. .. versionadded:: 1.3 :param open: whether the overview is open .. method:: set_secondary_menu(secondary_menu: ~gi.repository.Gio.MenuModel | None = None) -> None Sets the secondary menu model for ``self``\. Use it to add extra actions, e.g. to open a new window or undo closed tab. .. versionadded:: 1.3 :param secondary_menu: a menu model .. method:: set_show_end_title_buttons(show_end_title_buttons: bool) -> None Sets whether to show end title buttons in ``self``\'s header bar. See :obj:`~gi.repository.Adw.HeaderBar.props.show_start_title_buttons` for the other side. .. versionadded:: 1.3 :param show_end_title_buttons: whether to show end title buttons .. method:: set_show_start_title_buttons(show_start_title_buttons: bool) -> None Sets whether to show start title buttons in ``self``\'s header bar. See :obj:`~gi.repository.Adw.HeaderBar.props.show_end_title_buttons` for the other side. .. versionadded:: 1.3 :param show_start_title_buttons: whether to show start title buttons .. method:: set_view(view: ~gi.repository.Adw.TabView | None = None) -> None Sets the tab view to control. The view must be inside ``self``\, see :obj:`~gi.repository.Adw.TabOverview.props.child`\. .. versionadded:: 1.3 :param view: a tab view .. method:: setup_extra_drop_target(actions: ~gi.repository.Gdk.DragAction, types: list[~gobject.GType] | None = None) -> None Sets the supported types for this drop target. Sets up an extra drop target on tabs. This allows to drag arbitrary content onto tabs, for example URLs in a web browser. If a tab is hovered for a certain period of time while dragging the content, it will be automatically selected. The :obj:`~gi.repository.Adw.TabOverview.signals.extra_drag_drop` signal can be used to handle the drop. .. versionadded:: 1.3 :param actions: the supported actions :param types: all supported ``GType``\s that can be dropped Properties ---------- .. rst-class:: interim-class .. class:: TabOverview :no-index: .. attribute:: props.child :type: ~gi.repository.Gtk.Widget The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.enable_new_tab :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.enable_search :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.extra_drag_preferred_action :type: ~gi.repository.Gdk.DragAction The type of the None singleton. .. versionadded:: 1.4 .. attribute:: props.extra_drag_preload :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.inverted :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.open :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.search_active :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.secondary_menu :type: ~gi.repository.Gio.MenuModel The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.show_end_title_buttons :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.show_start_title_buttons :type: bool The type of the None singleton. .. versionadded:: 1.3 .. attribute:: props.view :type: ~gi.repository.Adw.TabView The type of the None singleton. .. versionadded:: 1.3 Signals ------- .. rst-class:: interim-class .. class:: TabOverview.signals :no-index: .. method:: create_tab() -> ~gi.repository.Adw.TabPage The type of the None singleton. .. versionadded:: 1.3 .. method:: extra_drag_drop(page: ~gi.repository.Adw.TabPage, value: ~gi.repository.GObject.Value) -> bool The type of the None singleton. .. versionadded:: 1.3 :param page: the page matching the tab the content was dropped onto :param value: the ``GValue`` being dropped .. method:: extra_drag_value(page: ~gi.repository.Adw.TabPage, value: ~gi.repository.GObject.Value) -> ~gi.repository.Gdk.DragAction The type of the None singleton. .. versionadded:: 1.3 :param page: the page matching the tab the content was dropped onto :param value: the ``GValue`` being dropped