NavigationPage
Added in version 1.4.
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
- Constructors:
NavigationPage(**properties)
new(child:Gtk.Widget, title:str) -> Adw.NavigationPage
new_with_tag(child:Gtk.Widget, title:str, tag:str) -> Adw.NavigationPage
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
AdwNavigationPage
with 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
self
can be popped from navigation stack.Set it to
FALSE
to disable shortcuts and gestures, as well as remove the back button fromHeaderBar
.Manually calling
pop
or using thenavigation.pop
action will still work.See
show_back_button
for 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_tag
orreplace_with_tags
.Tags must be unique within each
NavigationView
.The tag also must be set to use the
navigation.push
action.Added in version 1.4.
- Parameters:
tag – the page tag
Properties
- class NavigationPage
- props.can_pop: bool
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 fromHeaderBar
.Manually calling
pop
or using thenavigation.pop
action will still work.See
show_back_button
for removing only the back button, but not shortcuts.Added in version 1.4.
- props.tag: str
The page tag.
The tag can be used to retrieve the page with
find_page
, as well as withpush_by_tag
,pop_to_tag
orreplace_with_tags
.Tags must be unique within each
NavigationView
.The tag also must be set to use the
navigation.push
action.Added in version 1.4.
Signals
- class NavigationPage.signals
- hidden() → None
Emitted when the navigation view transition has been completed and the page is fully hidden.
It will always be preceded by
hiding
orshowing
.Added in version 1.4.
- hiding() → None
Emitted when the page starts hiding at the beginning of the navigation view transition.
It will always be followed by
hidden
orshown
.Added in version 1.4.
Virtual Methods
- class NavigationPage
- do_hidden() → None
Called when the navigation view transition has been completed and the page is fully hidden.
Added in version 1.4.
- do_hiding() → None
Called when the page starts hiding at the beginning of the navigation view transition.
Added in version 1.4.
Fields
- class NavigationPage
- parent_instance