@jsvision/ui / ChromeHost
Interface: ChromeHost
Defined in: ui/src/router/types.ts:23
The chrome seam an application hands to a router-style body so each screen can define its own status line and menu. A screen calls setStatus/setMenu on activation; passing null falls back to the application's base bar (whatever createApplication was given). The router carries no merge rules — a present contribution fully defines that bar, null restores the base.
Example
// On entering a screen with its own affordances:
chrome.setStatus([statusItem('~Esc~ Back', 'back', 'Escape')]);
chrome.setMenu(null); // this screen keeps the app's base menuMethods
setMenu()
setMenu(
items):void
Defined in: ui/src/router/types.ts:38
Replace the menu bar's top-level items with items, rebuilding its navigation controller; pass null to restore the application's base menu.
Parameters
items
MenuItem[] | null
The top-level menu nodes for the active screen, or null to restore the base.
Returns
void
setStatus()
setStatus(
items):void
Defined in: ui/src/router/types.ts:31
Replace the status line's items with items; pass null to restore the application's base status line (whatever createApplication({ statusLine }) was given). Swapped-in command items are re-wired so their greyed/enabled state stays correct.
Parameters
items
View[] | null
The status items/spacers for the active screen, or null to restore the base.
Returns
void