Skip to main content

Class: SoftKeyMenu

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:35

A softkey menu instance.

Extended by​

Constructors​

Constructor​

new SoftKeyMenu(menuSystem): SoftKeyMenu

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:44

Creates an instance of a SoftKeyMenu.

Parameters​

ParameterTypeDescription
menuSystemSoftKeyMenuSystemThe menu system that will manage this menu.

Returns​

SoftKeyMenu

Properties​

protected menuSystem: SoftKeyMenuSystem

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:44

The menu system that will manage this menu.


EmptyMenuItem​

static EmptyMenuItem: MenuItem

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:117

An empty menu item.

Methods​

addItem()​

addItem(index, label, handler?, value?, disabled?): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:54

Adds a menu item to the softkey menu.

Parameters​

ParameterTypeDefault valueDescription
indexnumberundefinedThe softkey index to add the menu item to.
labelstringundefinedThe label of the menu item.
handler?(menu) => voidundefinedThe handler to call when the menu item is selected.
value?string | booleanundefinedThe value of the menu item, if any.
disabled?booleanfalseWhether or not the menu item is disabled.

Returns​

void


forEach()​

forEach(each): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:97

Iterates over the menu items.

Parameters​

ParameterTypeDescription
each(menuItem, index) => voidThe function to run over each menu item.

Returns​

void


getItem()​

getItem(index): MenuItem

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:82

Gets a menu item.

Parameters​

ParameterTypeDescription
indexnumberThe index of the menu item.

Returns​

MenuItem

The requested menu item.


handleBack()​

handleBack(): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:89

Handles a back menu action.

Returns​

void


handleItemPressed()​

handleItemPressed(index): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:108

Handles when a menu item is pressed.

Parameters​

ParameterTypeDescription
indexnumberThe index of the menu item that was pressed.

Returns​

void


removeItem()​

removeItem(index): void

Defined in: workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/Menus/SoftKeyMenu.ts:73

Removes a menu item from the menu.

Parameters​

ParameterTypeDescription
indexnumberThe softkey index to remove the menu item from.

Returns​

void