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 |
An adaptive view switcher.
An adaptive view switcher designed to switch between multiple views
contained in a ViewStack
in a similar fashion to
StackSwitcher
.
Depending on the available width, the view switcher can adapt from a wide mode showing the view's icon and title side by side, to a narrow mode showing the view's icon and title one on top of the other, in a more compact way. This can be controlled via the ViewSwitcher:policy property.
CSS nodes
AdwViewSwitcher
has a single CSS node with name viewswitcher
.
Accessibility
AdwViewSwitcher
uses the GTK_ACCESSIBLE_ROLE_TAB_LIST
role and uses the
GTK_ACCESSIBLE_ROLE_TAB
for its buttons.
Since: 1.0
Synopsis
- newtype ViewSwitcher = ViewSwitcher (ManagedPtr ViewSwitcher)
- class (GObject o, IsDescendantOf ViewSwitcher o) => IsViewSwitcher o
- toViewSwitcher :: (MonadIO m, IsViewSwitcher o) => o -> m ViewSwitcher
- viewSwitcherGetPolicy :: (HasCallStack, MonadIO m, IsViewSwitcher a) => a -> m ViewSwitcherPolicy
- viewSwitcherGetStack :: (HasCallStack, MonadIO m, IsViewSwitcher a) => a -> m (Maybe ViewStack)
- viewSwitcherNew :: (HasCallStack, MonadIO m) => m ViewSwitcher
- viewSwitcherSetPolicy :: (HasCallStack, MonadIO m, IsViewSwitcher a) => a -> ViewSwitcherPolicy -> m ()
- viewSwitcherSetStack :: (HasCallStack, MonadIO m, IsViewSwitcher a, IsViewStack b) => a -> Maybe b -> m ()
- constructViewSwitcherPolicy :: (IsViewSwitcher o, MonadIO m) => ViewSwitcherPolicy -> m (GValueConstruct o)
- getViewSwitcherPolicy :: (MonadIO m, IsViewSwitcher o) => o -> m ViewSwitcherPolicy
- setViewSwitcherPolicy :: (MonadIO m, IsViewSwitcher o) => o -> ViewSwitcherPolicy -> m ()
- clearViewSwitcherStack :: (MonadIO m, IsViewSwitcher o) => o -> m ()
- constructViewSwitcherStack :: (IsViewSwitcher o, MonadIO m, IsViewStack a) => a -> m (GValueConstruct o)
- getViewSwitcherStack :: (MonadIO m, IsViewSwitcher o) => o -> m (Maybe ViewStack)
- setViewSwitcherStack :: (MonadIO m, IsViewSwitcher o, IsViewStack a) => o -> a -> m ()
Exported types
newtype ViewSwitcher Source #
Memory-managed wrapper type.
Instances
Eq ViewSwitcher Source # | |
Defined in GI.Adw.Objects.ViewSwitcher (==) :: ViewSwitcher -> ViewSwitcher -> Bool # (/=) :: ViewSwitcher -> ViewSwitcher -> Bool # | |
GObject ViewSwitcher Source # | |
Defined in GI.Adw.Objects.ViewSwitcher | |
ManagedPtrNewtype ViewSwitcher Source # | |
Defined in GI.Adw.Objects.ViewSwitcher | |
TypedObject ViewSwitcher Source # | |
Defined in GI.Adw.Objects.ViewSwitcher | |
HasParentTypes ViewSwitcher Source # | |
Defined in GI.Adw.Objects.ViewSwitcher | |
IsGValue (Maybe ViewSwitcher) Source # | Convert |
Defined in GI.Adw.Objects.ViewSwitcher gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe ViewSwitcher -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe ViewSwitcher) # | |
type ParentTypes ViewSwitcher Source # | |
Defined in GI.Adw.Objects.ViewSwitcher |
class (GObject o, IsDescendantOf ViewSwitcher o) => IsViewSwitcher o Source #
Type class for types which can be safely cast to ViewSwitcher
, for instance with toViewSwitcher
.
Instances
(GObject o, IsDescendantOf ViewSwitcher o) => IsViewSwitcher o Source # | |
Defined in GI.Adw.Objects.ViewSwitcher |
toViewSwitcher :: (MonadIO m, IsViewSwitcher o) => o -> m ViewSwitcher Source #
Cast to ViewSwitcher
, 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, 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, getOverflow, getPangoContext, getParent, getPolicy, 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, setOverflow, setParent, setPolicy, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStack, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getPolicy
viewSwitcherGetPolicy Source #
:: (HasCallStack, MonadIO m, IsViewSwitcher a) | |
=> a |
|
-> m ViewSwitcherPolicy | Returns: the policy of |
Gets the policy of self
.
Since: 1.0
getStack
:: (HasCallStack, MonadIO m, IsViewSwitcher a) | |
=> a |
|
-> m (Maybe ViewStack) | Returns: the stack |
Gets the stack controlled by self
.
Since: 1.0
new
:: (HasCallStack, MonadIO m) | |
=> m ViewSwitcher | Returns: the newly created |
Creates a new AdwViewSwitcher
.
Since: 1.0
setPolicy
viewSwitcherSetPolicy Source #
:: (HasCallStack, MonadIO m, IsViewSwitcher a) | |
=> a |
|
-> ViewSwitcherPolicy |
|
-> m () |
Sets the policy of self
.
Since: 1.0
setStack
:: (HasCallStack, MonadIO m, IsViewSwitcher a, IsViewStack b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the stack controlled by self
.
Since: 1.0
Properties
policy
The policy to determine which mode to use.
Since: 1.0
constructViewSwitcherPolicy :: (IsViewSwitcher o, MonadIO m) => ViewSwitcherPolicy -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “policy
” property. This is rarely needed directly, but it is used by new
.
getViewSwitcherPolicy :: (MonadIO m, IsViewSwitcher o) => o -> m ViewSwitcherPolicy Source #
Get the value of the “policy
” property.
When overloading is enabled, this is equivalent to
get
viewSwitcher #policy
setViewSwitcherPolicy :: (MonadIO m, IsViewSwitcher o) => o -> ViewSwitcherPolicy -> m () Source #
Set the value of the “policy
” property.
When overloading is enabled, this is equivalent to
set
viewSwitcher [ #policy:=
value ]
stack
The stack the view switcher controls.
Since: 1.0
clearViewSwitcherStack :: (MonadIO m, IsViewSwitcher o) => o -> m () Source #
Set the value of the “stack
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#stack
constructViewSwitcherStack :: (IsViewSwitcher o, MonadIO m, IsViewStack 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
.
getViewSwitcherStack :: (MonadIO m, IsViewSwitcher o) => o -> m (Maybe ViewStack) Source #
Get the value of the “stack
” property.
When overloading is enabled, this is equivalent to
get
viewSwitcher #stack
setViewSwitcherStack :: (MonadIO m, IsViewSwitcher o, IsViewStack a) => o -> a -> m () Source #
Set the value of the “stack
” property.
When overloading is enabled, this is equivalent to
set
viewSwitcher [ #stack:=
value ]