2015-03-21 19:28:04 +03:00
|
|
|
/* -*- Mode: C++ final; tab-width: 2 final; indent-tabs-mode: nil final; 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"
|
|
|
|
#include "xpcAccessibleGeneric.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.
|
|
|
|
*/
|
|
|
|
class xpcAccessibleTable : public xpcAccessibleGeneric,
|
|
|
|
public nsIAccessibleTable
|
2012-03-28 04:53:58 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-10-11 01:28:35 +04:00
|
|
|
explicit xpcAccessibleTable(Accessible* aIntl) :
|
|
|
|
xpcAccessibleGeneric(aIntl) { }
|
2014-10-22 04:49:28 +04:00
|
|
|
|
2016-01-19 17:47:52 +03:00
|
|
|
xpcAccessibleTable(ProxyAccessible* aProxy, uint32_t aInterfaces) :
|
|
|
|
xpcAccessibleGeneric(aProxy, aInterfaces) {}
|
|
|
|
|
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
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetCaption(nsIAccessible** aCaption) final override;
|
|
|
|
NS_IMETHOD GetSummary(nsAString& aSummary) final override;
|
|
|
|
NS_IMETHOD GetColumnCount(int32_t* aColumnCount) final override;
|
|
|
|
NS_IMETHOD GetRowCount(int32_t* aRowCount) final override;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetCellAt(int32_t aRowIndex, int32_t aColumnIndex,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsIAccessible** aCell) final override;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetCellIndexAt(int32_t aRowIndex, int32_t aColumnIndex,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t* aCellIndex) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetColumnIndexAt(int32_t aCellIndex, int32_t* aColumnIndex)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetRowIndexAt(int32_t aCellIndex, int32_t* aRowIndex)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
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)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetColumnExtentAt(int32_t row, int32_t column,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t* aColumnExtent) final override;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetRowExtentAt(int32_t row, int32_t column,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t* aRowExtent) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetColumnDescription(int32_t aColIdx, nsAString& aDescription)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetRowDescription(int32_t aRowIdx, nsAString& aDescription)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD IsColumnSelected(int32_t aColIdx, bool* _retval)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD IsRowSelected(int32_t aRowIdx, bool* _retval)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD IsCellSelected(int32_t aRowIdx, int32_t aColIdx, bool* _retval)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetSelectedCellCount(uint32_t* aSelectedCellCount)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetSelectedColumnCount(uint32_t* aSelectedColumnCount)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetSelectedRowCount(uint32_t* aSelectedRowCount)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
|
|
|
NS_IMETHOD GetSelectedCells(nsIArray** aSelectedCell) final override;
|
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)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
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)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GetSelectedRowIndices(uint32_t* aRowsArraySize,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t** aRowsArray) final override;
|
|
|
|
NS_IMETHOD SelectColumn(int32_t aColIdx) final override;
|
|
|
|
NS_IMETHOD SelectRow(int32_t aRowIdx) final override;
|
|
|
|
NS_IMETHOD UnselectColumn(int32_t aColIdx) final override;
|
|
|
|
NS_IMETHOD UnselectRow(int32_t aRowIdx) final override;
|
|
|
|
NS_IMETHOD IsProbablyForLayout(bool* aIsForLayout) final override;
|
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_
|