2013-04-21 10:42:26 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
2013-05-07 01:38:08 +04:00
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2013-04-21 10:42:26 +04:00
|
|
|
|
2019-09-27 18:26:14 +03:00
|
|
|
[Func="IsChromeOrXBL",
|
|
|
|
Exposed=Window]
|
2013-04-21 10:42:26 +04:00
|
|
|
interface TreeColumns {
|
|
|
|
/**
|
|
|
|
* The tree widget for these columns.
|
|
|
|
*/
|
2018-12-04 19:25:30 +03:00
|
|
|
readonly attribute XULTreeElement? tree;
|
2013-04-21 10:42:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The number of columns.
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long count;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An alias for count (for the benefit of scripts which treat this as an
|
|
|
|
* array).
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the first/last column.
|
|
|
|
*/
|
2014-10-17 13:13:41 +04:00
|
|
|
TreeColumn? getFirstColumn();
|
|
|
|
TreeColumn? getLastColumn();
|
2013-04-21 10:42:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Attribute based column getters.
|
|
|
|
*/
|
2014-10-17 13:13:41 +04:00
|
|
|
TreeColumn? getPrimaryColumn();
|
|
|
|
TreeColumn? getSortedColumn();
|
|
|
|
TreeColumn? getKeyColumn();
|
2013-04-21 10:42:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the column for the given element.
|
|
|
|
*/
|
2014-10-17 13:13:41 +04:00
|
|
|
TreeColumn? getColumnFor(Element? element);
|
2013-04-21 10:42:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Parametric column getters.
|
|
|
|
*/
|
2014-10-17 13:13:41 +04:00
|
|
|
getter TreeColumn? getNamedColumn(DOMString name);
|
|
|
|
getter TreeColumn? getColumnAt(unsigned long index);
|
2013-04-21 10:42:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is called whenever a treecol is added or removed and
|
|
|
|
* the column cache needs to be rebuilt.
|
|
|
|
*/
|
|
|
|
void invalidateColumns();
|
|
|
|
|
|
|
|
void restoreNaturalOrder();
|
|
|
|
};
|