gi-adwaita-1.0.5: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Objects.TabBar

Description

A tab bar for [classtabView].

<picture> <source srcset="tab-bar-dark.png" media="(prefers-color-scheme: dark)"> <img src="tab-bar.png" alt="tab-bar"> </picture>

The AdwTabBar widget is a tab bar that can be used with conjunction with AdwTabView.

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.

CSS nodes

AdwTabBar has a single CSS node with name tabbar.

Synopsis

Exported types

newtype TabBar Source #

Memory-managed wrapper type.

Constructors

TabBar (ManagedPtr TabBar) 

Instances

Instances details
Eq TabBar Source # 
Instance details

Defined in GI.Adw.Objects.TabBar

Methods

(==) :: TabBar -> TabBar -> Bool #

(/=) :: TabBar -> TabBar -> Bool #

GObject TabBar Source # 
Instance details

Defined in GI.Adw.Objects.TabBar

ManagedPtrNewtype TabBar Source # 
Instance details

Defined in GI.Adw.Objects.TabBar

Methods

toManagedPtr :: TabBar -> ManagedPtr TabBar

TypedObject TabBar Source # 
Instance details

Defined in GI.Adw.Objects.TabBar

Methods

glibType :: IO GType

HasParentTypes TabBar Source # 
Instance details

Defined in GI.Adw.Objects.TabBar

IsGValue (Maybe TabBar) Source #

Convert TabBar to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Adw.Objects.TabBar

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe TabBar -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe TabBar)

type ParentTypes TabBar Source # 
Instance details

Defined in GI.Adw.Objects.TabBar

type ParentTypes TabBar = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf TabBar o) => IsTabBar o Source #

Type class for types which can be safely cast to TabBar, for instance with toTabBar.

Instances

Instances details
(GObject o, IsDescendantOf TabBar o) => IsTabBar o Source # 
Instance details

Defined in GI.Adw.Objects.TabBar

toTabBar :: (MonadIO m, IsTabBar o) => o -> m TabBar Source #

Cast to TabBar, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, setupExtraDropTarget, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getAutohide, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getEndActionWidget, getExpandTabs, getExtraDragPreload, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getInverted, getIsOverflowing, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStartActionWidget, getStateFlags, getStyleContext, getTabsRevealed, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getView, getVisible, getWidth.

Setters

setAccessibleParent, setAutohide, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setEndActionWidget, setExpandTabs, setExtraDragPreload, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setInverted, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStartActionWidget, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setView, setVisible.

getAutohide

tabBarGetAutohide Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m Bool

Returns: whether the tabs automatically hide

Gets whether the tabs automatically hide.

getEndActionWidget

tabBarGetEndActionWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m (Maybe Widget)

Returns: the widget shown after the tabs

Gets the widget shown after the tabs.

getExpandTabs

tabBarGetExpandTabs Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m Bool

Returns: whether tabs expand to full width.

Gets whether tabs expand to full width.

getExtraDragPreload

tabBarGetExtraDragPreload Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m Bool

Returns: whether drop data should be preloaded on hover

Gets whether drop data should be preloaded on hover.

Since: 1.3

getInverted

tabBarGetInverted Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m Bool

Returns: whether tabs use inverted layout

Gets whether tabs use inverted layout.

getIsOverflowing

tabBarGetIsOverflowing Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m Bool

Returns: whether self is overflowing

Gets whether self is overflowing.

If TRUE, all tabs cannot be displayed at once and require scrolling.

getStartActionWidget

tabBarGetStartActionWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m (Maybe Widget)

Returns: the widget shown before the tabs

Gets the widget shown before the tabs.

getTabsRevealed

tabBarGetTabsRevealed Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m Bool

Returns: whether the tabs are currently revealed

Gets whether the tabs are currently revealed.

See [propertytabBar:autohide].

getView

tabBarGetView Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> m (Maybe TabView)

Returns: the view self controls

Gets the tab view self controls.

new

tabBarNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TabBar

Returns: the newly created AdwTabBar

Creates a new AdwTabBar.

setAutohide

tabBarSetAutohide Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> Bool

autohide: whether the tabs automatically hide

-> m () 

Sets whether the tabs automatically hide.

If set to TRUE, the tab bar disappears when [propertytabBar:view] has 0 or 1 tab, no pinned tabs, and no tab is being transferred.

See [propertytabBar:tabs-revealed].

setEndActionWidget

tabBarSetEndActionWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a, IsWidget b) 
=> a

self: a tab bar

-> Maybe b

widget: the widget to show after the tabs

-> m () 

