It derives from <GtkWidget>.
A tab bar for TabView.
The <AdwTabBar> widget is a tab bar that can be
used with conjunction with <AdwTabView>. It is
typically used as a top bar within ToolbarView.
<AdwTabBar> can autohide and can optionally contain
action widgets on both sides of the tabs.
When there’s not enough space to show all the tabs,
<AdwTabBar> will scroll them. Pinned tabs always
stay visible and aren’t a part of the scrollable area.
<AdwTabBar> tabs can have an additional drop target
for arbitrary content.
Use TabBar.setup_extra_drop_target to set it up, specifying the
supported content types and drag actions, then connect to
"extra-drag-drop" to handle a drop.
In some cases, it may be necessary to determine the used action based on
the content. In that case, set TabBar:extra-drag-preload to
TRUE and connect to "extra-drag-value" signal, then return
the action from its handler. To access this action from the
"extra-drag-drop" handler, use the
TabBar:extra-drag-preferred-action property.
"extra-drag-value" is also always emitted when starting to hover
an item, with a NULL value. This happens even when
TabBar:extra-drag-preload is FALSE.
<AdwTabBar> has a single CSS node with name
tabbar.
By default <AdwTabBar> look like a part of an
<AdwHeaderBar> and is intended to be used
directly attached to one or used as a ToolbarView toolbar. The
‘.inline‘ style class removes its background, so that it can be used in
different contexts instead.
Whether the tabs automatically hide.
If set to TRUE, the tab bar disappears when TabBar:view
has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
See TabBar:tabs-revealed.
Its value is a boolean.
Set it with (set! (tab-bar:autohide self) value).
The widget shown after the tabs.
Its value is a <GtkWidget>, or #f.
Set it with (set! (tab-bar:end-action-widget self) value).
Whether tabs expand to full width.
If set to TRUE, the tabs will always vary width filling the whole
width when possible, otherwise tabs will always have the minimum
possible size.
Its value is a boolean.
Set it with (set! (tab-bar:expand-tabs self) value).
The current drag action during a drop.
This property should only be used from inside a "extra-drag-drop"
handler.
The action will be a subset of what was originally passed to
TabBar.setup_extra_drop_target.
Its value is a <GdkDragAction>.
It is read only.
Whether the drop data should be preloaded on hover.
See drop-target:preload.
Its value is a boolean.
Set it with (set! (tab-bar:extra-drag-preload self) value).
Whether tabs use inverted layout.
If set to TRUE, non-pinned tabs will have the close button at the
beginning and the indicator at the end rather than the opposite.
Its value is a boolean.
Set it with (set! (tab-bar:inverted self) value).
Whether the tab bar is overflowing.
If TRUE, all tabs cannot be displayed at once and require
scrolling.
Its value is a boolean.
It is read only.
The widget shown before the tabs.
Its value is a <GtkWidget>, or #f.
Set it with (set! (tab-bar:start-action-widget self) value).
Whether the tabs are currently revealed.
See TabBar:autohide.
Its value is a boolean.
It is read only.
The tab view the tab bar controls.
Its value is a <AdwTabView>, or #f.
Set it with (set! (tab-bar:view self) value).
Gets whether the tabs automatically hide.
Passed: a <AdwTabBar>.
a tab bar
Returned: a boolean.
whether the tabs automatically hide
Gets the widget shown after the tabs.
Passed: a <AdwTabBar>.
a tab bar
Returned: a <GtkWidget>, or #f.
the widget shown after the tabs
Gets whether tabs expand to full width.
Passed: a <AdwTabBar>.
a tab bar
Returned: a boolean.
whether tabs expand to full width.
Gets the current drag action during a drop.
This method should only be used from inside a "extra-drag-drop"
handler.
The action will be a subset of what was originally passed to
TabBar.setup_extra_drop_target.
Passed: a <AdwTabBar>.
a tab bar
Returned: a <GdkDragAction>.
the drag action of the current drop
Gets whether drop data should be preloaded on hover.
Passed: a <AdwTabBar>.
a tab bar
Returned: a boolean.
whether drop data should be preloaded on hover
Gets whether tabs use inverted layout.
Passed: a <AdwTabBar>.
a tab bar
Returned: a boolean.
whether tabs use inverted layout
Gets whether self is overflowing.
If TRUE, all tabs cannot be displayed at once and require
scrolling.
Passed: a <AdwTabBar>.
a tab bar
Returned: a boolean.
whether self is overflowing
Gets the widget shown before the tabs.
Passed: a <AdwTabBar>.
a tab bar
Returned: a <GtkWidget>, or #f.
the widget shown before the tabs
Gets whether the tabs are currently revealed.
See TabBar:autohide.
Passed: a <AdwTabBar>.
a tab bar
Returned: a boolean.
whether the tabs are currently revealed
Gets the tab view self controls.
Passed: a <AdwTabBar>.
a tab bar
Returned: a <AdwTabView>, or #f.
the view self controls
Creates a new <AdwTabBar>.
Returned: a <AdwTabBar>.
the newly created <AdwTabBar>
Sets whether the tabs automatically hide.
If set to TRUE, the tab bar disappears when TabBar:view
has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
See TabBar:tabs-revealed.
Passed: a <AdwTabBar>.
a tab bar
Passed: a boolean.
whether the tabs automatically hide
Sets the widget to show after the tabs.
Passed: a <AdwTabBar>.
a tab bar
Passed, or left out: a <GtkWidget>, or
#f.
the widget to show after the tabs
Sets whether tabs expand to full width.
If set to TRUE, the tabs will always vary width filling the whole
width when possible, otherwise tabs will always have the minimum
possible size.
Passed: a <AdwTabBar>.
a tab bar
Passed: a boolean.
whether to expand tabs
Sets whether drop data should be preloaded on hover.
See drop-target:preload.
Passed: a <AdwTabBar>.
a tab bar
Passed: a boolean.
whether to preload drop data
Sets whether tabs tabs use inverted layout.
If set to TRUE, non-pinned tabs will have the close button at the
beginning and the indicator at the end rather than the opposite.
Passed: a <AdwTabBar>.
a tab bar
Passed: a boolean.
whether tabs use inverted layout
Sets the widget to show before the tabs.
Passed: a <AdwTabBar>.
a tab bar
Passed, or left out: a <GtkWidget>, or
#f.
the widget to show before the tabs
Sets the tab view self controls.
Passed: a <AdwTabBar>.
a tab bar
Passed, or left out: a <AdwTabView>, or #f.
a tab view
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 "extra-drag-drop" signal can be used to handle the drop.
Passed: a <AdwTabBar>.
a tab bar
Passed: a <GdkDragAction>, or a list of its
symbols, or one of them.
the supported actions
Passed: a list or vector, each a class, or a GType number, or #f.
all supported GTypes that can be dropped
Not passed: guile-gi gives the length of types.
number of types
Connect a handler with (connect object tab-bar:extra-drag-drop
handler). It is called as (handler self page value) ⇒ %return.
Emitted when content is dropped onto a tab.
The content must be of one of the types set up via
TabBar.setup_extra_drop_target.
See drop-target:drop.
Passed: a <AdwTabBar>.
Passed: a <AdwTabPage>.
the page matching the tab the content was dropped onto
Passed: a <GValue>.
the <GValue> being dropped
Returned: a boolean.
whether the drop was accepted
Connect a handler with (connect object tab-bar:extra-drag-value
handler). It is called as (handler self page value) ⇒ %return.
Emitted when the dropped content is preloaded.
In order for data to be preloaded, TabBar:extra-drag-preload must
be set to TRUE.
The content must be of one of the types set up via
TabBar.setup_extra_drop_target.
See drop-target:value.
Passed: a <AdwTabBar>.
Passed: a <AdwTabPage>.
the page matching the tab the content was dropped onto
Passed: a <GValue>, or #f.
the <GValue> being dropped
Returned: a <GdkDragAction>, or a list of
its symbols, or one of them.
the preferred action for the drop