跳到主要内容
版本:0.9.0-beta.2

Interface: ILayoutService

molecule.ILayoutService

Hierarchy

Implemented by

Properties

container

Readonly container: null | HTMLElement

Get the container of the molecule

Defined in

src/services/workbench/layoutService.ts:15


state

Protected Abstract state: ILayout

Inherited from

Component.state

Defined in

src/react/component.ts:42

Methods

count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Inherited from

Component.count

Defined in

src/common/event/eventBus.ts:28


emit

emit(name, ...args): void

Emit the service event

Parameters

NameTypeDescription
namestringEvent name
...argsanyArguments

Returns

void

Inherited from

Component.emit

Defined in

src/common/event/eventBus.ts:20


forceUpdate

forceUpdate(): void

Force to update the Component

Returns

void

Inherited from

Component.forceUpdate

Defined in

src/react/component.ts:79


getMenuBarMode

getMenuBarMode(): "horizontal" | "vertical"

Get the mode of the MenuBar

Returns

"horizontal" | "vertical"

Defined in

src/services/workbench/layoutService.ts:65


getState

getState(): ILayout

Get the Component state

Returns

ILayout

Inherited from

Component.getState

Defined in

src/react/component.ts:83


onUpdateState

onUpdateState(callback): void

Listen to the Component state update event

Parameters

NameType
callback(prevState: ILayout, nextState: ILayout) => void

Returns

void

Inherited from

Component.onUpdateState

Defined in

src/react/component.ts:71


removeOnUpdateState

removeOnUpdateState(): void

Remove the Component update event listening

Returns

void

Inherited from

Component.removeOnUpdateState

Defined in

src/react/component.ts:75


render

render(nextState?): void

Initiative notify the component to render the view by the state

Parameters

NameType
nextState?ILayout

Returns

void

Inherited from

Component.render

Defined in

src/react/component.ts:67


reset

reset(): void

Reset all layout data as default value

Returns

void

Defined in

src/services/workbench/layoutService.ts:69


setHorizontalPaneSize

setHorizontalPaneSize(horizontalSplitPanePos): void

Set the sizes between the editor and the panel

Parameters

NameType
horizontalSplitPanePosstring[]

Returns

void

Defined in

src/services/workbench/layoutService.ts:49


setMenuBarMode

setMenuBarMode(mode): void

Set the mode of the MenuBar, default is vertical

unachieved

Parameters

NameType
mode"horizontal" | "vertical"

Returns

void

Defined in

src/services/workbench/layoutService.ts:61


setPaneSize

setPaneSize(splitPanePos): void

Set the sizes between the side bar and main content area

Parameters

NameType
splitPanePosstring[]

Returns

void

Defined in

src/services/workbench/layoutService.ts:44


setSideBarPosition

setSideBarPosition(position): void

Set the position of the side bar, default is in left

unachieved

Parameters

NameType
position"right" | "left"

Returns

void

Defined in

src/services/workbench/layoutService.ts:55


setState

setState(values, callback?): void

Set the state values, and notify the view component to re render

Parameters

NameTypeDescription
valuesPartial<ILayout>update target state values
callback?(prevState: ILayout, nextState: ILayout) => void-

Returns

void

Inherited from

Component.setState

Defined in

src/react/component.ts:54


subscribe

subscribe(name, callback): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
callbackFunctionCallback 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:31


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:19


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:39


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:27


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:23


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:35


unsubscribe

unsubscribe(name): void

Unsubscribe the specific event

Parameters

NameTypeDescription
nameanyThe event name

Returns

void

Inherited from

Component.unsubscribe

Defined in

src/common/event/eventBus.ts:37