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.ViewSwitcherTitle

Description

A view switcher title.

A widget letting you switch between multiple views contained by a ViewStack via an ViewSwitcher.

It is designed to be used as the title widget of a HeaderBar, and will display the window's title when the window is too narrow to fit the view switcher e.g. on mobile phones, or if there are less than two views.

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

AdwViewSwitcherTitle has a single CSS node with name viewswitchertitle.

Since: 1.0

Synopsis

Exported types

class (GObject o, IsDescendantOf ViewSwitcherTitle o) => IsViewSwitcherTitle o Source #

Type class for types which can be safely cast to ViewSwitcherTitle, for instance with toViewSwitcherTitle.

Instances

Instances details
(GObject o, IsDescendantOf ViewSwitcherTitle o) => IsViewSwitcherTitle o Source # 
Instance details

Defined in GI.Adw.Objects.ViewSwitcherTitle

toViewSwitcherTitle :: (MonadIO m, IsViewSwitcherTitle o) => o -> m ViewSwitcherTitle Source #

Cast to ViewSwitcherTitle, 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, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStack, getStateFlags, getStyleContext, getSubtitle, getTemplateChild, getTitle, getTitleVisible, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getViewSwitcherEnabled, 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, setSensitive, setSizeRequest, setStack, setStateFlags, setSubtitle, setTitle, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setViewSwitcherEnabled, setVisible.

getStack

viewSwitcherTitleGetStack Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> m (Maybe ViewStack)

Returns: the stack

Gets the stack controlled by self.

Since: 1.0

getSubtitle

viewSwitcherTitleGetSubtitle Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> m Text

Returns: the subtitle

Gets the subtitle of self.

Since: 1.0

getTitle

viewSwitcherTitleGetTitle Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> m Text

Returns: the title

Gets the title of self.

Since: 1.0

getTitleVisible

viewSwitcherTitleGetTitleVisible Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> m Bool

Returns: whether the title of self is currently visible

Gets whether the title of self is currently visible.

Since: 1.0

getViewSwitcherEnabled

viewSwitcherTitleGetViewSwitcherEnabled Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> m Bool

Returns: whether the view switcher is enabled

Gets whether self's view switcher is enabled.

Since: 1.0

new

viewSwitcherTitleNew Source #

Arguments

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

Returns: the newly created AdwViewSwitcherTitle

Creates a new AdwViewSwitcherTitle.

Since: 1.0

setStack

viewSwitcherTitleSetStack Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> Maybe b

stack: a stack

-> m () 

Sets the stack controlled by self.

Since: 1.0

setSubtitle

viewSwitcherTitleSetSubtitle Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> Text

subtitle: a subtitle

-> m () 

Sets the subtitle of self.

Since: 1.0

setTitle

viewSwitcherTitleSetTitle Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> Text

title: a title

-> m () 

Sets the title of self.

Since: 1.0

setViewSwitcherEnabled

viewSwitcherTitleSetViewSwitcherEnabled Source #

Arguments

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

self: a AdwViewSwitcherTitle

-> Bool

enabled: whether the view switcher is enabled

-> m () 

Sets whether self's view switcher is enabled.

Since: 1.0

Properties

stack

The stack the view switcher controls.

Since: 1.0

clearViewSwitcherTitleStack :: (MonadIO m, IsViewSwitcherTitle o) => o -> m () Source #

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

clear #stack

constructViewSwitcherTitleStack :: (IsViewSwitcherTitle 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.

getViewSwitcherTitleStack :: (MonadIO m, IsViewSwitcherTitle o) => o -> m (Maybe ViewStack) Source #

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

get viewSwitcherTitle #stack

setViewSwitcherTitleStack :: (MonadIO m, IsViewSwitcherTitle o, IsViewStack a) => o -> a -> m () Source #

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

set viewSwitcherTitle [ #stack := value ]

subtitle

The subtitle to display.

The subtitle should give a user additional details.

Since: 1.0

constructViewSwitcherTitleSubtitle :: (IsViewSwitcherTitle o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getViewSwitcherTitleSubtitle :: (MonadIO m, IsViewSwitcherTitle o) => o -> m Text Source #

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

get viewSwitcherTitle #subtitle

setViewSwitcherTitleSubtitle :: (MonadIO m, IsViewSwitcherTitle o) => o -> Text -> m () Source #

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

set viewSwitcherTitle [ #subtitle := value ]

title

The title to display.

The title should give a user additional details. A good title should not include the application name.

Since: 1.0

constructViewSwitcherTitleTitle :: (IsViewSwitcherTitle o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getViewSwitcherTitleTitle :: (MonadIO m, IsViewSwitcherTitle o) => o -> m Text Source #

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

get viewSwitcherTitle #title

setViewSwitcherTitleTitle :: (MonadIO m, IsViewSwitcherTitle o) => o -> Text -> m () Source #

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

set viewSwitcherTitle [ #title := value ]

titleVisible

Whether the title is currently visible.

If the title is visible, it means the view switcher is hidden an it may be wanted to show an alternative switcher, e.g. a ViewSwitcherBar.

Since: 1.0

getViewSwitcherTitleTitleVisible :: (MonadIO m, IsViewSwitcherTitle o) => o -> m Bool Source #

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

get viewSwitcherTitle #titleVisible

viewSwitcherEnabled

Whether the view switcher is enabled.

If it is disabled, the title will be displayed instead. This allows to programmatically hide the view switcher even if it fits in the available space.

This can be used e.g. to ensure the view switcher is hidden below a certain window width, or any other constraint you find suitable.

Since: 1.0

constructViewSwitcherTitleViewSwitcherEnabled :: (IsViewSwitcherTitle o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getViewSwitcherTitleViewSwitcherEnabled :: (MonadIO m, IsViewSwitcherTitle o) => o -> m Bool Source #

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

get viewSwitcherTitle #viewSwitcherEnabled

setViewSwitcherTitleViewSwitcherEnabled :: (MonadIO m, IsViewSwitcherTitle o) => o -> Bool -> m () Source #

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

set viewSwitcherTitle [ #viewSwitcherEnabled := value ]