Adw.TabOverview¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a tab needs to be created; This can happen after the new tab button has been pressed, see [property`TabOverview`:py:data::enable-new-tab<Adw.TabOverview.props.enable_new_tab>]. |
|
This signal is emitted when content is dropped onto a tab. |
|
This signal is emitted when the dropped content is preloaded. |
Fields¶
- Inherited:
Class Details¶
- class Adw.TabOverview(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A tab overview for [class`TabView`].
<picture> <source srcset=”tab-overview-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”tab-overview.png” alt=”tab-overview”> </picture>
AdwTabOverview
is a widget that can display tabs from anAdwTabView
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 [property`TabPage`:py:data::live-thumbnail<Adw.TabOverview.props.live_thumbnail>] toTRUE
, or refreshed with [method`TabPage`.invalidate_thumbnail] or [method`TabView`.invalidate_thumbnails] otherwise.If the pages are too tall or too wide, the thumbnails will be cropped; use [property`TabPage`:py:data::thumbnail-xalign<Adw.TabOverview.props.thumbnail_xalign>] and [property`TabPage`:py:data::thumbnail-yalign<Adw.TabOverview.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 [class`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 [property`TabPage`:py:data::keyword<Adw.TabOverview.props.keyword>].If [property`TabOverview`:py:data::enable-new-tab<Adw.TabOverview.props.enable_new_tab>] is set to
TRUE
, a new tab button will be shown. Connect to the [signal`TabOverview`:py:func:::create-tab<Adw.TabOverview.signals.create_tab>] signal to use it.[property`TabOverview`:py:data::secondary-menu<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 [property`TabOverview`:py:data::child<Adw.TabOverview.props.child>]. The child is expected to contain an [class`TabView`].AdwTabOverview
shows window buttons by default. They can be disabled by setting [property`TabOverview`:py:data::show-start-title-buttons<Adw.TabOverview.props.show_start_title_buttons>] and/or [property`TabOverview`:py:data::show-start-title-buttons<Adw.TabOverview.props.show_start_title_buttons>] and/or [property`TabOverview`:py:data::show-end-title-buttons<Adw.TabOverview.props.show_end_title_buttons>] toFALSE
.If search and window buttons are disabled, and secondary menu is not set, the header bar will be hidden.
- Actions
AdwTabOverview
defines theoverview.open
andoverview.close
actions for opening and closing itself. They can be convenient when used together with [class`TabButton`].- CSS nodes
AdwTabOverview
has a single CSS node with nametaboverview
.New in version 1.3.
- classmethod new()¶
- Returns:
the newly created
AdwTabOverview
- Return type:
Creates a new
AdwTabOverview
.New in version 1.3.
- get_child()¶
- Returns:
the child widget of self
- Return type:
Gtk.Widget
orNone
Gets the child widget of self.
New in version 1.3.
- get_enable_new_tab()¶
- Returns:
whether new tab button is enabled
- Return type:
Gets whether to new tab button is enabled for self.
New in version 1.3.
- get_enable_search()¶
- Returns:
whether search is enabled
- Return type:
Gets whether search in tabs is enabled for self.
New in version 1.3.
- get_extra_drag_preferred_action()¶
- Returns:
the drag action of the current drop.
- Return type:
Gets the current action during a drop on the extra_drop_target.
New in version 1.4.
- get_extra_drag_preload()¶
- Returns:
whether drop data should be preloaded on hover
- Return type:
Gets whether drop data should be preloaded on hover.
New in version 1.3.
- get_inverted()¶
- Returns:
whether thumbnails use inverted layout
- Return type:
Gets whether thumbnails use inverted layout.
New in version 1.3.
- get_open()¶
- Returns:
whether the overview is open
- Return type:
Gets whether self is open.
New in version 1.3.
- get_search_active()¶
- Returns:
whether search is active
- Return type:
Gets whether search is currently active for self.
See [property`TabOverview`:py:data::enable-search<Adw.TabOverview.props.enable_search>].
New in version 1.3.
- Returns:
the secondary menu model
- Return type:
Gets the secondary menu model for self.
New in version 1.3.
- get_show_end_title_buttons()¶
- Returns:
whether end title buttons are shown
- Return type:
Gets whether end title buttons are shown in self's header bar.
New in version 1.3.
- get_show_start_title_buttons()¶
- Returns:
whether start title buttons are shown
- Return type:
Gets whether start title buttons are shown in self's header bar.
New in version 1.3.
- get_view()¶
- Returns:
the tab view
- Return type:
Adw.TabView
orNone
Gets the tab view self controls.
New in version 1.3.
- set_child(child)¶
- Parameters:
child (
Gtk.Widget
orNone
) – the child widget
Sets the child widget of self.
New in version 1.3.
- set_enable_new_tab(enable_new_tab)¶
- Parameters:
enable_new_tab (
bool
) – whether to enable new tab button
Sets whether to enable new tab button for self.
Connect to the [signal`TabOverview`:py:func:::create-tab<Adw.TabOverview.signals.create_tab>] signal to use it.
New in version 1.3.
- set_enable_search(enable_search)¶
- Parameters:
enable_search (
bool
) – whether to enable search
Sets whether to enable search in tabs for self.
Search matches tab titles and tooltips, as well as keywords, set via [property`TabPage`:py:data::keyword<Adw.TabOverview.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 [property`TabOverview`:py:data::search-active<Adw.TabOverview.props.search_active>] to check out if search is currently active.
New in version 1.3.
- set_extra_drag_preload(preload)¶
- Parameters:
preload (
bool
) – whether to preload drop data
Sets whether drop data should be preloaded on hover.
See [property`Gtk`.DropTarget:preload].
New in version 1.3.
- set_inverted(inverted)¶
- Parameters:
inverted (
bool
) – whether thumbnails use inverted layout
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.New in version 1.3.
- set_open(open)¶
- Parameters:
open (
bool
) – whether the overview is open
Sets whether the to open self.
New in version 1.3.
- Parameters:
secondary_menu (
Gio.MenuModel
orNone
) – a menu model
Sets the secondary menu model for self.
Use it to add extra actions, e.g. to open a new window or undo closed tab.
New in version 1.3.
- set_show_end_title_buttons(show_end_title_buttons)¶
- Parameters:
show_end_title_buttons (
bool
) – whether to show end title buttons
Sets whether to show end title buttons in self's header bar.
See [property`HeaderBar`:py:data::show-start-title-buttons<Adw.TabOverview.props.show_start_title_buttons>] for the other side.
New in version 1.3.
- set_show_start_title_buttons(show_start_title_buttons)¶
- Parameters:
show_start_title_buttons (
bool
) – whether to show start title buttons
Sets whether to show start title buttons in self's header bar.
See [property`HeaderBar`:py:data::show-end-title-buttons<Adw.TabOverview.props.show_end_title_buttons>] for the other side.
New in version 1.3.
- set_view(view)¶
- Parameters:
view (
Adw.TabView
orNone
) – a tab view
Sets the tab view to control.
The view must be inside self, see [property`TabOverview`:py:data::child<Adw.TabOverview.props.child>].
New in version 1.3.
- setup_extra_drop_target(actions, types)¶
- Parameters:
actions (
Gdk.DragAction
) – the supported actionstypes ([
GObject.GType
] orNone
) – all supported ``GType``s that can be dropped
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 [signal`TabOverview`:py:func:::extra-drag-drop<Adw.TabOverview.signals.extra_drag_drop>] signal can be used to handle the drop.
New in version 1.3.
Signal Details¶
- Adw.TabOverview.signals.create_tab(tab_overview)¶
- Signal Name:
create-tab
- Flags:
- Parameters:
tab_overview (
Adw.TabOverview
) – The object which received the signal- Returns:
the newly created page
- Return type:
Emitted when a tab needs to be created;
This can happen after the new tab button has been pressed, see [property`TabOverview`:py:data::enable-new-tab<Adw.TabOverview.props.enable_new_tab>].
The signal handler is expected to create a new page in the corresponding [class`TabView`] and return it.
New in version 1.3.
- Adw.TabOverview.signals.extra_drag_drop(tab_overview, page, value)¶
- Signal Name:
extra-drag-drop
- Flags:
- Parameters:
tab_overview (
Adw.TabOverview
) – The object which received the signalpage (
Adw.TabPage
) – the page matching the tab the content was dropped ontovalue (
GObject.Value
) – theGValue
being dropped
- Returns:
whether the drop was accepted for page
- Return type:
This signal is emitted when content is dropped onto a tab.
The content must be of one of the types set up via [method`TabOverview`.setup_extra_drop_target].
See [signal`Gtk`.DropTarget::drop].
New in version 1.3.
- Adw.TabOverview.signals.extra_drag_value(tab_overview, page, value)¶
- Signal Name:
extra-drag-value
- Flags:
- Parameters:
tab_overview (
Adw.TabOverview
) – The object which received the signalpage (
Adw.TabPage
) – the page matching the tab the content was dropped ontovalue (
GObject.Value
) – theGValue
being dropped
- Returns:
the preferred action for the drop on page
- Return type:
This signal is emitted when the dropped content is preloaded.
In order for data to be preloaded, [property`TabOverview`:py:data::extra-drag-preload<Adw.TabOverview.props.extra_drag_preload>] must be set to
TRUE
.The content must be of one of the types set up via [method`TabOverview`.setup_extra_drop_target].
See [property`Gtk`.DropTarget:value].
New in version 1.3.
Property Details¶
- Adw.TabOverview.props.child¶
- Name:
child
- Type:
- Default Value:
- Flags:
The child widget.
New in version 1.3.
- Adw.TabOverview.props.enable_new_tab¶
- Name:
enable-new-tab
- Type:
- Default Value:
- Flags:
Whether to enable new tab button.
Connect to the [signal`TabOverview`:py:func:::create-tab<Adw.TabOverview.signals.create_tab>] signal to use it.
New in version 1.3.
- Adw.TabOverview.props.enable_search¶
- Name:
enable-search
- Type:
- Default Value:
- Flags:
Whether to enable search in tabs.
Search matches tab titles and tooltips, as well as keywords, set via [property`TabPage`:py:data::keyword<Adw.TabOverview.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 [property`TabOverview`:py:data::search-active<Adw.TabOverview.props.search_active>] to check out if search is currently active.
New in version 1.3.
- Adw.TabOverview.props.extra_drag_preferred_action¶
- Name:
extra-drag-preferred-action
- Type:
- Default Value:
0
- Flags:
The unique action on the
current-drop
of the [signal`TabOverview`:py:func:::extra-drag-drop<Adw.TabOverview.signals.extra_drag_drop>].This property should only be used during a [signal`TabOverview`:py:func:::extra-drag-drop<Adw.TabOverview.signals.extra_drag_drop>] and is always a subset of what was originally passed to [method`TabOverview`.setup_extra_drop_target].
New in version 1.4.
- Adw.TabOverview.props.extra_drag_preload¶
- Name:
extra-drag-preload
- Type:
- Default Value:
- Flags:
Whether the drop data should be preloaded on hover.
See [property`Gtk`.DropTarget:preload].
New in version 1.3.
- Adw.TabOverview.props.inverted¶
- Name:
inverted
- Type:
- Default Value:
- Flags:
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.New in version 1.3.
- Adw.TabOverview.props.open¶
- Name:
open
- Type:
- Default Value:
- Flags:
Whether the overview is open.
New in version 1.3.
- Adw.TabOverview.props.search_active¶
-
Whether search is currently active.
See [property`TabOverview`:py:data::enable-search<Adw.TabOverview.props.enable_search>].
New in version 1.3.
- Name:
secondary-menu
- Type:
- Default Value:
- Flags:
The secondary menu model.
Use it to add extra actions, e.g. to open a new window or undo closed tab.
New in version 1.3.
- Adw.TabOverview.props.show_end_title_buttons¶
- Name:
show-end-title-buttons
- Type:
- Default Value:
- Flags:
Whether to show end title buttons in the overview’s header bar.
See [property`HeaderBar`:py:data::show-start-title-buttons<Adw.TabOverview.props.show_start_title_buttons>] for the other side.
New in version 1.3.
- Adw.TabOverview.props.show_start_title_buttons¶
- Name:
show-start-title-buttons
- Type:
- Default Value:
- Flags:
Whether to show start title buttons in the overview’s header bar.
See [property`HeaderBar`:py:data::show-end-title-buttons<Adw.TabOverview.props.show_end_title_buttons>] for the other side.
New in version 1.3.
- Adw.TabOverview.props.view¶
- Name:
view
- Type:
- Default Value:
- Flags:
The tab view the overview controls.
The view must be inside the tab overview, see [property`TabOverview`:py:data::child<Adw.TabOverview.props.child>].
New in version 1.3.