gi-adwaita-1.0.1: 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.ViewSwitcherBar

Description

A view switcher action bar.

An action bar letting you switch between multiple views contained in a ViewStack, via an ViewSwitcher. It is designed to be put at the bottom of a window and to be revealed only on really narrow windows, e.g. on mobile phones. It can't be revealed if there are less than two pages.

You can conveniently bind the ViewSwitcherBar:reveal property to ViewSwitcherTitle:titleVisible to automatically reveal the view switcher bar when the title label is displayed in place of the view switcher.

An example of the UI definition for a common use case:

xml code

<object class="GtkWindow"/>
  <child type="titlebar">
    <object class="AdwHeaderBar">
      <property name="centering-policy">strict</property>
      <child type="title">
        <object class="AdwViewSwitcherTitle" id="title">
          <property name="stack">stack</property>
        </object>
      </child>
    </object>
  </child>
  <child>
    <object class="GtkBox">
      <child>
        <object class="AdwViewStack" id="stack"/>
      </child>
      <child>
        <object class="AdwViewSwitcherBar">
          <property name="stack">stack</property>
          <binding name="reveal">
            <lookup name="title-visible">title</lookup>
          </binding>
        </object>
      </child>
    </object>
  </child>
</object>

CSS nodes

AdwViewSwitcherBar has a single CSS node with name viewswitcherbar.

Since: 1.0

Synopsis

Exported types

class (GObject o, IsDescendantOf ViewSwitcherBar o) => IsViewSwitcherBar o Source #

Type class for types which can be safely cast to ViewSwitcherBar, for instance with toViewSwitcherBar.

Instances

Instances details
(GObject o, IsDescendantOf ViewSwitcherBar o) => IsViewSwitcherBar o Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcherBar

toViewSwitcherBar :: (MonadIO m, IsViewSwitcherBar o) => o -> m ViewSwitcherBar Source #

Cast to ViewSwitcherBar, 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, 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, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getReveal, 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, setProperty, setReceivesDefault, setReveal, setSensitive, setSizeRequest, setStack, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

getReveal

viewSwitcherBarGetReveal Source #

Arguments

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

self: a AdwViewSwitcherBar

-> m Bool

Returns: whether self is revealed

Gets whether self should be revealed or hidden.

Since: 1.0

getStack

viewSwitcherBarGetStack Source #

Arguments

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

self: a AdwViewSwitcherBar

-> m (Maybe ViewStack)

Returns: the stack

Gets the stack controlled by self.

Since: 1.0

new

viewSwitcherBarNew Source #

Arguments

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

Returns: the newly created AdwViewSwitcherBar

Creates a new AdwViewSwitcherBar.

Since: 1.0

setReveal

viewSwitcherBarSetReveal Source #

Arguments

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

self: a AdwViewSwitcherBar

-> Bool

reveal: whether to reveal self

-> m () 

Sets whether self should be revealed or hidden.

Since: 1.0

setStack

viewSwitcherBarSetStack Source #

Arguments

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

self: a AdwViewSwitcherBar

-> Maybe b

stack: a stack

-> m () 

Sets the stack controlled by self.

Since: 1.0

Properties

reveal

Whether the bar should be revealed or hidden.

Since: 1.0

constructViewSwitcherBarReveal :: (IsViewSwitcherBar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “reveal” property. This is rarely needed directly, but it is used by new.

getViewSwitcherBarReveal :: (MonadIO m, IsViewSwitcherBar o) => o -> m Bool Source #

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

get viewSwitcherBar #reveal

setViewSwitcherBarReveal :: (MonadIO m, IsViewSwitcherBar o) => o -> Bool -> m () Source #

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

set viewSwitcherBar [ #reveal := value ]

stack

The stack the view switcher controls.

Since: 1.0

clearViewSwitcherBarStack :: (MonadIO m, IsViewSwitcherBar o) => o -> m () Source #

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

clear #stack

constructViewSwitcherBarStack :: (IsViewSwitcherBar 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.

getViewSwitcherBarStack :: (MonadIO m, IsViewSwitcherBar o) => o -> m (Maybe ViewStack) Source #

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

get viewSwitcherBar #stack

setViewSwitcherBarStack :: (MonadIO m, IsViewSwitcherBar o, IsViewStack a) => o -> a -> m () Source #

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

set viewSwitcherBar [ #stack := value ]