Merge m-c to b2g-inbound.
[gecko.git] / dom / webidl / TreeColumns.webidl
blob5a0e7117a6ea4c32b176f91d17f10768ec96f9fb
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;
8 [Func="IsChromeOrXBL"]
9 interface TreeColumns {
10   /**
11    * The tree widget for these columns.
12    */
13   readonly attribute MozTreeBoxObject? tree;
15   /**
16    * The number of columns.
17    */
18   readonly attribute unsigned long count;
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;
26   /**
27    * Get the first/last column.
28    */
29   MozTreeColumn? getFirstColumn();
30   MozTreeColumn? getLastColumn();
32   /**
33    * Attribute based column getters.
34    */
35   MozTreeColumn? getPrimaryColumn();
36   MozTreeColumn? getSortedColumn();
37   MozTreeColumn? getKeyColumn();
39   /**
40    * Get the column for the given element.
41    */
42   MozTreeColumn? getColumnFor(Element? element);
44   /**
45    * Parametric column getters.
46    */
47   getter MozTreeColumn? getNamedColumn(DOMString name);
48   getter MozTreeColumn? getColumnAt(unsigned long index);
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();
56   void restoreNaturalOrder();