@univerjs/ui v0.4.2 • Docs
Class: ContextMenuService
Extends
Implements
Constructors
new ContextMenuService()
new ContextMenuService(): ContextMenuService
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
disabled | public | boolean | false | - | packages/ui/src/services/contextmenu/contextmenu.service.ts:46 (opens in a new tab) |
Accessors
visible
get visible(): boolean
Returns
boolean
Implementation of
Defined in
packages/ui/src/services/contextmenu/contextmenu.service.ts:48 (opens in a new tab)
Methods
disable()
disable(): void
Returns
void
Implementation of
Defined in
packages/ui/src/services/contextmenu/contextmenu.service.ts:52 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
enable()
enable(): void
Returns
void
Implementation of
Defined in
packages/ui/src/services/contextmenu/contextmenu.service.ts:56 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
hideContextMenu()
hideContextMenu(): void
Returns
void
Implementation of
IContextMenuService
.hideContextMenu
Defined in
packages/ui/src/services/contextmenu/contextmenu.service.ts:67 (opens in a new tab)
registerContextMenuHandler()
registerContextMenuHandler(handler): IDisposable
Parameters
Parameter | Type |
---|---|
handler | IContextMenuHandler |
Returns
Implementation of
IContextMenuService
.registerContextMenuHandler
Defined in
packages/ui/src/services/contextmenu/contextmenu.service.ts:71 (opens in a new tab)
triggerContextMenu()
triggerContextMenu(event, menuType): void
Parameters
Parameter | Type |
---|---|
event | IMouseEvent | IPointerEvent |
menuType | string |
Returns
void
Implementation of
IContextMenuService
.triggerContextMenu
Defined in
packages/ui/src/services/contextmenu/contextmenu.service.ts:60 (opens in a new tab)