Bug 1845134 - Part 4: Update existing ui-icons to use the latest source from acorn...
[gecko.git] / accessible / interfaces / nsIAccessibleTable.idl
blobab4b60a5cc9beccf911b2b8e287d3ab82e63ecb0
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
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
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 interface nsIAccessible;
10 interface nsIArray;
12 [scriptable, builtinclass, uuid(cb0bf7b9-117e-40e2-9e46-189c3d43ce4a)]
13 interface nsIAccessibleTable : nsISupports
15 /**
16 * Return the caption accessible for the table. For example, html:caption
17 * element of html:table element.
19 readonly attribute nsIAccessible caption;
21 /**
22 * Return summary description for the table. For example, @summary attribute
23 * on html:table element.
25 readonly attribute AString summary;
27 /**
28 * Return columns count in the table.
30 readonly attribute long columnCount;
32 /**
33 * Return rows count in the table.
35 readonly attribute long rowCount;
37 /**
38 * Return the accessible object at the specified row and column in the table.
39 * If both row and column index are valid then the corresponding accessible
40 * object is returned that represents the requested cell regardless of whether
41 * the cell is currently visible (on the screen).
43 * @param rowIndex [in] the row index to retrieve the cell at
44 * @param columnIndex [in] the column index to retrieve the cell at
46 nsIAccessible getCellAt(in long rowIndex, in long columnIndex);
48 /**
49 * Translate the given row and column indices into the corresponding cell
50 * index.
52 * @param rowIndex [in] the row index to return cell index at
53 * @param columnIndex [in] the column index to return cell index at
55 long getCellIndexAt(in long rowIndex, in long columnIndex);
57 /**
58 * Translate the given cell index into the corresponding column index.
60 * @param cellIndex [in] index of the table cell to return column index for
62 long getColumnIndexAt(in long cellIndex);
64 /**
65 * Translate the given cell index into the corresponding row index.
67 * @param cellIndex [in] index of the table cell to return row index for
69 long getRowIndexAt(in long cellIndex);
71 /**
72 * Translate the given cell index into the corresponding row and column
73 * indices.
75 * @param cellIndex [in] cell index to return row and column indices for
76 * @param rowIndex [out] row index at the given cell index
77 * @param columnIndex [out] column index at the given cell index
79 void getRowAndColumnIndicesAt(in long cellIndex,
80 out long rowIndex, out long columnIndex);
82 /**
83 * Return the number of columns occupied by the accessible cell at
84 * the specified row and column in the table. The result differs from 1 if
85 * the specified cell spans multiple columns.
87 * @param row [in] row index of the cell to return the column extent for
88 * @param column [in] column index of the cell to return the column extent
89 * for
91 long getColumnExtentAt(in long row, in long column);
93 /**
94 * Return the number of rows occupied by the accessible cell at the specified
95 * row and column in the table. The result differs from 1 if the specified
96 * cell spans multiple rows.
98 * @param row [in] row index of the cell to return the column extent for
99 * @param column [in] column index of the cell to return the column extent
100 * for
102 long getRowExtentAt(in long row, in long column);
105 * Return the description text of the specified column in the table.
107 * @param columnIndex [in] the column index to retrieve description for
109 AString getColumnDescription(in long columnIndex);
112 * Return the description text of the specified row in the table.
114 * @param rowIndex [in] the row index to retrieve description for
116 AString getRowDescription(in long rowIndex);
119 * Return a boolean value indicating whether the specified column is
120 * selected, i.e. all cells within the column are selected.
122 * @param columnIndex [in] the column index to determine if it's selected
124 boolean isColumnSelected(in long columnIndex);
127 * Return a boolean value indicating whether the specified row is selected,
128 * i.e. all cells within the row are selected.
130 * @param rowIndex [in] the row index to determine whether it's selected
132 boolean isRowSelected(in long rowIndex);
135 * Return a boolean value indicating whether the specified cell is selected.
137 * @param rowIndex [in] the row index of the cell
138 * @param columnIndex [in] the column index of the cell
140 boolean isCellSelected(in long rowIndex, in long columnIndex);
143 * Return the total number of selected cells.
145 readonly attribute unsigned long selectedCellCount;
148 * Return the total number of selected columns.
150 readonly attribute unsigned long selectedColumnCount;
153 * Return the total number of selected rows.
155 readonly attribute unsigned long selectedRowCount;
158 * Return an array of selected cells.
160 readonly attribute nsIArray selectedCells;
163 * Return an array of cell indices currently selected.
165 * @return array of indexes of selected cells
167 Array<uint32_t> getSelectedCellIndices();
170 * Return an array of column indices currently selected.
172 * @return array of indices of selected columns
174 Array<uint32_t> getSelectedColumnIndices();
177 * Return an array of row indices currently selected.
179 * @return array of indices of selected rows
181 Array<uint32_t> getSelectedRowIndices();
184 * Use heuristics to determine if table is most likely used for layout.
186 boolean isProbablyForLayout();
190 [scriptable, builtinclass, uuid(654e296d-fae6-452b-987d-746b20b9514b)]
191 interface nsIAccessibleTableCell : nsISupports
194 * Return host table accessible.
196 readonly attribute nsIAccessibleTable table;
199 * Return column index of this cell.
201 readonly attribute long columnIndex;
204 * Return row index of this cell.
206 readonly attribute long rowIndex;
209 * Return the number of columns occupied by this cell. The result differs
210 * from 1 if the specified cell spans multiple columns.
212 readonly attribute long columnExtent;
215 * Return the number of rows occupied by this accessible cell. The result
216 * differs from 1 if the specified cell spans multiple rows.
218 readonly attribute long rowExtent;
221 * Return an array of column header cells for this cell.
223 readonly attribute nsIArray columnHeaderCells;
226 * Return an array of row header cells for this cell.
228 readonly attribute nsIArray rowHeaderCells;
231 * Return a boolean value indicating whether this cell is selected.
233 boolean isSelected();