Package com.tremorvideo.airbase
Class public class Menus
Inheritance Menus → EventDispatcher
Language Version: ActionScript 3.0Class public class Menus
Inheritance Menus → EventDispatcher
Runtime Versions: AIR 2
Simplifies working with menus items.
See also
Public Properties
Property
Defined By
menuItemNames : Array
[AIR] [read only] Returns an array of the labels of all menu items.
[AIR] [read only] Returns an array of the labels of all menu items.
Menus
nativeMenu : NativeMenu
[AIR] [read only] Returns the nativeMenu instance.
[AIR] [read only] Returns the nativeMenu instance.
Menus
Public Methods
Method
Defined By
Menus(context:Stage):void
[AIR] Creates a new instance of Menus.
[AIR] Creates a new instance of Menus.
Menus
menuAddItem(mainMenu:String, index:uint = 99):void
[AIR] Adds a menu item if it does not already exist.
[AIR] Adds a menu item if it does not already exist.
Menus
menuClear(mainMenu:*):void
[AIR] Clears all submenu items from a menu. Expects either a string representing the menu item's name or a number representing it's index.
[AIR] Clears all submenu items from a menu. Expects either a string representing the menu item's name or a number representing it's index.
Menus
menuExists(mainMenu:*):Boolean
[AIR] Checks if menu item exists. Expects either a string representing the menu item's name or a number representing it's index.
[AIR] Checks if menu item exists. Expects either a string representing the menu item's name or a number representing it's index.
Menus
menuRemoveAll():void
[AIR] Removes all menu items.
[AIR] Removes all menu items.
Menus
menuRemoveItem(mainMenu:*):void
[AIR] Removes a menu item. Expects either a string representing the menu item's name or a number representing it's index.
[AIR] Removes a menu item. Expects either a string representing the menu item's name or a number representing it's index.
Menus
nestedSubmenuAddItem(mainMenu:*, submenu:*, nestedMenu:String, shortcutKey:String = null):void
[AIR] Adds a nested submenu item. The 'mainMenu' param expects either a string representing the menu item's name or a number representing it's index. The 'submenu' param expects either a string representing the submenu item's name or a number representing it's index.
[AIR] Adds a nested submenu item. The 'mainMenu' param expects either a string representing the menu item's name or a number representing it's index. The 'submenu' param expects either a string representing the submenu item's name or a number representing it's index.
Menus
submenuAddItem(mainMenu:*, submenu:String, shortcutKey:String = null, topSeparator:Boolean = false, bottomSeparator:Boolean = false, index:uint = 99):void
[AIR] Adds a submenu item. The 'mainMenu' param expects either a string representing the menu item's name or a number representing it's index.
[AIR] Adds a submenu item. The 'mainMenu' param expects either a string representing the menu item's name or a number representing it's index.
Menus
submenuCheckmarkItem(mainMenu:*, submenu:*, checked:Boolean = true, toggleOnClick:Boolean = false):void
[AIR] Checks and unchecks submenu items.
[AIR] Checks and unchecks submenu items.
Menus
submenuClear(mainMenu:*, submenu:*):void
[AIR] Clears all nested items from a submenu. Expects either a string representing the item's name or a number representing it's index.
[AIR] Clears all nested items from a submenu. Expects either a string representing the item's name or a number representing it's index.
Menus
submenuEnableAllIn(mainMenu:*, enable:Boolean = true):void
[AIR] Enables and disables all submenu items in the specified menu.
[AIR] Enables and disables all submenu items in the specified menu.
Menus
submenuEnableItem(mainMenu:*, submenu:*, enable:Boolean = true):void
[AIR] Enables and disables submenu items.
[AIR] Enables and disables submenu items.
Menus
submenuExists(mainMenu:*, submenu:*):Boolean
[AIR] Checks if submenu item exists. Expects either a string representing the menu/submenu item's name or a number representing it's index.
[AIR] Checks if submenu item exists. Expects either a string representing the menu/submenu item's name or a number representing it's index.
Menus
submenuIsChecked(mainMenu:*, submenu:*):Boolean
[AIR] Gets a value to indicate whether a submenu item is checked.
[AIR] Gets a value to indicate whether a submenu item is checked.
Menus
submenuIsEnabled(mainMenu:*, submenu:*):Boolean
[AIR] Gets a value to indicate whether a submenu item is enabled.
[AIR] Gets a value to indicate whether a submenu item is enabled.
Menus
submenuItemNames(mainMenu:*):Array
[AIR] Returns an array of the labels of all submenu items of a specific menu (excludes separators).
[AIR] Returns an array of the labels of all submenu items of a specific menu (excludes separators).
Menus
submenuRemoveItem(mainMenu:*, submenu:*):void
[AIR] Removes a submenu item. Expects either a string representing the menu item's name or a number representing it's index.
[AIR] Removes a submenu item. Expects either a string representing the menu item's name or a number representing it's index.
Menus
submenuRemoveShortcut(mainMenu:*, submenu:*):void
[AIR] Removes a submenu item's keyboard shortcut.
[AIR] Removes a submenu item's keyboard shortcut.
Menus
Events
Event
Summary
Defined By
submenuSelect
[AIR] Dispatched when a submenu is selected.
Menus
submenuSelectItem
[AIR] Dispatched when a submenu is selected.
Menus
submenuSelectPath
[AIR] Dispatched when a submenu is selected.
Menus
Created May 18 2015