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 |
GI.Adw.Objects.NavigationPage
Description
A page within [classnavigationView
] or [classnavigationSplitView
].
Each page has a child widget, a title and optionally a tag.
The signalnavigationPage
[showing], signalnavigationPage
[shown],
signalnavigationPage
[hiding] and signalnavigationPage
[hidden] signals
can be used to track the page's visibility within its AdwNavigationView
.
Header Bar Integration
When placed inside AdwNavigationPage
, [classheaderBar
] will display the
page title instead of window title.
When used together with [classnavigationView
], it will also display a back
button that can be used to go back to the previous page. Set
[propertyheaderBar
:show-back-button] to FALSE
to disable that behavior if
it's unwanted.
CSS Nodes
AdwNavigationPage
has a single CSS node with name
navigation-view-page
.
Accessibility
AdwNavigationPage
uses the GTK_ACCESSIBLE_ROLE_GROUP
role.
Since: 1.4
Synopsis
- newtype NavigationPage = NavigationPage (ManagedPtr NavigationPage)
- class (GObject o, IsDescendantOf NavigationPage o) => IsNavigationPage o
- toNavigationPage :: (MonadIO m, IsNavigationPage o) => o -> m NavigationPage
- navigationPageGetCanPop :: (HasCallStack, MonadIO m, IsNavigationPage a) => a -> m Bool
- navigationPageGetChild :: (HasCallStack, MonadIO m, IsNavigationPage a) => a -> m (Maybe Widget)
- navigationPageGetTag :: (HasCallStack, MonadIO m, IsNavigationPage a) => a -> m (Maybe Text)
- navigationPageGetTitle :: (HasCallStack, MonadIO m, IsNavigationPage a) => a -> m Text
- navigationPageNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> m NavigationPage
- navigationPageNewWithTag :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> Text -> m NavigationPage
- navigationPageSetCanPop :: (HasCallStack, MonadIO m, IsNavigationPage a) => a -> Bool -> m ()
- navigationPageSetChild :: (HasCallStack, MonadIO m, IsNavigationPage a, IsWidget b) => a -> Maybe b -> m ()
- navigationPageSetTag :: (HasCallStack, MonadIO m, IsNavigationPage a) => a -> Maybe Text -> m ()
- navigationPageSetTitle :: (HasCallStack, MonadIO m, IsNavigationPage a) => a -> Text -> m ()
- constructNavigationPageCanPop :: (IsNavigationPage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getNavigationPageCanPop :: (MonadIO m, IsNavigationPage o) => o -> m Bool
- setNavigationPageCanPop :: (MonadIO m, IsNavigationPage o) => o -> Bool -> m ()
- clearNavigationPageChild :: (MonadIO m, IsNavigationPage o) => o -> m ()
- constructNavigationPageChild :: (IsNavigationPage o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getNavigationPageChild :: (MonadIO m, IsNavigationPage o) => o -> m (Maybe Widget)
- setNavigationPageChild :: (MonadIO m, IsNavigationPage o, IsWidget a) => o -> a -> m ()
- clearNavigationPageTag :: (MonadIO m, IsNavigationPage o) => o -> m ()
- constructNavigationPageTag :: (IsNavigationPage o, MonadIO m) => Text -> m (GValueConstruct o)
- getNavigationPageTag :: (MonadIO m, IsNavigationPage o) => o -> m (Maybe Text)
- setNavigationPageTag :: (MonadIO m, IsNavigationPage o) => o -> Text -> m ()
- constructNavigationPageTitle :: (IsNavigationPage o, MonadIO m) => Text -> m (GValueConstruct o)
- getNavigationPageTitle :: (MonadIO m, IsNavigationPage o) => o -> m Text
- setNavigationPageTitle :: (MonadIO m, IsNavigationPage o) => o -> Text -> m ()
- type NavigationPageHiddenCallback = IO ()
- afterNavigationPageHidden :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHiddenCallback) -> m SignalHandlerId
- onNavigationPageHidden :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHiddenCallback) -> m SignalHandlerId
- type NavigationPageHidingCallback = IO ()
- afterNavigationPageHiding :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHidingCallback) -> m SignalHandlerId
- onNavigationPageHiding :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHidingCallback) -> m SignalHandlerId
- type NavigationPageShowingCallback = IO ()
- afterNavigationPageShowing :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShowingCallback) -> m SignalHandlerId
- onNavigationPageShowing :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShowingCallback) -> m SignalHandlerId
- type NavigationPageShownCallback = IO ()
- afterNavigationPageShown :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShownCallback) -> m SignalHandlerId
- onNavigationPageShown :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShownCallback) -> m SignalHandlerId
Exported types
newtype NavigationPage Source #
Memory-managed wrapper type.
Constructors
NavigationPage (ManagedPtr NavigationPage) |
Instances
class (GObject o, IsDescendantOf NavigationPage o) => IsNavigationPage o Source #
Type class for types which can be safely cast to NavigationPage
, for instance with toNavigationPage
.
Instances
toNavigationPage :: (MonadIO m, IsNavigationPage o) => o -> m NavigationPage Source #
Cast to NavigationPage
, 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
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, 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, getBaseline, getBounds, getBuildableId, getCanFocus, getCanPop, getCanTarget, getChild, 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, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTag, getTemplateChild, getTitle, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setCanFocus, setCanPop, setCanTarget, setChild, 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, setStateFlags, setTag, setTitle, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getCanPop
navigationPageGetCanPop Source #
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a) | |
=> a |
|
-> m Bool | Returns: whether the page can be popped from navigation stack |
Gets whether self
can be popped from navigation stack.
Since: 1.4
getChild
navigationPageGetChild Source #
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the child widget of |
Gets the child widget of self
.
Since: 1.4
getTag
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a) | |
=> a |
|
-> m (Maybe Text) | Returns: the page tag |
Gets the tag of self
.
Since: 1.4
getTitle
navigationPageGetTitle Source #
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a) | |
=> a |
|
-> m Text | Returns: the title of |
Gets the title of self
.
Since: 1.4
new
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> m NavigationPage | Returns: the new created |
Creates a new AdwNavigationPage
.
Since: 1.4
newWithTag
navigationPageNewWithTag Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m NavigationPage | Returns: the new created |
Creates a new AdwNavigationPage
with provided tag.
Since: 1.4
setCanPop
navigationPageSetCanPop Source #
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether self
can be popped from navigation stack.
Set it to FALSE
to disable shortcuts and gestures, as well as remove the
back button from [classheaderBar
].
Manually calling [methodnavigationView
.pop] or using the navigation.pop
action will still work.
See [propertyheaderBar
:show-back-button] for removing only the back button,
but not shortcuts.
Since: 1.4
setChild
navigationPageSetChild Source #
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the child widget of self
.
Since: 1.4
setTag
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the tag for self
.
The tag can be used to retrieve the page with
[methodnavigationView
.find_page], as well as with
[methodnavigationView
.push_by_tag], [methodnavigationView
.pop_to_tag] or
[methodnavigationView
.replace_with_tags].
Tags must be unique within each [classnavigationView
].
The tag also must be set to use the navigation.push
action.
Since: 1.4
setTitle
navigationPageSetTitle Source #
Arguments
:: (HasCallStack, MonadIO m, IsNavigationPage a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the title of self
.
It's displayed in [classheaderBar
] instead of the window title, and used as
the tooltip on the next page's back button, as well as by screen reader.
Since: 1.4
Properties
canPop
Whether the page can be popped from navigation stack.
Set it to FALSE
to disable shortcuts and gestures, as well as remove the
back button from [classheaderBar
].
Manually calling [methodnavigationView
.pop] or using the navigation.pop
action will still work.
See [propertyheaderBar
:show-back-button] for removing only the back
button, but not shortcuts.
Since: 1.4
constructNavigationPageCanPop :: (IsNavigationPage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “can-pop
” property. This is rarely needed directly, but it is used by new
.
getNavigationPageCanPop :: (MonadIO m, IsNavigationPage o) => o -> m Bool Source #
Get the value of the “can-pop
” property.
When overloading is enabled, this is equivalent to
get
navigationPage #canPop
setNavigationPageCanPop :: (MonadIO m, IsNavigationPage o) => o -> Bool -> m () Source #
Set the value of the “can-pop
” property.
When overloading is enabled, this is equivalent to
set
navigationPage [ #canPop:=
value ]
child
The child widget.
Since: 1.4
clearNavigationPageChild :: (MonadIO m, IsNavigationPage o) => o -> m () Source #
Set the value of the “child
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#child
constructNavigationPageChild :: (IsNavigationPage o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “child
” property. This is rarely needed directly, but it is used by new
.
getNavigationPageChild :: (MonadIO m, IsNavigationPage o) => o -> m (Maybe Widget) Source #
Get the value of the “child
” property.
When overloading is enabled, this is equivalent to
get
navigationPage #child
setNavigationPageChild :: (MonadIO m, IsNavigationPage o, IsWidget a) => o -> a -> m () Source #
Set the value of the “child
” property.
When overloading is enabled, this is equivalent to
set
navigationPage [ #child:=
value ]
tag
The page tag.
The tag can be used to retrieve the page with
[methodnavigationView
.find_page], as well as with
[methodnavigationView
.push_by_tag], [methodnavigationView
.pop_to_tag] or
[methodnavigationView
.replace_with_tags].
Tags must be unique within each [classnavigationView
].
The tag also must be set to use the navigation.push
action.
Since: 1.4
clearNavigationPageTag :: (MonadIO m, IsNavigationPage o) => o -> m () Source #
Set the value of the “tag
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#tag
constructNavigationPageTag :: (IsNavigationPage o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tag
” property. This is rarely needed directly, but it is used by new
.
getNavigationPageTag :: (MonadIO m, IsNavigationPage o) => o -> m (Maybe Text) Source #
Get the value of the “tag
” property.
When overloading is enabled, this is equivalent to
get
navigationPage #tag
setNavigationPageTag :: (MonadIO m, IsNavigationPage o) => o -> Text -> m () Source #
Set the value of the “tag
” property.
When overloading is enabled, this is equivalent to
set
navigationPage [ #tag:=
value ]
title
The page title.
It's displayed in [classheaderBar
] instead of the window title, and used
as the tooltip on the next page's back button, as well as by screen reader.
Since: 1.4
constructNavigationPageTitle :: (IsNavigationPage 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
.
getNavigationPageTitle :: (MonadIO m, IsNavigationPage o) => o -> m Text Source #
Get the value of the “title
” property.
When overloading is enabled, this is equivalent to
get
navigationPage #title
setNavigationPageTitle :: (MonadIO m, IsNavigationPage o) => o -> Text -> m () Source #
Set the value of the “title
” property.
When overloading is enabled, this is equivalent to
set
navigationPage [ #title:=
value ]
Signals
type NavigationPageHiddenCallback = IO () Source #
Emitted when the navigation view transition has been completed and the page is fully hidden.
It will always be preceded by signalnavigationPage
[hiding] or
signalnavigationPage
[showing].
Since: 1.4
afterNavigationPageHidden :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHiddenCallback) -> m SignalHandlerId Source #
Connect a signal handler for the hidden signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
navigationPage #hidden callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onNavigationPageHidden :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHiddenCallback) -> m SignalHandlerId Source #
Connect a signal handler for the hidden signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
navigationPage #hidden callback
hiding
type NavigationPageHidingCallback = IO () Source #
Emitted when the page starts hiding at the beginning of the navigation view transition.
It will always be followed by signalnavigationPage
[hidden] or
signalnavigationPage
[shown].
Since: 1.4
afterNavigationPageHiding :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHidingCallback) -> m SignalHandlerId Source #
Connect a signal handler for the hiding signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
navigationPage #hiding callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onNavigationPageHiding :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageHidingCallback) -> m SignalHandlerId Source #
Connect a signal handler for the hiding signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
navigationPage #hiding callback
showing
type NavigationPageShowingCallback = IO () Source #
Emitted when the page shows at the beginning of the navigation view transition.
It will always be followed by signalnavigationPage
[shown] or
signalnavigationPage
[hidden].
Since: 1.4
afterNavigationPageShowing :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShowingCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showing signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
navigationPage #showing callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onNavigationPageShowing :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShowingCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showing signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
navigationPage #showing callback
shown
type NavigationPageShownCallback = IO () Source #
Emitted when the navigation view transition has been completed and the page is fully shown.
It will always be preceded by signalnavigationPage
[showing] or
signalnavigationPage
[hiding].
Since: 1.4
afterNavigationPageShown :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShownCallback) -> m SignalHandlerId Source #
Connect a signal handler for the shown signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
navigationPage #shown callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onNavigationPageShown :: (IsNavigationPage a, MonadIO m) => a -> ((?self :: a) => NavigationPageShownCallback) -> m SignalHandlerId Source #
Connect a signal handler for the shown signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
navigationPage #shown callback