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