1 | import { Message } from '@lumino/messaging';
|
2 | import { Layout } from './layout';
|
3 | import { PanelLayout } from './panellayout';
|
4 | import { Widget } from './widget';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare class StackedLayout extends PanelLayout {
|
12 | constructor(options?: StackedLayout.IOptions);
|
13 | /**
|
14 | * The method for hiding widgets.
|
15 | *
|
16 | * #### Notes
|
17 | * If there is only one child widget, `Display` hiding mode will be used
|
18 | * regardless of this setting.
|
19 | */
|
20 | get hiddenMode(): Widget.HiddenMode;
|
21 | /**
|
22 | * Set the method for hiding widgets.
|
23 | *
|
24 | * #### Notes
|
25 | * If there is only one child widget, `Display` hiding mode will be used
|
26 | * regardless of this setting.
|
27 | */
|
28 | set hiddenMode(v: Widget.HiddenMode);
|
29 | /**
|
30 | * Dispose of the resources held by the layout.
|
31 | */
|
32 | dispose(): void;
|
33 | /**
|
34 | * Attach a widget to the parent's DOM node.
|
35 | *
|
36 | * @param index - The current index of the widget in the layout.
|
37 | *
|
38 | * @param widget - The widget to attach to the parent.
|
39 | *
|
40 | * #### Notes
|
41 | * This is a reimplementation of the superclass method.
|
42 | */
|
43 | protected attachWidget(index: number, widget: Widget): void;
|
44 | /**
|
45 | * Move a widget in the parent's DOM node.
|
46 | *
|
47 | * @param fromIndex - The previous index of the widget in the layout.
|
48 | *
|
49 | * @param toIndex - The current index of the widget in the layout.
|
50 | *
|
51 | * @param widget - The widget to move in the parent.
|
52 | *
|
53 | * #### Notes
|
54 | * This is a reimplementation of the superclass method.
|
55 | */
|
56 | protected moveWidget(fromIndex: number, toIndex: number, widget: Widget): void;
|
57 | /**
|
58 | * Detach a widget from the parent's DOM node.
|
59 | *
|
60 | * @param index - The previous index of the widget in the layout.
|
61 | *
|
62 | * @param widget - The widget to detach from the parent.
|
63 | *
|
64 | * #### Notes
|
65 | * This is a reimplementation of the superclass method.
|
66 | */
|
67 | protected detachWidget(index: number, widget: Widget): void;
|
68 | /**
|
69 | * A message handler invoked on a `'before-show'` message.
|
70 | */
|
71 | protected onBeforeShow(msg: Message): void;
|
72 | /**
|
73 | * A message handler invoked on a `'before-attach'` message.
|
74 | */
|
75 | protected onBeforeAttach(msg: Message): void;
|
76 | /**
|
77 | * A message handler invoked on a `'child-shown'` message.
|
78 | */
|
79 | protected onChildShown(msg: Widget.ChildMessage): void;
|
80 | /**
|
81 | * A message handler invoked on a `'child-hidden'` message.
|
82 | */
|
83 | protected onChildHidden(msg: Widget.ChildMessage): void;
|
84 | /**
|
85 | * A message handler invoked on a `'resize'` message.
|
86 | */
|
87 | protected onResize(msg: Widget.ResizeMessage): void;
|
88 | /**
|
89 | * A message handler invoked on an `'update-request'` message.
|
90 | */
|
91 | protected onUpdateRequest(msg: Message): void;
|
92 | /**
|
93 | * A message handler invoked on a `'fit-request'` message.
|
94 | */
|
95 | protected onFitRequest(msg: Message): void;
|
96 | /**
|
97 | * Fit the layout to the total size required by the widgets.
|
98 | */
|
99 | private _fit;
|
100 | /**
|
101 | * Update the layout position and size of the widgets.
|
102 | *
|
103 | * The parent offset dimensions should be `-1` if unknown.
|
104 | */
|
105 | private _update;
|
106 | private _dirty;
|
107 | private _items;
|
108 | private _box;
|
109 | private _hiddenMode;
|
110 | }
|
111 | /**
|
112 | * The namespace for the `StackedLayout` class statics.
|
113 | */
|
114 | export declare namespace StackedLayout {
|
115 | |
116 |
|
117 |
|
118 | interface IOptions extends Layout.IOptions {
|
119 | |
120 |
|
121 |
|
122 |
|
123 |
|
124 | hiddenMode?: Widget.HiddenMode;
|
125 | }
|
126 | }
|