michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: interface MozTreeBoxObject; michael@0: interface MozTreeColumn; michael@0: michael@0: [Func="IsChromeOrXBL"] michael@0: interface TreeColumns { michael@0: /** michael@0: * The tree widget for these columns. michael@0: */ michael@0: readonly attribute MozTreeBoxObject? tree; michael@0: michael@0: /** michael@0: * The number of columns. michael@0: */ michael@0: readonly attribute unsigned long count; michael@0: michael@0: /** michael@0: * An alias for count (for the benefit of scripts which treat this as an michael@0: * array). michael@0: */ michael@0: readonly attribute unsigned long length; michael@0: michael@0: /** michael@0: * Get the first/last column. michael@0: */ michael@0: MozTreeColumn? getFirstColumn(); michael@0: MozTreeColumn? getLastColumn(); michael@0: michael@0: /** michael@0: * Attribute based column getters. michael@0: */ michael@0: MozTreeColumn? getPrimaryColumn(); michael@0: MozTreeColumn? getSortedColumn(); michael@0: MozTreeColumn? getKeyColumn(); michael@0: michael@0: /** michael@0: * Get the column for the given element. michael@0: */ michael@0: MozTreeColumn? getColumnFor(Element? element); michael@0: michael@0: /** michael@0: * Parametric column getters. michael@0: */ michael@0: getter MozTreeColumn? getNamedColumn(DOMString name); michael@0: getter MozTreeColumn? getColumnAt(unsigned long index); michael@0: michael@0: /** michael@0: * This method is called whenever a treecol is added or removed and michael@0: * the column cache needs to be rebuilt. michael@0: */ michael@0: void invalidateColumns(); michael@0: michael@0: void restoreNaturalOrder(); michael@0: };