import { ISignal } from '@phosphor/signaling'; import { FocusTracker, Widget } from '@phosphor/widgets'; import { IInstanceRestorer } from '../instancerestorer'; /** * The application shell for JupyterLab. */ export declare class ApplicationShell extends Widget { /** * Construct a new application shell. */ constructor(); /** * A signal emitted when main area's current focus changes. */ readonly currentChanged: ISignal; /** * A signal emitted when main area's active focus changes. */ readonly activeChanged: ISignal; /** * The current widget in the shell's main area. */ readonly currentWidget: Widget | null; /** * The active widget in the shell's main area. */ readonly activeWidget: Widget | null; /** * True if left area is empty. */ readonly leftAreaIsEmpty: boolean; /** * True if main area is empty. */ readonly mainAreaIsEmpty: boolean; /** * Promise that resolves when state is restored, returning layout description. */ readonly restored: Promise; /** * True if right area is empty. */ readonly rightAreaIsEmpty: boolean; /** * True if top area is empty. */ readonly topAreaIsEmpty: boolean; /** * Activate a widget in the left area. */ activateLeft(id: string): void; /** * Activate a widget in the main area. */ activateMain(id: string): void; activateNextTab(): void; activatePreviousTab(): void; /** * Activate a widget in the right area. */ activateRight(id: string): void; /** * Add a widget to the left content area. * * #### Notes * Widgets must have a unique `id` property, which will be used as the DOM id. */ addToLeftArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void; /** * Add a widget to the main content area. * * #### Notes * Widgets must have a unique `id` property, which will be used as the DOM id. * All widgets added to the main area should be disposed after removal (or * simply disposed in order to remove). */ addToMainArea(widget: Widget): void; /** * Add a widget to the right content area. * * #### Notes * Widgets must have a unique `id` property, which will be used as the DOM id. */ addToRightArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void; /** * Add a widget to the top content area. * * #### Notes * Widgets must have a unique `id` property, which will be used as the DOM id. */ addToTopArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void; /** * Collapse the left area. */ collapseLeft(): void; /** * Collapse the right area. */ collapseRight(): void; /** * Close all widgets in the main area. */ closeAll(): void; /** * Set the layout data store for the application shell. */ setLayoutDB(database: IInstanceRestorer.ILayoutDB): void; private _currentTabBar(); private _previousTabBar(); private _nextTabBar(); /** * Save the dehydrated state of the application shell. */ private _save(); /** * Handle a change to the dock area current widget. */ private _onCurrentChanged(sender, args); /** * Handle a change to the dock area active widget. */ private _onActiveChanged(sender, args); private _database; private _dockPanel; private _hboxPanel; private _hsplitPanel; private _isRestored; private _leftHandler; private _restored; private _rightHandler; private _topPanel; private _tracker; private _currentChanged; private _activeChanged; } /** * The namespace for `ApplicationShell` class statics. */ export declare namespace ApplicationShell { /** * The areas of the application shell where widgets can reside. */ type Area = 'main' | 'top' | 'left' | 'right'; /** * The options for adding a widget to a side area of the shell. */ interface ISideAreaOptions { /** * The rank order of the widget among its siblings. */ rank?: number; } /** * An arguments object for the changed signals. */ type IChangedArgs = FocusTracker.IChangedArgs; }