2018-11-27 13:08:58 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-03-28 04:53:58 +04:00
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
#ifndef mozilla_a11y_xpcAccessibleTable_h_
|
|
|
|
#define mozilla_a11y_xpcAccessibleTable_h_
|
2012-03-28 04:53:58 +04:00
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
#include "nsIAccessibleTable.h"
|
2018-10-26 12:07:27 +03:00
|
|
|
#include "xpcAccessibleHyperText.h"
|
2012-11-18 06:01:44 +04:00
|
|
|
|
2012-03-28 04:53:58 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
2012-11-18 06:01:44 +04:00
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
/**
|
|
|
|
* XPCOM wrapper around TableAccessible class.
|
|
|
|
*/
|
2018-10-26 12:07:27 +03:00
|
|
|
class xpcAccessibleTable : public xpcAccessibleHyperText,
|
2014-10-22 04:49:28 +04:00
|
|
|
public nsIAccessibleTable {
|
2012-03-28 04:53:58 +04:00
|
|
|
public:
|
2014-10-11 01:28:35 +04:00
|
|
|
explicit xpcAccessibleTable(Accessible* aIntl)
|
2018-10-26 12:07:27 +03:00
|
|
|
: xpcAccessibleHyperText(aIntl) {}
|
2014-10-22 04:49:28 +04:00
|
|
|
|
2016-01-19 17:47:52 +03:00
|
|
|
xpcAccessibleTable(ProxyAccessible* aProxy, uint32_t aInterfaces)
|
2018-10-26 12:07:27 +03:00
|
|
|
: xpcAccessibleHyperText(aProxy, aInterfaces) {}
|
2016-01-19 17:47:52 +03:00
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2012-03-28 04:53:58 +04:00
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
// nsIAccessibleTable
|
2018-02-06 09:46:57 +03:00
|
|
|
NS_IMETHOD GetCaption(nsIAccessible** aCaption) final;
|
|
|
|
NS_IMETHOD GetSummary(nsAString& aSummary) final;
|
|
|
|
NS_IMETHOD GetColumnCount(int32_t* aColumnCount) final;
|
|
|
|
NS_IMETHOD GetRowCount(int32_t* aRowCount) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetCellAt(int32_t aRowIndex, int32_t aColumnIndex,
|
2018-02-06 09:46:57 +03:00
|
|
|
nsIAccessible** aCell) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetCellIndexAt(int32_t aRowIndex, int32_t aColumnIndex,
|
2018-02-06 09:46:57 +03:00
|
|
|
int32_t* aCellIndex) final;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetColumnIndexAt(int32_t aCellIndex, int32_t* aColumnIndex) final;
|
|
|
|
NS_IMETHOD GetRowIndexAt(int32_t aCellIndex, int32_t* aRowIndex) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetRowAndColumnIndicesAt(int32_t aCellIndex, int32_t* aRowIndex,
|
2015-01-15 23:39:04 +03:00
|
|
|
int32_t* aColumnIndex) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetColumnExtentAt(int32_t row, int32_t column,
|
2018-02-06 09:46:57 +03:00
|
|
|
int32_t* aColumnExtent) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetRowExtentAt(int32_t row, int32_t column,
|
2018-02-06 09:46:57 +03:00
|
|
|
int32_t* aRowExtent) final;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetColumnDescription(int32_t aColIdx,
|
|
|
|
nsAString& aDescription) final;
|
|
|
|
NS_IMETHOD GetRowDescription(int32_t aRowIdx, nsAString& aDescription) final;
|
|
|
|
NS_IMETHOD IsColumnSelected(int32_t aColIdx, bool* _retval) final;
|
|
|
|
NS_IMETHOD IsRowSelected(int32_t aRowIdx, bool* _retval) final;
|
|
|
|
NS_IMETHOD IsCellSelected(int32_t aRowIdx, int32_t aColIdx,
|
|
|
|
bool* _retval) final;
|
|
|
|
NS_IMETHOD GetSelectedCellCount(uint32_t* aSelectedCellCount) final;
|
|
|
|
NS_IMETHOD GetSelectedColumnCount(uint32_t* aSelectedColumnCount) final;
|
|
|
|
NS_IMETHOD GetSelectedRowCount(uint32_t* aSelectedRowCount) final;
|
2018-02-06 09:46:57 +03:00
|
|
|
NS_IMETHOD GetSelectedCells(nsIArray** aSelectedCell) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetSelectedCellIndices(uint32_t* aCellsArraySize,
|
2015-01-15 23:39:04 +03:00
|
|
|
int32_t** aCellsArray) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetSelectedColumnIndices(uint32_t* aColsArraySize,
|
2015-01-15 23:39:04 +03:00
|
|
|
int32_t** aColsArray) final;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetSelectedRowIndices(uint32_t* aRowsArraySize,
|
2018-02-06 09:46:57 +03:00
|
|
|
int32_t** aRowsArray) final;
|
|
|
|
NS_IMETHOD SelectColumn(int32_t aColIdx) final;
|
|
|
|
NS_IMETHOD SelectRow(int32_t aRowIdx) final;
|
|
|
|
NS_IMETHOD UnselectColumn(int32_t aColIdx) final;
|
|
|
|
NS_IMETHOD UnselectRow(int32_t aRowIdx) final;
|
|
|
|
NS_IMETHOD IsProbablyForLayout(bool* aIsForLayout) final;
|
2012-03-28 04:53:58 +04:00
|
|
|
|
|
|
|
protected:
|
2014-10-22 04:49:28 +04:00
|
|
|
virtual ~xpcAccessibleTable() {}
|
|
|
|
|
|
|
|
private:
|
2016-01-21 08:07:56 +03:00
|
|
|
TableAccessible* Intl() {
|
|
|
|
return mIntl.IsAccessible() ? mIntl.AsAccessible()->AsTable() : nullptr;
|
|
|
|
}
|
2014-10-22 04:49:28 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
xpcAccessibleTable(const xpcAccessibleTable&) = delete;
|
|
|
|
xpcAccessibleTable& operator=(const xpcAccessibleTable&) = delete;
|
2012-03-28 04:53:58 +04:00
|
|
|
};
|
|
|
|
|
2012-11-18 06:01:44 +04:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
#endif // mozilla_a11y_xpcAccessibleTable_h_
|