Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Rikitav/Terminality/llms.txt
Use this file to discover all available pages before exploring further.
Navigator manages a stack of UI layers so you can overlay full-screen pages on top of the root view — modal flows, detail screens, settings pages — without replacing the root widget. Calling Navigate pushes a new layer, runs a nested event loop inside it, then cleans up automatically when the nested loop exits. The root view regains focus the moment you pop back, with its layout invalidated so it redraws cleanly.
Class: Navigator
The Navigator singleton is lazily created on first access. It has no public constructor; obtain the instance with Navigator::Current().
Current
Navigator instance.
Navigate
page onto the visual layer stack and starts a nested UI loop that runs until the page calls HostApplication::Current().RequestStop() or another layer-exit mechanism. When the nested loop returns, the layer is popped automatically and the previous layer’s root node receives InvalidateMeasure and InvalidateVisual so it repaints correctly.
If page is nullptr, the call is a no-op.
The root node of the page to display. Ownership is transferred to the layer stack.
CanGoBack
true when there is more than one layer on the stack — that is, when there is something to go back to.
true if the layer count is greater than one.GoBack
false if already at the root (nothing to pop).
true if a layer was popped; false if the stack had only one layer.GoHome
InvalidateMeasure and InvalidateVisual.
Navigate vs. NestUILoop
Navigator::Navigate is the recommended high-level API. Internally it calls VisualTree::PushLayer, then HostApplication::NestUILoop, then VisualTree::PopLayer. Use Navigate whenever you want a self-contained modal page. Use HostApplication::NestUILoop directly only when you need precise control over when the nested loop starts and stops — for example, to animate a transition before handing over input.
Navigating between pages
Back button pattern
Returning to the root
Related
HostApplication—RunUILoop,NestUILoop,RequestStopVisualTree—PushLayer,PopLayer,LayerCountFocusManager— focus is preserved per layer