Class GSAbstractMenu

An abstract base class for menus.

Class Summary
Constructor Attributes Constructor Name and Description
 
GSAbstractMenu(options)
Creates a new GSAbstractMenu
Method Summary
Method Attributes Method Name and Description
 
addItem(menuItem)
Adds a menu item to the menu after any menu items
 
addItemAt(menuItem, index)
Adds a menu item to the menu at the position specified by the index parameter (zero-based)
 
Returns this menu's menu items
 
hide()
Hides the context menu
 
removeItem(menuItem)
Removes the specified menu item from this menu
 
removeItemAt(index)
Removes the menu item at the specified index (zero-based)
 
selectItem(menuItem)
Selects the specified menu item
 
show()
Displays the context menu
Event Summary
Event Attributes Event Name and Description
 
menuHidden(menu)
 
menuShown(menu, target)
Class Detail
GSAbstractMenu(options)
Creates a new GSAbstractMenu
Parameters:
{Object} options Optional
an object literal specifying options for this control:
{int} options.menuItemWidth
the width of the menu items
{int} options.menuItemHeight
the height of the 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.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 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 the menu after any menu items
Parameters:
{GSMenuItem} menuItem
the menu item to add to the menu

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

{Array} getItems()
Returns this menu's menu items
Returns:
{Array} an array of menu items

hide()
Hides the context menu

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

selectItem(menuItem)
Selects the specified menu item
Parameters:
{GSMenuItem} menuItem
the menu item to select

show()
Displays the context menu
Event Detail
menuHidden(menu)
Parameters:
{GSAbstractMenu} menu
a reference to the menu

menuShown(menu, target)
Parameters:
{GSAbstractMenu} menu
a reference to the menu
{Object} target Optional
the API component that triggered the show method on the context menu

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