AbstractMenu | context-menu

### Hierarchy

- AbstractPostable
  - AbstractMenu
    - ContextMenu
    - SubMenu

### Implements

- KeyNavigatable
- MouseNavigatable
- Element
- Postable
- Menu

## Index

### Properties

- className
- focused
- items
- role
- variablePool

### Methods

- addAttributes
- addEvents
- bubbleKey
- click
- display
- down
- escape
- find
- focus
- generateHtml
- generateMenu
- getFocused
- getHtml
- getItems
- getPool
- isPosted
- keydown
- left
- mousedown
- mouseout
- mouseover
- mouseup
- parseItem
- parseItems
- post
- right
- setFocused
- setHtml
- space
- stop
- unfocus
- unpost
- unpostSubmenus
- up

## Properties

### Protected className

className: "CtxtMenu_ContextMenu" | "CtxtMenu_Menu" | "CtxtMenu_MenuArrow" | "CtxtMenu_MenuActive" | "CtxtMenu_MenuCheck" | "CtxtMenu_MenuClose" | "CtxtMenu_MenuDisabled" | "CtxtMenu_MenuItem" | "CtxtMenu_MenuLabel" | "CtxtMenu_MenuRadioCheck" | "CtxtMenu_MenuRule" | "CtxtMenu_MousePost" | "CtxtMenu_RTL" | "CtxtMenu_Attached" | "CtxtMenu_Info" | "CtxtMenu_InfoClose" | "CtxtMenu_InfoContent" | "CtxtMenu_InfoSignature" | "CtxtMenu_InfoTitle" | "CtxtMenu_MenuFrame" = HtmlClasses['CONTEXTMENU']

Overwrites MenuElement.className

- Defined in abstract_menu.ts:39

override

### Private focused

focused: Item

- Defined in abstract_menu.ts:53

### Private items

items: Item[] = []

- Defined in abstract_menu.ts:52

### Protected role

role: string = "menu"

Overwrites MenuElement.role

- Defined in abstract_menu.ts:50

override

### Protected variablePool

variablePool: VariablePool<string | boolean>

- Defined in abstract_menu.ts:45

The variable pool of the context menu.

type

  {VarialbePool}

## Methods

### addAttributes

- addAttributes(attributes: object): void

- Inherited from MenuElement.addAttributes

  - Defined in menu_element.ts:50

  Adds a attributes and values to the HTML element.

  #### Parameters

  - ##### attributes: object

    A dictionary of attributes.

    - ##### [attr: string]: string

  #### Returns void

### addEvents

- addEvents(element: HTMLElement): void

- Inherited from AbstractNavigatable.addEvents

  - Defined in abstract_navigatable.ts:153

  Adds navigation events to an HTML element.

  #### Parameters

  - ##### element: HTMLElement

    The HTML element for navigation.

  #### Returns void

### bubbleKey

- bubbleKey(): void

- Inherited from AbstractNavigatable.bubbleKey

  - Defined in abstract_navigatable.ts:38

  Bubble this key event.

  #### Returns void

### click

- click(event: MouseEvent): void

- Implementation of MouseNavigatable.click

  Inherited from AbstractNavigatable.click

  - Defined in abstract_navigatable.ts:145
  override

  #### Parameters

  - ##### event: MouseEvent

  #### Returns void

### Protected display

- display(): void

- Inherited from AbstractPostable.display

  - Defined in abstract_postable.ts:77

  Displays the element on screen.

  #### Returns void

### down

- down(event: KeyboardEvent): void

- Implementation of KeyNavigatable.down

  Overwrites AbstractNavigatable.down

  - Defined in abstract_menu.ts:118
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

### escape

- escape(event: KeyboardEvent): void

- Implementation of KeyNavigatable.escape

  Inherited from AbstractNavigatable.escape

  - Defined in abstract_navigatable.ts:75
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

### find

- find(id: string): Item

- Implementation of Menu.find

  - Defined in abstract_menu.ts:189
  override

  #### Parameters

  - ##### id: string

  #### Returns Item

### focus

- focus(): void

- Inherited from MenuElement.focus

  - Defined in menu_element.ts:88
  override

  #### Returns void

### generateHtml

- generateHtml(): void

- Implementation of Element.generateHtml

  Overwrites MenuElement.generateHtml

  - Defined in abstract_menu.ts:140
  override

  #### Returns void

### generateMenu

- generateMenu(): void

- Implementation of Menu.generateMenu

  - Defined in abstract_menu.ts:148
  override

  #### Returns void

### getFocused

- getFocused(): Item

- Implementation of Menu.getFocused

  - Defined in abstract_menu.ts:72
  override

  #### Returns Item

### getHtml

- getHtml(): HTMLElement

