import { Message } from 'phosphor-messaging'; import { Widget } from 'phosphor-widget'; /** * A widget which provides a flexible docking area for content widgets. */ export declare class DockPanel extends Widget { /** * Construct a new dock panel. */ constructor(); /** * Get the spacing between the tab panels. */ /** * Set the spacing between the tab panels. */ spacing: number; /** * Insert a widget as a new panel above a reference widget. * * @param widget - The widget to insert into the dock panel. * * @param ref - The reference widget. If this is not provided, the * widget will be inserted at the top edge of the dock panel. * * @throws An error if either `widget` or `ref` is invalid. */ insertTop(widget: Widget, ref?: Widget): void; /** * Insert a widget as a new panel to the left of a reference widget. * * @param widget - The widget to insert into the dock panel. * * @param ref - The reference widget. If this is not provided, the * widget will be inserted at the left edge of the dock panel. * * @throws An error if either `widget` or `ref` is invalid. */ insertLeft(widget: Widget, ref?: Widget): void; /** * Insert a widget as a new panel to the right of a reference widget. * * @param widget - The widget to insert into the dock panel. * * @param ref - The reference widget. If this is not provided, the * widget will be inserted at the right edge of the dock panel. * * @throws An error if either `widget` or `ref` is invalid. */ insertRight(widget: Widget, ref?: Widget): void; /** * Insert a widget as a new panel below a reference widget. * * @param widget - The widget to insert into the dock panel. * * @param ref - The reference widget. If this is not provided, the * widget will be inserted at the bottom edge of the dock panel. * * @throws An error if either `widget` or `ref` is invalid. */ insertBottom(widget: Widget, ref?: Widget): void; /** * Insert a widget as a sibling tab before a reference widget. * * @param widget - The widget to insert into the dock panel. * * @param ref - The reference widget. If this is not provided, the * widget will be inserted as the first tab in the top-left panel. * * @throws An error if either `widget` or `ref` is invalid. */ insertTabBefore(widget: Widget, ref?: Widget): void; /** * Insert a widget as a sibling tab after a reference widget. * * @param widget - The widget to insert into the dock panel. * * @param ref - The reference widget. If this is not provided, the * widget will be inserted as the last tab in the top-left panel. * * @throws An error if either `widget` or `ref` is invalid. */ insertTabAfter(widget: Widget, ref?: Widget): void; /** * Ensure the tab for the specified content widget is selected. * * @param widget - The content widget of interest. * * #### Notes * If the widget is not contained in the dock panel, or is already * the selected tab in its respective tab panel, this is a no-op. */ selectWidget(widget: Widget): void; /** * Handle the DOM events for the dock panel. * * @param event - The DOM event sent to the dock panel. * * #### Notes * This method implements the DOM `EventListener` interface and is * called in response to events on the dock panel's node. It should * not be called directly by user code. */ handleEvent(event: Event): void; /** * A message handler invoked on an `'after-attach'` message. */ protected onAfterAttach(msg: Message): void; /** * A message handler invoked on a `'before-detach'` message. */ protected onBeforeDetach(msg: Message): void; /** * Handle the `'p-dragenter'` event for the dock panel. */ private _evtDragEnter(event); /** * Handle the `'p-dragleave'` event for the dock panel. */ private _evtDragLeave(event); /** * Handle the `'p-dragover'` event for the dock panel. */ private _evtDragOver(event); /** * Handle the `'p-drop'` event for the dock panel. */ private _evtDrop(event); }