: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` :Constructors: :: TabOverview(**properties) new() -> Gtk.Widget 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: ~typing.Sequence[type] | 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 child widget. .. versionadded:: 1.3 .. attribute:: props.enable_new_tab :type: bool Whether to enable new tab button. Connect to the :obj:`~gi.repository.Adw.TabOverview.signals.create_tab` signal to use it. .. versionadded:: 1.3 .. attribute:: props.enable_search :type: bool Whether to enable search in tabs. 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 .. attribute:: props.extra_drag_preferred_action :type: ~gi.repository.Gdk.DragAction The unique action on the ``current-drop`` of the :obj:`~gi.repository.Adw.TabOverview.signals.extra_drag_drop`. This property should only be used during a :obj:`~gi.repository.Adw.TabOverview.signals.extra_drag_drop` and is always a subset of what was originally passed to :obj:`~gi.repository.TabOverview.setup_extra_drop_target`. .. versionadded:: 1.4 .. attribute:: props.extra_drag_preload :type: bool Whether the drop data should be preloaded on hover. See :obj:`~gi.repository.Gtk.DropTarget.props.preload`. .. versionadded:: 1.3 .. attribute:: props.inverted :type: bool Whether thumbnails use inverted layout. If set to ``TRUE``, thumbnails will have the close or unpin buttons at the beginning and the indicator at the end rather than the other way around. .. versionadded:: 1.3 .. attribute:: props.open :type: bool Whether the overview is open. .. versionadded:: 1.3 .. attribute:: props.search_active :type: bool Whether search is currently active. See :obj:`~gi.repository.Adw.TabOverview.props.enable_search`. .. versionadded:: 1.3 .. attribute:: props.secondary_menu :type: ~gi.repository.Gio.MenuModel The secondary menu model. Use it to add extra actions, e.g. to open a new window or undo closed tab. .. versionadded:: 1.3 .. attribute:: props.show_end_title_buttons :type: bool Whether to show end title buttons in the overview's header bar. See :obj:`~gi.repository.Adw.HeaderBar.props.show_start_title_buttons` for the other side. .. versionadded:: 1.3 .. attribute:: props.show_start_title_buttons :type: bool Whether to show start title buttons in the overview's header bar. See :obj:`~gi.repository.Adw.HeaderBar.props.show_end_title_buttons` for the other side. .. versionadded:: 1.3 .. attribute:: props.view :type: ~gi.repository.Adw.TabView The tab view the overview controls. The view must be inside the tab overview, see :obj:`~gi.repository.Adw.TabOverview.props.child`. .. versionadded:: 1.3 Signals ------- .. rst-class:: interim-class .. class:: TabOverview.signals :no-index: .. method:: create_tab() -> ~gi.repository.Adw.TabPage Emitted when a tab needs to be created; This can happen after the new tab button has been pressed, see :obj:`~gi.repository.Adw.TabOverview.props.enable_new_tab`. The signal handler is expected to create a new page in the corresponding :obj:`~gi.repository.Adw.TabView` and return it. .. versionadded:: 1.3 .. method:: extra_drag_drop(page: ~gi.repository.Adw.TabPage, value: ~typing.Any) -> bool This signal is emitted when content is dropped onto a tab. The content must be of one of the types set up via :obj:`~gi.repository.TabOverview.setup_extra_drop_target`. See :obj:`~gi.repository.Gtk.DropTarget.signals.drop`. .. 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: ~typing.Any) -> ~gi.repository.Gdk.DragAction This signal is emitted when the dropped content is preloaded. In order for data to be preloaded, :obj:`~gi.repository.Adw.TabOverview.props.extra_drag_preload` must be set to ``TRUE``. The content must be of one of the types set up via :obj:`~gi.repository.TabOverview.setup_extra_drop_target`. See :obj:`~gi.repository.Gtk.DropTarget.props.value`. .. versionadded:: 1.3 :param page: the page matching the tab the content was dropped onto :param value: the ``GValue`` being dropped