Adds an item to the end of the menu.
The item to add
Constructs and adds a new item with an action.
The title of the item
The function to call when the item is clicked
Optional
keyEquivalent: CCKeyComboA key combo to trigger the action with
Returns the index of the specified menu item.
The item to look for
The item's index, or undefined if not found
Inserts an item at the specified index.
The item to add
The index to add at
Returns the menu item at the specified index.
The index of the item
The found item, or undefined if not found
Called when a subitem changes state.
The item that changed
Returns the first menu item with the specified title.
The title to look for
The found item, or undefined if not found
Removes an item from the menu.
The item to remove
Serializes the menu into a representation for the window manager.
A serialized representation of the menu
Holds information about a single menu in the menu bar, either as a top-level menu or a submenu.