Klasse NavigationPage

Alle implementierten Schnittstellen:
PointerInterface

public class NavigationPage extends Widget
A page within [class@NavigationView] or [class@NavigationSplitView].

Each page has a child widget, a title and optionally a tag.

The [signal@NavigationPage::showing], [signal@NavigationPage::shown],
[signal@NavigationPage::hiding] and [signal@NavigationPage::hidden] signals
can be used to track the page's visibility within its `AdwNavigationView`.

## Header Bar Integration

When placed inside `AdwNavigationPage`, [class@HeaderBar] will display the
page title instead of window title.

When used together with [class@NavigationView], it will also display a back
button that can be used to go back to the previous page. Set
[property@HeaderBar: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.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationPage.html

  • Felddetails

  • Konstruktordetails

    • NavigationPage

      public NavigationPage(PointerContainer pointer)
    • NavigationPage

      public NavigationPage(@Nonnull Widget child, @Nonnull Str title)
      Creates a new `AdwNavigationPage`.
      Parameter:
      child - the child widget
      title - the page title
    • NavigationPage

      public NavigationPage(@Nonnull Widget child, String title)
      Creates a new `AdwNavigationPage`.
      Parameter:
      child - the child widget
      title - the page title
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newWithTagNavigationPage

      public static NavigationPage newWithTagNavigationPage(@Nonnull Widget child, @Nonnull Str title, @Nonnull Str tag)
      Creates a new `AdwNavigationPage` with provided tag.
      Parameter:
      child - the child widget
      title - the page title
      tag - the page tag
      Gibt zurück:
      the new created `AdwNavigationPage`
    • newWithTagNavigationPage

      public static NavigationPage newWithTagNavigationPage(@Nonnull Widget child, String title, String tag)
      Creates a new `AdwNavigationPage` with provided tag.
      Parameter:
      child - the child widget
      title - the page title
      tag - the page tag
      Gibt zurück:
      the new created `AdwNavigationPage`
    • getCanPop

      public boolean getCanPop()
      Gets whether @self can be popped from navigation stack.
      Gibt zurück:
      whether the page can be popped from navigation stack
    • getChild

      public Widget getChild()
      Gets the child widget of @self.
      Gibt zurück:
      the child widget of @self
    • getTag

      public Str getTag()
      Gets the tag of @self.
      Gibt zurück:
      the page tag
    • getTitle

      public Str getTitle()
      Gets the title of @self.
      Gibt zurück:
      the title of @self
    • setCanPop

      public void setCanPop(boolean can_pop)
      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 [class@HeaderBar].

      Manually calling [method@NavigationView.pop] or using the `navigation.pop`
      action will still work.

      See [property@HeaderBar:show-back-button] for removing only the back button,
      but not shortcuts.
      Parameter:
      can_pop - whether the page can be popped from navigation stack
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child widget of @self.
      Parameter:
      child - the child widget
    • setTag

      public void setTag(@Nullable Str tag)
      Sets the tag for @self.

      The tag can be used to retrieve the page with
      [method@NavigationView.find_page], as well as with
      [method@NavigationView.push_by_tag], [method@NavigationView.pop_to_tag] or
      [method@NavigationView.replace_with_tags].

      Tags must be unique within each [class@NavigationView].

      The tag also must be set to use the `navigation.push` action.
      Parameter:
      tag - the page tag
    • setTag

      public void setTag(String tag)
      Sets the tag for @self.

      The tag can be used to retrieve the page with
      [method@NavigationView.find_page], as well as with
      [method@NavigationView.push_by_tag], [method@NavigationView.pop_to_tag] or
      [method@NavigationView.replace_with_tags].

      Tags must be unique within each [class@NavigationView].

      The tag also must be set to use the `navigation.push` action.
      Parameter:
      tag - the page tag
    • setTitle

      public void setTitle(@Nonnull Str title)
      Sets the title of @self.

      It's displayed in [class@HeaderBar] instead of the window title, and used as
      the tooltip on the next page's back button, as well as by screen reader.
      Parameter:
      title - the title
    • setTitle

      public void setTitle(String title)
      Sets the title of @self.

      It's displayed in [class@HeaderBar] instead of the window title, and used as
      the tooltip on the next page's back button, as well as by screen reader.
      Parameter:
      title - the title
    • onHidden

      public SignalHandler onHidden(NavigationPage.OnHidden signal)
      Connect to signal "hidden".
      See NavigationPage.OnHidden.onHidden() for signal description.
      Field SIGNAL_ON_HIDDEN contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onHiding

      public SignalHandler onHiding(NavigationPage.OnHiding signal)
      Connect to signal "hiding".
      See NavigationPage.OnHiding.onHiding() for signal description.
      Field SIGNAL_ON_HIDING contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onShowing

      public SignalHandler onShowing(NavigationPage.OnShowing signal)
      Connect to signal "showing".
      See NavigationPage.OnShowing.onShowing() for signal description.
      Field SIGNAL_ON_SHOWING contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onShown

      public SignalHandler onShown(NavigationPage.OnShown signal)
      Connect to signal "shown".
      See NavigationPage.OnShown.onShown() for signal description.
      Field SIGNAL_ON_SHOWN contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Setzt außer Kraft:
      asAccessible in Klasse Widget
      Gibt zurück:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Setzt außer Kraft:
      asBuildable in Klasse Widget
      Gibt zurück:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Setzt außer Kraft:
      asConstraintTarget in Klasse Widget
      Gibt zurück:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()