Class: UserSettingToggleController<T, K>
A controller which binds a setting that can take one of several enumerated values to an ArrowToggle component.
Type parameters
Name | Type |
---|---|
T | extends UserSettingRecord |
K | extends keyof T & string |
Hierarchy
UserSettingController
<T
,K
>↳
UserSettingToggleController
Constructors
constructor
• new UserSettingToggleController<T
, K
>(settingManager
, settingName
, values
): UserSettingToggleController
<T
, K
>
Constructor.
Type parameters
Name | Type |
---|---|
T | extends UserSettingRecord |
K | extends string |
Parameters
Name | Type | Description |
---|---|---|
settingManager | UserSettingManager <T > | This controller's settings manager. |
settingName | K | The name of the setting associated with this controller. |
values | NonNullable <T [K ]>[] | An array of values this controller can assign to its setting. |
Returns
UserSettingToggleController
<T
, K
>
Overrides
UserSettingController.constructor
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingToggleController.ts:27
Properties
optionSelectedHandler
• optionSelectedHandler: (index
: number
) => void
A function which handles value selected events from the ArrowToggle component which this controller controls.
This handler should be passed to the ArrowToggle component via its onOptionSelected
prop.
Type declaration
▸ (index
): void
A function which handles value selected events from the ArrowToggle component which this controller controls.
This handler should be passed to the ArrowToggle component via its onOptionSelected
prop.
Parameters
Name | Type |
---|---|
index | number |
Returns
void
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingToggleController.ts:19
selectedIndexSub
• Readonly
selectedIndexSub: Subject
<number
>
A subject which provides a selected index for the ArrowToggle component which this controller controls. This
subject should be passed to the ArrowToggle component via its dataref
prop.
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingToggleController.ts:13
setting
• Readonly
setting: UserSetting
<NonNullable
<T
[K
]>>
The setting associated with this controller.
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingController.ts:8
settingManager
• Readonly
settingManager: UserSettingManager
<T
>
This controller's settings manager.
Inherited from
UserSettingController.settingManager
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingToggleController.ts:28
settingName
• Readonly
settingName: K
The name of the setting associated with this controller.
Inherited from
UserSettingController.settingName
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingToggleController.ts:29
values
• Readonly
values: NonNullable
<T
[K
]>[]
An array of values this controller can assign to its setting.
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingToggleController.ts:30
Methods
init
▸ init(): void
Initializes this controller. This will immediately change the state of this controller's control component to reflect the current value of this controller's setting. Furthermore, any future changes to the setting's value will be synced to the control component.
Returns
void
Inherited from
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingController.ts:23
onSettingChanged
▸ onSettingChanged(value
): void
A callback which is called when value of this control's setting is changed.
Parameters
Name | Type | Description |
---|---|---|
value | NonNullable <T [K ]> | The new value of the setting. |
Returns
void
Overrides
UserSettingController.onSettingChanged
Defined in
workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingToggleController.ts:36