Class: MfdLwrMenuViewService
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/MFD/Menus/MfdLwrMenuViewService.ts:29
A service to manage mfd lower menu views.
Extends
Constructors
Constructor
new MfdLwrMenuViewService(
bus,instrumentConfig,wt21ControlPublisher,mapSettingsManager,mfdSettingManager,otherMenuServices):MfdLwrMenuViewService
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/MFD/Menus/MfdLwrMenuViewService.ts:65
MfdLwrMenuViewService constructor
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
bus | EventBus | undefined | the event bus |
instrumentConfig | InstrumentConfig | undefined | The instrument config object |
wt21ControlPublisher | WTLineControlPublisher | undefined | the WT21 control publisher |
mapSettingsManager | UserSettingManager<MapSettingsMfdAliased> | undefined | The map settings manager |
mfdSettingManager | UserSettingManager<MFDSettingsAliased> | undefined | The mfd settings manager |
otherMenuServices | MenuViewService<Record<string, unknown>>[] | [] | Other menus on this screen that should be closed when this menu is opened |
Returns
MfdLwrMenuViewService
Overrides
Properties
activeView
readonlyactiveView:Subscribable<null|GuiDialog<GuiDialogProps>>
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:28
The currently active view.
Inherited from
activeViewKey
readonlyactiveViewKey:Subscribable<""|"MfdLwrOverlaysMenu"|"MfdLwrMapSymbolsMenu"|"MfdLwrMenu">
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:26
The key of the currently active view.
Inherited from
guiEventMap
protectedreadonlyguiEventMap:Map<string,GuiHEvent>
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/MFD/Menus/MfdLwrMenuViewService.ts:30
override in child class
Overrides
interactionTimeoutId
protectedinteractionTimeoutId:null|number=null
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:34
Tracks the current timeout timer, used for closing the menu after 10 seconds of inactivity.
Inherited from
MenuViewService.interactionTimeoutId
otherMenuServices
readonlyotherMenuServices:MenuViewService<Record<string,unknown>>[] =[]
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/MFD/Menus/MfdLwrMenuViewService.ts:71
Other menus on this screen that should be closed when this menu is opened
Methods
clearStack()
protectedclearStack(closePage):void
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:152
Closes all open views and clears the stack.
Parameters
| Parameter | Type | Description |
|---|---|---|
closePage | boolean | Whether to close the currently open page, if one exists. |
Returns
void
Inherited from
onInteractionEvent()
onInteractionEvent(
hEvent,instrumentIndex):boolean
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/MFD/Menus/MfdLwrMenuViewService.ts:89
Routes the HEvents to the views.
Parameters
| Parameter | Type | Description |
|---|---|---|
hEvent | string | The event identifier. |
instrumentIndex | number | The index of the instrument. |
Returns
boolean
Whether the event was handled.
Overrides
MenuViewService.onInteractionEvent
open()
open<
T>(type):T
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:84
Opens a view. Opening a page will close all other views,
Type Parameters
| Type Parameter |
|---|
T extends GuiDialog<GuiDialogProps> |
Parameters
| Parameter | 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
registerView()
registerView(
type?,vnodeFn?):void
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:175
Registers a view with the service.
Parameters
| Parameter | Type | Description |
|---|---|---|
type? | "MfdLwrOverlaysMenu" | "MfdLwrMapSymbolsMenu" | "MfdLwrMenu" | The type of the view. |
vnodeFn? | () => VNode | A function creating the VNode. |
Returns
void
Inherited from
routeInteractionEventToViews()
protectedrouteInteractionEventToViews(evt):boolean
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:69
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
| Parameter | Type | Description |
|---|---|---|
evt | GuiHEvent | An interaction event. |
Returns
boolean
Whether the event was handled.
Inherited from
MenuViewService.routeInteractionEventToViews
startInteractionTimeout()
protectedstartInteractionTimeout():void
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:181
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