2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = AtkTable.html
51 private import atk
.atktypes
;
53 private import lib
.atk
;
55 private import glib
.Str
;
59 * AtkTable should be implemented by components which present elements
60 * ordered via rows and columns. It may also be used to present
61 * tree-structured information if the nodes of the trees can be said to
62 * contain multiple "columns". Individual elements of an AtkTable are
63 * typically referred to as "cells", and these cells are exposed by
64 * AtkTable as child AtkObjects of the AtkTable. Both row/column and
65 * child-index-based access to these children is provided.
66 * Children of AtkTable are frequently "lightweight" objects, that is,
67 * they may not have backing widgets in the host UI toolkit. They are
68 * therefore often transient.
69 * Since tables are often very complex, AtkTable includes provision for
70 * offering simplified summary information, as well as row and column
71 * headers and captions. Headers and captions are AtkObjects which may
72 * implement other interfaces (AtkText, AtkImage, etc.) as appropriate.
73 * AtkTable summaries may themselves be (simplified) AtkTables, etc.
78 /** the main Gtk struct */
79 protected AtkTable
* atkTable
;
82 public AtkTable
* getTableStruct()
88 /** the main Gtk struct as a void* */
89 protected void* getStruct()
91 return cast(void*)atkTable
;
95 * Sets our main struct and passes it to the parent class
97 public this (AtkTable
* atkTable
)
99 this.atkTable
= atkTable
;
105 // imports for the signal processing
106 private import gobject
.Signals
;
107 private import gdk
.gdktypes
;
108 int[char[]] connectedSignals
;
110 void delegate(gint
, gint
, Table
)[] onColumnDeletedListeners
;
111 void addOnColumnDeleted(void delegate(gint
, gint
, Table
) dlg
)
113 if ( !("column-deleted" in connectedSignals
) )
118 cast(GCallback
)&callBackColumnDeleted
,
121 cast(ConnectFlags
)0);
122 connectedSignals
["column-deleted"] = 1;
124 onColumnDeletedListeners
~= dlg
;
126 extern(C
) static void callBackColumnDeleted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
128 bit consumed
= false;
130 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onColumnDeletedListeners
)
132 dlg(arg1
, arg2
, table
);
138 void delegate(gint
, gint
, Table
)[] onColumnInsertedListeners
;
139 void addOnColumnInserted(void delegate(gint
, gint
, Table
) dlg
)
141 if ( !("column-inserted" in connectedSignals
) )
146 cast(GCallback
)&callBackColumnInserted
,
149 cast(ConnectFlags
)0);
150 connectedSignals
["column-inserted"] = 1;
152 onColumnInsertedListeners
~= dlg
;
154 extern(C
) static void callBackColumnInserted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
156 bit consumed
= false;
158 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onColumnInsertedListeners
)
160 dlg(arg1
, arg2
, table
);
166 void delegate(Table
)[] onColumnReorderedListeners
;
167 void addOnColumnReordered(void delegate(Table
) dlg
)
169 if ( !("column-reordered" in connectedSignals
) )
174 cast(GCallback
)&callBackColumnReordered
,
177 cast(ConnectFlags
)0);
178 connectedSignals
["column-reordered"] = 1;
180 onColumnReorderedListeners
~= dlg
;
182 extern(C
) static void callBackColumnReordered(AtkTable
* atktableStruct
, Table table
)
184 bit consumed
= false;
186 foreach ( void delegate(Table
) dlg
; table
.onColumnReorderedListeners
)
194 void delegate(Table
)[] onModelChangedListeners
;
195 void addOnModelChanged(void delegate(Table
) dlg
)
197 if ( !("model-changed" in connectedSignals
) )
202 cast(GCallback
)&callBackModelChanged
,
205 cast(ConnectFlags
)0);
206 connectedSignals
["model-changed"] = 1;
208 onModelChangedListeners
~= dlg
;
210 extern(C
) static void callBackModelChanged(AtkTable
* atktableStruct
, Table table
)
212 bit consumed
= false;
214 foreach ( void delegate(Table
) dlg
; table
.onModelChangedListeners
)
222 void delegate(gint
, gint
, Table
)[] onRowDeletedListeners
;
223 void addOnRowDeleted(void delegate(gint
, gint
, Table
) dlg
)
225 if ( !("row-deleted" in connectedSignals
) )
230 cast(GCallback
)&callBackRowDeleted
,
233 cast(ConnectFlags
)0);
234 connectedSignals
["row-deleted"] = 1;
236 onRowDeletedListeners
~= dlg
;
238 extern(C
) static void callBackRowDeleted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
240 bit consumed
= false;
242 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onRowDeletedListeners
)
244 dlg(arg1
, arg2
, table
);
250 void delegate(gint
, gint
, Table
)[] onRowInsertedListeners
;
251 void addOnRowInserted(void delegate(gint
, gint
, Table
) dlg
)
253 if ( !("row-inserted" in connectedSignals
) )
258 cast(GCallback
)&callBackRowInserted
,
261 cast(ConnectFlags
)0);
262 connectedSignals
["row-inserted"] = 1;
264 onRowInsertedListeners
~= dlg
;
266 extern(C
) static void callBackRowInserted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
268 bit consumed
= false;
270 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onRowInsertedListeners
)
272 dlg(arg1
, arg2
, table
);
278 void delegate(Table
)[] onRowReorderedListeners
;
279 void addOnRowReordered(void delegate(Table
) dlg
)
281 if ( !("row-reordered" in connectedSignals
) )
286 cast(GCallback
)&callBackRowReordered
,
289 cast(ConnectFlags
)0);
290 connectedSignals
["row-reordered"] = 1;
292 onRowReorderedListeners
~= dlg
;
294 extern(C
) static void callBackRowReordered(AtkTable
* atktableStruct
, Table table
)
296 bit consumed
= false;
298 foreach ( void delegate(Table
) dlg
; table
.onRowReorderedListeners
)
309 * Get a reference to the table cell at row, column.
311 * a GObject instance that implements AtkTableIface
313 * a gint representing a row in table
315 * a gint representing a column in table
317 * a AtkObject* representing the referred to accessible
319 public AtkObject
* refAt(int row
, int column
)
321 // AtkObject* atk_table_ref_at (AtkTable *table, gint row, gint column);
322 return atk_table_ref_at(atkTable
, row
, column
);
326 * Gets a gint representing the index at the specified row and column.
328 * a GObject instance that implements AtkTableIface
330 * a gint representing a row in table
332 * a gint representing a column in table
334 * a gint representing the index at specified position.
335 * The value -1 is returned if the object at row,column is not a child
336 * of table or table does not implement this interface.
338 public int getIndexAt(int row
, int column
)
340 // gint atk_table_get_index_at (AtkTable *table, gint row, gint column);
341 return atk_table_get_index_at(atkTable
, row
, column
);
345 * Gets a gint representing the column at the specified index_.
347 * a GObject instance that implements AtkTableInterface
349 * a gint representing an index in table
351 * a gint representing the column at the specified index,
352 * or -1 if the table does not implement this interface
354 public int getColumnAtIndex(int index
)
356 // gint atk_table_get_column_at_index (AtkTable *table, gint index_);
357 return atk_table_get_column_at_index(atkTable
, index
);
361 * Gets a gint representing the row at the specified index_.
363 * a GObject instance that implements AtkTableInterface
365 * a gint representing an index in table
367 * a gint representing the row at the specified index,
368 * or -1 if the table does not implement this interface
370 public int getRowAtIndex(int index
)
372 // gint atk_table_get_row_at_index (AtkTable *table, gint index_);
373 return atk_table_get_row_at_index(atkTable
, index
);
377 * Gets the number of columns in the table.
379 * a GObject instance that implements AtkTableIface
381 * a gint representing the number of columns, or 0
382 * if value does not implement this interface.
384 public int getNColumns()
386 // gint atk_table_get_n_columns (AtkTable *table);
387 return atk_table_get_n_columns(atkTable
);
391 * Gets the number of rows in the table.
393 * a GObject instance that implements AtkTableIface
395 * a gint representing the number of rows, or 0
396 * if value does not implement this interface.
398 public int getNRows()
400 // gint atk_table_get_n_rows (AtkTable *table);
401 return atk_table_get_n_rows(atkTable
);
405 * Gets the number of columns occupied by the accessible object
406 * at the specified row and column in the table.
408 * a GObject instance that implements AtkTableIface
410 * a gint representing a row in table
412 * a gint representing a column in table
414 * a gint representing the column extent at specified position, or 0
415 * if value does not implement this interface.
417 public int getColumnExtentAt(int row
, int column
)
419 // gint atk_table_get_column_extent_at (AtkTable *table, gint row, gint column);
420 return atk_table_get_column_extent_at(atkTable
, row
, column
);
424 * Gets the number of rows occupied by the accessible object
425 * at a specified row and column in the table.
427 * a GObject instance that implements AtkTableIface
429 * a gint representing a row in table
431 * a gint representing a column in table
433 * a gint representing the row extent at specified position, or 0
434 * if value does not implement this interface.
436 public int getRowExtentAt(int row
, int column
)
438 // gint atk_table_get_row_extent_at (AtkTable *table, gint row, gint column);
439 return atk_table_get_row_extent_at(atkTable
, row
, column
);
443 * Gets the caption for the table.
445 * a GObject instance that implements AtkTableInterface
447 * a AtkObject* representing the table caption, or NULL
448 * if value does not implement this interface.
450 public AtkObject
* getCaption()
452 // AtkObject* atk_table_get_caption (AtkTable *table);
453 return atk_table_get_caption(atkTable
);
457 * Gets the description text of the specified column in the table
459 * a GObject instance that implements AtkTableIface
461 * a gint representing a column in table
463 * a gchar* representing the column description, or NULL
464 * if value does not implement this interface.
466 public char[] getColumnDescription(int column
)
468 // const gchar* atk_table_get_column_description (AtkTable *table, gint column);
469 return Str
.toString(atk_table_get_column_description(atkTable
, column
) );
473 * Gets the description text of the specified row in the table
475 * a GObject instance that implements AtkTableIface
477 * a gint representing a row in table
479 * a gchar* representing the row description, or NULL
480 * if value does not implement this interface.
482 public char[] getRowDescription(int row
)
484 // const gchar* atk_table_get_row_description (AtkTable *table, gint row);
485 return Str
.toString(atk_table_get_row_description(atkTable
, row
) );
489 * Gets the column header of a specified column in an accessible table.
491 * a GObject instance that implements AtkTableIface
493 * a gint representing a column in the table
495 * a AtkObject* representing the specified column header, or
496 * NULL if value does not implement this interface.
498 public AtkObject
* getColumnHeader(int column
)
500 // AtkObject* atk_table_get_column_header (AtkTable *table, gint column);
501 return atk_table_get_column_header(atkTable
, column
);
505 * Gets the row header of a specified row in an accessible table.
507 * a GObject instance that implements AtkTableIface
509 * a gint representing a row in the table
511 * a AtkObject* representing the specified row header, or
512 * NULL if value does not implement this interface.
514 public AtkObject
* getRowHeader(int row
)
516 // AtkObject* atk_table_get_row_header (AtkTable *table, gint row);
517 return atk_table_get_row_header(atkTable
, row
);
521 * Gets the summary description of the table.
523 * a GObject instance that implements AtkTableIface
525 * a AtkObject* representing a summary description of the table,
526 * or zero if value does not implement this interface.
528 public AtkObject
* getSummary()
530 // AtkObject* atk_table_get_summary (AtkTable *table);
531 return atk_table_get_summary(atkTable
);
535 * Sets the caption for the table.
537 * a GObject instance that implements AtkTableIface
539 * a AtkObject representing the caption to set for table
541 public void setCaption(AtkObject
* caption
)
543 // void atk_table_set_caption (AtkTable *table, AtkObject *caption);
544 atk_table_set_caption(atkTable
, caption
);
548 * Sets the description text for the specified row of table.
550 * a GObject instance that implements AtkTableIface
552 * a gint representing a row in table
554 * a gchar representing the description text
555 * to set for the specified row of table
557 public void setRowDescription(int row
, char[] description
)
559 // void atk_table_set_row_description (AtkTable *table, gint row, const gchar *description);
560 atk_table_set_row_description(atkTable
, row
, Str
.toStringz(description
));
564 * Sets the description text for the specified column of the table.
566 * a GObject instance that implements AtkTableIface
568 * a gint representing a column in table
570 * a gchar representing the description text
571 * to set for the specified column of the table
573 public void setColumnDescription(int column
, char[] description
)
575 // void atk_table_set_column_description (AtkTable *table, gint column, const gchar *description);
576 atk_table_set_column_description(atkTable
, column
, Str
.toStringz(description
));
580 * Sets the specified row header to header.
582 * a GObject instance that implements AtkTableIface
584 * a gint representing a row in table
588 public void setRowHeader(int row
, AtkObject
* header
)
590 // void atk_table_set_row_header (AtkTable *table, gint row, AtkObject *header);
591 atk_table_set_row_header(atkTable
, row
, header
);
595 * Sets the specified column header to header.
597 * a GObject instance that implements AtkTableIface
599 * a gint representing a column in table
603 public void setColumnHeader(int column
, AtkObject
* header
)
605 // void atk_table_set_column_header (AtkTable *table, gint column, AtkObject *header);
606 atk_table_set_column_header(atkTable
, column
, header
);
610 * Sets the summary description of the table.
612 * a GObject instance that implements AtkTableIface
614 * an AtkObject representing the summary description
617 public void setSummary(AtkObject
* accessible
)
619 // void atk_table_set_summary (AtkTable *table, AtkObject *accessible);
620 atk_table_set_summary(atkTable
, accessible
);
624 * Gets the selected columns of the table by initializing **selected with
625 * the selected column numbers. This array should be freed by the caller.
627 * a GObject instance that implements AtkTableIface
629 * a gint** that is to contain the selected columns numbers
631 * a gint representing the number of selected columns,
632 * or 0 if value does not implement this interface.
634 public int getSelectedColumns(int** selected
)
636 // gint atk_table_get_selected_columns (AtkTable *table, gint **selected);
637 return atk_table_get_selected_columns(atkTable
, selected
);
641 * Gets the selected rows of the table by initializing **selected with
642 * the selected row numbers. This array should be freed by the caller.
644 * a GObject instance that implements AtkTableIface
646 * a gint** that is to contain the selected row numbers
648 * a gint representing the number of selected rows,
649 * or zero if value does not implement this interface.
651 public int getSelectedRows(int** selected
)
653 // gint atk_table_get_selected_rows (AtkTable *table, gint **selected);
654 return atk_table_get_selected_rows(atkTable
, selected
);
658 * Gets a boolean value indicating whether the specified column
661 * a GObject instance that implements AtkTableIface
663 * a gint representing a column in table
665 * a gboolean representing if the column is selected, or 0
666 * if value does not implement this interface.
668 public int isColumnSelected(int column
)
670 // gboolean atk_table_is_column_selected (AtkTable *table, gint column);
671 return atk_table_is_column_selected(atkTable
, column
);
675 * Gets a boolean value indicating whether the specified row
678 * a GObject instance that implements AtkTableIface
680 * a gint representing a row in table
682 * a gboolean representing if the row is selected, or 0
683 * if value does not implement this interface.
685 public int isRowSelected(int row
)
687 // gboolean atk_table_is_row_selected (AtkTable *table, gint row);
688 return atk_table_is_row_selected(atkTable
, row
);
692 * Gets a boolean value indicating whether the accessible object
693 * at the specified row and column is selected
695 * a GObject instance that implements AtkTableIface
697 * a gint representing a row in table
699 * a gint representing a column in table
701 * a gboolean representing if the cell is selected, or 0
702 * if value does not implement this interface.
704 public int isSelected(int row
, int column
)
706 // gboolean atk_table_is_selected (AtkTable *table, gint row, gint column);
707 return atk_table_is_selected(atkTable
, row
, column
);
711 * Adds the specified column to the selection.
713 * a GObject instance that implements AtkTableIface
715 * a gint representing a column in table
717 * a gboolean representing if the column was successfully added to
718 * the selection, or 0 if value does not implement this interface.
720 public int addColumnSelection(int column
)
722 // gboolean atk_table_add_column_selection (AtkTable *table, gint column);
723 return atk_table_add_column_selection(atkTable
, column
);
727 * Adds the specified row to the selection.
729 * a GObject instance that implements AtkTableIface
731 * a gint representing a row in table
733 * a gboolean representing if row was successfully added to selection,
734 * or 0 if value does not implement this interface.
736 public int addRowSelection(int row
)
738 // gboolean atk_table_add_row_selection (AtkTable *table, gint row);
739 return atk_table_add_row_selection(atkTable
, row
);
743 * Adds the specified column to the selection.
745 * a GObject instance that implements AtkTableIface
747 * a gint representing a column in table
749 * a gboolean representing if the column was successfully removed from
750 * the selection, or 0 if value does not implement this interface.
752 public int removeColumnSelection(int column
)
754 // gboolean atk_table_remove_column_selection (AtkTable *table, gint column);
755 return atk_table_remove_column_selection(atkTable
, column
);
759 * Removes the specified row from the selection.
761 * a GObject instance that implements AtkTableIface
763 * a gint representing a row in table
765 * a gboolean representing if the row was successfully removed from
766 * the selection, or 0 if value does not implement this interface.
768 * The "column-deleted" signal
769 * void user_function (AtkTable *atktable,
772 * gpointer user_data) : Run last
773 * The "column-deleted" signal is emitted by an object which implements the
774 * AtkTable interface when a column is deleted.
776 * the object which received the signal.
778 * The index of the first column deleted.
780 * The number of columns deleted.
782 * user data set when the signal handler was connected.
784 public int removeRowSelection(int row
)
786 // gboolean atk_table_remove_row_selection (AtkTable *table, gint row);
787 return atk_table_remove_row_selection(atkTable
, row
);