Interface: IMenuBarService
services.IMenuBarService
Hierarchy
Component
\<IMenuBar
>↳
IMenuBarService
Table of contents
Properties
Methods
Properties
state
• Protected
Abstract
state: IMenuBar
Inherited from
Component.state
Defined in
Methods
append
▸ append(menuItem
, parentId
): void
Append a new menu into the specific menu found by parentId
Parameters
Name | Type | Description |
---|---|---|
menuItem | IMenuBarItem | the new menu |
parentId | UniqueId |
Returns
void
Defined in
src/services/workbench/menuBarService.ts:16
getMenuById
▸ getMenuById(menuId
): undefined
| IMenuBarItem
Get the specific menu item
Parameters
Name | Type |
---|---|
menuId | UniqueId |
Returns
undefined
| IMenuBarItem
Defined in
src/services/workbench/menuBarService.ts:26
onSelect
▸ onSelect(callback
): void
listen to the onSelect event in menu
Parameters
Name | Type |
---|---|
callback | (menuId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/menuBarService.ts:41
remove
▸ remove(menuId
): void
Remove the specific menu item
Parameters
Name | Type |
---|---|
menuId | UniqueId |
Returns
void
Defined in
src/services/workbench/menuBarService.ts:21
reset
▸ reset(): void
Reset menu bar data;
Returns
void
Defined in
src/services/workbench/menuBarService.ts:36
setMenus
▸ setMenus(data
): void
Set the menus data
Parameters
Name | Type |
---|---|
data | IMenuBarItem [] |
Returns
void
Defined in
src/services/workbench/menuBarService.ts:10
subscribe
▸ subscribe(name
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Inherited from
Component.subscribe
Defined in
src/common/event/eventBus.ts:11
unsubscribe
▸ unsubscribe(name
, listener?
): void
Unsubscribe the specific event and the listener function
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
listener? | Function | optional, it unsubscribes events via name if not pass the listener function |
Returns
void
Inherited from
Component.unsubscribe
Defined in
src/common/event/eventBus.ts:39
update
▸ update(menuId
, menuItem
): void
Update the specific menu item data
Parameters
Name | Type |
---|---|
menuId | UniqueId |
menuItem | IMenuBarItem |
Returns
void