Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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 | #include "nsISupports.idl" |
michael@0 | 6 | |
michael@0 | 7 | interface nsITreeColumns; |
michael@0 | 8 | interface nsIDOMElement; |
michael@0 | 9 | interface nsIAtom; |
michael@0 | 10 | |
michael@0 | 11 | [scriptable, uuid(ae835ecf-6b32-4660-9b43-8a270df56e02)] |
michael@0 | 12 | interface nsITreeColumn : nsISupports |
michael@0 | 13 | { |
michael@0 | 14 | readonly attribute nsIDOMElement element; |
michael@0 | 15 | |
michael@0 | 16 | readonly attribute nsITreeColumns columns; |
michael@0 | 17 | |
michael@0 | 18 | readonly attribute long x; |
michael@0 | 19 | readonly attribute long width; |
michael@0 | 20 | |
michael@0 | 21 | readonly attribute AString id; |
michael@0 | 22 | [noscript] void getIdConst([shared] out wstring idConst); |
michael@0 | 23 | [noscript] readonly attribute nsIAtom atom; |
michael@0 | 24 | |
michael@0 | 25 | readonly attribute long index; |
michael@0 | 26 | |
michael@0 | 27 | readonly attribute boolean primary; |
michael@0 | 28 | readonly attribute boolean cycler; |
michael@0 | 29 | readonly attribute boolean editable; |
michael@0 | 30 | readonly attribute boolean selectable; |
michael@0 | 31 | |
michael@0 | 32 | const short TYPE_TEXT = 1; |
michael@0 | 33 | const short TYPE_CHECKBOX = 2; |
michael@0 | 34 | const short TYPE_PROGRESSMETER = 3; |
michael@0 | 35 | readonly attribute short type; |
michael@0 | 36 | |
michael@0 | 37 | nsITreeColumn getNext(); |
michael@0 | 38 | nsITreeColumn getPrevious(); |
michael@0 | 39 | |
michael@0 | 40 | void invalidate(); |
michael@0 | 41 | }; |
michael@0 | 42 | |
michael@0 | 43 | interface nsITreeBoxObject; |
michael@0 | 44 | |
michael@0 | 45 | [scriptable, uuid(f8a8d6b4-6788-438d-9009-7142798767ab)] |
michael@0 | 46 | interface nsITreeColumns : nsISupports |
michael@0 | 47 | { |
michael@0 | 48 | /** |
michael@0 | 49 | * The tree widget for these columns. |
michael@0 | 50 | */ |
michael@0 | 51 | readonly attribute nsITreeBoxObject tree; |
michael@0 | 52 | |
michael@0 | 53 | /** |
michael@0 | 54 | * The number of columns. |
michael@0 | 55 | */ |
michael@0 | 56 | readonly attribute long count; |
michael@0 | 57 | |
michael@0 | 58 | /** |
michael@0 | 59 | * An alias for count (for the benefit of scripts which treat this as an |
michael@0 | 60 | * array). |
michael@0 | 61 | */ |
michael@0 | 62 | readonly attribute long length; |
michael@0 | 63 | |
michael@0 | 64 | /** |
michael@0 | 65 | * Get the first/last column. |
michael@0 | 66 | */ |
michael@0 | 67 | nsITreeColumn getFirstColumn(); |
michael@0 | 68 | nsITreeColumn getLastColumn(); |
michael@0 | 69 | |
michael@0 | 70 | /** |
michael@0 | 71 | * Attribute based column getters. |
michael@0 | 72 | */ |
michael@0 | 73 | nsITreeColumn getPrimaryColumn(); |
michael@0 | 74 | nsITreeColumn getSortedColumn(); |
michael@0 | 75 | nsITreeColumn getKeyColumn(); |
michael@0 | 76 | |
michael@0 | 77 | /** |
michael@0 | 78 | * Get the column for the given element. |
michael@0 | 79 | */ |
michael@0 | 80 | nsITreeColumn getColumnFor(in nsIDOMElement element); |
michael@0 | 81 | |
michael@0 | 82 | /** |
michael@0 | 83 | * Parametric column getters. |
michael@0 | 84 | */ |
michael@0 | 85 | nsITreeColumn getNamedColumn(in AString id); |
michael@0 | 86 | nsITreeColumn getColumnAt(in long index); |
michael@0 | 87 | |
michael@0 | 88 | /** |
michael@0 | 89 | * This method is called whenever a treecol is added or removed and |
michael@0 | 90 | * the column cache needs to be rebuilt. |
michael@0 | 91 | */ |
michael@0 | 92 | void invalidateColumns(); |
michael@0 | 93 | |
michael@0 | 94 | void restoreNaturalOrder(); |
michael@0 | 95 | }; |