Skip to main content

Class: DisplayPaneUtils

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:7

Collection of functions for working with Display Panes.

Constructors

Constructor

new DisplayPaneUtils(): DisplayPaneUtils

Returns

DisplayPaneUtils

Properties

ALL_INDEXES

readonly static ALL_INDEXES: readonly [LeftPfdInstrument, LeftPfd, LeftMfd, RightMfd, RightPfd, RightPfdInstrument]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:9

An array of indexes of all display panes.


CONTROLLABLE_INDEXES

readonly static CONTROLLABLE_INDEXES: readonly [LeftPfd, LeftMfd, RightMfd, RightPfd]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:19

An array of indexes of display panes that are controllable by GTCs.


MFD_INDEXES

readonly static MFD_INDEXES: readonly [LeftMfd, RightMfd]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:39

An array of indexes of MFD display panes.


PFD_INDEXES

readonly static PFD_INDEXES: readonly [LeftPfd, RightPfd]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:33

An array of indexes of PFD display panes.


PFD_INSTRUMENT_INDEXES

readonly static PFD_INSTRUMENT_INDEXES: readonly [LeftPfdInstrument, RightPfdInstrument]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:27

An array of indexes of PFD instrument display panes.

Methods

getAvailableControllablePanes()

static getAvailableControllablePanes(enabledPaneIndexes, otherGtcSelectedPaneIndex, displayPaneSettingManager): readonly ControllableDisplayPaneIndex[]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:118

Gets an array of indexes of controllable display panes that are available to be selected by a display pane-controlling GTC.

Parameters

ParameterTypeDescription
enabledPaneIndexesreadonly ControllableDisplayPaneIndex[]An array containing the indexes of all enabled controllable display panes in ascending order.
otherGtcSelectedPaneIndex-1 | ControllableDisplayPaneIndexThe index of the display pane selected by the left display pane-controlling GTC, or -1 if the GTC has not selected a pane.
displayPaneSettingManagerUserSettingManager<DisplayPaneAllUserSettingTypes>A manager for all display pane user settings.

Returns

readonly ControllableDisplayPaneIndex[]

An array of indexes of controllable display panes that are available to be selected in ascending order.


getControllablePaneToSelect()

static getControllablePaneToSelect(controlGtcIndex, desiredPaneIndex, availablePanes): -1 | ControllableDisplayPaneIndex

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:138

Gets the controllable display pane that should be selected when a GTC attempts to select a desired pane.

Parameters

ParameterTypeDescription
controlGtcIndexDisplayPaneControlGtcIndexThe display pane control index of the GTC that is attempting to select a desired pane.
desiredPaneIndex-1 | ControllableDisplayPaneIndexThe index of the desired pane to select, or -1 if the GTC is attempting to clear its selected pane.
availablePanesreadonly ControllableDisplayPaneIndex[]An array containing the indexes of all available controllable display panes, in ascending order.

Returns

-1 | ControllableDisplayPaneIndex

The index of the display pane to be selected, or -1 if no pane should be selected.


getEnabledControllablePanes()

static getEnabledControllablePanes(pfdCount): ControllableDisplayPaneIndex[]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:102

Gets an array of indexes of controllable display panes that are enabled for a given GDU configuration.

Parameters

ParameterTypeDescription
pfdCount1 | 2The number of supported PFD GDUs.

Returns

ControllableDisplayPaneIndex[]

An array of indexes of controllable display panes that are enabled for the specified GDU configuration in ascending order.


isControllableDisplayPaneIndex()

static isControllableDisplayPaneIndex(value): value is ControllableDisplayPaneIndex

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:49

Checks whether a value is a controllable display pane index.

Parameters

ParameterTypeDescription
valueunknownThe value to check.

Returns

value is ControllableDisplayPaneIndex

Whether the specified value is a controllable display pane index.


isMfdDisplayPaneIndex()

static isMfdDisplayPaneIndex(value): value is LeftMfd | RightMfd

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:88

Checks whether a value is an MFD display pane index.

Parameters

ParameterTypeDescription
valueunknownThe value to check.

Returns

value is LeftMfd | RightMfd

Whether the specified value is an MFD display pane index.


isPfdDisplayPaneIndex()

static isPfdDisplayPaneIndex(value): value is LeftPfd | RightPfd

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:75

Checks whether a value is a PFD display pane index.

Parameters

ParameterTypeDescription
valueunknownThe value to check.

Returns

value is LeftPfd | RightPfd

Whether the specified value is a PFD display pane index.


isPfdInstrumentDisplayPaneIndex()

static isPfdInstrumentDisplayPaneIndex(value): value is LeftPfdInstrument | RightPfdInstrument

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:62

Checks whether a value is a PFD instrument display pane index.

Parameters

ParameterTypeDescription
valueunknownThe value to check.

Returns

value is LeftPfdInstrument | RightPfdInstrument

Whether the specified value is a PFD instrument display pane index.