accessible/src/generic/TableCellAccessible.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/generic/TableCellAccessible.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,70 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.8 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef mozilla_a11y_TableCellAccessible_h__
    1.11 +#define mozilla_a11y_TableCellAccessible_h__
    1.12 +
    1.13 +#include "nsTArray.h"
    1.14 +#include <stdint.h>
    1.15 +
    1.16 +namespace mozilla {
    1.17 +namespace a11y {
    1.18 +
    1.19 +class Accessible;
    1.20 +class TableAccessible;
    1.21 +
    1.22 +/**
    1.23 + * Abstract interface implemented by table cell accessibles.
    1.24 + */
    1.25 +class TableCellAccessible
    1.26 +{
    1.27 +public:
    1.28 +
    1.29 +  /**
    1.30 +   * Return the table this cell is in.
    1.31 +   */
    1.32 +  virtual TableAccessible* Table() const = 0;
    1.33 +
    1.34 +  /**
    1.35 +   * Return the column of the table this cell is in.
    1.36 +   */
    1.37 +  virtual uint32_t ColIdx() const = 0;
    1.38 +
    1.39 +  /**
    1.40 +   * Return the row of the table this cell is in.
    1.41 +   */
    1.42 +  virtual uint32_t RowIdx() const = 0;
    1.43 +
    1.44 +  /**
    1.45 +   * Return the column extent of this cell.
    1.46 +   */
    1.47 +  virtual uint32_t ColExtent() const { return 1; }
    1.48 +
    1.49 +  /**
    1.50 +   * Return the row extent of this cell.
    1.51 +   */
    1.52 +  virtual uint32_t RowExtent() const { return 1; }
    1.53 +
    1.54 +  /**
    1.55 +   * Return the column header cells for this cell.
    1.56 +   */
    1.57 +  virtual void ColHeaderCells(nsTArray<Accessible*>* aCells);
    1.58 +
    1.59 +  /**
    1.60 +   * Return the row header cells for this cell.
    1.61 +   */
    1.62 +  virtual void RowHeaderCells(nsTArray<Accessible*>* aCells);
    1.63 +
    1.64 +  /**
    1.65 +   * Returns true if this cell is selected.
    1.66 +   */
    1.67 +  virtual bool Selected() = 0;
    1.68 +};
    1.69 +
    1.70 +} // namespace a11y
    1.71 +} // namespace mozilla
    1.72 +
    1.73 +#endif // mozilla_a11y_TableCellAccessible_h__

mercurial