Sets the widget to show after the tabs.

setExpandTabs

tabBarSetExpandTabs Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> Bool

expandTabs: whether to expand tabs

-> m () 

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.

setExtraDragPreload

tabBarSetExtraDragPreload Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> Bool

preload: whether to preload drop data

-> m () 

Sets whether drop data should be preloaded on hover.

See DropTarget:preload.

Since: 1.3

setInverted

tabBarSetInverted Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> Bool

inverted: whether tabs use inverted layout

-> m () 

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.

setStartActionWidget

tabBarSetStartActionWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a, IsWidget b) 
=> a

self: a tab bar

-> Maybe b

widget: the widget to show before the tabs

-> m () 

Sets the widget to show before the tabs.

setView

tabBarSetView Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a, IsTabView b) 
=> a

self: a tab bar

-> Maybe b

view: a tab view

-> m () 

Sets the tab view self controls.

setupExtraDropTarget

tabBarSetupExtraDropTarget Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabBar a) 
=> a

self: a tab bar

-> [DragAction]

actions: the supported actions

-> Maybe [GType]

types: all supported GTypes that can be dropped

-> m () 

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 signaltabBar[extraDragDrop] signal can be used to handle the drop.

Properties

autohide

Whether the tabs automatically hide.

If set to TRUE, the tab bar disappears when [propertytabBar:view] has 0 or 1 tab, no pinned tabs, and no tab is being transferred.

See [propertytabBar:tabs-revealed].

