bug 494645 - new "-r" option to the dis function disassemble recursively. r=mrbkap
[mozilla-central.git] / accessible / public / nsIAccessibleTable.idl
blob7501f1432e1e21743d5be02d0931c72cd826a6fc
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is the Mozilla browser.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Paul Sandoz (paul.sandoz@sun.com)
25 * Bill Haneman (bill.haneman@sun.com)
26 * John Gaunt (jgaunt@netscape.com)
28 * Alternatively, the contents of this file may be used under the terms of
29 * either of the GNU General Public License Version 2 or later (the "GPL"),
30 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
40 * ***** END LICENSE BLOCK ***** */
42 #include "nsISupports.idl"
44 interface nsIAccessible;
46 [scriptable, uuid(dcc1e5c3-966e-45b2-b30a-839d35432b24)]
47 interface nsIAccessibleTable : nsISupports
49 /**
50 * Returns the caption accessible for the table. For example, html:caption
51 * element of html:table element.
53 readonly attribute nsIAccessible caption;
55 /**
56 * Returns summary description for the table. For example, @summary attribute
57 * on html:element.
59 readonly attribute AString summary;
61 /**
62 * Returns columns count in the table.
63 * XXX: not very well named property.
65 readonly attribute long columns;
67 /**
68 * Returns table accessible containing column headers.
70 readonly attribute nsIAccessibleTable columnHeader;
72 /**
73 * Returns rows count in the table.
74 * XXX: not very well named property.
76 readonly attribute long rows;
78 /**
79 * Returns table accessible containing row headers.
81 readonly attribute nsIAccessibleTable rowHeader;
83 /**
84 * Returns the accessible object at the specified row and column in the table.
85 * If both row and column index are valid then the corresponding accessible
86 * object is returned that represents the requested cell regardless of whether
87 * the cell is currently visible (on the screen).
89 * @param row - The row index for which to retrieve the cell.
90 * @param column - The column index for which to retrieve the cell.
92 nsIAccessible cellRefAt(in long row, in long column);
94 /**
95 * Translates the given row and column indices into the corresponding cell
96 * index.
98 * @param row - index of the row of the table for which to return the cell
99 * index.
100 * @param column - index of the column of the table for which to return
101 * the cell index.
103 long getIndexAt(in long row, in long column);
106 * Translates the given child index into the corresponding column index.
108 * @param index - index of the child of the table for which to return
109 * the column index.
111 long getColumnAtIndex(in long index);
114 * Translates the given child index into the corresponding row index.
116 * @param index - index of the child of the table for which to return
117 * the row index.
119 long getRowAtIndex(in long index);
122 * Returns the number of columns occupied by the accessible object
123 * at the specified row and column in the table. The result differs from 1
124 * if the specified cell spans multiple columns.
126 * @param row - Row index of the accessible for which to return
127 * the column extent.
128 * @param column - Column index of the accessible for which to return
129 * the column extent.
131 long getColumnExtentAt(in long row, in long column);
134 * Returns the number of rows occupied by the accessible oject
135 * at the specified row and column in the table. The result differs from 1
136 * if the specified cell spans multiple rows.
138 * @param row - Row index of the accessible for which to return
139 * the column extent.
140 * @param column - Column index of the accessible for which to return
141 * the column extent.
143 long getRowExtentAt(in long row, in long column);
146 * Returns the description text of the specified column in the table.
147 * @param column - The index of the column for which to retrieve
148 * the description.
150 AString getColumnDescription(in long column);
153 * Returns the description text of the specified row in the table.
154 * @param row - The index of the row for which to retrieve the description.
156 AString getRowDescription(in long row);
159 * Returns a boolean value indicating whether the specified column is
160 * completely selected.
162 * @param column - Index of the column for which to determine whether it is
163 * selected.
165 boolean isColumnSelected(in long column);
168 * Returns a boolean value indicating whether the specified row is completely
169 * selected.
171 * @param row - Index of the row for which to determine whether it is
172 * selected.
174 boolean isRowSelected(in long row);
177 * Returns a boolean value indicating whether the specified cell is selected.
179 * @param row - Index of the row for the cell to determine whether it is
180 * selected.
181 * @param column - Index of the column for the cell to determine whether it
182 * is selected.
184 boolean isCellSelected(in long row, in long column);
187 * Returns the total number of selected cells.
189 readonly attribute unsigned long selectedCellsCount;
192 * Returns the total number of selected columns.
194 readonly attribute unsigned long selectedColumnsCount;
197 * Returns the total number of selected rows.
199 readonly attribute unsigned long selectedRowsCount;
202 * Returns a list of cells indexes currently selected.
204 * @param cellsSize - length of array
205 * @param cells - array of indexes of selected cells
207 void getSelectedCells(out unsigned long cellsSize,
208 [retval, array, size_is(cellsSize)] out long cells);
211 * Returns a list of column indexes currently selected.
213 * @param columnsSize - Length of array
214 * @param columns - Array of indexes of selected columns
216 void getSelectedColumns(out unsigned long columnsSize,
217 [retval, array, size_is(columnsSize)] out long columns);
220 * Returns a list of row indexes currently selected.
222 * @param rowsSize - Length of array
223 * @param rows - Array of indexes of selected rows
225 void getSelectedRows(out unsigned long rowsSize,
226 [retval, array, size_is(rowsSize)] out long rows);
229 * Selects a row and unselects all previously selected rows.
231 * @param row - Index of the row to be selected.
233 void selectRow(in long row);
236 * Selects a column and unselects all previously selected columns.
238 * @param column - Index of the column to be selected.
240 void selectColumn(in long column);
243 * Unselects one row, leaving other selected rows selected (if any).
245 * @param row - Index of the row to be selected.
247 void unselectRow(in long row);
250 * Unselects one column, leaving other selected columns selected (if any).
252 * @param column - Index of the column to be selected.
254 void unselectColumn(in long column);
257 * Use heuristics to determine if table is most likely used for layout.
259 boolean isProbablyForLayout();