import { Message } from '../core/messaging'; import { ISignal } from '../core/signaling'; import { Panel, PanelLayout } from './panel'; import { ChildMessage, ResizeMessage, Widget } from './widget'; /** * A panel where visible widgets are stacked atop one another. * * #### Notes * This class provides a convenience wrapper around a [[StackedLayout]]. */ export declare class StackedPanel extends Panel { /** * Construct a new stacked panel. * * @param options - The options for initializing the panel. */ constructor(options?: StackedPanel.IOptions); /** * A signal emitted when a widget is removed from a stacked panel. */ widgetRemoved: ISignal; /** * A message handler invoked on a `'child-added'` message. */ protected onChildAdded(msg: ChildMessage): void; /** * A message handler invoked on a `'child-removed'` message. */ protected onChildRemoved(msg: ChildMessage): void; } /** * The namespace for the `StackedPanel` class statics. */ export declare namespace StackedPanel { /** * An options object for creating a stacked panel. */ interface IOptions { /** * The stacked layout to use for the stacked panel. * * The default is a new `StackedLayout`. */ layout?: StackedLayout; } } /** * A layout where visible widgets are stacked atop one another. * * #### Notes * The Z-order of the visible widgets follows their layout order. */ export declare class StackedLayout extends PanelLayout { /** * Attach a widget to the parent's DOM node. * * @param index - The current index of the widget in the layout. * * @param widget - The widget to attach to the parent. * * #### Notes * This is a reimplementation of the superclass method. */ protected attachWidget(index: number, widget: Widget): void; /** * Move a widget in the parent's DOM node. * * @param fromIndex - The previous index of the widget in the layout. * * @param toIndex - The current index of the widget in the layout. * * @param widget - The widget to move in the parent. * * #### Notes * This is a reimplementation of the superclass method. */ protected moveWidget(fromIndex: number, toIndex: number, widget: Widget): void; /** * Detach a widget from the parent's DOM node. * * @param index - The previous index of the widget in the layout. * * @param widget - The widget to detach from the parent. * * #### Notes * This is a reimplementation of the superclass method. */ protected detachWidget(index: number, widget: Widget): void; /** * A message handler invoked on an `'after-show'` message. */ protected onAfterShow(msg: Message): void; /** * A message handler invoked on an `'after-attach'` message. */ protected onAfterAttach(msg: Message): void; /** * A message handler invoked on a `'child-shown'` message. */ protected onChildShown(msg: ChildMessage): void; /** * A message handler invoked on a `'child-hidden'` message. */ protected onChildHidden(msg: ChildMessage): void; /** * A message handler invoked on a `'resize'` message. */ protected onResize(msg: ResizeMessage): void; /** * A message handler invoked on an `'update-request'` message. */ protected onUpdateRequest(msg: Message): void; /** * A message handler invoked on a `'fit-request'` message. */ protected onFitRequest(msg: Message): void; /** * Fit the layout to the total size required by the widgets. */ private _fit(); /** * Update the layout position and size of the widgets. * * The parent offset dimensions should be `-1` if unknown. */ private _update(offsetWidth, offsetHeight); private _dirty; private _box; }