Class: LayoutService
molecule.LayoutService
Hierarchy
Component<ILayout>↳
LayoutService
Implements
Constructors
constructor
• new LayoutService()
Overrides
Defined in
src/services/workbench/layoutService.ts:78
Properties
_container
• Private _container: null | HTMLElement
Defined in
src/services/workbench/layoutService.ts:77
state
• Protected state: ILayout
Implementation of
Overrides
Defined in
src/services/workbench/layoutService.ts:76
Accessors
container
• get container(): HTMLElement
Get the container of the molecule
Returns
HTMLElement
Implementation of
Defined in
src/services/workbench/layoutService.ts:83
Methods
count
▸ count(name): number
Count the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Event name |
Returns
number
Implementation of
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
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:20
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Implementation of
Inherited from
Defined in
getMenuBarMode
▸ getMenuBarMode(): "horizontal" | "vertical"
Get the mode of the MenuBar
Returns
"horizontal" | "vertical"
Implementation of
Defined in
src/services/workbench/layoutService.ts:161
getState
▸ getState(): ILayout
Get the Component state
Returns
ILayout
Implementation of
Inherited from
Defined in
onUpdateState
▸ onUpdateState(callback): void
Listen to the Component state update event
Parameters
| Name | Type |
|---|---|
callback | (prevState: ILayout, nextState: ILayout) => void |
Returns
void
Implementation of
Inherited from
Defined in
removeOnUpdateState
▸ removeOnUpdateState(): void
Remove the Component update event listening
Returns
void
Implementation of
ILayoutService.removeOnUpdateState
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
Implementation of
Inherited from
Defined in
reset
▸ reset(): void
Reset all layout data as default value
Returns
void
Implementation of
Defined in
src/services/workbench/layoutService.ts:166
setHorizontalPaneSize
▸ setHorizontalPaneSize(horizontalSplitPanePos): void
Set the sizes between the editor and the panel
Parameters
| Name | Type |
|---|---|
horizontalSplitPanePos | string[] |
Returns
void
Implementation of
ILayoutService.setHorizontalPaneSize
Defined in
src/services/workbench/layoutService.ts:149
setMenuBarMode
▸ setMenuBarMode(mode): void
Set the mode of the MenuBar, default is vertical
Parameters
| Name | Type |
|---|---|
mode | "horizontal" | "vertical" |
Returns
void
Implementation of
Defined in
src/services/workbench/layoutService.ts:153
setPaneSize
▸ setPaneSize(splitPanePos): void
Set the sizes between the side bar and main content area
Parameters
| Name | Type |
|---|---|
splitPanePos | string[] |
Returns
void
Implementation of
Defined in
src/services/workbench/layoutService.ts:146
setSideBarPosition
▸ setSideBarPosition(position): void
Set the position of the side bar, default is in left
Parameters
| Name | Type |
|---|---|
position | "right" | "left" |
Returns
void
Implementation of
ILayoutService.setSideBarPosition
Defined in
src/services/workbench/layoutService.ts:125
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
Implementation of
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
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:11
toggleActivityBarVisibility
▸ toggleActivityBarVisibility(): boolean
Toggle the visibility of the activity bar, returns the status of activity bar's hidden
Returns
boolean
Implementation of
ILayoutService.toggleActivityBarVisibility
Defined in
src/services/workbench/layoutService.ts:111
toggleMenuBarVisibility
▸ toggleMenuBarVisibility(): boolean
Toggle the visibility of menu bar, returns the status of menu bar's hidden
Returns
boolean
Implementation of
ILayoutService.toggleMenuBarVisibility
Defined in
src/services/workbench/layoutService.ts:90
togglePanelMaximized
▸ togglePanelMaximized(): boolean
Toggle the maximized status of the panel, returns the status of maximized panel
Returns
boolean
Implementation of
ILayoutService.togglePanelMaximized
Defined in
src/services/workbench/layoutService.ts:135
togglePanelVisibility
▸ togglePanelVisibility(): boolean
Toggle the visibility of the panel, returns the status of panel's hidden
Returns
boolean
Implementation of
ILayoutService.togglePanelVisibility
Defined in
src/services/workbench/layoutService.ts:97
toggleSidebarVisibility
▸ toggleSidebarVisibility(): boolean
Toggle the visibility of side bar, returns the status of side bar's hidden
Returns
boolean
Implementation of
ILayoutService.toggleSidebarVisibility
Defined in
src/services/workbench/layoutService.ts:104
toggleStatusBarVisibility
▸ toggleStatusBarVisibility(): boolean
Toggle the visibility of the status bar, returns the status of status bar's hidden
Returns
boolean
Implementation of
ILayoutService.toggleStatusBarVisibility
Defined in
src/services/workbench/layoutService.ts:118
unsubscribe
▸ unsubscribe(name): void
Unsubscribe the specific event
Parameters
| Name | Type | Description |
|---|---|---|
name | any | The event name |
Returns
void