gi-handy-1.0.4: libhandy bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Handy.Objects.ViewSwitcherTitle

Description

A view switcher title.

A widget letting you switch between multiple views contained by a Stack, via an [classviewSwitcher].

It is designed to be used as the title widget of a [classheaderBar], 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.

HdyViewSwitcherTitle is intended to be used together with [classviewSwitcherBar].

A common use case is to bind the [propertyviewSwitcherBar:reveal] property to [propertyviewSwitcherTitle:title-visible] to automatically reveal the view switcher bar when the title label is displayed in place of the view switcher, as follows:

xml code

<object class="GtkWindow"/>
  <child type="titlebar">
    <object class="HdyHeaderBar">
      <property name="centering-policy">strict</property>
      <child type="title">
        <object class="HdyViewSwitcherTitle"
                id="view_switcher_title">
          <property name="stack">stack</property>
        </object>
      </child>
    </object>
  </child>
  <child>
    <object class="GtkBox">
      <child>
        <object class="GtkStack" id="stack"/>
      </child>
      <child>
        <object class="HdyViewSwitcherBar">
          <property name="stack">stack</property>
          <property name="reveal"
                    bind-source="view_switcher_title"
                    bind-property="title-visible"
                    bind-flags="sync-create"/>
        </object>
      </child>
    </object>
  </child>
</object>

CSS nodes

HdyViewSwitcherTitle has a single CSS node with name viewswitchertitle.

Since: 1.0

Synopsis

Exported types

newtype ViewSwitcherTitle Source #

Memory-managed wrapper type.

Constructors

ViewSwitcherTitle (ManagedPtr ViewSwitcherTitle) 

Instances

Instances details
Eq ViewSwitcherTitle Source # 
Instance details

Defined in GI.Handy.Objects.ViewSwitcherTitle

GObject ViewSwitcherTitle Source # 
Instance details

Defined in GI.Handy.Objects.ViewSwitcherTitle

ManagedPtrNewtype ViewSwitcherTitle Source # 
Instance details

Defined in GI.Handy.Objects.ViewSwitcherTitle

TypedObject ViewSwitcherTitle Source # 
Instance details

Defined in GI.Handy.Objects.ViewSwitcherTitle

Methods

glibType :: IO GType

HasParentTypes ViewSwitcherTitle Source # 
Instance details

Defined in GI.Handy.Objects.ViewSwitcherTitle

IsGValue (Maybe ViewSwitcherTitle) Source #

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

Instance details

Defined in GI.Handy.Objects.ViewSwitcherTitle

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes ViewSwitcherTitle Source # 
Instance details

Defined in GI.Handy.Objects.ViewSwitcherTitle

type ParentTypes ViewSwitcherTitle = '[Bin, Container, Widget, Object, ImplementorIface, Buildable]

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

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPolicy, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getStack, getState, getStateFlags, getStyle, getStyleContext, getSubtitle, getSupportMultidevice, getTemplateChild, getTitle, getTitleVisible, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getViewSwitcherEnabled, getVisible, getVisual, getWindow.

Setters

setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setPolicy, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setStack, setState, setStateFlags, setStyle, setSubtitle, setSupportMultidevice, setTitle, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setViewSwitcherEnabled, setVisible, setVisual, setWindow.

getPolicy

viewSwitcherTitleGetPolicy Source #

Arguments

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

self: a view switcher title

-> m ViewSwitcherPolicy

Returns: the policy of self

Gets the policy of self.

Since: 1.0

getStack

viewSwitcherTitleGetStack Source #

Arguments

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

self: a view switcher title

-> m (Maybe Stack)

Returns: the stack

Gets the stack controlled by self.

Since: 1.0

getSubtitle

viewSwitcherTitleGetSubtitle Source #

Arguments

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

self: a view switcher title

-> m (Maybe Text)

Returns: the subtitle of self

Gets the subtitle of self.

Since: 1.0

getTitle

viewSwitcherTitleGetTitle Source #

Arguments

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

self: a view switcher title

-> m (Maybe Text)

Returns: the title of self

Gets the title of self.

Since: 1.0

getTitleVisible

viewSwitcherTitleGetTitleVisible Source #

Arguments

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

self: a view switcher title

-> 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 view switcher title

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

Creates a new HdyViewSwitcherTitle.

Since: 1.0

setPolicy

viewSwitcherTitleSetPolicy Source #

Arguments

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

self: a view switcher title

-> ViewSwitcherPolicy

policy: the new policy

-> m () 

Sets the policy of self.

Since: 1.0

setStack

viewSwitcherTitleSetStack Source #

Arguments

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

self: a view switcher title

-> Maybe b

stack: a stack

-> m () 

Sets the Stack to control.

Since: 1.0

setSubtitle

viewSwitcherTitleSetSubtitle Source #

Arguments

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

self: a view switcher title

-> Maybe 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 view switcher title

-> Maybe 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 view switcher title

-> Bool

enabled: TRUE to enable the view switcher, FALSE to disable it

-> m () 

Sets whether self's view switcher is enabled.

Since: 1.0

Properties

policy

The policy used to determine which mode to use.

Since: 1.0

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

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

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

get viewSwitcherTitle #policy

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

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

set viewSwitcherTitle [ #policy := value ]

stack

The Stack the [classviewSwitcher] 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, 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.

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

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

get viewSwitcherTitle #stack

setViewSwitcherTitleStack :: (MonadIO m, IsViewSwitcherTitle o, IsStack 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 of the [classviewSwitcher].

The subtitle should give a user additional details.

Since: 1.0

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

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

clear #subtitle

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 (Maybe 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 of the [classviewSwitcher].

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

Since: 1.0

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

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

clear #title

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 (Maybe 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 bar should be revealed or hidden.

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 bar should be revealed or hidden.

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 ]