Class: PFDViewService
Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/PFD/Components/UI/PFDViewService.ts:17
A service to manage views.
Extends
Constructors
Constructor
new PFDViewService(
bus
):PFDViewService
Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/PFD/Components/UI/PFDViewService.ts:39
Constructs the view service.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
Returns
PFDViewService
Overrides
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
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
bus
readonly
bus:EventBus
Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/PFD/Components/UI/PFDViewService.ts:39
The event bus.
Inherited from
fmsEventMap
protected
readonly
fmsEventMap:Map
<string
,FmsHEvent
>
Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/PFD/Components/UI/PFDViewService.ts:19
override in child class
Overrides
ignorePageHistory
protected
ignorePageHistory:boolean
=false
Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ViewService.ts:39
Inherited from
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
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
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
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
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
Parameter | Type | Description |
---|---|---|
closePage | boolean | Whether to close the currently open page, if one exists. |
Returns
void
Inherited from
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
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
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
onInteractionEvent()
protected
onInteractionEvent(hEvent
):boolean
Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/PFD/Components/UI/PFDViewService.ts:58
Routes the HEvents to the views.
Parameters
Parameter | Type | Description |
---|---|---|
hEvent | string | The event identifier. |
Returns
boolean
whether the event was handled
Overrides
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 Parameter | Default type |
---|---|
T extends UiView <UiViewProps , any , any > | UiView <UiViewProps , any , any > |
Parameters
Parameter | 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
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
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
Parameter | Type | Description |
---|---|---|
type? | string | The type of the view. |
vnodeFn? | () => VNode | A function creating the VNode. |
Returns
void
Inherited from
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
Parameter | Type | Description |
---|---|---|
evt | FmsHEvent | An interaction event. |
Returns
boolean
Whether the event was handled.