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/. */
5 interface MozTreeBoxObject;
6 interface MozTreeColumn;
9 interface TreeColumns {
11 * The tree widget for these columns.
13 readonly attribute MozTreeBoxObject? tree;
16 * The number of columns.
18 readonly attribute unsigned long count;
21 * An alias for count (for the benefit of scripts which treat this as an
24 readonly attribute unsigned long length;
27 * Get the first/last column.
29 MozTreeColumn? getFirstColumn();
30 MozTreeColumn? getLastColumn();
33 * Attribute based column getters.
35 MozTreeColumn? getPrimaryColumn();
36 MozTreeColumn? getSortedColumn();
37 MozTreeColumn? getKeyColumn();
40 * Get the column for the given element.
42 MozTreeColumn? getColumnFor(Element? element);
45 * Parametric column getters.
47 getter MozTreeColumn? getNamedColumn(DOMString name);
48 getter MozTreeColumn? getColumnAt(unsigned long index);
51 * This method is called whenever a treecol is added or removed and
52 * the column cache needs to be rebuilt.
54 void invalidateColumns();
56 void restoreNaturalOrder();