Class: MfdLwrMenuViewService
A service to manage mfd lower menu views.
Hierarchy
MenuViewService
<MfdLwrMenuViewKeys
>↳
MfdLwrMenuViewService
Constructors
constructor
• new MfdLwrMenuViewService(bus
, displayUnitConfig
, displayUnitIndex
, wt21ControlPublisher
, otherMenuServices?
): MfdLwrMenuViewService
MfdLwrMenuViewService constructor
Parameters
Name | Type | Default value | Description |
---|---|---|---|
bus | EventBus | undefined | the event bus |
displayUnitConfig | DisplayUnitConfigInterface | undefined | the display unit config |
displayUnitIndex | WT21DisplayUnitIndex | undefined | the display unit index |
wt21ControlPublisher | WT21ControlPublisher | undefined | the WT21 control publisher |
otherMenuServices | MenuViewService <Record <string , unknown >>[] | [] | Other menus on this screen that should be closed when this menu is opened |
Returns
Overrides
MenuViewService\<MfdLwrMenuViewKeys\>.constructor
Defined in
workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/MFD/Menus/MfdLwrMenuViewService.ts:65
Properties
activeView
• Readonly
activeView: Subscribable
<null
| GuiDialog
<GuiDialogProps
>>
The currently active view.
Inherited from
MenuViewService.activeView
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:28
activeViewKey
• Readonly
activeViewKey: Subscribable
<""
| "MfdLwrOverlaysMenu"
| "MfdLwrMapSymbolsMenu"
| "MfdLwrMenu"
>
The key of the currently active view.
Inherited from
MenuViewService.activeViewKey
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:26
guiEventMap
• Protected
Readonly
guiEventMap: Map
<string
, GuiHEvent
>
Overrides
MenuViewService.guiEventMap
Defined in
workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/MFD/Menus/MfdLwrMenuViewService.ts:29
interactionTimeoutId
• Protected
interactionTimeoutId: null
| number
= null
Tracks the current timeout timer, used for closing the menu after 10 seconds of inactivity.
Inherited from
MenuViewService.interactionTimeoutId
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:34
otherMenuServices
• Readonly
otherMenuServices: MenuViewService
<Record
<string
, unknown
>>[] = []
Other menus on this screen that should be closed when this menu is opened
Defined in
workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/MFD/Menus/MfdLwrMenuViewService.ts:70
Methods
clearStack
▸ clearStack(closePage
): void
Closes all open views and clears the stack.
Parameters
Name | Type | Description |
---|---|---|
closePage | boolean | Whether to close the currently open page, if one exists. |
Returns
void
Inherited from
MenuViewService.clearStack
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:149
onInteractionEvent
▸ onInteractionEvent(hEvent
, instrumentIndex
): boolean
Parameters
Name | Type |
---|---|
hEvent | string |
instrumentIndex | number |
Returns
boolean
Inherit Doc
Overrides
MenuViewService.onInteractionEvent
Defined in
workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/MFD/Menus/MfdLwrMenuViewService.ts:88
open
▸ open<T
>(type
): T
Opens a view. Opening a page will close all other views,
Type parameters
Name | Type |
---|---|
T | extends GuiDialog <GuiDialogProps > |
Parameters
Name | Type | Description |
---|---|---|
type | "MfdLwrOverlaysMenu" | "MfdLwrMapSymbolsMenu" | "MfdLwrMenu" | The type of the view to open. |
Returns
T
The view that was opened.
Throws
Error if the view type is not registered with this service.
Inherited from
MenuViewService.open
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:82
registerView
▸ registerView(type?
, vnodeFn
): void
Registers a view with the service.
Parameters
Name | Type | Description |
---|---|---|
type? | "MfdLwrOverlaysMenu" | "MfdLwrMapSymbolsMenu" | "MfdLwrMenu" | The type of the view. |
vnodeFn | () => VNode | A function creating the VNode. |
Returns
void
Inherited from
MenuViewService.registerView
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:172
routeInteractionEventToViews
▸ routeInteractionEventToViews(evt
): boolean
Routes an interaction to the active view, and if it is not handled, re-routes the interaction to the currently open page if it exists and is not the active view.
Parameters
Name | Type | Description |
---|---|---|
evt | GuiHEvent | An interaction event. |
Returns
boolean
Whether the event was handled.
Inherited from
MenuViewService.routeInteractionEventToViews
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:67
startInteractionTimeout
▸ startInteractionTimeout(): void
Starts/resets a 10 second timer, which will close the menu when finished. Call this function whenever there is an interaction with the menu.
Returns
void
Inherited from
MenuViewService.startInteractionTimeout
Defined in
workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:178