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 |
- Exported types
- Methods
- append
- getAdjacentChild
- getCanNavigateBack
- getCanNavigateForward
- getCanUnfold
- getChildByName
- getChildTransitionParams
- getChildTransitionRunning
- getFoldThresholdPolicy
- getFolded
- getHomogeneous
- getModeTransitionDuration
- getPage
- getPages
- getTransitionType
- getVisibleChild
- getVisibleChildName
- insertChildAfter
- navigate
- new
- prepend
- remove
- reorderChildAfter
- setCanNavigateBack
- setCanNavigateForward
- setCanUnfold
- setChildTransitionParams
- setFoldThresholdPolicy
- setHomogeneous
- setModeTransitionDuration
- setTransitionType
- setVisibleChild
- setVisibleChildName
- Properties
An adaptive container acting like a box or a stack.
<picture> <source srcset="leaflet-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="leaflet-wide.png" alt="leaflet-wide"> </picture> <picture> <source srcset="leaflet-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="leaflet-narrow.png" alt="leaflet-narrow"> </picture>
The AdwLeaflet
widget can display its children like a Box
does
or like a Stack
does, adapting to size changes by switching
between the two modes.
When there is enough space the children are displayed side by side, otherwise only one is displayed and the leaflet is said to be “folded”. The threshold is dictated by the preferred minimum sizes of the children. When a leaflet is folded, the children can be navigated using swipe gestures.
The “over” and “under” transition types stack the children one on top of the other, while the “slide” transition puts the children side by side. While navigating to a child on the side or below can be performed by swiping the current child away, navigating to an upper child requires dragging it from the edge where it resides. This doesn't affect non-dragging swipes.
CSS nodes
AdwLeaflet
has a single CSS node with name leaflet
. The node will get the
style classes .folded
when it is folded, .unfolded
when it's not, or none
if it hasn't computed its fold yet.
Since: 1.0
Synopsis
- newtype Leaflet = Leaflet (ManagedPtr Leaflet)
- class (GObject o, IsDescendantOf Leaflet o) => IsLeaflet o
- toLeaflet :: (MonadIO m, IsLeaflet o) => o -> m Leaflet
- leafletAppend :: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) => a -> b -> m LeafletPage
- leafletGetAdjacentChild :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> NavigationDirection -> m (Maybe Widget)
- leafletGetCanNavigateBack :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m Bool
- leafletGetCanNavigateForward :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m Bool
- leafletGetCanUnfold :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m Bool
- leafletGetChildByName :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> Text -> m (Maybe Widget)
- leafletGetChildTransitionParams :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m SpringParams
- leafletGetChildTransitionRunning :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m Bool
- leafletGetFoldThresholdPolicy :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m FoldThresholdPolicy
- leafletGetFolded :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m Bool
- leafletGetHomogeneous :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m Bool
- leafletGetModeTransitionDuration :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m Word32
- leafletGetPage :: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) => a -> b -> m LeafletPage
- leafletGetPages :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m SelectionModel
- leafletGetTransitionType :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m LeafletTransitionType
- leafletGetVisibleChild :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m (Maybe Widget)
- leafletGetVisibleChildName :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> m (Maybe Text)
- leafletInsertChildAfter :: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b, IsWidget c) => a -> b -> Maybe c -> m LeafletPage
- leafletNavigate :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> NavigationDirection -> m Bool
- leafletNew :: (HasCallStack, MonadIO m) => m Leaflet
- leafletPrepend :: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) => a -> b -> m LeafletPage
- leafletRemove :: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) => a -> b -> m ()
- leafletReorderChildAfter :: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b, IsWidget c) => a -> b -> Maybe c -> m ()
- leafletSetCanNavigateBack :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> Bool -> m ()
- leafletSetCanNavigateForward :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> Bool -> m ()
- leafletSetCanUnfold :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> Bool -> m ()
- leafletSetChildTransitionParams :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> SpringParams -> m ()
- leafletSetFoldThresholdPolicy :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> FoldThresholdPolicy -> m ()
- leafletSetHomogeneous :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> Bool -> m ()
- leafletSetModeTransitionDuration :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> Word32 -> m ()
- leafletSetTransitionType :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> LeafletTransitionType -> m ()
- leafletSetVisibleChild :: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) => a -> b -> m ()
- leafletSetVisibleChildName :: (HasCallStack, MonadIO m, IsLeaflet a) => a -> Text -> m ()
- constructLeafletCanNavigateBack :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o)
- getLeafletCanNavigateBack :: (MonadIO m, IsLeaflet o) => o -> m Bool
- setLeafletCanNavigateBack :: (MonadIO m, IsLeaflet o) => o -> Bool -> m ()
- constructLeafletCanNavigateForward :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o)
- getLeafletCanNavigateForward :: (MonadIO m, IsLeaflet o) => o -> m Bool
- setLeafletCanNavigateForward :: (MonadIO m, IsLeaflet o) => o -> Bool -> m ()
- constructLeafletCanUnfold :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o)
- getLeafletCanUnfold :: (MonadIO m, IsLeaflet o) => o -> m Bool
- setLeafletCanUnfold :: (MonadIO m, IsLeaflet o) => o -> Bool -> m ()
- constructLeafletChildTransitionParams :: (IsLeaflet o, MonadIO m) => SpringParams -> m (GValueConstruct o)
- getLeafletChildTransitionParams :: (MonadIO m, IsLeaflet o) => o -> m (Maybe SpringParams)
- setLeafletChildTransitionParams :: (MonadIO m, IsLeaflet o) => o -> SpringParams -> m ()
- getLeafletChildTransitionRunning :: (MonadIO m, IsLeaflet o) => o -> m Bool
- constructLeafletFoldThresholdPolicy :: (IsLeaflet o, MonadIO m) => FoldThresholdPolicy -> m (GValueConstruct o)
- getLeafletFoldThresholdPolicy :: (MonadIO m, IsLeaflet o) => o -> m FoldThresholdPolicy
- setLeafletFoldThresholdPolicy :: (MonadIO m, IsLeaflet o) => o -> FoldThresholdPolicy -> m ()
- getLeafletFolded :: (MonadIO m, IsLeaflet o) => o -> m Bool
- constructLeafletHomogeneous :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o)
- getLeafletHomogeneous :: (MonadIO m, IsLeaflet o) => o -> m Bool
- setLeafletHomogeneous :: (MonadIO m, IsLeaflet o) => o -> Bool -> m ()
- constructLeafletModeTransitionDuration :: (IsLeaflet o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getLeafletModeTransitionDuration :: (MonadIO m, IsLeaflet o) => o -> m Word32
- setLeafletModeTransitionDuration :: (MonadIO m, IsLeaflet o) => o -> Word32 -> m ()
- getLeafletPages :: (MonadIO m, IsLeaflet o) => o -> m (Maybe SelectionModel)
- constructLeafletTransitionType :: (IsLeaflet o, MonadIO m) => LeafletTransitionType -> m (GValueConstruct o)
- getLeafletTransitionType :: (MonadIO m, IsLeaflet o) => o -> m LeafletTransitionType
- setLeafletTransitionType :: (MonadIO m, IsLeaflet o) => o -> LeafletTransitionType -> m ()
- constructLeafletVisibleChild :: (IsLeaflet o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getLeafletVisibleChild :: (MonadIO m, IsLeaflet o) => o -> m (Maybe Widget)
- setLeafletVisibleChild :: (MonadIO m, IsLeaflet o, IsWidget a) => o -> a -> m ()
- constructLeafletVisibleChildName :: (IsLeaflet o, MonadIO m) => Text -> m (GValueConstruct o)
- getLeafletVisibleChildName :: (MonadIO m, IsLeaflet o) => o -> m (Maybe Text)
- setLeafletVisibleChildName :: (MonadIO m, IsLeaflet o) => o -> Text -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Leaflet Source # | |
GObject Leaflet Source # | |
Defined in GI.Adw.Objects.Leaflet | |
ManagedPtrNewtype Leaflet Source # | |
Defined in GI.Adw.Objects.Leaflet toManagedPtr :: Leaflet -> ManagedPtr Leaflet | |
TypedObject Leaflet Source # | |
Defined in GI.Adw.Objects.Leaflet | |
HasParentTypes Leaflet Source # | |
Defined in GI.Adw.Objects.Leaflet | |
IsGValue (Maybe Leaflet) Source # | Convert |
Defined in GI.Adw.Objects.Leaflet gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Leaflet -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Leaflet) | |
type ParentTypes Leaflet Source # | |
Defined in GI.Adw.Objects.Leaflet |
class (GObject o, IsDescendantOf Leaflet o) => IsLeaflet o Source #
Instances
(GObject o, IsDescendantOf Leaflet o) => IsLeaflet o Source # | |
Defined in GI.Adw.Objects.Leaflet |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, append, 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, insertChildAfter, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, navigate, notify, notifyByPspec, observeChildren, observeControllers, pick, prepend, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, reorderChildAfter, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAdjacentChild, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanNavigateBack, getCanNavigateForward, getCanTarget, getCanUnfold, getCancelProgress, getChildByName, getChildTransitionParams, getChildTransitionRunning, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getDistance, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFoldThresholdPolicy, getFolded, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHomogeneous, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getModeTransitionDuration, getName, getNative, getNextSibling, getOpacity, getOrientation, getOverflow, getPage, getPages, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProgress, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getSnapPoints, getStateFlags, getStyleContext, getSwipeArea, getTemplateChild, getTooltipMarkup, getTooltipText, getTransitionType, getValign, getVexpand, getVexpandSet, getVisible, getVisibleChild, getVisibleChildName, getWidth.
Setters
setCanFocus, setCanNavigateBack, setCanNavigateForward, setCanTarget, setCanUnfold, setChildTransitionParams, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFoldThresholdPolicy, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHomogeneous, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setModeTransitionDuration, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setTransitionType, setValign, setVexpand, setVexpandSet, setVisible, setVisibleChild, setVisibleChildName.
append
:: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) | |
=> a |
|
-> b |
|
-> m LeafletPage | Returns: the [class |
Adds a child to self
.
Since: 1.0
getAdjacentChild
leafletGetAdjacentChild Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> NavigationDirection |
|
-> m (Maybe Widget) | Returns: the previous or next child |
Finds the previous or next navigatable child.
This will be the same child [methodleaflet
.navigate] or swipe gestures will
navigate to.
If there's no child to navigate to, NULL
will be returned instead.
See [propertyleafletPage
:navigatable].
Since: 1.0
getCanNavigateBack
leafletGetCanNavigateBack Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m Bool | Returns: Whether gestures and shortcuts are enabled. |
Gets whether gestures and shortcuts for navigating backward are enabled.
Since: 1.0
getCanNavigateForward
leafletGetCanNavigateForward Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m Bool | Returns: Whether gestures and shortcuts are enabled. |
Gets whether gestures and shortcuts for navigating forward are enabled.
Since: 1.0
getCanUnfold
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether self
can unfold.
Since: 1.0
getChildByName
leafletGetChildByName Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> Text |
|
-> m (Maybe Widget) | Returns: the requested child of |
Finds the child of self
with name
.
Returns NULL
if there is no child with this name.
See [propertyleafletPage
:name].
Since: 1.0
getChildTransitionParams
leafletGetChildTransitionParams Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m SpringParams | Returns: the child transition parameters |
Gets the child transition spring parameters for self
.
Since: 1.0
getChildTransitionRunning
leafletGetChildTransitionRunning Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m Bool | Returns: whether a transition is currently running |
Gets whether a child transition is currently running for self
.
Since: 1.0
getFoldThresholdPolicy
leafletGetFoldThresholdPolicy Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m FoldThresholdPolicy |
Gets the fold threshold policy for self
.
Since: 1.0
getFolded
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether self
is folded.
Since: 1.0
getHomogeneous
leafletGetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether self
is homogeneous.
Since: 1.0
getModeTransitionDuration
leafletGetModeTransitionDuration Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m Word32 | Returns: the mode transition duration, in milliseconds. |
Gets the mode transition animation duration for self
.
Since: 1.0
getPage
:: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) | |
=> a |
|
-> b |
|
-> m LeafletPage | Returns: the page object for |
Returns the [classleafletPage
] object for child
.
Since: 1.0
getPages
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m SelectionModel | Returns: a |
Returns a ListModel
that contains the pages of the leaflet.
This can be used to keep an up-to-date view. The model also implements
SelectionModel
and can be used to track and change the visible
page.
Since: 1.0
getTransitionType
leafletGetTransitionType Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m LeafletTransitionType | Returns: the current transition type of |
Gets the type of animation used for transitions between modes and children.
Since: 1.0
getVisibleChild
leafletGetVisibleChild Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the visible child |
Gets the widget currently visible when the leaflet is folded.
Since: 1.0
getVisibleChildName
leafletGetVisibleChildName Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> m (Maybe Text) | Returns: the name of the visible child |
Gets the name of the currently visible child widget.
Since: 1.0
insertChildAfter
leafletInsertChildAfter Source #
:: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b, IsWidget c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m LeafletPage | Returns: the [class |
Inserts child
in the position after sibling
in the list of children.
If sibling
is NULL
, inserts child
at the first position.
Since: 1.0
navigate
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> NavigationDirection |
|
-> m Bool | Returns: whether the visible child was changed |
Navigates to the previous or next child.
The child must have the [propertyleafletPage
:navigatable] property set to
TRUE
, otherwise it will be skipped.
This will be the same child as returned by
[methodleaflet
.get_adjacent_child] or navigated to via swipe gestures.
Since: 1.0
new
:: (HasCallStack, MonadIO m) | |
=> m Leaflet | Returns: the new created |
Creates a new AdwLeaflet
.
Since: 1.0
prepend
:: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) | |
=> a |
|
-> b |
|
-> m LeafletPage | Returns: the [class |
Inserts child
at the first position in self
.
Since: 1.0
remove
:: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Removes a child widget from self
.
Since: 1.0
reorderChildAfter
leafletReorderChildAfter Source #
:: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b, IsWidget c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m () |
Moves child
to the position after sibling
in the list of children.
If sibling
is NULL
, moves child
to the first position.
Since: 1.0
setCanNavigateBack
leafletSetCanNavigateBack Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether gestures and shortcuts for navigating backward are enabled.
Since: 1.0
setCanNavigateForward
leafletSetCanNavigateForward Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether gestures and shortcuts for navigating forward are enabled.
Since: 1.0
setCanUnfold
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether self
can unfold.
Since: 1.0
setChildTransitionParams
leafletSetChildTransitionParams Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> SpringParams |
|
-> m () |
Sets the child transition spring parameters for self
.
Since: 1.0
setFoldThresholdPolicy
leafletSetFoldThresholdPolicy Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> FoldThresholdPolicy |
|
-> m () |
Sets the fold threshold policy for self
.
Since: 1.0
setHomogeneous
leafletSetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets self
to be homogeneous or not.
If set to FALSE
, different children can have different size along the
opposite orientation.
Since: 1.0
setModeTransitionDuration
leafletSetModeTransitionDuration Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the mode transition animation duration for self
.
Since: 1.0
setTransitionType
leafletSetTransitionType Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> LeafletTransitionType |
|
-> m () |
Sets the type of animation used for transitions between modes and children.
Since: 1.0
setVisibleChild
leafletSetVisibleChild Source #
:: (HasCallStack, MonadIO m, IsLeaflet a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Sets the widget currently visible when the leaflet is folded.
Since: 1.0
setVisibleChildName
leafletSetVisibleChildName Source #
:: (HasCallStack, MonadIO m, IsLeaflet a) | |
=> a |
|
-> Text |
|
-> m () |
Properties
canNavigateBack
Whether gestures and shortcuts for navigating backward are enabled.
The supported gestures are:
- One-finger swipe on touchscreens
- Horizontal scrolling on touchpads (usually two-finger swipe)
- Back/forward mouse buttons
The keyboard back/forward keys are also supported, as well as the <kbd>Alt</kbd>+<kbd>←</kbd> shortcut for horizontal orientation, or <kbd>Alt</kbd>+<kbd>↑</kbd> for vertical orientation.
If the orientation is horizontal, for right-to-left locales, gestures and shortcuts are reversed.
Only children that have [propertyleafletPage
:navigatable] set to TRUE
can be navigated to.
Since: 1.0
constructLeafletCanNavigateBack :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “can-navigate-back
” property. This is rarely needed directly, but it is used by new
.
getLeafletCanNavigateBack :: (MonadIO m, IsLeaflet o) => o -> m Bool Source #
Get the value of the “can-navigate-back
” property.
When overloading is enabled, this is equivalent to
get
leaflet #canNavigateBack
setLeafletCanNavigateBack :: (MonadIO m, IsLeaflet o) => o -> Bool -> m () Source #
Set the value of the “can-navigate-back
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #canNavigateBack:=
value ]
canNavigateForward
Whether gestures and shortcuts for navigating forward are enabled.
The supported gestures are:
- One-finger swipe on touchscreens
- Horizontal scrolling on touchpads (usually two-finger swipe)
- Back/forward mouse buttons
The keyboard back/forward keys are also supported, as well as the <kbd>Alt</kbd>+<kbd>→</kbd> shortcut for horizontal orientation, or <kbd>Alt</kbd>+<kbd>↓</kbd> for vertical orientation.
If the orientation is horizontal, for right-to-left locales, gestures and shortcuts are reversed.
Only children that have [propertyleafletPage
:navigatable] set to TRUE
can be navigated to.
Since: 1.0
constructLeafletCanNavigateForward :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “can-navigate-forward
” property. This is rarely needed directly, but it is used by new
.
getLeafletCanNavigateForward :: (MonadIO m, IsLeaflet o) => o -> m Bool Source #
Get the value of the “can-navigate-forward
” property.
When overloading is enabled, this is equivalent to
get
leaflet #canNavigateForward
setLeafletCanNavigateForward :: (MonadIO m, IsLeaflet o) => o -> Bool -> m () Source #
Set the value of the “can-navigate-forward
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #canNavigateForward:=
value ]
canUnfold
Whether or not the leaflet can unfold.
Since: 1.0
constructLeafletCanUnfold :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “can-unfold
” property. This is rarely needed directly, but it is used by new
.
getLeafletCanUnfold :: (MonadIO m, IsLeaflet o) => o -> m Bool Source #
Get the value of the “can-unfold
” property.
When overloading is enabled, this is equivalent to
get
leaflet #canUnfold
setLeafletCanUnfold :: (MonadIO m, IsLeaflet o) => o -> Bool -> m () Source #
Set the value of the “can-unfold
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #canUnfold:=
value ]
childTransitionParams
The child transition spring parameters.
The default value is equivalent to:
c code
adw_spring_params_new (1, 0.5, 500)
Since: 1.0
constructLeafletChildTransitionParams :: (IsLeaflet o, MonadIO m) => SpringParams -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “child-transition-params
” property. This is rarely needed directly, but it is used by new
.
getLeafletChildTransitionParams :: (MonadIO m, IsLeaflet o) => o -> m (Maybe SpringParams) Source #
Get the value of the “child-transition-params
” property.
When overloading is enabled, this is equivalent to
get
leaflet #childTransitionParams
setLeafletChildTransitionParams :: (MonadIO m, IsLeaflet o) => o -> SpringParams -> m () Source #
Set the value of the “child-transition-params
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #childTransitionParams:=
value ]
childTransitionRunning
Whether a child transition is currently running.
Since: 1.0
getLeafletChildTransitionRunning :: (MonadIO m, IsLeaflet o) => o -> m Bool Source #
Get the value of the “child-transition-running
” property.
When overloading is enabled, this is equivalent to
get
leaflet #childTransitionRunning
foldThresholdPolicy
Determines when the leaflet will fold.
If set to ADW_FOLD_THRESHOLD_POLICY_MINIMUM
, it will only fold when
the children cannot fit anymore. With ADW_FOLD_THRESHOLD_POLICY_NATURAL
,
it will fold as soon as children don't get their natural size.
This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately folding.
Since: 1.0
constructLeafletFoldThresholdPolicy :: (IsLeaflet o, MonadIO m) => FoldThresholdPolicy -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “fold-threshold-policy
” property. This is rarely needed directly, but it is used by new
.
getLeafletFoldThresholdPolicy :: (MonadIO m, IsLeaflet o) => o -> m FoldThresholdPolicy Source #
Get the value of the “fold-threshold-policy
” property.
When overloading is enabled, this is equivalent to
get
leaflet #foldThresholdPolicy
setLeafletFoldThresholdPolicy :: (MonadIO m, IsLeaflet o) => o -> FoldThresholdPolicy -> m () Source #
Set the value of the “fold-threshold-policy
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #foldThresholdPolicy:=
value ]
folded
Whether the leaflet is folded.
The leaflet will be folded if the size allocated to it is smaller than the sum of the fold threshold policy, it will be unfolded otherwise.
Since: 1.0
getLeafletFolded :: (MonadIO m, IsLeaflet o) => o -> m Bool Source #
Get the value of the “folded
” property.
When overloading is enabled, this is equivalent to
get
leaflet #folded
homogeneous
Whether the leaflet allocates the same size for all children when folded.
If set to FALSE
, different children can have different size along the
opposite orientation.
Since: 1.0
constructLeafletHomogeneous :: (IsLeaflet o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “homogeneous
” property. This is rarely needed directly, but it is used by new
.
getLeafletHomogeneous :: (MonadIO m, IsLeaflet o) => o -> m Bool Source #
Get the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
get
leaflet #homogeneous
setLeafletHomogeneous :: (MonadIO m, IsLeaflet o) => o -> Bool -> m () Source #
Set the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #homogeneous:=
value ]
modeTransitionDuration
The mode transition animation duration, in milliseconds.
Since: 1.0
constructLeafletModeTransitionDuration :: (IsLeaflet o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “mode-transition-duration
” property. This is rarely needed directly, but it is used by new
.
getLeafletModeTransitionDuration :: (MonadIO m, IsLeaflet o) => o -> m Word32 Source #
Get the value of the “mode-transition-duration
” property.
When overloading is enabled, this is equivalent to
get
leaflet #modeTransitionDuration
setLeafletModeTransitionDuration :: (MonadIO m, IsLeaflet o) => o -> Word32 -> m () Source #
Set the value of the “mode-transition-duration
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #modeTransitionDuration:=
value ]
pages
A selection model with the leaflet's pages.
This can be used to keep an up-to-date view. The model also implements
SelectionModel
and can be used to track and change the visible
page.
Since: 1.0
getLeafletPages :: (MonadIO m, IsLeaflet o) => o -> m (Maybe SelectionModel) Source #
Get the value of the “pages
” property.
When overloading is enabled, this is equivalent to
get
leaflet #pages
transitionType
The type of animation used for transitions between modes and children.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the mode or child that is about to become current.
Since: 1.0
constructLeafletTransitionType :: (IsLeaflet o, MonadIO m) => LeafletTransitionType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “transition-type
” property. This is rarely needed directly, but it is used by new
.
getLeafletTransitionType :: (MonadIO m, IsLeaflet o) => o -> m LeafletTransitionType Source #
Get the value of the “transition-type
” property.
When overloading is enabled, this is equivalent to
get
leaflet #transitionType
setLeafletTransitionType :: (MonadIO m, IsLeaflet o) => o -> LeafletTransitionType -> m () Source #
Set the value of the “transition-type
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #transitionType:=
value ]
visibleChild
The widget currently visible when the leaflet is folded.
The transition is determined by [propertyleaflet
:transition-type] and
[Leaflet:child-transition-duration]. The transition can be cancelled by the
user, in which case visible child will change back to the previously
visible child.
Since: 1.0
constructLeafletVisibleChild :: (IsLeaflet o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “visible-child
” property. This is rarely needed directly, but it is used by new
.
getLeafletVisibleChild :: (MonadIO m, IsLeaflet o) => o -> m (Maybe Widget) Source #
Get the value of the “visible-child
” property.
When overloading is enabled, this is equivalent to
get
leaflet #visibleChild
setLeafletVisibleChild :: (MonadIO m, IsLeaflet o, IsWidget a) => o -> a -> m () Source #
Set the value of the “visible-child
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #visibleChild:=
value ]
visibleChildName
The name of the widget currently visible when the leaflet is folded.
See [propertyleaflet
:visible-child].
Since: 1.0
constructLeafletVisibleChildName :: (IsLeaflet o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “visible-child-name
” property. This is rarely needed directly, but it is used by new
.
getLeafletVisibleChildName :: (MonadIO m, IsLeaflet o) => o -> m (Maybe Text) Source #
Get the value of the “visible-child-name
” property.
When overloading is enabled, this is equivalent to
get
leaflet #visibleChildName
setLeafletVisibleChildName :: (MonadIO m, IsLeaflet o) => o -> Text -> m () Source #
Set the value of the “visible-child-name
” property.
When overloading is enabled, this is equivalent to
set
leaflet [ #visibleChildName:=
value ]