Skip to main content
Ctrl+K

GNOME Python API

  • GLib
  • Gio
  • GObject
  • Gtk
  • Gdk
  • Adw
    • DBus
    • DBusGLib
    • Flatpak
    • GModule
    • Gcr
    • GdkPixbuf
    • GdkPixdata
    • GdkWayland
    • GdkX11
    • Graphene
    • Gsk
    • Gst
    • GstBase
    • GstCheck
    • GstController
    • GstNet
    • GtkSource
    • HarfBuzz
    • ICal
    • JavaScriptCore
    • Pango
    • PangoCairo
    • PangoFT2
    • PangoFc
    • PangoOT
    • PangoXft
    • Shumate
    • Soup
    • Vte
    • WebKit
    • WebKitWebProcessExtension
    • Xdp
    • XdpGtk4
    • pycairo
  • GLib
  • Gio
  • GObject
  • Gtk
  • Gdk
  • Adw
  • DBus
  • DBusGLib
  • Flatpak
  • GModule
  • Gcr
  • GdkPixbuf
  • GdkPixdata
  • GdkWayland
  • GdkX11
  • Graphene
  • Gsk
  • Gst
  • GstBase
  • GstCheck
  • GstController
  • GstNet
  • GtkSource
  • HarfBuzz
  • ICal
  • JavaScriptCore
  • Pango
  • PangoCairo
  • PangoFT2
  • PangoFc
  • PangoOT
  • PangoXft
  • Shumate
  • Soup
  • Vte
  • WebKit
  • WebKitWebProcessExtension
  • Xdp
  • XdpGtk4
  • pycairo

Section Navigation

API

  • Classes
    • AboutDialog
    • AboutWindow
    • ActionRow
    • AlertDialog
    • Animation
    • AnimationTarget
    • Application
    • ApplicationWindow
    • Avatar
    • Banner
    • Bin
    • BottomSheet
    • Breakpoint
    • BreakpointBin
    • ButtonContent
    • ButtonRow
    • CallbackAnimationTarget
    • Carousel
    • CarouselIndicatorDots
    • CarouselIndicatorLines
    • Clamp
    • ClampLayout
    • ClampScrollable
    • ComboRow
    • Dialog
    • EntryRow
    • EnumListItem
    • EnumListModel
    • ExpanderRow
    • Flap
    • HeaderBar
    • Layout
    • LayoutSlot
    • Leaflet
    • LeafletPage
    • MessageDialog
    • MultiLayoutView
    • NavigationPage
    • NavigationSplitView
    • NavigationView
    • OverlaySplitView
    • PasswordEntryRow
    • PreferencesDialog
    • PreferencesGroup
    • PreferencesPage
    • PreferencesRow
    • PreferencesWindow
    • PropertyAnimationTarget
    • SpinRow
    • Spinner
    • SpinnerPaintable
    • SplitButton
    • SpringAnimation
    • Squeezer
    • SqueezerPage
    • StatusPage
    • StyleManager
    • SwipeTracker
    • SwitchRow
    • TabBar
    • TabButton
    • TabOverview
    • TabPage
    • TabView
    • TimedAnimation
    • Toast
    • ToastOverlay
    • ToolbarView
    • ViewStack
    • ViewStackPage
    • ViewStackPages
    • ViewSwitcher
    • ViewSwitcherBar
    • ViewSwitcherTitle
    • Window
    • WindowTitle
  • Interfaces
    • Swipeable
  • Structures
    • BreakpointCondition
    • SpringParams
  • Enums
    • AccentColor
    • AnimationState
    • BreakpointConditionLengthType
    • BreakpointConditionRatioType
    • CenteringPolicy
    • ColorScheme
    • DialogPresentationMode
    • Easing
    • FlapFoldPolicy
    • FlapTransitionType
    • FoldThresholdPolicy
    • LeafletTransitionType
    • LengthUnit
    • NavigationDirection
    • ResponseAppearance
    • SqueezerTransitionType
    • TabViewShortcuts
    • ToastPriority
    • ToolbarStyle
    • ViewSwitcherPolicy
  • Functions
  • Constants
  • Adw
  • Classes
  • NavigationPage

NavigationPage#

Added in version 1.4.

class NavigationPage(**properties: Any)#

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 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
do_hidden(self) → None#
do_hiding(self) → None#
do_showing(self) → None#
do_shown(self) → None#
get_can_pop() → bool#

Gets whether self can be popped from navigation stack.

Added in version 1.4.

get_child() → Widget | None#

Gets the child widget of self.

Added in version 1.4.

get_tag() → str | None#

Gets the tag of self.

Added in version 1.4.

get_title() → str#

Gets the title of self.

Added in version 1.4.

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 from HeaderBar.

Manually calling pop or using the navigation.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 with push_by_tag, pop_to_tag or replace_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

set_title(title: str) → None#

Sets the title of self.

It’s displayed in HeaderBar instead of the window title, and used as the tooltip on the next page’s back button, as well as by screen reader.

Added in version 1.4.

Parameters:

title – the title

Properties#

class NavigationPage
props.can_pop: bool#

The type of the None singleton.

Added in version 1.4.

props.child: Widget#

The type of the None singleton.

Added in version 1.4.

props.tag: str#

The type of the None singleton.

Added in version 1.4.

props.title: str#

The type of the None singleton.

Added in version 1.4.

Signals#

class NavigationPage.signals
hidden() → None#

The type of the None singleton.

Added in version 1.4.

hiding() → None#

The type of the None singleton.

Added in version 1.4.

showing() → None#

The type of the None singleton.

Added in version 1.4.

shown() → None#

The type of the None singleton.

Added in version 1.4.

Virtual Methods#

class NavigationPage
do_hidden() → None#

The type of the None singleton.

Added in version 1.4.

do_hiding() → None#

The type of the None singleton.

Added in version 1.4.

do_showing() → None#

The type of the None singleton.

Added in version 1.4.

do_shown() → None#

The type of the None singleton.

Added in version 1.4.

Fields#

class NavigationPage
parent_instance#
On this page
  • Header Bar Integration
  • CSS Nodes
  • Accessibility
  • Constructors
    • NavigationPage.new()
    • NavigationPage.new_with_tag()
  • Methods
    • NavigationPage.do_hidden()
    • NavigationPage.do_hiding()
    • NavigationPage.do_showing()
    • NavigationPage.do_shown()
    • NavigationPage.get_can_pop()
    • NavigationPage.get_child()
    • NavigationPage.get_tag()
    • NavigationPage.get_title()
    • NavigationPage.set_can_pop()
    • NavigationPage.set_child()
    • NavigationPage.set_tag()
    • NavigationPage.set_title()
  • Properties
    • NavigationPage.props.can_pop
    • NavigationPage.props.child
    • NavigationPage.props.tag
    • NavigationPage.props.title
  • Signals
    • NavigationPage.signals.hidden()
    • NavigationPage.signals.hiding()
    • NavigationPage.signals.showing()
    • NavigationPage.signals.shown()
  • Virtual Methods
    • NavigationPage.do_hidden()
    • NavigationPage.do_hiding()
    • NavigationPage.do_showing()
    • NavigationPage.do_shown()
  • Fields
    • NavigationPage.parent_instance

This Page

  • Show Source

Created using Sphinx 8.2.3.

General Index

Built with the PyData Sphinx Theme 0.16.1.