:right-sidebar: True NavigationPage =================================================================== .. currentmodule:: gi.repository.Adw .. versionadded:: 1.4 .. class:: NavigationPage(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.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 ------------ .. rst-class:: interim-class .. class:: NavigationPage :no-index: .. classmethod:: new(child: ~gi.repository.Gtk.Widget, title: str) -> ~gi.repository.Adw.NavigationPage Creates a new ``AdwNavigationPage``. .. versionadded:: 1.4 :param child: the child widget :param title: the page title .. classmethod:: new_with_tag(child: ~gi.repository.Gtk.Widget, title: str, tag: str) -> ~gi.repository.Adw.NavigationPage Creates a new ``AdwNavigationPage`` with provided tag. .. versionadded:: 1.4 :param child: the child widget :param title: the page title :param tag: the page tag Methods ------- .. rst-class:: interim-class .. class:: NavigationPage :no-index: .. method:: get_can_pop() -> bool Gets whether ``self`` can be popped from navigation stack. .. versionadded:: 1.4 .. method:: get_child() -> ~gi.repository.Gtk.Widget | None Gets the child widget of ``self``. .. versionadded:: 1.4 .. method:: get_tag() -> str | None Gets the tag of ``self``. .. versionadded:: 1.4 .. method:: get_title() -> str Gets the title of ``self``. .. versionadded:: 1.4 .. method:: 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 :obj:`~gi.repository.Adw.HeaderBar`. Manually calling :obj:`~gi.repository.NavigationView.pop` or using the ``navigation.pop`` action will still work. See :obj:`~gi.repository.Adw.HeaderBar.props.show_back_button` for removing only the back button, but not shortcuts. .. versionadded:: 1.4 :param can_pop: whether the page can be popped from navigation stack .. method:: set_child(child: ~gi.repository.Gtk.Widget | None = None) -> None Sets the child widget of ``self``. .. versionadded:: 1.4 :param child: the child widget .. method:: set_tag(tag: str | None = None) -> None Sets the tag for ``self``. The tag can be used to retrieve the page with :obj:`~gi.repository.NavigationView.find_page`, as well as with :obj:`~gi.repository.NavigationView.push_by_tag`, :obj:`~gi.repository.NavigationView.pop_to_tag` or :obj:`~gi.repository.NavigationView.replace_with_tags`. Tags must be unique within each :obj:`~gi.repository.Adw.NavigationView`. The tag also must be set to use the ``navigation.push`` action. .. versionadded:: 1.4 :param tag: the page tag .. method:: set_title(title: str) -> None Sets the title of ``self``. It's displayed in :obj:`~gi.repository.Adw.HeaderBar` instead of the window title, and used as the tooltip on the next page's back button, as well as by screen reader. .. versionadded:: 1.4 :param title: the title Properties ---------- .. rst-class:: interim-class .. class:: NavigationPage :no-index: .. attribute:: props.can_pop :type: 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 :obj:`~gi.repository.Adw.HeaderBar`. Manually calling :obj:`~gi.repository.NavigationView.pop` or using the ``navigation.pop`` action will still work. See :obj:`~gi.repository.Adw.HeaderBar.props.show_back_button` for removing only the back button, but not shortcuts. .. versionadded:: 1.4 .. attribute:: props.child :type: ~gi.repository.Gtk.Widget The child widget. .. versionadded:: 1.4 .. attribute:: props.tag :type: str The page tag. The tag can be used to retrieve the page with :obj:`~gi.repository.NavigationView.find_page`, as well as with :obj:`~gi.repository.NavigationView.push_by_tag`, :obj:`~gi.repository.NavigationView.pop_to_tag` or :obj:`~gi.repository.NavigationView.replace_with_tags`. Tags must be unique within each :obj:`~gi.repository.Adw.NavigationView`. The tag also must be set to use the ``navigation.push`` action. .. versionadded:: 1.4 .. attribute:: props.title :type: str The page title. It's displayed in :obj:`~gi.repository.Adw.HeaderBar` instead of the window title, and used as the tooltip on the next page's back button, as well as by screen reader. .. versionadded:: 1.4 Signals ------- .. rst-class:: interim-class .. class:: NavigationPage.signals :no-index: .. method:: hidden() -> None Emitted when the navigation view transition has been completed and the page is fully hidden. It will always be preceded by :obj:`~gi.repository.Adw.NavigationPage.signals.hiding` or :obj:`~gi.repository.Adw.NavigationPage.signals.showing`. .. versionadded:: 1.4 .. method:: hiding() -> None Emitted when the page starts hiding at the beginning of the navigation view transition. It will always be followed by :obj:`~gi.repository.Adw.NavigationPage.signals.hidden` or :obj:`~gi.repository.Adw.NavigationPage.signals.shown`. .. versionadded:: 1.4 .. method:: showing() -> None Emitted when the page shows at the beginning of the navigation view transition. It will always be followed by :obj:`~gi.repository.Adw.NavigationPage.signals.shown` or :obj:`~gi.repository.Adw.NavigationPage.signals.hidden`. .. versionadded:: 1.4 .. method:: shown() -> None Emitted when the navigation view transition has been completed and the page is fully shown. It will always be preceded by :obj:`~gi.repository.Adw.NavigationPage.signals.showing` or :obj:`~gi.repository.Adw.NavigationPage.signals.hiding`. .. versionadded:: 1.4 Virtual Methods --------------- .. rst-class:: interim-class .. class:: NavigationPage :no-index: .. method:: do_hidden() -> None Called when the navigation view transition has been completed and the page is fully hidden. .. versionadded:: 1.4 .. method:: do_hiding() -> None Called when the page starts hiding at the beginning of the navigation view transition. .. versionadded:: 1.4 .. method:: do_showing() -> None Called when the page shows at the beginning of the navigation view transition. .. versionadded:: 1.4 .. method:: do_shown() -> None Called when the navigation view transition has been completed and the page is fully shown. .. versionadded:: 1.4 Fields ------ .. rst-class:: interim-class .. class:: NavigationPage :no-index: .. attribute:: parent_instance