Interface: ILayoutService
services.ILayoutService
Hierarchy
Component
\<ILayout
>↳
ILayoutService
Table of contents
Properties
Methods
- getMenuBarMode
- onWorkbenchDidMount
- reset
- setAuxiliaryBar
- setEditorGroupDirection
- setGroupSplitSize
- setHorizontalPaneSize
- setMenuBarMode
- setPaneSize
- setSideBarPosition
- subscribe
- toggleActivityBarVisibility
- toggleMenuBarVisibility
- togglePanelMaximized
- togglePanelVisibility
- toggleSidebarVisibility
- toggleStatusBarVisibility
- unsubscribe
Properties
container
• Readonly
container: null
| HTMLElement
Get the container of the molecule
Defined in
src/services/workbench/layoutService.ts:12
state
• Protected
Abstract
state: ILayout
Inherited from
Component.state
Defined in
Methods
getMenuBarMode
▸ getMenuBarMode(): "vertical"
| "horizontal"
Get the mode of the MenuBar
Returns
"vertical"
| "horizontal"
Defined in
src/services/workbench/layoutService.ts:67
onWorkbenchDidMount
▸ onWorkbenchDidMount(callback
): void
Listen to the workbench did mount event
Parameters
Name | Type | Description |
---|---|---|
callback | Function | callback function |
Returns
void
Defined in
src/services/workbench/layoutService.ts:88
reset
▸ reset(): void
Reset all layout data as default value
Returns
void
Defined in
src/services/workbench/layoutService.ts:83
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
src/services/workbench/layoutService.ts:79
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
src/services/workbench/layoutService.ts:71
setGroupSplitSize
▸ setGroupSplitSize(groupSplitPos
): void
Set the sizes between editor groups
Parameters
Name | Type |
---|---|
groupSplitPos | (string | number )[] |
Returns
void
Defined in
src/services/workbench/layoutService.ts:57
setHorizontalPaneSize
▸ setHorizontalPaneSize(horizontalSplitPanePos
): void
Set the sizes between the editor and the panel
Parameters
Name | Type |
---|---|
horizontalSplitPanePos | (string | number )[] |
Returns
void
Defined in
src/services/workbench/layoutService.ts:46
setMenuBarMode
▸ setMenuBarMode(mode
): void
Set the mode of the MenuBar, default is vertical
Parameters
Name | Type |
---|---|
mode | "vertical" | "horizontal" |
Returns
void
Unachieved
Defined in
src/services/workbench/layoutService.ts:63
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
src/services/workbench/layoutService.ts:41
setSideBarPosition
▸ setSideBarPosition(position
): void
Set the position of the side bar, default is in left
Parameters
Name | Type |
---|---|
position | "right" | "left" |
Returns
void
Unachieved
Defined in
src/services/workbench/layoutService.ts:52
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
toggleActivityBarVisibility
▸ toggleActivityBarVisibility(): boolean
Toggle the visibility of the activity bar, returns the status of activity bar's hidden
Returns
boolean
Defined in
src/services/workbench/layoutService.ts:28
toggleMenuBarVisibility
▸ toggleMenuBarVisibility(): boolean
Toggle the visibility of menu bar, returns the status of menu bar's hidden
Returns
boolean
Defined in
src/services/workbench/layoutService.ts:16
togglePanelMaximized
▸ togglePanelMaximized(): boolean
Toggle the maximized status of the panel, returns the status of maximized panel
Returns
boolean
Defined in
src/services/workbench/layoutService.ts:36
togglePanelVisibility
▸ togglePanelVisibility(): boolean
Toggle the visibility of the panel, returns the status of panel's hidden
Returns
boolean
Defined in
src/services/workbench/layoutService.ts:24
toggleSidebarVisibility
▸ toggleSidebarVisibility(): boolean
Toggle the visibility of side bar, returns the status of side bar's hidden
Returns
boolean
Defined in
src/services/workbench/layoutService.ts:20
toggleStatusBarVisibility
▸ toggleStatusBarVisibility(): boolean
Toggle the visibility of the status bar, returns the status of status bar's hidden
Returns
boolean
Defined in
src/services/workbench/layoutService.ts:32
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