Interface: IStatusBarService
molecule.IStatusBarService
Hierarchy
↳
IStatusBarService
Implemented by
Properties
state
• Protected Abstract state: IStatusBar
Inherited from
Defined in
Methods
add
▸ add(item, float): void
Add a new StatusBar item into right or left status
Parameters
| Name | Type | Description |
|---|---|---|
item | IStatusBarItem<any> | |
float | Float | position the item to left or right |
Returns
void
Defined in
src/services/workbench/statusBarService.ts:21
count
▸ count(name): number
Count the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Event name |
Returns
number
Inherited from
Defined in
src/common/event/eventBus.ts:28
emit
▸ emit(name, ...args): void
Emit the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Event name |
...args | any | Arguments |
Returns
void
Inherited from
Defined in
src/common/event/eventBus.ts:20
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Inherited from
Defined in
getState
▸ getState(): IStatusBar
Get the Component state
Returns
Inherited from
Defined in
getStatusBarItem
▸ getStatusBarItem(id, float?): null | IStatusBarItem<any>
Get the specific StatusBar item
Parameters
| Name | Type |
|---|---|
id | UniqueId |
float? | Float |
Returns
null | IStatusBarItem<any>
Defined in
src/services/workbench/statusBarService.ts:38
onClick
▸ onClick(callback): any
Listen to the StatusBar click event
Parameters
| Name | Type |
|---|---|
callback | (e: MouseEvent, item: IStatusBarItem<any>) => void |
Returns
any
Defined in
src/services/workbench/statusBarService.ts:47
onUpdateState
▸ onUpdateState(callback): void
Listen to the Component state update event
Parameters
| Name | Type |
|---|---|
callback | (prevState: IStatusBar, nextState: IStatusBar) => void |
Returns
void
Inherited from
Defined in
remove
▸ remove(id, float?): void
Remove the specific StatusBar item
Parameters
| Name | Type | Description |
|---|---|---|
id | UniqueId | |
float? | Float | if provided, it'll remove the item in spcific position |
Returns
void
Defined in
src/services/workbench/statusBarService.ts:27
removeOnUpdateState
▸ removeOnUpdateState(): void
Remove the Component update event listening
Returns
void
Inherited from
Defined in
render
▸ render(nextState?): void
Initiative notify the component to render the view by the state
Parameters
| Name | Type |
|---|---|
nextState? | IStatusBar |
Returns
void
Inherited from
Defined in
reset
▸ reset(): void
Reset the contextMenu data and the StatusBar data , including right and left
Returns
void
Defined in
src/services/workbench/statusBarService.ts:42
setState
▸ setState(values, callback?): void
Set the state values, and notify the view component to re render
Parameters
| Name | Type | Description |
|---|---|---|
values | Partial<IStatusBar> | update target state values |
callback? | (prevState: IStatusBar, nextState: IStatusBar) => void | - |
Returns
void
Inherited from
Defined in
subscribe
▸ subscribe(name, callback): void
Subscribe the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | string[] | Event name |
callback | Function | Callback function |
Returns
void
Inherited from
Defined in
src/common/event/eventBus.ts:11
unsubscribe
▸ unsubscribe(name): void
Unsubscribe the specific event
Parameters
| Name | Type | Description |
|---|---|---|
name | any | The event name |
Returns
void
Inherited from
Defined in
src/common/event/eventBus.ts:37
update
▸ update(item, float?): void
Update the specific StatusBar item, it'll update the item found in left
Parameters
| Name | Type | Description |
|---|---|---|
item | IStatusBarItem<any> | the id field is required |
float? | Float | if provided, it'll update the item in specific position |
Returns
void