Menu | context-menu

### Hierarchy

- Postable
  - Menu

### Implemented by

- AbstractMenu
- ContextMenu
- SubMenu

## Index

### Methods

- find
- generateMenu
- getFocused
- getItems
- getPool
- isPosted
- post
- setFocused
- unpost
- unpostSubmenus

## Methods

### find

- find(id: string): Item

- - Defined in menu.ts:67

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

  #### Parameters

  - ##### id: string

    The item id.

  #### Returns Item

  The item if it exists.

### generateMenu

- generateMenu(): void

- - Defined in menu.ts:72

  Generates the HTML element containing the menu entries.

  #### Returns void

### getFocused

- getFocused(): Item

- - Defined in menu.ts:43

  Returns the currently focused Item.

  #### Returns Item

  The focused Item.

### getItems

- getItems(): Item[]

- - Defined in menu.ts:37

  Returns the items in that menu.

  #### Returns Item[]

  The array of items.

### getPool

- getPool(): VariablePool<string | boolean>

- - Defined in menu.ts:55

  #### Returns VariablePool<string | boolean>

  The variable pool associated to this menu.

### isPosted

- isPosted(): boolean

- Inherited from Postable.isPosted

  - Defined in postable.ts:32

  #### Returns boolean

  True if element is posted in the page.

### post

- post(): void
- post(x?: number, y?: number): void

- Inherited from Postable.post

  - Defined in postable.ts:37

  Posts the element.

  #### Returns void

- Inherited from Postable.post

  - Defined in postable.ts:44

  Posts the element at the given coordinates.

  #### Parameters

  - ##### Optional x: number

    The x coordinate.

  - ##### Optional y: number

    The y coordinate.

  #### Returns void

### setFocused

- setFocused(item?: Item): void

- - Defined in menu.ts:49

  Sets the currently focused Item.

  #### Parameters

  - ##### Optional item: Item

    The new focused Item.

  #### Returns void

### unpost

- unpost(): void

- Inherited from Postable.unpost

  - Defined in postable.ts:49

  Removes element from page.

  #### Returns void

### unpostSubmenus

- unpostSubmenus(): void

- - Defined in menu.ts:60

  Unposts all submenus of this menu.

  #### Returns void

Generated using TypeDoc