layouts/actions
The controls a layout offers besides the catalog's panels (panels/catalog.ts),
decided once for every layout: which of them the session allows and this page
can use, what each is called, its mark, its state, and what pressing it does.
A layout only places them, the sidebar as tiles and header buttons, the toolbar
in its bar, and a new layout takes the same list. Each control carries the
class the suites and the core find it by, whichever layout draws it. The
events every layout's chrome answers (Ctrl+Shift+M, gaming mode, fullscreen)
arrive through useChromeEvents.
Interfaces
Action
Defined in: layouts/actions.ts:34
One control a layout places.
Properties
className
className: string;Defined in: layouts/actions.ts:36
The class the suites and the core find the control by.
label
label: string;Defined in: layouts/actions.ts:38
Its accessible name.
title
title: string;Defined in: layouts/actions.ts:40
What hovering it explains, where that says more than the name.
icon
icon: ComponentType<{
className?: string;
}>;Defined in: layouts/actions.ts:41
active?
active?: boolean;Defined in: layouts/actions.ts:43
A toggle's state; absent for a plain action.
run
run: () => void;Defined in: layouts/actions.ts:44
Returns
void
Actions
Defined in: layouts/actions.ts:48
What every layout may place. A control the session or the client rules out is null, or left out.
Properties
streams
streams: StreamSpec[];Defined in: layouts/actions.ts:50
The stream switches this page may use; none on a second display's page.
touchGamepad
touchGamepad: Action;Defined in: layouts/actions.ts:52
A touch client's own, once the page has seen a touch: the touch gamepad (on the primary's page).
trackpad
trackpad: Action;Defined in: layouts/actions.ts:54
Trackpad mode on a touch client.
keyboardButton
keyboardButton: Action;Defined in: layouts/actions.ts:56
The floating button that pops the system's on-screen keyboard, on a touch client.
softKeys
softKeys: boolean;Defined in: layouts/actions.ts:58
Whether a touch client gets the soft keys: the keys, or with only the trackpad allowed its speed while it is on.
fullscreen
fullscreen: Action;Defined in: layouts/actions.ts:59
gamingMode
gamingMode: Action;Defined in: layouts/actions.ts:60
stats
stats: Action;Defined in: layouts/actions.ts:62
The stats over the stream, on the primary's page.
cite
cite: boolean;Defined in: layouts/actions.ts:64
The citation link at the layout's foot, which goes with the shortcuts.
ChromeEvents
Defined in: layouts/actions.ts:106
How a layout's chrome answers the events every layout meets (useChromeEvents).
Properties
open
open: boolean;Defined in: layouts/actions.ts:108
Whether its chrome is open over the stream now, which the core is told.
onToggle
onToggle: () => void;Defined in: layouts/actions.ts:110
Ctrl+Shift+M, owned by the core: show or hide the chrome.
Returns
void
onGamingMode?
onGamingMode?: () => void;Defined in: layouts/actions.ts:112
Gaming mode starting: the chrome steps out of the game's way.
Returns
void
onFullscreen?
onFullscreen?: () => void;Defined in: layouts/actions.ts:114
The page entering fullscreen, from any source: the user lands in the session.
Returns
void
Functions
FullscreenIcon()
function FullscreenIcon(props): CElement<{
className?: string;
viewBox: string;
}, Component<{
className?: string;
viewBox: string;
}, any, any>>;Defined in: layouts/actions.ts:29
Maximize drawn to the crosshair's circle: its corners stop a unit inside that circle, so drawn to its extent the two read as one size beside each other.
Parameters
| Parameter | Type |
|---|---|
props | { className?: string; } |
props.className? | string |
Returns
CElement<{
className?: string;
viewBox: string;
}, Component<{
className?: string;
viewBox: string;
}, any, any>>
useActions()
function useActions(): Actions;Defined in: layouts/actions.ts:68
The controls this page offers now; see Actions.
Returns
useChromeEvents()
function useChromeEvents(events): void;Defined in: layouts/actions.ts:122
Wires a layout's chrome to the core's messages and the page's fullscreen, and tells the core while the chrome is open. The handlers may change between renders; the latest ones answer.
Parameters
| Parameter | Type |
|---|---|
events | ChromeEvents |
Returns
void