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

GI.Handy.Objects.TabBar

Description

A tab bar for [classtabView].

The HdyTabBar widget is a tab bar that can be used with conjunction with [classtabView].

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

CSS nodes

HdyTabBar has a single CSS node with name tabbar.

Since: 1.2

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.Handy.Objects.TabBar

Methods

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

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

GObject TabBar Source # 
Instance details

Defined in GI.Handy.Objects.TabBar

ManagedPtrNewtype TabBar Source # 
Instance details

Defined in GI.Handy.Objects.TabBar

Methods

toManagedPtr :: TabBar -> ManagedPtr TabBar

TypedObject TabBar Source # 
Instance details

Defined in GI.Handy.Objects.TabBar

Methods

glibType :: IO GType

HasParentTypes TabBar Source # 
Instance details

Defined in GI.Handy.Objects.TabBar

IsGValue (Maybe TabBar) Source #

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

Instance details

Defined in GI.Handy.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.Handy.Objects.TabBar

type ParentTypes TabBar = '[Bin, Container, Widget, Object, ImplementorIface, Buildable]

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.Handy.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

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getAutohide, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEndActionWidget, getEvents, getExpandTabs, getExtraDragDestTargets, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getInverted, getIsOverflowing, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getStartActionWidget, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTabsRevealed, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getView, getVisible, getVisual, getWindow.

Setters

setAccelPath, setAllocation, setAppPaintable, setAutohide, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEndActionWidget, setEvents, setExpandTabs, setExtraDragDestTargets, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setInverted, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setStartActionWidget, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setView, setVisible, setVisual, setWindow.

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.

Since: 1.2

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.

Since: 1.2

getExpandTabs

tabBarGetExpandTabs Source #

Arguments

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

self: a tab bar

-> m Bool

Returns: whether tabs should expand

Gets whether tabs should expand.

Since: 1.2

getExtraDragDestTargets

tabBarGetExtraDragDestTargets Source #

Arguments

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

self: a tab bar

-> m (Maybe TargetList)

Returns: extra drag targets

Gets extra drag destination targets.

Since: 1.2

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.

Since: 1.2

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.

Since: 1.2

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.

Since: 1.2

getTabsRevealed

tabBarGetTabsRevealed Source #

Arguments

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

self: a tab bar

-> m Bool

Returns: whether the tabs are current revealed

Gets the value of the [propertytabBar:tabs-revealed] property.

Since: 1.2

getView

tabBarGetView Source #

Arguments

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

self: a tab bar

-> m (Maybe TabView)

Returns: the [classtabView] self controls

Gets the [classtabView] self controls.

Since: 1.2

new

tabBarNew Source #

Arguments

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

Returns: a new HdyTabBar

Creates a new HdyTabBar widget.

Since: 1.2

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 autohide is TRUE, the tab bar disappears when the associated [classtabView] has 0 or 1 tab, no pinned tabs, and no tab is being transferred.

Autohide is enabled by default.

See [propertytabBar:tabs-revealed].

Since: 1.2

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.

Since: 1.2

setExpandTabs

tabBarSetExpandTabs Source #

Arguments

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

self: a tab bar

-> Bool

expandTabs: whether to expand tabs

-> m () 

Sets whether tabs should expand.

If expandTabs is TRUE, the tabs will always vary width filling the whole width when possible, otherwise tabs will always have the minimum possible size.

Expand is enabled by default.

Since: 1.2

setExtraDragDestTargets

tabBarSetExtraDragDestTargets Source #

Arguments

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

self: a tab bar

-> Maybe TargetList

extraDragDestTargets: extra drag targets

-> m () 

Sets extra drag destination targets.

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.

After content is dropped, the signaltabBar[extraDragDataReceived] signal can be used to retrieve and process the drag data.

Since: 1.2

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 inverted is TRUE, non-pinned tabs will have the close button at the beginning and the indicator at the end rather than the opposite.

Since: 1.2

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.

Since: 1.2

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 [classtabView] self controls.

Since: 1.2

Properties

autohide

Whether tabs automatically hide.

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

See [propertytabBar:tabs-revealed].

Since: 1.2

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.

Since: 1.2

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 should expand.

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.

Since: 1.2

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 ]

extraDragDestTargets

Extra drag destination targets.

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.

After content is dropped, the signaltabBar[extraDragDataReceived] signal can be used to retrieve and process the drag data.

Since: 1.2

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

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

clear #extraDragDestTargets

constructTabBarExtraDragDestTargets :: (IsTabBar o, MonadIO m) => TargetList -> m (GValueConstruct o) Source #

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

getTabBarExtraDragDestTargets :: (MonadIO m, IsTabBar o) => o -> m (Maybe TargetList) Source #

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

get tabBar #extraDragDestTargets

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

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

set tabBar [ #extraDragDestTargets := 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.

Since: 1.2

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 set to TRUE, all tabs cannot be displayed at once and require scrolling.

Since: 1.2

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.

Since: 1.2

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 tabs are currently revealed.

See [propertytabBar:autohide].

Since: 1.2

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 [classtabView] the tab bar controls.

Since: 1.2

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

extraDragDataReceived

type TabBarExtraDragDataReceivedCallback Source #

Arguments

 = TabPage

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

-> DragContext

context: the drag context

-> SelectionData

data: the received data

-> Word32

info: the info that has been registered with the target in the [structgtk.TargetList]

-> Word32

time: the timestamp at which the data was received

-> IO () 

Emitted when content allowed via [propertytabBar:extra-drag-dest-targets] is dropped onto a tab.

See Widget::dragDataReceived.

Since: 1.2

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

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

after tabBar #extraDragDataReceived 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.

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

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

on tabBar #extraDragDataReceived callback