Skip to main content

Class: MFDViewService

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/MFD/Components/UI/MFDViewService.ts:10

A service to manage views.

Extends

Constructors

Constructor

new MFDViewService(bus): MFDViewService

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/MFD/Components/UI/MFDViewService.ts:40

Constructs the view service.

Parameters

ParameterTypeDescription
busEventBusThe event bus.

Returns

MFDViewService

Overrides

ViewService.constructor

Properties

activeView

readonly activeView: Subscribable<null | UiView<UiViewProps, any, any>>

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:36

The currently active view.

Inherited from

ViewService.activeView


activeViewKey

readonly activeViewKey: Subscribable<string>

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:34

The key of the currently active view.

Inherited from

ViewService.activeViewKey


bus

readonly bus: EventBus

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/MFD/Components/UI/MFDViewService.ts:40

The event bus.

Inherited from

ViewService.bus


fmsEventMap

protected readonly fmsEventMap: Map<string, FmsHEvent>

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/MFD/Components/UI/MFDViewService.ts:15

override in child class

Overrides

ViewService.fmsEventMap


ignorePageHistory

protected ignorePageHistory: boolean = false

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:39

Inherited from

ViewService.ignorePageHistory


openPage

readonly openPage: Subscribable<null | UiPage<UiPageProps>>

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:30

The currently open page.

Inherited from

ViewService.openPage


openPageKey

readonly openPageKey: Subscribable<string>

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:28

The key of the currently open page.

Inherited from

ViewService.openPageKey


pageHistory

protected readonly pageHistory: ViewEntry<UiView<UiViewProps, any, any>>[] = []

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:38

Inherited from

ViewService.pageHistory

Methods

clearPageHistory()

clearPageHistory(): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:231

Clears this view service's page history.

Returns

void

Inherited from

ViewService.clearPageHistory


clearStack()

protected clearStack(closePage): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:253

Closes all open views and clears the stack.

Parameters

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

Returns

void

Inherited from

ViewService.clearStack


closeActiveView()

closeActiveView(): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:238

Closes the currently active view.

Returns

void

Inherited from

ViewService.closeActiveView


closeAllViews()

closeAllViews(): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:245

Closes all open views except for the currently open page, if one exists.

Returns

void

Inherited from

ViewService.closeAllViews


getOpenViews()

getOpenViews(): readonly UiView<UiViewProps, any, any>[]

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:93

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


onInteractionEvent()

protected onInteractionEvent(hEvent): boolean

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:64

Routes the HEvents to the views.

Parameters

ParameterTypeDescription
hEventstringThe event identifier.

Returns

boolean

whether the event was handled

Inherited from

ViewService.onInteractionEvent


open()

open<T>(type, isSubView): T

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:117

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

Type ParameterDefault type
T extends UiView<UiViewProps, any, any>UiView<UiViewProps, any, any>

Parameters

ParameterTypeDefault 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


openLastPage()

openLastPage(): null | UiPage<UiPageProps>

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:217

Opens the page that was most recently closed.

Returns

null | UiPage<UiPageProps>

The page that was opened.

Inherited from

ViewService.openLastPage


registerView()

registerView(type?, vnodeFn?): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:102

Registers a view with the service.

Parameters

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

Returns

void

Inherited from

ViewService.registerView


routeInteractionEventToViews()

protected routeInteractionEventToViews(evt): boolean

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:81

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

ParameterTypeDescription
evtFmsHEventAn interaction event.

Returns

boolean

Whether the event was handled.

Inherited from

ViewService.routeInteractionEventToViews