1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module atk.TableIF;
26 
27 private import atk.ObjectAtk;
28 private import glib.Str;
29 private import gobject.ObjectG;
30 private import gobject.Signals;
31 private import gtkc.atk;
32 public  import gtkc.atktypes;
33 private import std.algorithm;
34 
35 
36 /**
37  * #AtkTable should be implemented by components which present
38  * elements ordered via rows and columns.  It may also be used to
39  * present tree-structured information if the nodes of the trees can
40  * be said to contain multiple "columns".  Individual elements of an
41  * #AtkTable are typically referred to as "cells". Those cells should
42  * implement the interface #AtkTableCell, but #Atk doesn't require
43  * them to be direct children of the current #AtkTable. They can be
44  * grand-children, grand-grand-children etc. #AtkTable provides the
45  * API needed to get a individual cell based on the row and column
46  * numbers.
47  * 
48  * Children of #AtkTable are frequently "lightweight" objects, that
49  * is, they may not have backing widgets in the host UI toolkit.  They
50  * are therefore often transient.
51  * 
52  * Since tables are often very complex, #AtkTable includes provision
53  * for offering simplified summary information, as well as row and
54  * column headers and captions.  Headers and captions are #AtkObjects
55  * which may implement other interfaces (#AtkText, #AtkImage, etc.) as
56  * appropriate.  #AtkTable summaries may themselves be (simplified)
57  * #AtkTables, etc.
58  * 
59  * Note for implementors: in the past, #AtkTable required that all the
60  * cells should be direct children of #AtkTable, and provided some
61  * index based methods to request the cells. The practice showed that
62  * that forcing made #AtkTable implementation complex, and hard to
63  * expose other kind of children, like rows or captions. Right now,
64  * index-based methods are deprecated.
65  */
66 public interface TableIF{
67 	/** Get the main Gtk struct */
68 	public AtkTable* getTableStruct(bool transferOwnership = false);
69 
70 	/** the main Gtk struct as a void* */
71 	protected void* getStruct();
72 
73 
74 	/**
75 	 * Adds the specified @column to the selection.
76 	 *
77 	 * Params:
78 	 *     column = a #gint representing a column in @table
79 	 *
80 	 * Returns: a gboolean representing if the column was successfully added to
81 	 *     the selection, or 0 if value does not implement this interface.
82 	 */
83 	public bool addColumnSelection(int column);
84 
85 	/**
86 	 * Adds the specified @row to the selection.
87 	 *
88 	 * Params:
89 	 *     row = a #gint representing a row in @table
90 	 *
91 	 * Returns: a gboolean representing if row was successfully added to selection,
92 	 *     or 0 if value does not implement this interface.
93 	 */
94 	public bool addRowSelection(int row);
95 
96 	/**
97 	 * Gets the caption for the @table.
98 	 *
99 	 * Returns: a AtkObject* representing the
100 	 *     table caption, or %NULL if value does not implement this interface.
101 	 */
102 	public ObjectAtk getCaption();
103 
104 	/**
105 	 * Gets a #gint representing the column at the specified @index_.
106 	 *
107 	 * Deprecated: Since 2.12.
108 	 *
109 	 * Params:
110 	 *     index = a #gint representing an index in @table
111 	 *
112 	 * Returns: a gint representing the column at the specified index,
113 	 *     or -1 if the table does not implement this method.
114 	 */
115 	public int getColumnAtIndex(int index);
116 
117 	/**
118 	 * Gets the description text of the specified @column in the table
119 	 *
120 	 * Params:
121 	 *     column = a #gint representing a column in @table
122 	 *
123 	 * Returns: a gchar* representing the column description, or %NULL
124 	 *     if value does not implement this interface.
125 	 */
126 	public string getColumnDescription(int column);
127 
128 	/**
129 	 * Gets the number of columns occupied by the accessible object
130 	 * at the specified @row and @column in the @table.
131 	 *
132 	 * Params:
133 	 *     row = a #gint representing a row in @table
134 	 *     column = a #gint representing a column in @table
135 	 *
136 	 * Returns: a gint representing the column extent at specified position, or 0
137 	 *     if value does not implement this interface.
138 	 */
139 	public int getColumnExtentAt(int row, int column);
140 
141 	/**
142 	 * Gets the column header of a specified column in an accessible table.
143 	 *
144 	 * Params:
145 	 *     column = a #gint representing a column in the table
146 	 *
147 	 * Returns: a AtkObject* representing the
148 	 *     specified column header, or %NULL if value does not implement this
149 	 *     interface.
150 	 */
151 	public ObjectAtk getColumnHeader(int column);
152 
153 	/**
154 	 * Gets a #gint representing the index at the specified @row and
155 	 * @column.
156 	 *
157 	 * Deprecated: Since 2.12. Use atk_table_ref_at() in order to get the
158 	 * accessible that represents the cell at (@row, @column)
159 	 *
160 	 * Params:
161 	 *     row = a #gint representing a row in @table
162 	 *     column = a #gint representing a column in @table
163 	 *
164 	 * Returns: a #gint representing the index at specified position.
165 	 *     The value -1 is returned if the object at row,column is not a child
166 	 *     of table or table does not implement this interface.
167 	 */
168 	public int getIndexAt(int row, int column);
169 
170 	/**
171 	 * Gets the number of columns in the table.
172 	 *
173 	 * Returns: a gint representing the number of columns, or 0
174 	 *     if value does not implement this interface.
175 	 */
176 	public int getNColumns();
177 
178 	/**
179 	 * Gets the number of rows in the table.
180 	 *
181 	 * Returns: a gint representing the number of rows, or 0
182 	 *     if value does not implement this interface.
183 	 */
184 	public int getNRows();
185 
186 	/**
187 	 * Gets a #gint representing the row at the specified @index_.
188 	 *
189 	 * Deprecated: since 2.12.
190 	 *
191 	 * Params:
192 	 *     index = a #gint representing an index in @table
193 	 *
194 	 * Returns: a gint representing the row at the specified index,
195 	 *     or -1 if the table does not implement this method.
196 	 */
197 	public int getRowAtIndex(int index);
198 
199 	/**
200 	 * Gets the description text of the specified row in the table
201 	 *
202 	 * Params:
203 	 *     row = a #gint representing a row in @table
204 	 *
205 	 * Returns: a gchar* representing the row description, or
206 	 *     %NULL if value does not implement this interface.
207 	 */
208 	public string getRowDescription(int row);
209 
210 	/**
211 	 * Gets the number of rows occupied by the accessible object
212 	 * at a specified @row and @column in the @table.
213 	 *
214 	 * Params:
215 	 *     row = a #gint representing a row in @table
216 	 *     column = a #gint representing a column in @table
217 	 *
218 	 * Returns: a gint representing the row extent at specified position, or 0
219 	 *     if value does not implement this interface.
220 	 */
221 	public int getRowExtentAt(int row, int column);
222 
223 	/**
224 	 * Gets the row header of a specified row in an accessible table.
225 	 *
226 	 * Params:
227 	 *     row = a #gint representing a row in the table
228 	 *
229 	 * Returns: a AtkObject* representing the
230 	 *     specified row header, or %NULL if value does not implement this
231 	 *     interface.
232 	 */
233 	public ObjectAtk getRowHeader(int row);
234 
235 	/**
236 	 * Gets the selected columns of the table by initializing **selected with
237 	 * the selected column numbers. This array should be freed by the caller.
238 	 *
239 	 * Params:
240 	 *     selected = a #gint** that is to contain the selected columns numbers
241 	 *
242 	 * Returns: a gint representing the number of selected columns,
243 	 *     or %0 if value does not implement this interface.
244 	 */
245 	public int getSelectedColumns(int** selected);
246 
247 	/**
248 	 * Gets the selected rows of the table by initializing **selected with
249 	 * the selected row numbers. This array should be freed by the caller.
250 	 *
251 	 * Params:
252 	 *     selected = a #gint** that is to contain the selected row numbers
253 	 *
254 	 * Returns: a gint representing the number of selected rows,
255 	 *     or zero if value does not implement this interface.
256 	 */
257 	public int getSelectedRows(int** selected);
258 
259 	/**
260 	 * Gets the summary description of the table.
261 	 *
262 	 * Returns: a AtkObject* representing a summary description
263 	 *     of the table, or zero if value does not implement this interface.
264 	 */
265 	public ObjectAtk getSummary();
266 
267 	/**
268 	 * Gets a boolean value indicating whether the specified @column
269 	 * is selected
270 	 *
271 	 * Params:
272 	 *     column = a #gint representing a column in @table
273 	 *
274 	 * Returns: a gboolean representing if the column is selected, or 0
275 	 *     if value does not implement this interface.
276 	 */
277 	public bool isColumnSelected(int column);
278 
279 	/**
280 	 * Gets a boolean value indicating whether the specified @row
281 	 * is selected
282 	 *
283 	 * Params:
284 	 *     row = a #gint representing a row in @table
285 	 *
286 	 * Returns: a gboolean representing if the row is selected, or 0
287 	 *     if value does not implement this interface.
288 	 */
289 	public bool isRowSelected(int row);
290 
291 	/**
292 	 * Gets a boolean value indicating whether the accessible object
293 	 * at the specified @row and @column is selected
294 	 *
295 	 * Params:
296 	 *     row = a #gint representing a row in @table
297 	 *     column = a #gint representing a column in @table
298 	 *
299 	 * Returns: a gboolean representing if the cell is selected, or 0
300 	 *     if value does not implement this interface.
301 	 */
302 	public bool isSelected(int row, int column);
303 
304 	/**
305 	 * Get a reference to the table cell at @row, @column. This cell
306 	 * should implement the interface #AtkTableCell
307 	 *
308 	 * Params:
309 	 *     row = a #gint representing a row in @table
310 	 *     column = a #gint representing a column in @table
311 	 *
312 	 * Returns: an #AtkObject representing the referred
313 	 *     to accessible
314 	 */
315 	public ObjectAtk refAt(int row, int column);
316 
317 	/**
318 	 * Adds the specified @column to the selection.
319 	 *
320 	 * Params:
321 	 *     column = a #gint representing a column in @table
322 	 *
323 	 * Returns: a gboolean representing if the column was successfully removed from
324 	 *     the selection, or 0 if value does not implement this interface.
325 	 */
326 	public bool removeColumnSelection(int column);
327 
328 	/**
329 	 * Removes the specified @row from the selection.
330 	 *
331 	 * Params:
332 	 *     row = a #gint representing a row in @table
333 	 *
334 	 * Returns: a gboolean representing if the row was successfully removed from
335 	 *     the selection, or 0 if value does not implement this interface.
336 	 */
337 	public bool removeRowSelection(int row);
338 
339 	/**
340 	 * Sets the caption for the table.
341 	 *
342 	 * Params:
343 	 *     caption = a #AtkObject representing the caption to set for @table
344 	 */
345 	public void setCaption(ObjectAtk caption);
346 
347 	/**
348 	 * Sets the description text for the specified @column of the @table.
349 	 *
350 	 * Params:
351 	 *     column = a #gint representing a column in @table
352 	 *     description = a #gchar representing the description text
353 	 *         to set for the specified @column of the @table
354 	 */
355 	public void setColumnDescription(int column, string description);
356 
357 	/**
358 	 * Sets the specified column header to @header.
359 	 *
360 	 * Params:
361 	 *     column = a #gint representing a column in @table
362 	 *     header = an #AtkTable
363 	 */
364 	public void setColumnHeader(int column, ObjectAtk header);
365 
366 	/**
367 	 * Sets the description text for the specified @row of @table.
368 	 *
369 	 * Params:
370 	 *     row = a #gint representing a row in @table
371 	 *     description = a #gchar representing the description text
372 	 *         to set for the specified @row of @table
373 	 */
374 	public void setRowDescription(int row, string description);
375 
376 	/**
377 	 * Sets the specified row header to @header.
378 	 *
379 	 * Params:
380 	 *     row = a #gint representing a row in @table
381 	 *     header = an #AtkTable
382 	 */
383 	public void setRowHeader(int row, ObjectAtk header);
384 
385 	/**
386 	 * Sets the summary description of the table.
387 	 *
388 	 * Params:
389 	 *     accessible = an #AtkObject representing the summary description
390 	 *         to set for @table
391 	 */
392 	public void setSummary(ObjectAtk accessible);
393 
394 	/**
395 	 * The "column-deleted" signal is emitted by an object which
396 	 * implements the AtkTable interface when a column is deleted.
397 	 *
398 	 * Params:
399 	 *     arg1 = The index of the first column deleted.
400 	 *     arg2 = The number of columns deleted.
401 	 */
402 	gulong addOnColumnDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
403 
404 	/**
405 	 * The "column-inserted" signal is emitted by an object which
406 	 * implements the AtkTable interface when a column is inserted.
407 	 *
408 	 * Params:
409 	 *     arg1 = The index of the column inserted.
410 	 *     arg2 = The number of colums inserted.
411 	 */
412 	gulong addOnColumnInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
413 
414 	/**
415 	 * The "column-reordered" signal is emitted by an object which
416 	 * implements the AtkTable interface when the columns are
417 	 * reordered.
418 	 */
419 	gulong addOnColumnReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
420 
421 	/**
422 	 * The "model-changed" signal is emitted by an object which
423 	 * implements the AtkTable interface when the model displayed by
424 	 * the table changes.
425 	 */
426 	gulong addOnModelChanged(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
427 
428 	/**
429 	 * The "row-deleted" signal is emitted by an object which
430 	 * implements the AtkTable interface when a row is deleted.
431 	 *
432 	 * Params:
433 	 *     arg1 = The index of the first row deleted.
434 	 *     arg2 = The number of rows deleted.
435 	 */
436 	gulong addOnRowDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
437 
438 	/**
439 	 * The "row-inserted" signal is emitted by an object which
440 	 * implements the AtkTable interface when a row is inserted.
441 	 *
442 	 * Params:
443 	 *     arg1 = The index of the first row inserted.
444 	 *     arg2 = The number of rows inserted.
445 	 */
446 	gulong addOnRowInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
447 
448 	/**
449 	 * The "row-reordered" signal is emitted by an object which
450 	 * implements the AtkTable interface when the rows are
451 	 * reordered.
452 	 */
453 	gulong addOnRowReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
454 }