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
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
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
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
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
services/workbench/statusBarService.ts:47
onUpdateState
▸ onUpdateState(listener
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
listener | (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
services/workbench/statusBarService.ts:27
removeOnUpdateState
▸ removeOnUpdateState(listener?
): void
Remove the Component update event listening, default is remove all, also you can remove one by pass the listener
Parameters
Name | Type |
---|---|
listener? | Function |
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
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
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Inherited from
Defined in
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
Defined in
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