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/. */
7 #ifndef mozilla_a11y_xpcAccessibleTable_h_
8 #define mozilla_a11y_xpcAccessibleTable_h_
10 #include "nsIAccessibleTable.h"
11 #include "xpcAccessibleHyperText.h"
17 * XPCOM wrapper around TableAccessible class.
19 class xpcAccessibleTable
: public xpcAccessibleHyperText
,
20 public nsIAccessibleTable
{
22 explicit xpcAccessibleTable(Accessible
* aIntl
)
23 : xpcAccessibleHyperText(aIntl
) {}
25 xpcAccessibleTable(ProxyAccessible
* aProxy
, uint32_t aInterfaces
)
26 : xpcAccessibleHyperText(aProxy
, aInterfaces
) {}
28 NS_DECL_ISUPPORTS_INHERITED
31 NS_IMETHOD
GetCaption(nsIAccessible
** aCaption
) final
;
32 NS_IMETHOD
GetSummary(nsAString
& aSummary
) final
;
33 NS_IMETHOD
GetColumnCount(int32_t* aColumnCount
) final
;
34 NS_IMETHOD
GetRowCount(int32_t* aRowCount
) final
;
35 NS_IMETHOD
GetCellAt(int32_t aRowIndex
, int32_t aColumnIndex
,
36 nsIAccessible
** aCell
) final
;
37 NS_IMETHOD
GetCellIndexAt(int32_t aRowIndex
, int32_t aColumnIndex
,
38 int32_t* aCellIndex
) final
;
39 NS_IMETHOD
GetColumnIndexAt(int32_t aCellIndex
, int32_t* aColumnIndex
) final
;
40 NS_IMETHOD
GetRowIndexAt(int32_t aCellIndex
, int32_t* aRowIndex
) final
;
41 NS_IMETHOD
GetRowAndColumnIndicesAt(int32_t aCellIndex
, int32_t* aRowIndex
,
42 int32_t* aColumnIndex
) final
;
43 NS_IMETHOD
GetColumnExtentAt(int32_t row
, int32_t column
,
44 int32_t* aColumnExtent
) final
;
45 NS_IMETHOD
GetRowExtentAt(int32_t row
, int32_t column
,
46 int32_t* aRowExtent
) final
;
47 NS_IMETHOD
GetColumnDescription(int32_t aColIdx
,
48 nsAString
& aDescription
) final
;
49 NS_IMETHOD
GetRowDescription(int32_t aRowIdx
, nsAString
& aDescription
) final
;
50 NS_IMETHOD
IsColumnSelected(int32_t aColIdx
, bool* _retval
) final
;
51 NS_IMETHOD
IsRowSelected(int32_t aRowIdx
, bool* _retval
) final
;
52 NS_IMETHOD
IsCellSelected(int32_t aRowIdx
, int32_t aColIdx
,
54 NS_IMETHOD
GetSelectedCellCount(uint32_t* aSelectedCellCount
) final
;
55 NS_IMETHOD
GetSelectedColumnCount(uint32_t* aSelectedColumnCount
) final
;
56 NS_IMETHOD
GetSelectedRowCount(uint32_t* aSelectedRowCount
) final
;
57 NS_IMETHOD
GetSelectedCells(nsIArray
** aSelectedCell
) final
;
58 NS_IMETHOD
GetSelectedCellIndices(nsTArray
<uint32_t>& aCellsArray
) final
;
59 NS_IMETHOD
GetSelectedColumnIndices(nsTArray
<uint32_t>& aColsArray
) final
;
60 NS_IMETHOD
GetSelectedRowIndices(nsTArray
<uint32_t>& aRowsArray
) final
;
61 NS_IMETHOD
SelectColumn(int32_t aColIdx
) final
;
62 NS_IMETHOD
SelectRow(int32_t aRowIdx
) final
;
63 NS_IMETHOD
UnselectColumn(int32_t aColIdx
) final
;
64 NS_IMETHOD
UnselectRow(int32_t aRowIdx
) final
;
65 NS_IMETHOD
IsProbablyForLayout(bool* aIsForLayout
) final
;
68 virtual ~xpcAccessibleTable() {}
71 TableAccessible
* Intl() {
72 return mIntl
.IsAccessible() ? mIntl
.AsAccessible()->AsTable() : nullptr;
75 xpcAccessibleTable(const xpcAccessibleTable
&) = delete;
76 xpcAccessibleTable
& operator=(const xpcAccessibleTable
&) = delete;
80 } // namespace mozilla
82 #endif // mozilla_a11y_xpcAccessibleTable_h_