Print Friendly

# Class YAHOO.widget.MenuManager

Package: | YAHOO.widget
Class: | MenuManager
Extends: | Object
Defined In: | menu.js

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.

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| addMenu(`YAHOO.widget.Menu p_oMenu`) : void | MenuManager
@description Adds a menu to the collection of known menus.
| getMenu(`String p_sId`) : YAHOO.widget.Menu | MenuManager
@description Returns a menu with the specified id.
| getMenus() : Array | MenuManager
@description Returns an array of all menus registered with the menu manger.
| hideVisible() : void | MenuManager
@description Hides all visible, dynamically positioned menus.
| removeMenu(`YAHOO.widget.Menu p_oMenu`) : void | MenuManager
@description Removes a menu from the collection of known menus.
| toString() : String | MenuManager
@description Returns a string representing the menu manager.

## Public Events

This class has no public events.

## Method Details

### addMenu

`public function addMenu(`YAHOO.widget.Menu p_oMenu`)`
@description 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`

This method is defined by MenuManager.

### getMenu

`public function getMenu(`String p_sId`)`
@description Returns a menu with the specified id.
Parameters:

- `p_sId` : String
  String specifying the id of the menu to be retrieved.

Returns:

- `YAHOO.widget.Menu`

This method is defined by MenuManager.

### getMenus

`public function getMenus()`
@description Returns an array of all menus registered with the menu manger.
Parameters:

- None.

Returns:

- `Array`

This method is defined by MenuManager.

### hideVisible

`public function hideVisible()`
@description Hides all visible, dynamically positioned menus.
Parameters:

- None.

Returns:

- `void`

This method is defined by MenuManager.

### removeMenu

`public function removeMenu(`YAHOO.widget.Menu p_oMenu`)`
@description 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`

This method is defined by MenuManager.

### toString

`public function toString()`
@description Returns a string representing the menu manager.
Parameters:

- None.

Returns:

- `String`

This method is defined by MenuManager.

Copyright © 2006 Jack Slocum. All rights reserved.