gi-adwaita-1.0.5: 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.ViewSwitcher

Description

An adaptive view switcher.

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

An adaptive view switcher designed to switch between multiple views contained in a [classviewStack] in a similar fashion to StackSwitcher.

AdwViewSwitcher buttons always have an icon and a label. They can be displayed side by side, or icon on top of the label. This can be controlled via the [propertyviewSwitcher:policy] property.

Most applications should be using [classviewSwitcherBar] and [classviewSwitcherTitle].

CSS nodes

AdwViewSwitcher has a single CSS node with name viewswitcher. It can have the style classes .wide and .narrow, matching its policy.

Accessibility

AdwViewSwitcher uses the GTK_ACCESSIBLE_ROLE_TAB_LIST role and uses the GTK_ACCESSIBLE_ROLE_TAB for its buttons.

Synopsis

Exported types

newtype ViewSwitcher Source #

Memory-managed wrapper type.

Constructors

ViewSwitcher (ManagedPtr ViewSwitcher) 

Instances

Instances details
Eq ViewSwitcher Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcher

GObject ViewSwitcher Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcher

ManagedPtrNewtype ViewSwitcher Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcher

Methods

toManagedPtr :: ViewSwitcher -> ManagedPtr ViewSwitcher

TypedObject ViewSwitcher Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcher

Methods

glibType :: IO GType

HasParentTypes ViewSwitcher Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcher

IsGValue (Maybe ViewSwitcher) Source #

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

Instance details

Defined in GI.Adw.Objects.ViewSwitcher

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes ViewSwitcher Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcher

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

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

Instances details
(GObject o, IsDescendantOf ViewSwitcher o) => IsViewSwitcher o Source # 
Instance details

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

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, 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, 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

setAccessibleParent, 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 #

Arguments

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

self: a view switcher

-> m ViewSwitcherPolicy

Returns: the policy of self

Gets the policy of self.

getStack

viewSwitcherGetStack Source #

Arguments

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

self: a view switcher

-> m (Maybe ViewStack)

Returns: the stack

Gets the stack controlled by self.

new

viewSwitcherNew Source #

Arguments

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

Returns: the newly created AdwViewSwitcher

Creates a new AdwViewSwitcher.

setPolicy

viewSwitcherSetPolicy Source #

Arguments

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

self: a view switcher

-> ViewSwitcherPolicy

policy: the new policy

-> m () 

Sets the policy of self.

setStack

viewSwitcherSetStack Source #

Arguments

:: (HasCallStack, MonadIO m, IsViewSwitcher a, IsViewStack b) 
=> a

self: a view switcher

-> Maybe b

stack: a stack

-> m () 

Sets the stack controlled by self.

Properties

policy

The policy to determine which mode to use.

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.

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 ]