Interface: ILayoutService
molecule.ILayoutService
Hierarchy
Component<ILayout>↳
ILayoutService
Implemented by
Properties
container
• Readonly container: null | HTMLElement
Get the container of the molecule
Defined in
services/workbench/layoutService.ts:16
state
• Protected Abstract state: ILayout
Inherited from
Defined in
Methods
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
getMenuBarMode
▸ getMenuBarMode(): "horizontal" | "vertical"
Get the mode of the MenuBar
Returns
"horizontal" | "vertical"
Defined in
services/workbench/layoutService.ts:71
getState
▸ getState(): ILayout
Get the Component state
Returns
ILayout
Inherited from
Defined in
onUpdateState
▸ onUpdateState(listener): void
Listen to the Component state update event
Parameters
| Name | Type |
|---|---|
listener | (prevState: ILayout, nextState: ILayout) => void |
Returns
void
Inherited from
Defined in
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? | ILayout |
Returns
void
Inherited from
Defined in
reset
▸ reset(): void
Reset all layout data as default value
Returns
void
Defined in
services/workbench/layoutService.ts:89
setAuxiliaryBar
▸ setAuxiliaryBar(hidden): boolean
Set the visibility of auxiliary bar
Returns the next state of hidden
Parameters
| Name | Type |
|---|---|
hidden | boolean | (preState: boolean) => boolean |
Returns
boolean
Defined in
services/workbench/layoutService.ts:83
setEditorGroupDirection
▸ setEditorGroupDirection(direction): void
Set the direction of editor group,default is vertical
Parameters
| Name | Type |
|---|---|
direction | MenuBarMode | (prev: MenuBarMode) => MenuBarMode |
Returns
void
Defined in
services/workbench/layoutService.ts:75
setGroupSplitSize
▸ setGroupSplitSize(groupSplitPos): void
Set the sizes between editor groups
Parameters
| Name | Type |
|---|---|
groupSplitPos | (string | number)[] |
Returns
void
Defined in
services/workbench/layoutService.ts:61
setHorizontalPaneSize
▸ setHorizontalPaneSize(horizontalSplitPanePos): void
Set the sizes between the editor and the panel
Parameters
| Name | Type |
|---|---|
horizontalSplitPanePos | (string | number)[] |
Returns
void
Defined in
services/workbench/layoutService.ts:50
setMenuBarMode
▸ setMenuBarMode(mode): void
Set the mode of the MenuBar, default is vertical
unachieved
Parameters
| Name | Type |
|---|---|
mode | "horizontal" | "vertical" |
Returns
void
Defined in
services/workbench/layoutService.ts:67
setPaneSize
▸ setPaneSize(splitPanePos): void
Set the sizes between the side bar and main content area
Parameters
| Name | Type |
|---|---|
splitPanePos | (string | number)[] |
Returns
void
Defined in
services/workbench/layoutService.ts:45
setSideBarPosition
▸ setSideBarPosition(position): void
Set the position of the side bar, default is in left
unachieved
Parameters
| Name | Type |
|---|---|
position | "right" | "left" |
Returns
void
Defined in
services/workbench/layoutService.ts:56
setState
▸ setState(values, callback?): void
Set the state values, and notify the view component to re render
Parameters
| Name | Type | Description |
|---|---|---|
values | Partial<ILayout> | update target state values |
callback? | (prevState: ILayout, nextState: ILayout) => 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
toggleActivityBarVisibility
▸ toggleActivityBarVisibility(): boolean
Toggle the visibility of the activity bar, returns the status of activity bar's hidden
Returns
boolean
Defined in
services/workbench/layoutService.ts:32
toggleMenuBarVisibility
▸ toggleMenuBarVisibility(): boolean
Toggle the visibility of menu bar, returns the status of menu bar's hidden
Returns
boolean
Defined in
services/workbench/layoutService.ts:20
togglePanelMaximized
▸ togglePanelMaximized(): boolean
Toggle the maximized status of the panel, returns the status of maximized panel
Returns
boolean
Defined in
services/workbench/layoutService.ts:40
togglePanelVisibility
▸ togglePanelVisibility(): boolean
Toggle the visibility of the panel, returns the status of panel's hidden
Returns
boolean
Defined in
services/workbench/layoutService.ts:28
toggleSidebarVisibility
▸ toggleSidebarVisibility(): boolean
Toggle the visibility of side bar, returns the status of side bar's hidden
Returns
boolean
Defined in
services/workbench/layoutService.ts:24
toggleStatusBarVisibility
▸ toggleStatusBarVisibility(): boolean
Toggle the visibility of the status bar, returns the status of status bar's hidden
Returns
boolean
Defined in
services/workbench/layoutService.ts:36
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