MenuManager Prototype

Syntax

var object = new MenuManager(commandManager, menuSpecs, contextFunction, commandStr);

Arguments

ArgumentSummary
commandManager
menuSpecs
contextFunction
commandStr

Remarks

Members

MemberSummary
appendMenuItem Appends a menuitem to an existing menu or popup.
appendMenuItems
appendMenuSeparator Appends a menuseparator to an existing menu or popup.
appendPopupMenu Appends a popup to an existing popupset.
appendSubMenu Appends a sub-menu to an existing menu.
appendToolbarItem Appends a toolbaritem to an existing box element.
appendToolbarSeparator Appends a toolbarseparator to an existing box.
createContextMenu
createContextMenus
createMainToolbar
createMenu Creates menu DOM nodes from a menu specification.
createMenuItems
createMenus
hidePopup Internal use only.
hookPopup Internal use only.
menuCommand
showPopup Internal use only.
updateMenus

See Also

Source Code

function MenuManager(commandManager, menuSpecs, contextFunction, commandStr)
{
var menuManager = this;
this.commandManager = commandManager;
this.menuSpecs = menuSpecs;
this.contextFunction = contextFunction;
this.commandStr = commandStr;
this.repeatId = 0;
this.cxStore = new Object();
this.onPopupShowing =
function mmgr_onshow(event) { return menuManager.showPopup(event); };
this.onPopupHiding =
function mmgr_onhide(event) { return menuManager.hidePopup(event); };
this.onMenuCommand =
function mmgr_oncmd(event) { return menuManager.menuCommand(event); };
/* The code using us may override these with functions which will be called
* after all our internal processing is done. Both are called with the
* arguments 'event' (DOM), 'cx' (JS), 'popup' (DOM).
*/
this.onCallbackPopupShowing = null;
this.onCallbackPopupHiding = null;
}