MenuBuilder

MenuSystem. MenuBuilder

MenuBuilder is used to build concrete instances of Menu's

Methods

(static) attachMenuItems(menu, groups)

Source:
Attach the given MenuItem's to the given Menu
Parameters:
Name Type Description
menu MenuSystem.Menu
groups Array.<Array.<MenuSystem.MenuItem>> Array of MenuItem arrays, where each outer array is a grouping of MenuItems

(static) buildMenuHtml(menu)

Source:
Construct the HTML code for the given Menu
Parameters:
Name Type Description
menu MenuSystem.Menu

(static) buildMenuItemHtml(menuItem)

Source:
Construct the HTML code for the given MenuItem
Parameters:
Name Type Description
menuItem MenuSystem.MenuItem

(static) clearMenuItems(menu)

Source:
Clear all MenuItem's from the given Menu
Parameters:
Name Type Description
menu MenuSystem.Menu

(static) close(menu)

Source:
Closes the given Menu
Parameters:
Name Type Description
menu MenuSystem.Menu

(static) createSubmenuIcon()

Source:
Create an icon that represents a submenu

(static) destroyMenu(menu)

Source:
Destroy the given Menu
Parameters:
Name Type Description
menu MenuSystem.Menu

(static) destroyMenuItem(menuItem)

Source:
Destroy the given MenuItem
Parameters:
Name Type Description
menuItem MenuSystem.MenuItem

(static) open(menu, source)

Source:
Opens the given Menu The source parameter tells where the open event originated from, which can be a Element, or a 2D point
Parameters:
Name Type Description
menu MenuSystem.Menu The Menu to open
source Element | MenuSystem~Point The source of the open event