UNPKG

sussudio

Version:

An unofficial VS Code Internal API

46 lines (45 loc) 1.86 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IView, IViewSize } from "../grid/grid.mjs"; import { IBoundarySashes } from "../sash/sash.mjs"; import { ISplitViewStyles } from "../splitview/splitview.mjs"; import { Color } from "../../../common/color.mjs"; import { Event } from "../../../common/event.mjs"; import { IDisposable } from "../../../common/lifecycle.mjs"; export interface CenteredViewState { leftMarginRatio: number; rightMarginRatio: number; } export interface ICenteredViewStyles extends ISplitViewStyles { background: Color; } export declare class CenteredViewLayout implements IDisposable { private container; private view; readonly state: CenteredViewState; private splitView?; private width; private height; private style; private didLayout; private emptyViews; private readonly splitViewDisposables; constructor(container: HTMLElement, view: IView, state?: CenteredViewState); get minimumWidth(): number; get maximumWidth(): number; get minimumHeight(): number; get maximumHeight(): number; get onDidChange(): Event<IViewSize | undefined>; private _boundarySashes; get boundarySashes(): IBoundarySashes; set boundarySashes(boundarySashes: IBoundarySashes); layout(width: number, height: number, top: number, left: number): void; private resizeMargins; isActive(): boolean; styles(style: ICenteredViewStyles): void; activate(active: boolean): void; isDefault(state: CenteredViewState): boolean; dispose(): void; }