Yahoo! UI Library

Menu  2.5.2

Yahoo! UI Library > menu > YAHOO.widget.MenuManager

Show Private Show Protected

static Class YAHOO.widget.MenuManager

Singleton that manages a collection of all menus and menu items. Listens for DOM events at the document level and dispatches the events to the corresponding menu or menu item.

Methods

addMenu

void addMenu ( p_oMenu )
Adds a menu to the collection of known menus.
Parameters:
p_oMenu <YAHOO.widget.Menu> Object specifying the Menu instance to be added.
Returns: void

getFocusedMenu

YAHOO.widget.Menu getFocusedMenu ( )
Returns a reference to the menu that currently has focus.
Returns: YAHOO.widget.Menu

getFocusedMenuItem

YAHOO.widget.MenuItem getFocusedMenuItem ( )
Returns a reference to the menu item that currently has focus.
Returns: YAHOO.widget.MenuItem

getMenu

YAHOO.widget.Menu getMenu ( p_sId )
Returns a menu with the specified id.
Parameters:
p_sId <String> String specifying the id of the <div> element representing the menu to be retrieved.
Returns: YAHOO.widget.Menu

getMenuItem

YAHOO.widget.MenuItem getMenuItem ( p_sId )
Returns a menu item with the specified id.
Parameters:
p_sId <String> String specifying the id of the <li> element representing the menu item to be retrieved.
Returns: YAHOO.widget.MenuItem

getMenuItemGroup

Array getMenuItemGroup ( p_sId )
Returns an array of menu item instances whose corresponding <li> elements are child nodes of the <ul> element with the specified id.
Parameters:
p_sId <String> String specifying the id of the <ul> element representing the group of menu items to be retrieved.
Returns: Array

getMenus

Array getMenus ( )
Returns a collection of all menus registered with the menu manger.
Returns: Array

getVisible

Array getVisible ( )
Returns a collection of all visible menus registered with the menu manger.
Returns: Array

hideVisible

void hideVisible ( )
Hides all visible, dynamically positioned menus (excluding instances of YAHOO.widget.MenuBar).
Returns: void

removeMenu

void removeMenu ( p_oMenu )
Removes a menu from the collection of known menus.
Parameters:
p_oMenu <YAHOO.widget.Menu> Object specifying the Menu instance to be removed.
Returns: void

toString

String toString ( )
Returns a string representing the menu manager.
Returns: String


Copyright © 2007 Yahoo! Inc. All rights reserved.