Class: MFDViewService
A service to manage views.
Hierarchy
↳
MFDViewService
Constructors
constructor
• new MFDViewService(bus
): MFDViewService
Constructs the view service.
Parameters
Name | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
Returns
Overrides
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/MFD/Components/UI/MFDViewService.ts:40
Properties
activeView
• Readonly
activeView: Subscribable
<null
| UiView
<UiViewProps
, any
, any
>>
The currently active view.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:36
activeViewKey
• Readonly
activeViewKey: Subscribable
<string
>
The key of the currently active view.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:34
bus
• Readonly
bus: EventBus
The event bus.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/MFD/Components/UI/MFDViewService.ts:40
fmsEventMap
• Protected
Readonly
fmsEventMap: Map
<string
, FmsHEvent
>
override in child class
Overrides
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/MFD/Components/UI/MFDViewService.ts:15
ignorePageHistory
• Protected
ignorePageHistory: boolean
= false
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:39
openPage
• Readonly
openPage: Subscribable
<null
| UiPage
<UiPageProps
>>
The currently open page.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:30
openPageKey
• Readonly
openPageKey: Subscribable
<string
>
The key of the currently open page.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:28
pageHistory
• Protected
Readonly
pageHistory: ViewEntry
<UiView
<UiViewProps
, any
, any
>>[] = []
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:38
Methods
clearPageHistory
▸ clearPageHistory(): void
Clears this view service's page history.
Returns
void
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:231
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
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:253
closeActiveView
▸ closeActiveView(): void
Closes the currently active view.
Returns
void
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:238
closeAllViews
▸ closeAllViews(): void
Closes all open views except for the currently open page, if one exists.
Returns
void
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:245
getOpenViews
▸ getOpenViews(): readonly UiView
<UiViewProps
, any
, any
>[]
Gets an array of all currently open views.
Returns
readonly UiView
<UiViewProps
, any
, any
>[]
an array of all currently open views.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:93
onInteractionEvent
▸ onInteractionEvent(hEvent
): boolean
Routes the HEvents to the views.
Parameters
Name | Type | Description |
---|---|---|
hEvent | string | The event identifier. |
Returns
boolean
whether the event was handled
Inherited from
ViewService.onInteractionEvent
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:64
open
▸ open<T
>(type
, isSubView?
): T
Opens a view. The opened view can be a page, regular view, or subview. Opening a page will close all other views, including the currently open page. Opening a regular view will close all other views except the currently open page. Opening a subview does not close any other views. The opened view will immediately become the active view, and the previously active view (if one exists) will be paused.
Type parameters
Name | Type |
---|---|
T | extends UiView <UiViewProps , any , any > = UiView <UiViewProps , any , any > |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
type | string | undefined | The type of the view to open. |
isSubView | boolean | false | A boolean indicating if the view to be opened is a subview. |
Returns
T
The view that was opened.
Throws
Error if the view type is not registered with this service.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:117
openLastPage
▸ openLastPage(): null
| UiPage
<UiPageProps
>
Opens the page that was most recently closed.
Returns
null
| UiPage
<UiPageProps
>
The page that was opened.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:217
registerView
▸ registerView(type?
, vnodeFn
): void
Registers a view with the service.
Parameters
Name | Type | Description |
---|---|---|
type? | string | The type of the view. |
vnodeFn | () => VNode | A function creating the VNode. |
Returns
void
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:102
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 | FmsHEvent | An interaction event. |
Returns
boolean
Whether the event was handled.
Inherited from
ViewService.routeInteractionEventToViews
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:81