tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

xpcAccessibleTable.h (3204B)


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