layout/xul/tree/nsITreeColumns.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/tree/nsITreeColumns.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,95 @@
     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 +#include "nsISupports.idl"
     1.9 +
    1.10 +interface nsITreeColumns;
    1.11 +interface nsIDOMElement;
    1.12 +interface nsIAtom;
    1.13 +
    1.14 +[scriptable, uuid(ae835ecf-6b32-4660-9b43-8a270df56e02)]
    1.15 +interface nsITreeColumn : nsISupports
    1.16 +{
    1.17 +  readonly attribute nsIDOMElement element;
    1.18 +
    1.19 +  readonly attribute nsITreeColumns columns;
    1.20 +
    1.21 +  readonly attribute long x;
    1.22 +  readonly attribute long width;
    1.23 +
    1.24 +  readonly attribute AString id;
    1.25 +  [noscript] void getIdConst([shared] out wstring idConst);
    1.26 +  [noscript] readonly attribute nsIAtom atom;
    1.27 +
    1.28 +  readonly attribute long index;
    1.29 +
    1.30 +  readonly attribute boolean primary;
    1.31 +  readonly attribute boolean cycler;
    1.32 +  readonly attribute boolean editable;
    1.33 +  readonly attribute boolean selectable;
    1.34 +
    1.35 +  const short TYPE_TEXT                = 1;
    1.36 +  const short TYPE_CHECKBOX            = 2;
    1.37 +  const short TYPE_PROGRESSMETER       = 3;
    1.38 +  readonly attribute short type;
    1.39 +
    1.40 +  nsITreeColumn getNext();
    1.41 +  nsITreeColumn getPrevious();
    1.42 +
    1.43 +  void invalidate();
    1.44 +};
    1.45 +
    1.46 +interface nsITreeBoxObject;
    1.47 +
    1.48 +[scriptable, uuid(f8a8d6b4-6788-438d-9009-7142798767ab)]
    1.49 +interface nsITreeColumns : nsISupports
    1.50 +{
    1.51 +  /**
    1.52 +   * The tree widget for these columns.
    1.53 +   */
    1.54 +  readonly attribute nsITreeBoxObject tree;
    1.55 +
    1.56 +  /**
    1.57 +   * The number of columns.
    1.58 +   */
    1.59 +  readonly attribute long count;
    1.60 +
    1.61 +  /**
    1.62 +   * An alias for count (for the benefit of scripts which treat this as an
    1.63 +   * array).
    1.64 +   */
    1.65 +  readonly attribute long length;
    1.66 +
    1.67 +  /**
    1.68 +   * Get the first/last column.
    1.69 +   */
    1.70 +  nsITreeColumn getFirstColumn();
    1.71 +  nsITreeColumn getLastColumn();
    1.72 +
    1.73 +  /**
    1.74 +   * Attribute based column getters.
    1.75 +   */
    1.76 +  nsITreeColumn getPrimaryColumn();
    1.77 +  nsITreeColumn getSortedColumn();
    1.78 +  nsITreeColumn getKeyColumn();
    1.79 +
    1.80 +  /**
    1.81 +   * Get the column for the given element.
    1.82 +   */
    1.83 +  nsITreeColumn getColumnFor(in nsIDOMElement element);
    1.84 +
    1.85 +  /**
    1.86 +   * Parametric column getters.
    1.87 +   */
    1.88 +  nsITreeColumn getNamedColumn(in AString id);
    1.89 +  nsITreeColumn getColumnAt(in long index);
    1.90 +
    1.91 +  /**
    1.92 +   * This method is called whenever a treecol is added or removed and
    1.93 +   * the column cache needs to be rebuilt.
    1.94 +   */
    1.95 +  void invalidateColumns();
    1.96 +
    1.97 +  void restoreNaturalOrder();
    1.98 +};

mercurial