gi-adwaita-1.0.6: 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.TabButton

Description

A button that displays the number of [classtabView] pages.

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

AdwTabButton is a button that displays the number of pages in a given AdwTabView, as well as whether one of the inactive pages needs attention.

It's intended to be used as a visible indicator when there's no visible tab bar, typically opening an [classtabOverview] on click, e.g. via the overview.open action name:

xml code

<object class="AdwTabButton">
  <property name="view">view</property>
  <property name="action-name">overview.open</property>
</object>

CSS nodes

AdwTabButton has a main CSS node with name tabbutton.

Accessibility

AdwTabButton uses the GTK_ACCESSIBLE_ROLE_BUTTON role.

Since: 1.3

Synopsis

Exported types

newtype TabButton Source #

Memory-managed wrapper type.

Constructors

TabButton (ManagedPtr TabButton) 

Instances

Instances details
Eq TabButton Source # 
Instance details

Defined in GI.Adw.Objects.TabButton

GObject TabButton Source # 
Instance details

Defined in GI.Adw.Objects.TabButton

ManagedPtrNewtype TabButton Source # 
Instance details

Defined in GI.Adw.Objects.TabButton

Methods

toManagedPtr :: TabButton -> ManagedPtr TabButton

TypedObject TabButton Source # 
Instance details

Defined in GI.Adw.Objects.TabButton

Methods

glibType :: IO GType

HasParentTypes TabButton Source # 
Instance details

Defined in GI.Adw.Objects.TabButton

IsGValue (Maybe TabButton) Source #

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

Instance details

Defined in GI.Adw.Objects.TabButton

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes TabButton Source # 
Instance details

Defined in GI.Adw.Objects.TabButton

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

class (GObject o, IsDescendantOf TabButton o) => IsTabButton o Source #

Type class for types which can be safely cast to TabButton, for instance with toTabButton.

Instances

Instances details
(GObject o, IsDescendantOf TabButton o) => IsTabButton o Source # 
Instance details

Defined in GI.Adw.Objects.TabButton

toTabButton :: (MonadIO m, IsTabButton o) => o -> m TabButton Source #

Cast to TabButton, 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, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getActionName, getActionTargetValue, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, 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, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getView, getVisible, getWidth.

Setters

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

getView

tabButtonGetView Source #

Arguments

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

self: a tab button

-> m (Maybe TabView)

Returns: the tab view

Gets the tab view self displays.

Since: 1.3

new

tabButtonNew Source #

Arguments

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

Returns: the newly created AdwTabButton

Creates a new AdwTabButton.

Since: 1.3

setView

tabButtonSetView Source #

Arguments

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

self: a tab button

-> Maybe b

view: a tab view

-> m () 

Sets the tab view to display.

Since: 1.3

Properties

view

The view the tab button displays.

Since: 1.3

clearTabButtonView :: (MonadIO m, IsTabButton o) => o -> m () Source #

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

clear #view

constructTabButtonView :: (IsTabButton 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.

getTabButtonView :: (MonadIO m, IsTabButton o) => o -> m (Maybe TabView) Source #

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

get tabButton #view

setTabButtonView :: (MonadIO m, IsTabButton o, IsTabView a) => o -> a -> m () Source #

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

set tabButton [ #view := value ]

Signals

activate

type TabButtonActivateCallback = IO () Source #

Emitted to animate press then release.

This is an action signal. Applications should never connect to this signal, but use the signaltabButton[clicked] signal.

Since: 1.3

afterTabButtonActivate :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonActivateCallback) -> m SignalHandlerId Source #

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

after tabButton #activate 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.

onTabButtonActivate :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonActivateCallback) -> m SignalHandlerId Source #

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

on tabButton #activate callback

clicked

type TabButtonClickedCallback = IO () Source #

Emitted when the button has been activated (pressed and released).

Since: 1.3

afterTabButtonClicked :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonClickedCallback) -> m SignalHandlerId Source #

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

after tabButton #clicked 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.

onTabButtonClicked :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonClickedCallback) -> m SignalHandlerId Source #

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

on tabButton #clicked callback