Skip to main content

Class: UserSettingController<T, K>

A controller which binds a user setting to a control component.

Type parameters

NameType
Textends UserSettingRecord
Kextends keyof T & string

Hierarchy

Constructors

constructor

new UserSettingController<T, K>(settingManager, settingName): UserSettingController<T, K>

Constructor.

Type parameters

NameType
Textends UserSettingRecord
Kextends string

Parameters

NameTypeDescription
settingManagerUserSettingManager<T>This controller's settings manager.
settingNameKThe name of the setting associated with this controller.

Returns

UserSettingController<T, K>

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingController.ts:15

Properties

setting

Readonly setting: UserSetting<NonNullable<T[K]>>

The setting associated with this controller.

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.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingController.ts:15


settingName

Readonly settingName: K

The name of the setting associated with this controller.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingController.ts:15

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

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

NameTypeDescription
valueT[K]The new value of the setting.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingController.ts:31