NavigationPage#
Added in version 1.4.
Superclasses: Widget, InitiallyUnowned, Object
Implemented Interfaces: Accessible, Buildable, ConstraintTarget
A page within NavigationView or NavigationSplitView.
Each page has a child widget, a title and optionally a tag.
The showing, shown,
hiding and hidden signals
can be used to track the page’s visibility within its AdwNavigationView.
Header Bar Integration#
When placed inside AdwNavigationPage, HeaderBar will display the
page title instead of window title.
When used together with NavigationView, it will also display a back
button that can be used to go back to the previous page. Set
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.
Constructors#
- class NavigationPage
- classmethod new(child: Widget, title: str) → NavigationPage#
Creates a new
AdwNavigationPage.Added in version 1.4.
- Parameters:
child – the child widget
title – the page title
- classmethod new_with_tag(child: Widget, title: str, tag: str) → NavigationPage#
Creates a new
AdwNavigationPagewith provided tag.Added in version 1.4.
- Parameters:
child – the child widget
title – the page title
tag – the page tag
Methods#
- class NavigationPage
-
- set_can_pop(can_pop: bool) → None#
Sets whether
selfcan be popped from navigation stack.Set it to
FALSEto disable shortcuts and gestures, as well as remove the back button fromHeaderBar.Manually calling
popor using thenavigation.popaction will still work.See
show_back_buttonfor removing only the back button, but not shortcuts.Added in version 1.4.
- Parameters:
can_pop – whether the page can be popped from navigation stack
- set_child(child: Widget | None = None) → None#
Sets the child widget of
self.Added in version 1.4.
- Parameters:
child – the child widget
- set_tag(tag: str | None = None) → None#
Sets the tag for
self.The tag can be used to retrieve the page with
find_page, as well as withpush_by_tag,pop_to_tagorreplace_with_tags.Tags must be unique within each
NavigationView.The tag also must be set to use the
navigation.pushaction.Added in version 1.4.
- Parameters:
tag – the page tag
Properties#
- class NavigationPage
Signals#
- class NavigationPage.signals
Virtual Methods#
- class NavigationPage
Fields#
- class NavigationPage
- parent_instance#