TableCellAccessible.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_a11y_TableCellAccessible_h__
  6. #define mozilla_a11y_TableCellAccessible_h__
  7. #include "nsTArray.h"
  8. #include <stdint.h>
  9. namespace mozilla {
  10. namespace a11y {
  11. class Accessible;
  12. class TableAccessible;
  13. /**
  14. * Abstract interface implemented by table cell accessibles.
  15. */
  16. class TableCellAccessible
  17. {
  18. public:
  19. /**
  20. * Return the table this cell is in.
  21. */
  22. virtual TableAccessible* Table() const = 0;
  23. /**
  24. * Return the column of the table this cell is in.
  25. */
  26. virtual uint32_t ColIdx() const = 0;
  27. /**
  28. * Return the row of the table this cell is in.
  29. */
  30. virtual uint32_t RowIdx() const = 0;
  31. /**
  32. * Return the column extent of this cell.
  33. */
  34. virtual uint32_t ColExtent() const { return 1; }
  35. /**
  36. * Return the row extent of this cell.
  37. */
  38. virtual uint32_t RowExtent() const { return 1; }
  39. /**
  40. * Return the column header cells for this cell.
  41. */
  42. virtual void ColHeaderCells(nsTArray<Accessible*>* aCells);
  43. /**
  44. * Return the row header cells for this cell.
  45. */
  46. virtual void RowHeaderCells(nsTArray<Accessible*>* aCells);
  47. /**
  48. * Returns true if this cell is selected.
  49. */
  50. virtual bool Selected() = 0;
  51. };
  52. } // namespace a11y
  53. } // namespace mozilla
  54. #endif // mozilla_a11y_TableCellAccessible_h__