1 | import { SplitLayout } from './splitlayout';
|
2 | import { Title } from './title';
|
3 | import { Widget } from './widget';
|
4 |
|
5 |
|
6 |
|
7 | export declare class AccordionLayout extends SplitLayout {
|
8 | |
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | constructor(options: AccordionLayout.IOptions);
|
19 | /**
|
20 | * The section title height or width depending on the orientation.
|
21 | */
|
22 | titleSpace: number;
|
23 | /**
|
24 | * A read-only array of the section titles in the panel.
|
25 | */
|
26 | readonly titles: ReadonlyArray<HTMLElement>;
|
27 | /**
|
28 | * Dispose of the resources held by the layout.
|
29 | */
|
30 | dispose(): void;
|
31 | /**
|
32 | * The renderer used by the accordion layout.
|
33 | */
|
34 | readonly renderer: AccordionLayout.IRenderer;
|
35 | updateTitle(index: number, widget: Widget): void;
|
36 | /**
|
37 | * Attach a widget to the parent's DOM node.
|
38 | *
|
39 | * @param index - The current index of the widget in the layout.
|
40 | *
|
41 | * @param widget - The widget to attach to the parent.
|
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 | protected moveWidget(fromIndex: number, toIndex: number, widget: Widget): void;
|
54 | /**
|
55 | * Detach a widget from the parent's DOM node.
|
56 | *
|
57 | * @param index - The previous index of the widget in the layout.
|
58 | *
|
59 | * @param widget - The widget to detach from the parent.
|
60 | *
|
61 | * #### Notes
|
62 | * This is a reimplementation of the superclass method.
|
63 | */
|
64 | protected detachWidget(index: number, widget: Widget): void;
|
65 | /**
|
66 | * Update the item position.
|
67 | *
|
68 | * @param i Item index
|
69 | * @param isHorizontal Whether the layout is horizontal or not
|
70 | * @param left Left position in pixels
|
71 | * @param top Top position in pixels
|
72 | * @param height Item height
|
73 | * @param width Item width
|
74 | * @param size Item size
|
75 | */
|
76 | protected updateItemPosition(i: number, isHorizontal: boolean, left: number, top: number, height: number, width: number, size: number): void;
|
77 | private _titles;
|
78 | }
|
79 | export declare namespace AccordionLayout {
|
80 | |
81 |
|
82 |
|
83 | type Orientation = SplitLayout.Orientation;
|
84 | |
85 |
|
86 |
|
87 | type Alignment = SplitLayout.Alignment;
|
88 | |
89 |
|
90 |
|
91 | interface IOptions extends SplitLayout.IOptions {
|
92 | |
93 |
|
94 |
|
95 | renderer: IRenderer;
|
96 | |
97 |
|
98 |
|
99 |
|
100 |
|
101 | titleSpace?: number;
|
102 | }
|
103 | |
104 |
|
105 |
|
106 | interface IRenderer extends SplitLayout.IRenderer {
|
107 | |
108 |
|
109 |
|
110 | readonly titleClassName: string;
|
111 | |
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | createSectionTitle(title: Title<Widget>): HTMLElement;
|
119 | }
|
120 | }
|
121 |
|
\ | No newline at end of file |