JSDoc: Interface: Menu

# Interface: Menu

## Menu

Source:
  - menu.js, line 26

### Extends

- Postable

### Methods

#### find(id) → (nullable) {Item}

Retrieves a menu item via its id by depth-first search.

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | string | The item id.

Source:
  - menu.js, line 62

##### Returns:

The item if it exists.

Type
  Item

#### generateMenu()

Generates the HTML element containing the menu entries.

Source:
  - menu.js, line 67

#### getFocused() → {Item}

Returns the currently focused Item.

Source:
  - menu.js, line 38

##### Returns:

The focused Item.

Type
  Item

#### getItems() → {Array.<Item>}

Returns the items in that menu.

Source:
  - menu.js, line 32

##### Returns:

The array of items.

Type
  Array.<Item>

#### getPool() → {VariablePool.<(string|boolean)>}

Source:
  - menu.js, line 50

##### Returns:

The variable pool associated to this menu.

Type
  VariablePool.<(string|boolean)>

#### isPosted() → {boolean}

Inherited From:
  - Postable#isPosted
Source:
  - postable.js, line 30

##### Returns:

True if element is posted in the page.

Type
  boolean

#### post()

Posts the element.

Overrides:
  - Postable#post
Source:
  - postable.js, line 35

#### setFocused(item)

Sets the currently focused Item.

##### Parameters:

Name | Type | Description
--- | --- | ---
`item` | Item | The new focused Item.

Source:
  - menu.js, line 44

#### unpost()

Removes element from page.

Inherited From:
  - Postable#unpost
Source:
  - postable.js, line 47

#### unpostSubmenus()

Unposts all submenus of this menu.

Source:
  - menu.js, line 55