GNOME Python API

References

  • PyGObject Docs
  • GNOME Developer Documentation

Libraries

  • Adw
    • Classes
      • AboutDialog
      • AboutWindow
      • ActionRow
      • AlertDialog
      • Animation
      • AnimationTarget
      • Application
      • ApplicationWindow
      • Avatar
      • Banner
      • Bin
      • Breakpoint
      • BreakpointBin
      • ButtonContent
      • CallbackAnimationTarget
      • Carousel
      • CarouselIndicatorDots
      • CarouselIndicatorLines
      • Clamp
      • ClampLayout
      • ClampScrollable
      • ComboRow
      • Dialog
      • EntryRow
      • EnumListItem
      • EnumListModel
      • ExpanderRow
      • Flap
      • HeaderBar
      • Leaflet
      • LeafletPage
      • MessageDialog
      • NavigationPage
      • NavigationSplitView
      • NavigationView
      • OverlaySplitView
      • PasswordEntryRow
      • PreferencesDialog
      • PreferencesGroup
      • PreferencesPage
      • PreferencesRow
      • PreferencesWindow
      • PropertyAnimationTarget
      • SpinRow
      • 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
    • Structures
    • Enums
    • Functions
    • Constants
    • Dependencies
  • DBus
  • DBusGLib
  • Flatpak
  • GLib
  • GModule
  • GObject
  • Gcr
  • Gdk
  • GdkPixbuf
  • GdkPixdata
  • GdkWayland
  • GdkX11
  • Gio
  • Graphene
  • Gsk
  • Gst
  • GstBase
  • GstCheck
  • GstController
  • GstNet
  • Gtk
  • GtkSource
  • HarfBuzz
  • Pango
  • PangoCairo
  • PangoFT2
  • PangoFc
  • PangoOT
  • PangoXft
  • Shumate
  • Soup
  • Vte
  • WebKit
  • WebKitWebProcessExtension
  • Xdp
  • XdpGtk4
  • pycairo
GNOME Python API
  • Adw
  • Classes
  • NavigationPage
  • View page source

NavigationPage

Added in version 1.4.

class NavigationPage(**properties: Any)

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

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

props.child: Widget

The child widget.

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

props.title: str

The page title.

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.

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 or showing.

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 or shown.

Added in version 1.4.

showing() → None

Emitted when the page shows at the beginning of the navigation view transition.

It will always be followed by shown or hidden.

Added in version 1.4.

shown() → None

Emitted when the navigation view transition has been completed and the page is fully shown.

It will always be preceded by showing or hiding.

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.

do_showing() → None

Called when the page shows at the beginning of the navigation view transition.

Added in version 1.4.

do_shown() → None

Called when the navigation view transition has been completed and the page is fully shown.

Added in version 1.4.

Fields

class NavigationPage
parent_instance

Built with Sphinx using a theme provided by Read the Docs.
  • NavigationPage
    • Constructors
      • NavigationPage.new()
      • NavigationPage.new_with_tag()
    • Methods
      • 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