1 | import { Message } from '@lumino/messaging';
|
2 | import { AccordionLayout } from './accordionlayout';
|
3 | import { SplitLayout } from './splitlayout';
|
4 | import { SplitPanel } from './splitpanel';
|
5 | import { Title } from './title';
|
6 | import { Widget } from './widget';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class AccordionPanel extends SplitPanel {
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 | constructor(options?: AccordionPanel.IOptions);
|
20 | /**
|
21 | * The renderer used by the accordion panel.
|
22 | */
|
23 | readonly renderer: AccordionPanel.IRenderer;
|
24 | /**
|
25 | * The section title space.
|
26 | *
|
27 | * This is the height if the panel is vertical and the width if it is
|
28 | * horizontal.
|
29 | */
|
30 | titleSpace: number;
|
31 | /**
|
32 | * A read-only array of the section titles in the panel.
|
33 | */
|
34 | readonly titles: ReadonlyArray<HTMLElement>;
|
35 | /**
|
36 | * Add a widget to the end of the panel.
|
37 | *
|
38 | * @param widget - The widget to add to the panel.
|
39 | *
|
40 | * #### Notes
|
41 | * If the widget is already contained in the panel, it will be moved.
|
42 | */
|
43 | addWidget(widget: Widget): void;
|
44 | /**
|
45 | * Insert a widget at the specified index.
|
46 | *
|
47 | * @param index - The index at which to insert the widget.
|
48 | *
|
49 | * @param widget - The widget to insert into to the panel.
|
50 | *
|
51 | * #### Notes
|
52 | * If the widget is already contained in the panel, it will be moved.
|
53 | */
|
54 | insertWidget(index: number, widget: Widget): void;
|
55 | /**
|
56 | * Handle the DOM events for the accordion panel.
|
57 | *
|
58 | * @param event - The DOM event sent to the panel.
|
59 | *
|
60 | * #### Notes
|
61 | * This method implements the DOM `EventListener` interface and is
|
62 | * called in response to events on the panel's DOM node. It should
|
63 | * not be called directly by user code.
|
64 | */
|
65 | handleEvent(event: Event): void;
|
66 | /**
|
67 | * A message handler invoked on a `'before-attach'` message.
|
68 | */
|
69 | protected onBeforeAttach(msg: Message): void;
|
70 | /**
|
71 | * A message handler invoked on an `'after-detach'` message.
|
72 | */
|
73 | protected onAfterDetach(msg: Message): void;
|
74 | /**
|
75 | * Handle the `changed` signal of a title object.
|
76 | */
|
77 | private _onTitleChanged;
|
78 | /**
|
79 | * Handle the `'click'` event for the accordion panel
|
80 | */
|
81 | private _evtClick;
|
82 | /**
|
83 | * Handle the `'keydown'` event for the accordion panel.
|
84 | */
|
85 | private _eventKeyDown;
|
86 | }
|
87 | /**
|
88 | * The namespace for the `AccordionPanel` class statics.
|
89 | */
|
90 | export declare namespace AccordionPanel {
|
91 | |
92 |
|
93 |
|
94 | type Orientation = SplitLayout.Orientation;
|
95 | |
96 |
|
97 |
|
98 | type Alignment = SplitLayout.Alignment;
|
99 | |
100 |
|
101 |
|
102 | type IRenderer = AccordionLayout.IRenderer;
|
103 | |
104 |
|
105 |
|
106 | interface IOptions extends Partial<AccordionLayout.IOptions> {
|
107 | |
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 | layout?: AccordionLayout;
|
115 | }
|
116 | |
117 |
|
118 |
|
119 | class Renderer extends SplitPanel.Renderer implements IRenderer {
|
120 | |
121 |
|
122 |
|
123 | readonly titleClassName = "lm-AccordionPanel-title";
|
124 | |
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 | createCollapseIcon(data: Title<Widget>): HTMLElement;
|
132 | |
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 | createSectionTitle(data: Title<Widget>): HTMLElement;
|
140 | |
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 | createTitleKey(data: Title<Widget>): string;
|
152 | private _titleID;
|
153 | private _titleKeys;
|
154 | }
|
155 | |
156 |
|
157 |
|
158 | const defaultRenderer: Renderer;
|
159 | }
|
160 |
|
\ | No newline at end of file |