Class PageHost

Class Hierarchy
  • KanziObject
  •  └─ Node
  •        └─ Node2D
  •              └─ Page
  •                    └─ PageHost

Use a PageHost node to group Page and PageHost nodes, and to manage navigation requests and transitions in a tree of Page nodes under a PageHost node.

The role of PageHost nodes in navigation When you set a PageHost node as an ancestor of a Page node, that PageHost node listens for navigation requests from its descendant Page nodes. When a PageHost node receives a navigation request, it starts the navigation process to the Page node which dispatched the message. The navigation process involves resolving the route from the currently active Page or PageHost node to the target Page or PageHost node, and then performing transitions between Page nodes in the navigation route until the target Page or PageHost node is activated. Each PageHost node manages the navigation within its own scope and does not interfere with other PageHost nodes.

Activation tracking PageHost nodes keep track of the currently active Page or PageHost node within their scope. When you activate a PageHost node, that PageHost node automatically activates the currently active Page or PageHost node in its scope. This allows the PageHost node to remember and restore its state during activation to the state before it was deactivated.

Navigating between subpages PageHost nodes contain the functionality to navigate between the next and previous Page and PageHost nodes within their scope. This allows you to build support for navigation using key input. You can further configure this functionality to set whether you want a PageHost node to loop from the last to the first or the first to the last Page node when navigating to the next and the previous Page and PageHost.

Nesting PageHost nodes You can nest PageHost nodes to create the structure of an application user interface. For example, you can have one PageHost node managing the root-level navigation in the application user interface, such as transitions between the Home, Media Browser, Navigation, and Settings, and add to it child PageHost nodes, each of which manages its own hierarchy of Page nodes, such as Media Browser's own Page nodes.

See also Page
Deprecated in Kanzi 4.0.0. Use ExclusiveActivityHost2D instead.

Inherits properties and message types from PageHostMetadata.

Synopsis

Methods
create()

Creates a PageHost node

PageHost.PageHost:create(name)

Creates a PageHost node.

Deprecated In Kanzi 4.0.0. Pages are deprecated, use Activity2D and ExclusiveActivityHost2D instead.
Parameters
name (string)

The name of the node.

Return Values
(PageHost)

The created node.