Rule | context-menu

### Hierarchy

- AbstractEntry
  - Rule

### Implements

- KeyNavigatable
- MouseNavigatable
- Element
- Entry

## Index

### Constructors

- constructor

### Properties

- className
- role

### Methods

- addAttributes
- addEvents
- bubbleKey
- click
- down
- escape
- focus
- generateHtml
- getHtml
- getMenu
- getType
- hide
- isHidden
- keydown
- left
- mousedown
- mouseout
- mouseover
- mouseup
- right
- setHtml
- setMenu
- show
- space
- stop
- unfocus
- up
- parse

## Constructors

### constructor

- new Rule(menu: Menu): Rule

- Overwrites AbstractEntry.constructor

  - Defined in item_rule.ts:49
  constructor
  extends

    {AbstractItem}

  #### Parameters

  - ##### menu: Menu

    The context menu or sub-menu the item belongs to.

  #### Returns Rule

## 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['MENUITEM']

Overwrites AbstractEntry.className

- Defined in item_rule.ts:34

override

### Protected role

role: string = "separator"

Overwrites AbstractEntry.role

- Defined in item_rule.ts:39

override

## 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

- Overwrites AbstractNavigatable.addEvents

  - Defined in item_rule.ts:73
  override

  #### Parameters

  - ##### element: HTMLElement

  #### 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

### down

- down(event: KeyboardEvent): void

- Implementation of KeyNavigatable.down

  Inherited from AbstractNavigatable.down

  - Defined in abstract_navigatable.ts:100
  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

### 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 item_rule.ts:63
  override

  #### Returns void

### getHtml

- getHtml(): HTMLElement

- Implementation of Element.getHtml

  Inherited from MenuElement.getHtml

  - Defined in menu_element.ts:59
  override

  #### Returns HTMLElement

### getMenu

- getMenu(): Menu

- Implementation of Entry.getMenu

  Inherited from AbstractEntry.getMenu

  - Defined in abstract_entry.ts:66

  #### Returns Menu

  The context menu or sub-menu the entry belongs to.

### getType

- getType(): string

- Implementation of Entry.getType

  Inherited from AbstractEntry.getType

  - Defined in abstract_entry.ts:80

  #### Returns string

  The type of the menu entry, used for jsonification.

### hide

- hide(): void

- Implementation of Entry.hide

  Inherited from AbstractEntry.hide

  - Defined in abstract_entry.ts:87
  override

  #### Returns void

### isHidden

- isHidden(): boolean

- Implementation of Entry.isHidden

  Inherited from AbstractEntry.isHidden

  - Defined in abstract_entry.ts:103
  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

### 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

### 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

### setMenu

- setMenu(menu: Menu): void

- Implementation of Entry.setMenu

  Inherited from AbstractEntry.setMenu

  - Defined in abstract_entry.ts:73

  #### Parameters

  - ##### menu: Menu

    Sets the menu.

  #### Returns void

### show

- show(): void

- Implementation of Entry.show

  Inherited from AbstractEntry.show

  - Defined in abstract_entry.ts:95
  override

  #### 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

### up

- up(event: KeyboardEvent): void

- Implementation of KeyNavigatable.up

  Inherited from AbstractNavigatable.up

  - Defined in abstract_navigatable.ts:95
  override

  #### Parameters

  - ##### event: KeyboardEvent

  #### Returns void

### Static parse

- parse(__namedParameters: object, menu: Menu): Rule

- - Defined in item_rule.ts:47

  Parses a JSON respresentation of a rule item.

  #### Parameters

  - ##### __namedParameters: object

  - ##### menu: Menu

    The menu the item is attached to.

  #### Returns Rule

  The new rule object.

Generated using TypeDoc