Class GSMenuControl

Extends GSControl.

A control for displaying a list of menu items to the user.

Class Summary
Constructor Attributes Constructor Name and Description
 
GSMenuControl(name, options)
Properties borrowed from class GSControl:
parentPositioned
Method Summary
Method Attributes Method Name and Description
 
addItem(menuItem)
Adds a menu item to this menu control
 
addItemAt(menuItem, index)
Adds a menu item to the menu at the position specified by the index parameter (zero-based)
 
removeItem(menuItem)
Removes the specified menu item from this menu
 
removeItemAt(index)
Removes the menu item at the specified index (zero-based)
Methods borrowed from class GSControl:
getDefaultPosition, getHeight, getOrientation, getPosition, getWidth, hide, remove, render, show
Class Detail
GSMenuControl(name, options)
Parameters:
{String} name
a unique name for the control
{Object} options Optional
an object literal specifying optional properties for this control.
{boolean} options.open
true if the menu should be rendered open, defaults to false
{int} options.menuItemWidth
the width of the menu items
{int} options.menuItemHeight
the height of the menu items
{int} options.menuItemPadding
the padding around the content of each menu item
{int} options.menuPadding
the padding around the set of all menu items
{String} options.fontFamily
the font family to use for this control
{String} options.fontSize
the font size to use for this control
{String} options.color
the foreground color for this control
{String} options.backgroundColor
the background color for this control
{String} options.activeColor
the foreground color of an active menu item (check type only)
{String} options.highlightColor
the foreground color of a selected menu item
{String} options.highlightBackgroundColor
the background color of a selected menu item
{String} options.highlightBackgroundImage
an image to use for the background of a selected menu item, overrides the highlightBackgroundColor option
{boolean} options.useRollover
true if a rollover effect should be used for the menu options.items
{boolean} options.hideOnAction
true if the menu should be hidden when an action is performed on a menu item (defaults to false)
Method Detail
addItem(menuItem)
Adds a menu item to this menu control
Parameters:
{GSMenuItem} menuItem
the menu item to add

addItemAt(menuItem, index)
Adds a menu item to the menu at the position specified by the index parameter (zero-based)
Parameters:
{GSMenuItem} menuItem
the menu item to add to the menu
{int} index
the position to add the menu item at

removeItem(menuItem)
Removes the specified menu item from this menu
Parameters:
{GSMenuItem} menuItem
the menu item to remove from the menu

removeItemAt(index)
Removes the menu item at the specified index (zero-based)
Parameters:
{int} index
the position of the menu item to remove

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Mar 07 2012 11:47:29 GMT+1300 (NZDT)