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