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
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneUtils.ts:39
An array of indexes of MFD display panes.
PFD_INDEXES
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
): readonlyControllableDisplayPaneIndex
[]
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
Parameter | Type | Description |
---|---|---|
enabledPaneIndexes | readonly ControllableDisplayPaneIndex [] | An array containing the indexes of all enabled controllable display panes in ascending order. |
otherGtcSelectedPaneIndex | -1 | ControllableDisplayPaneIndex | The index of the display pane selected by the left display pane-controlling GTC, or -1 if the GTC has not selected a pane. |
displayPaneSettingManager | UserSettingManager <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
Parameter | Type | Description |
---|---|---|
controlGtcIndex | DisplayPaneControlGtcIndex | The display pane control index of the GTC that is attempting to select a desired pane. |
desiredPaneIndex | -1 | ControllableDisplayPaneIndex | The index of the desired pane to select, or -1 if the GTC is attempting to clear its selected pane. |
availablePanes | readonly 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
Parameter | Type | Description |
---|---|---|
pfdCount | 1 | 2 | The 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
Parameter | Type | Description |
---|---|---|
value | unknown | The 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
Parameter | Type | Description |
---|---|---|
value | unknown | The 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
Parameter | Type | Description |
---|---|---|
value | unknown | The 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
Parameter | Type | Description |
---|---|---|
value | unknown | The value to check. |
Returns
value is LeftPfdInstrument | RightPfdInstrument
Whether the specified value is a PFD instrument display pane index.