Class: PfdMenuViewService
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/PFD/Menus/PfdMenuViewService.ts:45
A service to manage pfd menu views.
Extends
MenuViewService
<PfdMenuViewKeys
>
Constructors
Constructor
new PfdMenuViewService(
bus
,displayUnitConfig
,courseNeedleNavIndicator
):PfdMenuViewService
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/PFD/Menus/PfdMenuViewService.ts:52
Ctor
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | the event bus |
displayUnitConfig | DisplayUnitConfigInterface | the display unit config for the PFD |
courseNeedleNavIndicator | WT21CourseNeedleNavIndicator | the course needle nav indicator, used to perform nav swap on PRESET LSK press |
Returns
PfdMenuViewService
Overrides
MenuViewService<PfdMenuViewKeys>.constructor
Properties
activeView
readonly
activeView:Subscribable
<null
|GuiDialog
<GuiDialogProps
>>
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:28
The currently active view.
Inherited from
MenuViewService.activeView
activeViewKey
readonly
activeViewKey:Subscribable
<""
|"BrgSrcMenu"
|"PfdConfigMenu"
|"PfdOverlaysMenu"
|"PfdRefsMenu"
|"PfdBaroSetMenu"
|"PfdMenu"
|"PfdSideButtonsNavBrgSrcMenu"
|"PfdSideButtonsRefs1Menu"
|"PfdSideButtonsRefs2Menu"
>
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:26
The key of the currently active view.
Inherited from
MenuViewService.activeViewKey
guiEventMap
protected
readonly
guiEventMap:Map
<string
,GuiHEvent
>
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/PFD/Menus/PfdMenuViewService.ts:78
override in child class
Overrides
MenuViewService.guiEventMap
interactionTimeoutId
protected
interactionTimeoutId: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
Methods
clearStack()
protected
clearStack(closePage
):void
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:149
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
MenuViewService.clearStack
onInteractionEvent()
onInteractionEvent(
hEvent
):boolean
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/PFD/Menus/PfdMenuViewService.ts:98
Parameters
Parameter | Type |
---|---|
hEvent | string |
Returns
boolean
Inherit Doc
Overrides
MenuViewService.onInteractionEvent
open()
open<
T
>(type
):T
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:82
Opens a view. Opening a page will close all other views,
Type Parameters
Type Parameter |
---|
T extends GuiDialog <GuiDialogProps > |
Parameters
Parameter | Type | Description |
---|---|---|
type | "BrgSrcMenu" | "PfdConfigMenu" | "PfdOverlaysMenu" | "PfdRefsMenu" | "PfdBaroSetMenu" | "PfdMenu" | "PfdSideButtonsNavBrgSrcMenu" | "PfdSideButtonsRefs1Menu" | "PfdSideButtonsRefs2Menu" | 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
registerView()
registerView(
type?
,vnodeFn?
):void
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:172
Registers a view with the service.
Parameters
Parameter | Type | Description |
---|---|---|
type? | "BrgSrcMenu" | "PfdConfigMenu" | "PfdOverlaysMenu" | "PfdRefsMenu" | "PfdBaroSetMenu" | "PfdMenu" | "PfdSideButtonsNavBrgSrcMenu" | "PfdSideButtonsRefs1Menu" | "PfdSideButtonsRefs2Menu" | The type of the view. |
vnodeFn? | () => VNode | A function creating the VNode. |
Returns
void
Inherited from
MenuViewService.registerView
routeInteractionEventToViews()
protected
routeInteractionEventToViews(evt
):boolean
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:67
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()
protected
startInteractionTimeout():void
Defined in: workingtitle-instruments-wt21/shared/UI/MenuViewService.ts:178
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