TabView
A dynamic tabbed container.
AdwTabView
is a container which shows one child at a time. While it provides keyboard shortcuts for switching between pages, it does not provide a visible tab switcher and relies on external widgets for that, such as class@TabBar, class@TabOverview and class@TabButton.
AdwTabView
maintains a class@TabPage object for each page, which holds additional per-page properties. You can obtain the AdwTabPage
for a page with method@TabView.get_page, and as the return value for method@TabView.append and other functions for adding children.
AdwTabView
only aims to be useful for dynamic tabs in multi-window document-based applications, such as web browsers, file managers, text editors or terminals. It does not aim to replace class@Gtk.Notebook for use cases such as tabbed dialogs.
As such, it does not support disabling page reordering or detaching.
AdwTabView
adds a number of global page switching and reordering shortcuts. The property@TabView:shortcuts property can be used to manage them.
See flags@TabViewShortcuts for the list of the available shortcuts. All of the shortcuts are enabled by default.
method@TabView.add_shortcuts and method@TabView.remove_shortcuts can be used to manage shortcuts in a convenient way, for example:
adw_tab_view_remove_shortcuts (view, ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME |
ADW_TAB_VIEW_SHORTCUT_CONTROL_END);
CSS nodes
AdwTabView
has a main CSS node with the name tabview
.
Accessibility
AdwTabView
uses the GTK_ACCESSIBLE_ROLE_TAB_PANEL
for the tab pages which are the accessible parent objects of the child widgets.
Skipped during bindings generation
method
selected-page
: Property TypeInfo of getter and setter do not match
Constructors
Properties
Default page icon.
Whether a page is being transferred.
The number of pinned pages in the tab view.
The enabled shortcuts.
Functions
Adds @shortcuts for @self.
Inserts @child as the last pinned page.
Requests to close all pages other than @page.
Completes a method@TabView.close_page call for @page.
Requests to close all pages after @page.
Requests to close all pages before @page.
Emitted after method@TabView.close_page has been called for @page.
Emitted when a tab should be transferred into a new window.
Emitted after the indicator icon on @page has been activated.
Emitted when a page has been created or transferred to @self.
Emitted when a page has been removed or transferred to another view.
Emitted after @page has been reordered to @position.
Emitted when a context menu is opened or closed for @page.
Gets the default icon of @self.
Whether a page is being transferred.
Gets the tab context menu model for @self.
Gets the number of pinned pages in @self.
Gets the class@TabPage representing the child at @position.
Finds the position of @page in @self, starting from 0.
Gets the currently selected page in @self.
Gets the enabled shortcuts for @self.
Inserts a pinned page at @position.
Invalidates thumbnails for all pages in @self.
Inserts @child as the first pinned page.
Removes @shortcuts from @self.
Reorders @page to before its previous page if possible.
Reorders @page to the first possible position.
Reorders @page to after its next page if possible.
Reorders @page to the last possible position.
Reorders @page to @position.
Selects the page after the currently selected page.
Selects the page before the currently selected page.
Sets the default page icon for @self.
Sets the tab context menu model for @self.
Pins or unpins @page.
Sets the currently selected page in @self.
Sets the enabled shortcuts for @self.
Transfers @page from @self to @other_view.