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 |
The GtkStackSwitcher
shows a row of buttons to switch between GtkStack
pages.
It acts as a controller for the associated GtkStack
.
All the content for the buttons comes from the properties of the stacks
StackPage
objects; the button visibility in a GtkStackSwitcher
widget is controlled by the visibility of the child in the GtkStack
.
It is possible to associate multiple GtkStackSwitcher
widgets
with the same GtkStack
widget.
CSS nodes
GtkStackSwitcher
has a single CSS node named stackswitcher and
style class .stack-switcher.
When circumstances require it, GtkStackSwitcher
adds the
.needs-attention style class to the widgets representing the
stack pages.
Accessibility
GtkStackSwitcher
uses the AccessibleRoleTabList
role
and uses the AccessibleRoleTab
for its buttons.
Orientable
Since GTK 4.4, GtkStackSwitcher
implements GtkOrientable
allowing
the stack switcher to be made vertical with
gtk_orientable_set_orientation()
.
Synopsis
- newtype StackSwitcher = StackSwitcher (ManagedPtr StackSwitcher)
- class (GObject o, IsDescendantOf StackSwitcher o) => IsStackSwitcher o
- toStackSwitcher :: (MonadIO m, IsStackSwitcher o) => o -> m StackSwitcher
- stackSwitcherGetStack :: (HasCallStack, MonadIO m, IsStackSwitcher a) => a -> m (Maybe Stack)
- stackSwitcherNew :: (HasCallStack, MonadIO m) => m StackSwitcher
- stackSwitcherSetStack :: (HasCallStack, MonadIO m, IsStackSwitcher a, IsStack b) => a -> Maybe b -> m ()
- clearStackSwitcherStack :: (MonadIO m, IsStackSwitcher o) => o -> m ()
- constructStackSwitcherStack :: (IsStackSwitcher o, MonadIO m, IsStack a) => a -> m (GValueConstruct o)
- getStackSwitcherStack :: (MonadIO m, IsStackSwitcher o) => o -> m (Maybe Stack)
- setStackSwitcherStack :: (MonadIO m, IsStackSwitcher o, IsStack a) => o -> a -> m ()
Exported types
newtype StackSwitcher Source #
Memory-managed wrapper type.
StackSwitcher (ManagedPtr StackSwitcher) |
Instances
Eq StackSwitcher Source # | |
Defined in GI.Gtk.Objects.StackSwitcher (==) :: StackSwitcher -> StackSwitcher -> Bool # (/=) :: StackSwitcher -> StackSwitcher -> Bool # | |
GObject StackSwitcher Source # | |
Defined in GI.Gtk.Objects.StackSwitcher | |
ManagedPtrNewtype StackSwitcher Source # | |
Defined in GI.Gtk.Objects.StackSwitcher toManagedPtr :: StackSwitcher -> ManagedPtr StackSwitcher | |
TypedObject StackSwitcher Source # | |
Defined in GI.Gtk.Objects.StackSwitcher | |
HasParentTypes StackSwitcher Source # | |
Defined in GI.Gtk.Objects.StackSwitcher | |
IsGValue (Maybe StackSwitcher) Source # | Convert |
Defined in GI.Gtk.Objects.StackSwitcher gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe StackSwitcher -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe StackSwitcher) | |
type ParentTypes StackSwitcher Source # | |
Defined in GI.Gtk.Objects.StackSwitcher type ParentTypes StackSwitcher = '[Widget, Object, Accessible, Buildable, ConstraintTarget, Orientable] |
class (GObject o, IsDescendantOf StackSwitcher o) => IsStackSwitcher o Source #
Type class for types which can be safely cast to StackSwitcher
, for instance with toStackSwitcher
.
Instances
(GObject o, IsDescendantOf StackSwitcher o) => IsStackSwitcher o Source # | |
Defined in GI.Gtk.Objects.StackSwitcher |
toStackSwitcher :: (MonadIO m, IsStackSwitcher o) => o -> m StackSwitcher Source #
Cast to StackSwitcher
, 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
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, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOrientation, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStack, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStack, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getStack
stackSwitcherGetStack Source #
:: (HasCallStack, MonadIO m, IsStackSwitcher a) | |
=> a |
|
-> m (Maybe Stack) | Returns: the stack |
Retrieves the stack.
new
:: (HasCallStack, MonadIO m) | |
=> m StackSwitcher | Returns: a new |
Create a new GtkStackSwitcher
.
setStack
stackSwitcherSetStack Source #
:: (HasCallStack, MonadIO m, IsStackSwitcher a, IsStack b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the stack to control.
Properties
stack
The stack.
clearStackSwitcherStack :: (MonadIO m, IsStackSwitcher o) => o -> m () Source #
Set the value of the “stack
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#stack
constructStackSwitcherStack :: (IsStackSwitcher o, MonadIO m, IsStack a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “stack
” property. This is rarely needed directly, but it is used by new
.
getStackSwitcherStack :: (MonadIO m, IsStackSwitcher o) => o -> m (Maybe Stack) Source #
Get the value of the “stack
” property.
When overloading is enabled, this is equivalent to
get
stackSwitcher #stack
setStackSwitcherStack :: (MonadIO m, IsStackSwitcher o, IsStack a) => o -> a -> m () Source #
Set the value of the “stack
” property.
When overloading is enabled, this is equivalent to
set
stackSwitcher [ #stack:=
value ]