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

Exported types

newtype NavigationPage Source #

Memory-managed wrapper type.

Constructors

NavigationPage (ManagedPtr NavigationPage) 

Instances

Instances details
Eq NavigationPage Source # 
Instance details

Defined in GI.Adw.Objects.NavigationPage

GObject NavigationPage Source # 
Instance details

Defined in GI.Adw.Objects.NavigationPage

ManagedPtrNewtype NavigationPage Source # 
Instance details

Defined in GI.Adw.Objects.NavigationPage

TypedObject NavigationPage Source # 
Instance details

Defined in GI.Adw.Objects.NavigationPage

Methods

glibType :: IO GType

HasParentTypes NavigationPage Source # 
Instance details

Defined in GI.Adw.Objects.NavigationPage

IsGValue (Maybe NavigationPage) Source #

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

Instance details

Defined in GI.Adw.Objects.NavigationPage

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes NavigationPage Source # 
Instance details

Defined in GI.Adw.Objects.NavigationPage

type ParentTypes NavigationPage = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

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

Instances details
(GObject o, IsDescendantOf NavigationPage o) => IsNavigationPage o Source # 
Instance details

Defined in GI.Adw.Objects.NavigationPage

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

Expand

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

self: a navigation page

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

self: a navigation page

-> m (Maybe Widget)

Returns: the child widget of self

Gets the child widget of self.

Since: 1.4

getTag

navigationPageGetTag Source #

Arguments

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

self: a navigation page

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

self: a navigation page

-> m Text

Returns: the title of self

Gets the title of self.

Since: 1.4

new

navigationPageNew Source #

Arguments

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

child: the child widget

-> Text

title: the page title

-> m NavigationPage

Returns: the new created AdwNavigationPage

Creates a new AdwNavigationPage.

Since: 1.4

newWithTag

navigationPageNewWithTag Source #

Arguments

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

child: the child widget

-> Text

title: the page title

-> Text

tag: the page tag

-> m NavigationPage

Returns: the new created AdwNavigationPage

Creates a new AdwNavigationPage with provided tag.

Since: 1.4

setCanPop

navigationPageSetCanPop Source #

Arguments

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

self: a navigation page

-> Bool

canPop: whether the page can be popped from navigation stack

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

self: a navigation page

-> Maybe b

child: the child widget

-> m () 

Sets the child widget of self.

Since: 1.4

setTag

navigationPageSetTag Source #

Arguments

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

self: a navigation page

-> Maybe Text

tag: the page tag

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

self: a navigation page

-> Text

title: the title

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

hidden

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