1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/TreeColumns.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +interface MozTreeBoxObject; 1.9 +interface MozTreeColumn; 1.10 + 1.11 +[Func="IsChromeOrXBL"] 1.12 +interface TreeColumns { 1.13 + /** 1.14 + * The tree widget for these columns. 1.15 + */ 1.16 + readonly attribute MozTreeBoxObject? tree; 1.17 + 1.18 + /** 1.19 + * The number of columns. 1.20 + */ 1.21 + readonly attribute unsigned long count; 1.22 + 1.23 + /** 1.24 + * An alias for count (for the benefit of scripts which treat this as an 1.25 + * array). 1.26 + */ 1.27 + readonly attribute unsigned long length; 1.28 + 1.29 + /** 1.30 + * Get the first/last column. 1.31 + */ 1.32 + MozTreeColumn? getFirstColumn(); 1.33 + MozTreeColumn? getLastColumn(); 1.34 + 1.35 + /** 1.36 + * Attribute based column getters. 1.37 + */ 1.38 + MozTreeColumn? getPrimaryColumn(); 1.39 + MozTreeColumn? getSortedColumn(); 1.40 + MozTreeColumn? getKeyColumn(); 1.41 + 1.42 + /** 1.43 + * Get the column for the given element. 1.44 + */ 1.45 + MozTreeColumn? getColumnFor(Element? element); 1.46 + 1.47 + /** 1.48 + * Parametric column getters. 1.49 + */ 1.50 + getter MozTreeColumn? getNamedColumn(DOMString name); 1.51 + getter MozTreeColumn? getColumnAt(unsigned long index); 1.52 + 1.53 + /** 1.54 + * This method is called whenever a treecol is added or removed and 1.55 + * the column cache needs to be rebuilt. 1.56 + */ 1.57 + void invalidateColumns(); 1.58 + 1.59 + void restoreNaturalOrder(); 1.60 +};