Skip to main content

Class: MFDViewService

A service to manage views.

Hierarchy

Constructors

constructor

new MFDViewService(bus): MFDViewService

Constructs the view service.

Parameters

NameTypeDescription
busEventBusThe event bus.

Returns

MFDViewService

Overrides

ViewService.constructor

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

ViewService.activeView

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

ViewService.activeViewKey

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

ViewService.bus

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

ViewService.fmsEventMap

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

ViewService.ignorePageHistory

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

ViewService.openPage

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

ViewService.openPageKey

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

ViewService.pageHistory

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

ViewService.clearPageHistory

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

NameTypeDescription
closePagebooleanWhether to close the currently open page, if one exists.

Returns

void

Inherited from

ViewService.clearStack

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

ViewService.closeActiveView

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

ViewService.closeAllViews

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

ViewService.getOpenViews

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

NameTypeDescription
hEventstringThe 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

NameType
Textends UiView<UiViewProps, any, any> = UiView<UiViewProps, any, any>

Parameters

NameTypeDefault valueDescription
typestringundefinedThe type of the view to open.
isSubViewbooleanfalseA 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

ViewService.open

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

ViewService.openLastPage

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

NameTypeDescription
type?stringThe type of the view.
vnodeFn() => VNodeA function creating the VNode.

Returns

void

Inherited from

ViewService.registerView

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

NameTypeDescription
evtFmsHEventAn 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