1 | import { Message } from '@phosphor/messaging';
|
2 | import { PanelLayout } from './panellayout';
|
3 | import { Widget } from './widget';
|
4 | /**
|
5 | * A layout where visible widgets are stacked atop one another.
|
6 | *
|
7 | * #### Notes
|
8 | * The Z-order of the visible widgets follows their layout order.
|
9 | */
|
10 | export declare class StackedLayout extends PanelLayout {
|
11 | /**
|
12 | * Dispose of the resources held by the layout.
|
13 | */
|
14 | dispose(): void;
|
15 | /**
|
16 | * Attach a widget to the parent's DOM node.
|
17 | *
|
18 | * @param index - The current index of the widget in the layout.
|
19 | *
|
20 | * @param widget - The widget to attach to the parent.
|
21 | *
|
22 | * #### Notes
|
23 | * This is a reimplementation of the superclass method.
|
24 | */
|
25 | protected attachWidget(index: number, widget: Widget): void;
|
26 | /**
|
27 | * Move a widget in the parent's DOM node.
|
28 | *
|
29 | * @param fromIndex - The previous index of the widget in the layout.
|
30 | *
|
31 | * @param toIndex - The current index of the widget in the layout.
|
32 | *
|
33 | * @param widget - The widget to move in the parent.
|
34 | *
|
35 | * #### Notes
|
36 | * This is a reimplementation of the superclass method.
|
37 | */
|
38 | protected moveWidget(fromIndex: number, toIndex: number, widget: Widget): void;
|
39 | /**
|
40 | * Detach a widget from the parent's DOM node.
|
41 | *
|
42 | * @param index - The previous index of the widget in the layout.
|
43 | *
|
44 | * @param widget - The widget to detach from the parent.
|
45 | *
|
46 | * #### Notes
|
47 | * This is a reimplementation of the superclass method.
|
48 | */
|
49 | protected detachWidget(index: number, widget: Widget): void;
|
50 | /**
|
51 | * A message handler invoked on a `'before-show'` message.
|
52 | */
|
53 | protected onBeforeShow(msg: Message): void;
|
54 | /**
|
55 | * A message handler invoked on a `'before-attach'` message.
|
56 | */
|
57 | protected onBeforeAttach(msg: Message): void;
|
58 | /**
|
59 | * A message handler invoked on a `'child-shown'` message.
|
60 | */
|
61 | protected onChildShown(msg: Widget.ChildMessage): void;
|
62 | /**
|
63 | * A message handler invoked on a `'child-hidden'` message.
|
64 | */
|
65 | protected onChildHidden(msg: Widget.ChildMessage): void;
|
66 | /**
|
67 | * A message handler invoked on a `'resize'` message.
|
68 | */
|
69 | protected onResize(msg: Widget.ResizeMessage): void;
|
70 | /**
|
71 | * A message handler invoked on an `'update-request'` message.
|
72 | */
|
73 | protected onUpdateRequest(msg: Message): void;
|
74 | /**
|
75 | * A message handler invoked on a `'fit-request'` message.
|
76 | */
|
77 | protected onFitRequest(msg: Message): void;
|
78 | /**
|
79 | * Fit the layout to the total size required by the widgets.
|
80 | */
|
81 | private _fit;
|
82 | /**
|
83 | * Update the layout position and size of the widgets.
|
84 | *
|
85 | * The parent offset dimensions should be `-1` if unknown.
|
86 | */
|
87 | private _update;
|
88 | private _dirty;
|
89 | private _items;
|
90 | private _box;
|
91 | }
|