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