michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_a11y_TableCellAccessible_h__ michael@0: #define mozilla_a11y_TableCellAccessible_h__ michael@0: michael@0: #include "nsTArray.h" michael@0: #include michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: class Accessible; michael@0: class TableAccessible; michael@0: michael@0: /** michael@0: * Abstract interface implemented by table cell accessibles. michael@0: */ michael@0: class TableCellAccessible michael@0: { michael@0: public: michael@0: michael@0: /** michael@0: * Return the table this cell is in. michael@0: */ michael@0: virtual TableAccessible* Table() const = 0; michael@0: michael@0: /** michael@0: * Return the column of the table this cell is in. michael@0: */ michael@0: virtual uint32_t ColIdx() const = 0; michael@0: michael@0: /** michael@0: * Return the row of the table this cell is in. michael@0: */ michael@0: virtual uint32_t RowIdx() const = 0; michael@0: michael@0: /** michael@0: * Return the column extent of this cell. michael@0: */ michael@0: virtual uint32_t ColExtent() const { return 1; } michael@0: michael@0: /** michael@0: * Return the row extent of this cell. michael@0: */ michael@0: virtual uint32_t RowExtent() const { return 1; } michael@0: michael@0: /** michael@0: * Return the column header cells for this cell. michael@0: */ michael@0: virtual void ColHeaderCells(nsTArray* aCells); michael@0: michael@0: /** michael@0: * Return the row header cells for this cell. michael@0: */ michael@0: virtual void RowHeaderCells(nsTArray* aCells); michael@0: michael@0: /** michael@0: * Returns true if this cell is selected. michael@0: */ michael@0: virtual bool Selected() = 0; michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_a11y_TableCellAccessible_h__