/*************************************************************************** * Copyright (c) 2018, VoilĂ  contributors * * Copyright (c) 2018, QuantStack * * * * Distributed under the terms of the BSD 3-Clause License. * * * * The full license is in the file LICENSE, distributed with this software. * ****************************************************************************/ import { JupyterFrontEnd } from '@jupyterlab/application'; import { DocumentRegistry } from '@jupyterlab/docregistry'; import { Widget } from '@lumino/widgets'; export type IShell = VoilaShell; /** * A namespace for Shell statics */ export declare namespace IShell { /** * The areas of the application shell where widgets can reside. */ type Area = 'main' | 'header' | 'top' | 'menu' | 'left' | 'right' | 'bottom' | 'down'; } /** * The application shell. */ export declare class VoilaShell extends Widget implements JupyterFrontEnd.IShell { constructor(); /** * The current widget in the shell's main area. */ get currentWidget(): Widget | null; activateById(id: string): void; /** * Add a widget to the application shell. * * @param widget - The widget being added. * * @param area - Optional region in the shell into which the widget should * be added. * */ add(widget: Widget, area?: IShell.Area, options?: DocumentRegistry.IOpenOptions): void; widgets(area: IShell.Area): IterableIterator; /** * Add a widget to the top content area. * * #### Notes * Widgets must have a unique `id` property, which will be used as the DOM id. */ private _addToTopArea; /** * Add a widget to the bottom content area. * * #### Notes * Widgets must have a unique `id` property, which will be used as the DOM id. */ private _addToBottomArea; /** * Handle a change to the layout. */ private _onLayoutModified; private _topHandler; private _mainPanel; private _bottomPanel; private _layoutDebouncer; private _layoutModified; }