nsITreeColumns.idl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #include "nsISupports.idl"
  5. interface nsITreeColumns;
  6. interface nsIDOMElement;
  7. interface nsIAtom;
  8. [scriptable, uuid(ae835ecf-6b32-4660-9b43-8a270df56e02)]
  9. interface nsITreeColumn : nsISupports
  10. {
  11. readonly attribute nsIDOMElement element;
  12. readonly attribute nsITreeColumns columns;
  13. readonly attribute long x;
  14. readonly attribute long width;
  15. readonly attribute AString id;
  16. [noscript] void getIdConst([shared] out wstring idConst);
  17. [noscript] readonly attribute nsIAtom atom;
  18. readonly attribute long index;
  19. readonly attribute boolean primary;
  20. readonly attribute boolean cycler;
  21. readonly attribute boolean editable;
  22. readonly attribute boolean selectable;
  23. const short TYPE_TEXT = 1;
  24. const short TYPE_CHECKBOX = 2;
  25. const short TYPE_PROGRESSMETER = 3;
  26. const short TYPE_PASSWORD = 4;
  27. readonly attribute short type;
  28. nsITreeColumn getNext();
  29. nsITreeColumn getPrevious();
  30. void invalidate();
  31. };
  32. interface nsITreeBoxObject;
  33. [scriptable, uuid(f8a8d6b4-6788-438d-9009-7142798767ab)]
  34. interface nsITreeColumns : nsISupports
  35. {
  36. /**
  37. * The tree widget for these columns.
  38. */
  39. readonly attribute nsITreeBoxObject tree;
  40. /**
  41. * The number of columns.
  42. */
  43. readonly attribute long count;
  44. /**
  45. * An alias for count (for the benefit of scripts which treat this as an
  46. * array).
  47. */
  48. readonly attribute long length;
  49. /**
  50. * Get the first/last column.
  51. */
  52. nsITreeColumn getFirstColumn();
  53. nsITreeColumn getLastColumn();
  54. /**
  55. * Attribute based column getters.
  56. */
  57. nsITreeColumn getPrimaryColumn();
  58. nsITreeColumn getSortedColumn();
  59. nsITreeColumn getKeyColumn();
  60. /**
  61. * Get the column for the given element.
  62. */
  63. nsITreeColumn getColumnFor(in nsIDOMElement element);
  64. /**
  65. * Parametric column getters.
  66. */
  67. nsITreeColumn getNamedColumn(in AString id);
  68. nsITreeColumn getColumnAt(in long index);
  69. /**
  70. * This method is called whenever a treecol is added or removed and
  71. * the column cache needs to be rebuilt.
  72. */
  73. void invalidateColumns();
  74. void restoreNaturalOrder();
  75. };