|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 interface MozTreeBoxObject; |
|
6 interface MozTreeColumn; |
|
7 |
|
8 [Func="IsChromeOrXBL"] |
|
9 interface TreeColumns { |
|
10 /** |
|
11 * The tree widget for these columns. |
|
12 */ |
|
13 readonly attribute MozTreeBoxObject? tree; |
|
14 |
|
15 /** |
|
16 * The number of columns. |
|
17 */ |
|
18 readonly attribute unsigned long count; |
|
19 |
|
20 /** |
|
21 * An alias for count (for the benefit of scripts which treat this as an |
|
22 * array). |
|
23 */ |
|
24 readonly attribute unsigned long length; |
|
25 |
|
26 /** |
|
27 * Get the first/last column. |
|
28 */ |
|
29 MozTreeColumn? getFirstColumn(); |
|
30 MozTreeColumn? getLastColumn(); |
|
31 |
|
32 /** |
|
33 * Attribute based column getters. |
|
34 */ |
|
35 MozTreeColumn? getPrimaryColumn(); |
|
36 MozTreeColumn? getSortedColumn(); |
|
37 MozTreeColumn? getKeyColumn(); |
|
38 |
|
39 /** |
|
40 * Get the column for the given element. |
|
41 */ |
|
42 MozTreeColumn? getColumnFor(Element? element); |
|
43 |
|
44 /** |
|
45 * Parametric column getters. |
|
46 */ |
|
47 getter MozTreeColumn? getNamedColumn(DOMString name); |
|
48 getter MozTreeColumn? getColumnAt(unsigned long index); |
|
49 |
|
50 /** |
|
51 * This method is called whenever a treecol is added or removed and |
|
52 * the column cache needs to be rebuilt. |
|
53 */ |
|
54 void invalidateColumns(); |
|
55 |
|
56 void restoreNaturalOrder(); |
|
57 }; |