constructTabBarAutohide :: (IsTabBar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “autohide” property. This is rarely needed directly, but it is used by new.

getTabBarAutohide :: (MonadIO m, IsTabBar o) => o -> m Bool Source #

Get the value of the “autohide” property. When overloading is enabled, this is equivalent to

get tabBar #autohide

setTabBarAutohide :: (MonadIO m, IsTabBar o) => o -> Bool -> m () Source #

Set the value of the “autohide” property. When overloading is enabled, this is equivalent to

set tabBar [ #autohide := value ]

endActionWidget

The widget shown after the tabs.

clearTabBarEndActionWidget :: (MonadIO m, IsTabBar o) => o -> m () Source #

Set the value of the “end-action-widget” property to Nothing. When overloading is enabled, this is equivalent to

clear #endActionWidget

constructTabBarEndActionWidget :: (IsTabBar o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “end-action-widget” property. This is rarely needed directly, but it is used by new.

getTabBarEndActionWidget :: (MonadIO m, IsTabBar o) => o -> m (Maybe Widget) Source #

Get the value of the “end-action-widget” property. When overloading is enabled, this is equivalent to

get tabBar #endActionWidget

setTabBarEndActionWidget :: (MonadIO m, IsTabBar o, IsWidget a) => o -> a -> m () Source #

Set the value of the “end-action-widget” property. When overloading is enabled, this is equivalent to

set tabBar [ #endActionWidget := value ]

expandTabs

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.

constructTabBarExpandTabs :: (IsTabBar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “expand-tabs” property. This is rarely needed directly, but it is used by new.

getTabBarExpandTabs :: (MonadIO m, IsTabBar o) => o -> m Bool Source #

Get the value of the “expand-tabs” property. When overloading is enabled, this is equivalent to

get tabBar #expandTabs

setTabBarExpandTabs :: (MonadIO m, IsTabBar o) => o -> Bool -> m () Source #

Set the value of the “expand-tabs” property. When overloading is enabled, this is equivalent to

set tabBar [ #expandTabs := value ]

extraDragPreload

Whether the drop data should be preloaded on hover.

See DropTarget:preload.

Since: 1.3

constructTabBarExtraDragPreload :: (IsTabBar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “extra-drag-preload” property. This is rarely needed directly, but it is used by new.

getTabBarExtraDragPreload :: (MonadIO m, IsTabBar o) => o -> m Bool Source #

Get the value of the “extra-drag-preload” property. When overloading is enabled, this is equivalent to

get tabBar #extraDragPreload

setTabBarExtraDragPreload :: (MonadIO m, IsTabBar o) => o -> Bool -> m () Source #

Set the value of the “extra-drag-preload” property. When overloading is enabled, this is equivalent to

set tabBar [ #extraDragPreload := value ]

inverted

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.

constructTabBarInverted :: (IsTabBar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “inverted” property. This is rarely needed directly, but it is used by new.

getTabBarInverted :: (MonadIO m, IsTabBar o) => o -> m Bool Source #

Get the value of the “inverted” property. When overloading is enabled, this is equivalent to

get tabBar #inverted

setTabBarInverted :: (MonadIO m, IsTabBar o) => o -> Bool -> m () Source #

Set the value of the “inverted” property. When overloading is enabled, this is equivalent to

set tabBar [ #inverted := value ]

isOverflowing

Whether the tab bar is overflowing.

If TRUE, all tabs cannot be displayed at once and require scrolling.

getTabBarIsOverflowing :: (MonadIO m, IsTabBar o) => o -> m Bool Source #

Get the value of the “is-overflowing” property. When overloading is enabled, this is equivalent to

get tabBar #isOverflowing

startActionWidget

The widget shown before the tabs.

clearTabBarStartActionWidget :: (MonadIO m, IsTabBar o) => o -> m () Source #

Set the value of the “start-action-widget” property to Nothing. When overloading is enabled, this is equivalent to

clear #startActionWidget

constructTabBarStartActionWidget :: (IsTabBar o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “start-action-widget” property. This is rarely needed directly, but it is used by new.

getTabBarStartActionWidget :: (MonadIO m, IsTabBar o) => o -> m (Maybe Widget) Source #

Get the value of the “start-action-widget” property. When overloading is enabled, this is equivalent to

get tabBar #startActionWidget

setTabBarStartActionWidget :: (MonadIO m, IsTabBar o, IsWidget a) => o -> a -> m () Source #

Set the value of the “start-action-widget” property. When overloading is enabled, this is equivalent to

set tabBar [ #startActionWidget := value ]

tabsRevealed

Whether the tabs are currently revealed.

See [propertytabBar:autohide].

getTabBarTabsRevealed :: (MonadIO m, IsTabBar o) => o -> m Bool Source #

Get the value of the “tabs-revealed” property. When overloading is enabled, this is equivalent to

get tabBar #tabsRevealed

view

The tab view the tab bar controls.

clearTabBarView :: (MonadIO m, IsTabBar o) => o -> m () Source #

Set the value of the “view” property to Nothing. When overloading is enabled, this is equivalent to

clear #view

constructTabBarView :: (IsTabBar o, MonadIO m, IsTabView a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “view” property. This is rarely needed directly, but it is used by new.

getTabBarView :: (MonadIO m, IsTabBar o) => o -> m (Maybe TabView) Source #

Get the value of the “view” property. When overloading is enabled, this is equivalent to

get tabBar #view

setTabBarView :: (MonadIO m, IsTabBar o, IsTabView a) => o -> a -> m () Source #

Set the value of the “view” property. When overloading is enabled, this is equivalent to

set tabBar [ #view := value ]

Signals

extraDragDrop

type TabBarExtraDragDropCallback Source #

Arguments

 = TabPage

page: the page matching the tab the content was dropped onto

-> GValue

value: the GValue being dropped

-> IO Bool

Returns: whether the drop was accepted for page

This signal is emitted when content is dropped onto a tab.

The content must be of one of the types set up via [methodtabBar.setup_extra_drop_target].

See DropTarget::drop.

afterTabBarExtraDragDrop :: (IsTabBar a, MonadIO m) => a -> ((?self :: a) => TabBarExtraDragDropCallback) -> m SignalHandlerId Source #

Connect a signal handler for the extraDragDrop signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabBar #extraDragDrop callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabBarExtraDragDrop :: (IsTabBar a, MonadIO m) => a -> ((?self :: a) => TabBarExtraDragDropCallback) -> m SignalHandlerId Source #

Connect a signal handler for the extraDragDrop signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabBar #extraDragDrop callback

extraDragValue

type TabBarExtraDragValueCallback Source #

Arguments

 = TabPage

page: the page matching the tab the content was dropped onto

-> GValue

value: the GValue being dropped

-> IO [DragAction]

Returns: the preferred action for the drop on page

This signal is emitted when the dropped content is preloaded.

In order for data to be preloaded, [propertytabBar:extra-drag-preload] must be set to TRUE.

The content must be of one of the types set up via [methodtabBar.setup_extra_drop_target].

See DropTarget:value.

Since: 1.3

afterTabBarExtraDragValue :: (IsTabBar a, MonadIO m) => a -> ((?self :: a) => TabBarExtraDragValueCallback) -> m SignalHandlerId Source #

Connect a signal handler for the extraDragValue signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabBar #extraDragValue callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabBarExtraDragValue :: (IsTabBar a, MonadIO m) => a -> ((?self :: a) => TabBarExtraDragValueCallback) -> m SignalHandlerId Source #

Connect a signal handler for the extraDragValue signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabBar #extraDragValue callback