adw.tab_bar

Module for [TabBar] class

Types 3

A tab bar for adw.tab_view.TabView.

tab-bar

The adw.tab_bar.TabBar widget is a tab bar that can be used with conjunction with adw.tab_view.TabView. It is typically used as a top bar within adw.toolbar_view.ToolbarView.

adw.tab_bar.TabBar 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, adw.tab_bar.TabBar will scroll them. Pinned tabs always stay visible and aren't a part of the scrollable area.

CSS nodes

adw.tab_bar.TabBar has a single CSS node with name tabbar.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
TabBar self() nothrowReturns `this`, for use in `with` statements.
TabBarGidBuilder builder() static nothrowGet builder for [adw.tab_bar.TabBar] Returns: New builder object
bool autohide() @property nothrowGet `autohide` property. Returns: Whether the tabs automatically hide.
void autohide(bool propval) @property nothrowSet `autohide` property. Params: propval = Whether the tabs automatically hide.
gtk.widget.Widget endActionWidget() @property nothrowGet `endActionWidget` property. Returns: The widget shown after the tabs.
void endActionWidget(gtk.widget.Widget propval) @property nothrowSet `endActionWidget` property. Params: propval = The widget shown after the tabs.
bool expandTabs() @property nothrowGet `expandTabs` property. Returns: Whether tabs expand to full width.
void expandTabs(bool propval) @property nothrowSet `expandTabs` property. Params: propval = Whether tabs expand to full width.
gdk.types.DragAction extraDragPreferredAction() @property nothrowGet `extraDragPreferredAction` property. Returns: The unique action on the `current-drop` of the [adw.tab_bar.TabBar.extraDragDrop].
bool extraDragPreload() @property nothrowGet `extraDragPreload` property. Returns: Whether the drop data should be preloaded on hover.
void extraDragPreload(bool propval) @property nothrowSet `extraDragPreload` property. Params: propval = Whether the drop data should be preloaded on hover.
bool inverted() @property nothrowGet `inverted` property. Returns: Whether tabs use inverted layout.
void inverted(bool propval) @property nothrowSet `inverted` property. Params: propval = Whether tabs use inverted layout.
bool isOverflowing() @property nothrowGet `isOverflowing` property. Returns: Whether the tab bar is overflowing.
gtk.widget.Widget startActionWidget() @property nothrowGet `startActionWidget` property. Returns: The widget shown before the tabs.
void startActionWidget(gtk.widget.Widget propval) @property nothrowSet `startActionWidget` property. Params: propval = The widget shown before the tabs.
bool tabsRevealed() @property nothrowGet `tabsRevealed` property. Returns: Whether the tabs are currently revealed.
adw.tab_view.TabView view() @property nothrowGet `view` property. Returns: The tab view the tab bar controls.
void view(adw.tab_view.TabView propval) @property nothrowSet `view` property. Params: propval = The tab view the tab bar controls.
bool getAutohide() nothrowGets whether the tabs automatically hide. Returns: whether the tabs automatically hide
gtk.widget.Widget getEndActionWidget() nothrowGets the widget shown after the tabs. Returns: the widget shown after the tabs
bool getExpandTabs() nothrowGets whether tabs expand to full width. Returns: whether tabs expand to full width.
gdk.types.DragAction getExtraDragPreferredAction() nothrowGets the current action during a drop on the extra_drop_target. Returns: the drag action of the current drop.
bool getExtraDragPreload() nothrowGets whether drop data should be preloaded on hover. Returns: whether drop data should be preloaded on hover
bool getInverted() nothrowGets whether tabs use inverted layout. Returns: whether tabs use inverted layout
bool getIsOverflowing() nothrowGets whether self is overflowing.
gtk.widget.Widget getStartActionWidget() nothrowGets the widget shown before the tabs. Returns: the widget shown before the tabs
bool getTabsRevealed() nothrowGets whether the tabs are currently revealed.
adw.tab_view.TabView getView() nothrowGets the tab view self controls. Returns: the view self controls
void setAutohide(bool autohide) nothrowSets whether the tabs automatically hide.
void setEndActionWidget(gtk.widget.Widget widget = null) nothrowSets the widget to show after the tabs.
void setExpandTabs(bool expandTabs) nothrowSets whether tabs expand to full width.
void setExtraDragPreload(bool preload) nothrowSets whether drop data should be preloaded on hover.
void setInverted(bool inverted) nothrowSets whether tabs tabs use inverted layout.
void setStartActionWidget(gtk.widget.Widget widget = null) nothrowSets the widget to show before the tabs.
void setView(adw.tab_view.TabView view = null) nothrowSets the tab view self controls.
void setupExtraDropTarget(gdk.types.DragAction actions, gobject.types.GType[] types = null) nothrowSets the supported types for this drop target.
gulong connectExtraDragDrop(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.tab_page.TabPage))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == gobject.value.Value))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : adw.tab_bar.TabBar))) && Parameters!T.length < 4) nothrowConnect to `ExtraDragDrop` signal.
gulong connectExtraDragValue(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == gdk.types.DragAction) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.tab_page.TabPage))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == gobject.value.Value))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : adw.tab_bar.TabBar))) && Parameters!T.length < 4) nothrowConnect to `ExtraDragValue` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [adw.tab_bar.TabBar]. Returns: the newly created [adw.tab_bar.TabBar]

Fluent builder implementation template for adw.tab_bar.TabBar

Methods
T autohide(bool propval) nothrowSet `autohide` property. Params: propval = Whether the tabs automatically hide.
T endActionWidget(gtk.widget.Widget propval) nothrowSet `endActionWidget` property. Params: propval = The widget shown after the tabs. Returns: Builder instance for fluent chaining
T expandTabs(bool propval) nothrowSet `expandTabs` property. Params: propval = Whether tabs expand to full width.
T extraDragPreload(bool propval) nothrowSet `extraDragPreload` property. Params: propval = Whether the drop data should be preloaded on hover.
T inverted(bool propval) nothrowSet `inverted` property. Params: propval = Whether tabs use inverted layout.
T startActionWidget(gtk.widget.Widget propval) nothrowSet `startActionWidget` property. Params: propval = The widget shown before the tabs. Returns: Builder instance for fluent chaining
T view(adw.tab_view.TabView propval) nothrowSet `view` property. Params: propval = The tab view the tab bar controls. Returns: Builder instance for fluent chaining

Fluent builder for adw.tab_bar.TabBar

Methods
TabBar build() nothrowCreate object from builder. Returns: New object