MenuManager

Description

MenuManager

Variables Summary

Functions Summary

Classes Summary

Variables

Public API

BEFORE

Insertion position constants Used by addMenu(), addMenuItem(), and addSubMenu() to specify the relative position of a newly created menu object

Public API

DIVIDER

Other constants

NO_ERROR

Error Codes from AppShell

menuData

Menu Data

Functions

_getMenuString

Return menu name with display key

_setupMainMenu

메인 메뉴를 셋팅한다.

Public API

addMenu

Add Menu

id string,Command
Unique identifier for Menu. Typically use the id of command corresponding the menu.
position nullable string
- constant defining the position of new MenuItem relative to other MenuItems. Values: - With no relativeID, use Menus.FIRST or LAST (default is LAST) - Relative to a command id, use BEFORE or AFTER (required) - Relative to a MenuSection, use FIRST_IN_SECTION or LAST_IN_SECTION (required)
relativeId nullable string
- command id. Required for all position constants except FIRST and LAST.
Public API

getAllMenus

Retrieves the map of all Menu objects.

Returns: Object.<string,Menu>
Map of All Menus.
Public API

getMenu

Retrieves the Menu object for the corresponding id.

id string
Unique identifier or command id for Menu.
Returns: Menu
Menu Object
Public API

getMenuItem

Retrieves the MenuItem object for the corresponding id.

id string
Unique identifier or command id for MenuItem.
Returns: MenuItem
MenuItem Object
Public API

removeMenu

Removes a top-level menu from the application menu bar which may be native or HTML-based.

id non-nullable string
Unique identifier for Menu. Typically use the id of command corresponding the menu.

Classes

Constructor

MenuEntry

MenuEntry. Abstraction of Menu and MenuItem.

id string
text string
Properties
Methods

Properties

data

Type: string

id

Type: string

items

Type: Array.<MenuEntry>

text

Type: string

Methods

addMenuDivider

Add Menu Divier

addMenuItem

Add MenuItem

commandId non-nullable string, Command
keyBindings
position nullable string
relativeId nullable string
iconClass nullable string

removeMenuDivider

Removes the specified menu divider from this Menu.

menuItemID non-nullable string
- the menu item id of the divider to remove.

removeMenuItem

Removes the specified menu item from this Menu. Key bindings are unaffected; use KeyBindingManager directly to remove key bindings if desired.

command non-nullable string, Command
- command the menu would execute if we weren't deleting it.
Constructor

Menu

Menu

Methods

_checkedChanged

Synchronizes MenuItem checked state with underlying Command checked state

_enabledChanged

Synchronizes MenuItem enabled state with underlying Command enabled state

Private

_keyBindingAdded

Private

_keyBindingRemoved

_nameChanged

Synchronizes MenuItem name with underlying Command name

_visibleChanged

Synchronizes MenuItem visible state with underlying Command visible state (Temporally visible is same with enabled)

getCommand

Gets the Command associated with a MenuItem

Returns: Command