Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype TabButton = TabButton (ManagedPtr TabButton)
- class (GObject o, IsDescendantOf TabButton o) => IsTabButton o
- toTabButton :: (MonadIO m, IsTabButton o) => o -> m TabButton
- tabButtonGetView :: (HasCallStack, MonadIO m, IsTabButton a) => a -> m (Maybe TabView)
- tabButtonNew :: (HasCallStack, MonadIO m) => m TabButton
- tabButtonSetView :: (HasCallStack, MonadIO m, IsTabButton a, IsTabView b) => a -> Maybe b -> m ()
- clearTabButtonView :: (MonadIO m, IsTabButton o) => o -> m ()
- constructTabButtonView :: (IsTabButton o, MonadIO m, IsTabView a) => a -> m (GValueConstruct o)
- getTabButtonView :: (MonadIO m, IsTabButton o) => o -> m (Maybe TabView)
- setTabButtonView :: (MonadIO m, IsTabButton o, IsTabView a) => o -> a -> m ()
- type TabButtonActivateCallback = IO ()
- afterTabButtonActivate :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonActivateCallback) -> m SignalHandlerId
- onTabButtonActivate :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonActivateCallback) -> m SignalHandlerId
- type TabButtonClickedCallback = IO ()
- afterTabButtonClicked :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonClickedCallback) -> m SignalHandlerId
- onTabButtonClicked :: (IsTabButton a, MonadIO m) => a -> ((?self :: a) => TabButtonClickedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq TabButton Source # | |
GObject TabButton Source # | |
Defined in GI.Adw.Objects.TabButton | |
ManagedPtrNewtype TabButton Source # | |
Defined in GI.Adw.Objects.TabButton toManagedPtr :: TabButton -> ManagedPtr TabButton | |
TypedObject TabButton Source # | |
Defined in GI.Adw.Objects.TabButton | |
HasParentTypes TabButton Source # | |
Defined in GI.Adw.Objects.TabButton | |
IsGValue (Maybe TabButton) Source # | Convert |
Defined in GI.Adw.Objects.TabButton gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe TabButton -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe TabButton) | |
type ParentTypes TabButton Source # | |
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
(GObject o, IsDescendantOf TabButton o) => IsTabButton o Source # | |
Defined in GI.Adw.Objects.TabButton |
toTabButton :: (MonadIO m, IsTabButton o) => o -> m TabButton Source #
Methods
Click to display all available methods, including inherited ones
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
:: (HasCallStack, MonadIO m, IsTabButton a) | |
=> a |
|
-> m (Maybe TabView) | Returns: the tab view |
Gets the tab view self
displays.
Since: 1.3
new
:: (HasCallStack, MonadIO m) | |
=> m TabButton | Returns: the newly created |
Creates a new AdwTabButton
.
Since: 1.3
setView
:: (HasCallStack, MonadIO m, IsTabButton a, IsTabView b) | |
=> a |
|
-> Maybe b |
|
-> 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