- Implementation of Element.getHtml

  Inherited from MenuElement.getHtml

  - Defined in menu_element.ts:59
  override

  #### Returns HTMLElement

### getItems

- getItems(): Item[]

- Implementation of Menu.getItems

  - Defined in abstract_menu.ts:58
  override

  #### Returns Item[]

### getPool

- getPool(): VariablePool<string | boolean>

- Implementation of Menu.getPool

  - Defined in abstract_menu.ts:65
  override

  #### Returns VariablePool<string | boolean>

### isPosted

- isPosted(): boolean

- Implementation of Menu.isPosted

  Inherited from AbstractPostable.isPosted

  - Defined in abstract_postable.ts:41
  override

  #### Returns boolean

### keydown

- keydown(event: KeyboardEvent): void

- Implementation of KeyNavigatable.keydown

  Inherited from AbstractNavigatable.keydown

  - Defined in abstract_navigatable.ts:45
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

### left

- left(event: KeyboardEvent): void

- Implementation of KeyNavigatable.left

  Inherited from AbstractNavigatable.left

  - Defined in abstract_navigatable.ts:85
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

### mousedown

- mousedown(event: MouseEvent): void

- Implementation of MouseNavigatable.mousedown

  Inherited from AbstractNavigatable.mousedown

  - Defined in abstract_navigatable.ts:117
  override

  #### Parameters

  - ##### event: MouseEvent

  #### Returns void

### mouseout

- mouseout(event: MouseEvent): void

- Implementation of MouseNavigatable.mouseout

  Inherited from AbstractNavigatable.mouseout

  - Defined in abstract_navigatable.ts:138
  override

  #### Parameters

  - ##### event: MouseEvent

  #### Returns void

### mouseover

- mouseover(event: MouseEvent): void

- Implementation of MouseNavigatable.mouseover

  Inherited from AbstractNavigatable.mouseover

  - Defined in abstract_navigatable.ts:131
  override

  #### Parameters

  - ##### event: MouseEvent

  #### Returns void

### mouseup

- mouseup(event: MouseEvent): void

- Implementation of MouseNavigatable.mouseup

  Inherited from AbstractNavigatable.mouseup

  - Defined in abstract_navigatable.ts:124
  override

  #### Parameters

  - ##### event: MouseEvent

  #### Returns void

### Private parseItem

- parseItem(item: any): Item

- - Defined in abstract_menu.ts:221

  Parses items in JSON formats and attaches them to the menu.

  #### Parameters

  - ##### item: any

  #### Returns Item

### Protected parseItems

- parseItems(items: any[]): void

- - Defined in abstract_menu.ts:211

  Parses items in JSON formats and attaches them to the menu.

  #### Parameters

  - ##### items: any[]

    List of JSON menu items.

  #### Returns void

### post

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

- Implementation of Menu.post

  Inherited from AbstractPostable.post

  - Defined in abstract_postable.ts:48
  override

  #### Parameters

  - ##### Optional x: number

  - ##### Optional y: number

  #### Returns void

### right

- right(event: KeyboardEvent): void

- Implementation of KeyNavigatable.right

  Inherited from AbstractNavigatable.right

  - Defined in abstract_navigatable.ts:90
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

### setFocused

- setFocused(item: Item): void

- Implementation of Menu.setFocused

  - Defined in abstract_menu.ts:79
  override

  #### Parameters

  - ##### item: Item

  #### Returns void

### setHtml

- setHtml(html: HTMLElement): void

- Implementation of Element.setHtml

  Inherited from MenuElement.setHtml

  - Defined in menu_element.ts:69
  override

  #### Parameters

  - ##### html: HTMLElement

  #### Returns void

### space

- space(event: KeyboardEvent): void

- Implementation of KeyNavigatable.space

  Inherited from AbstractNavigatable.space

  - Defined in abstract_navigatable.ts:80
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

### Protected stop

- stop(event: Event): void

- Inherited from AbstractNavigatable.stop

  - Defined in abstract_navigatable.ts:106

  Stops event propagation and bubbling.

  #### Parameters

  - ##### event: Event

    The keyboard event that fired.

  #### Returns void

### unfocus

- unfocus(): void

- Inherited from MenuElement.unfocus

  - Defined in menu_element.ts:97
  override

  #### Returns void

### unpost

- unpost(): void

- Implementation of Menu.unpost

  Overwrites AbstractPostable.unpost

  - Defined in abstract_menu.ts:180
  override

  #### Returns void

### unpostSubmenus

- unpostSubmenus(): void

- Implementation of Menu.unpostSubmenus

  - Defined in abstract_menu.ts:166
  override

  #### Returns void

### up

- up(event: KeyboardEvent): void

- Implementation of KeyNavigatable.up

  Overwrites AbstractNavigatable.up

  - Defined in abstract_menu.ts:97
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

Generated using TypeDoc