blob: f735a78265d1f9752964f7bb35fced7340045c14 [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.MenuBar",
"baseClassname": "mx.core.UIComponent"
,
"description": "A MenuBar control defines a horizontal, top-level menu bar that contains one or more menus. Clicking on a top-level menu item opens a pop-up submenu that is an instance of the Menu control. <p>The top-level menu bar of the MenuBar control is generally always visible. It is not intended for use as a pop-up menu. The individual submenus pop up as the user selects them with the mouse or keyboard. Open submenus disappear when a menu item is selected, or if the menu is dismissed by the user clicking outside the menu.</p> <p>For information and an example on the attributes that you can use in the data provider for the MenuBar control, see the Menu control.</p> <p>The MenuBar control has the following sizing characteristics: </p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>The width is determined from the menu text, with a minimum value of 27 pixels for the width. The default value for the height is 22 pixels.</td> </tr> </table> <p> The <code>&lt;mx:MenuBar&gt</code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes: </p> <pre>\\n &lt;mx:MenuBar\\n <b>Properties</b>\\n dataDescriptor=&quot;<i>mx.controls.treeClasses.DefaultDataDescriptor</i>&quot;\\n dataProvider=&quot;<i>undefined</i>&quot;\\n iconField=&quot;icon&quot;\\n labelField=&quot;label&quot;\\n labelFunction=&quot;<i>undefined</i>&quot;\\n menuBarItemRenderer=&quot;<i>mx.controls.menuClasses.MenuBarItem</i>&quot;\\n menuBarItems=&quot;[]&quot;\\n menus=&quot;[]&quot;\\n selectedIndex=&quot;-1&quot;\\n showRoot=&quot;true&quot;\\n \\n <b>Styles</b>\\n backgroundSkin=&quot;mx.skins.halo.MenuBarBackgroundSkin&quot;\\n borderColor=&quot;0xAAB3B3&quot;\\n color=&quot;0x0B333C&quot;\\n cornerRadius=&quot;0&quot;\\n disabledColor=&quot;0xAAB3B3&quot;\\n fillAlphas=&quot;[0.6,0.4]&quot;\\n fillColors=&quot;[0xFFFFFF, 0xCCCCCC]&quot;\\n focusAlpha=&quot;0.5&quot;\\n focusRoundedCorners=&quot;tl tr bl br&quot;\\n fontAntiAliasType=&quot;advanced|normal&quot;\\n fontFamily=&quot;Verdana&quot;\\n fontGridFitType=&quot;pixel|none|subpixel&quot;\\n fontSharpness=&quot;0&quot;\\n fontSize=&quot;10&quot;\\n fontStyle=&quot;normal|italic&quot;\\n fontThickness=&quot;0&quot;\\n fontWeight=&quot;normal|bold&quot;\\n highlightAlphas=&quot;[0.3,0.0]&quot;\\n itemDownSkin=&quot;mx.skins.halo.ActivatorSkin&quot;\\n itemOverSkin=&quot;mx.skins.halo.ActivatorSkin&quot;\\n itemUpSkin=&quot;mx.skins.halo.ActivatorSkin&quot;\\n leading=&quot;2&quot;\\n menuStyleName=&quot;<i>No default</i>&quot;\\n rollOverColor=&quot;0xB2E1FF&quot;\\n selectionColor=&quot;0x7FCEFF&quot;\\n textAlign=&quot;left&quot;\\n textDecoration=&quot;none&quot;\\n textIndent=&quot;0&quot;\\n \\n <b>Events</b>\\n itemClick=&quot;<i>No default&quot;</i>\\n itemRollOut=&quot;<i>No default&quot;</i>\\n itemRollOver=&quot;<i>No default&quot;</i>\\n menuHide=&quot;<i>No default&quot;</i>\\n menuShow=&quot;<i>No default&quot;</i>\\n /&gt;\\n </pre> </p>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/MenuBarExample.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.Menu", "mx.controls.PopUpMenuButton", "mx.controls.menuClasses.IMenuBarItemRenderer", "mx.controls.menuClasses.MenuBarItem", "mx.controls.menuClasses.IMenuDataDescriptor", "mx.controls.treeClasses.DefaultDataDescriptor"]},
{ "tagName": "royalesuppresspublicvarwarning",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.controls.MenuBar",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.core.IParent",
"qname": "strandChildren",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6"]},
{ "tagName": "copy",
"values": ["org.apache.royale.core.IContentViewHost#strandChildren"]},
{ "tagName": "productversion",
"values": ["Royale 0.8"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "dataProvider",
"namespace": "public",
"bindable": ["collectionChange"],
"details": [],
"deprecated": {},
"description": "The hierarchy of objects that are displayed as MenuBar items and menus. The top-level children all become MenuBar items, and their children become the items in the menus and submenus. The MenuBar control handles the source data object as follows: <p> <ul> <li>A String containing valid XML text is converted to an XML object.</li> <li>An XMLNode is converted to an XML object.</li> <li>An XMLList is converted to an XMLListCollection.</li> <li>Any object that implements the ICollectionView interface is cast to an ICollectionView.</li> <li>An Array is converted to an ArrayCollection.</li> <li>Any other type object is wrapped in an Array with the object as its sole entry.</li> </ul> </p>",
"tags": [
{ "tagName": "default",
"values": [""undefined""]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "iconField",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The name of the field in the data provider that determines the icon to display for each menu item. By default, the MenuBar does not try to display icons along with the text in a menu item. By specifying an icon field, you can define a graphic that is created and displayed as an icon for a menu item. <p>The MenuItemRenderer examines the data provider for a property of the name defined by the <code>iconField</code> property. If the value of the property is a Class, it instantiates that class and expects it to be an instance of IFlexDisplayObject. If the value of the property is a String, it looks to see if a Class exists with that name in the application, and if it cannot find one, it looks for a property on the document with that name and expects that property to map to a Class.</p>",
"tags": [
{ "tagName": "default",
"values": [""icon""]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "labelField",
"namespace": "public",
"bindable": ["labelFieldChanged"],
"details": [],
"deprecated": {},
"description": "The name of the field in the data provider that determines the text to display for each menu item. If the data provider is an Array of Strings, Flex uses each string value as the label. If the data provider is an E4X XML object, you must set this property explicitly. as the text to display for each menu item. Setting the <code>labelFunction</code> property overrides this property.",
"tags": [
{ "tagName": "default",
"values": [""label""]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "label",
"values": ["to specify the label attribute in an E4X XML Object"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Array",
"qname": "menuBarItems",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "An Array that contains the MenuBarItem objects that render each item in the top-level menu bar of a MenuBar control. By default, this property contains instances of the MenuBarItem class. Items should not be added directly to the <code>menuBarItems</code> array. To add new menubar items, add them directly to the MenuBar control's data provider.",
"tags": [
{ "tagName": "default",
"values": ["[ ]"]},
{ "tagName": "see",
"values": ["mx.controls.menuClasses.MenuBarItem"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "field",
"qname": "menus",
"return": "Array",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "An Array containing the Menu objects corresponding to the pop-up submenus of this MenuBar control. Each MenuBar item can have a corresponding Menu object in the Array, even if the item does not have a pop-up submenu. Flex does not initially populate the <code>menus</code> array; instead, it creates the menus dynamically, as needed. Items should not be added directly to the <code>menus</code> Array. To add new drop-down menus, add directly to the MenuBar control's data provider.",
"tags": [
{ "tagName": "default",
"values": ["[ ]"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "selectedIndex",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The index in the MenuBar control of the currently open Menu or the last opened Menu if none are currently open.",
"tags": [
{ "tagName": "default",
"values": ["-1"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "showRoot",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "A Boolean flag that specifies whether to display the data provider's root node. If the data provider has a root node, and the <code>showRoot</code> property is set to <code>false</code>, the items on the MenuBar control correspond to the immediate descendants of the root node. This flag has no effect on data providers without root nodes, like Lists and Arrays.",
"tags": [
{ "tagName": "default",
"values": ["true"]},
{ "tagName": "see",
"values": ["#hasRoot"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "measure",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "Calculates the preferred width and height of the MenuBar based on the default widths of the MenuBar items.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "getLayoutHost",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"return": "org.apache.royale.core.ILayoutHost",
"params": []}
]
,
"events": [
{ "qname": "itemClick",
"type": "mx.events.MenuEvent"
,
"description": "Dispatched when the user selects an item in a pop-up submenu.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.MenuEvent.ITEM_CLICK"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "menuShow",
"type": "mx.events.MenuEvent"
,
"description": "Dispatched when a pop-up submenu opens, or the user selects a menu bar item with no drop-down menu.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.MenuEvent.MENU_SHOW"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}