2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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
56 import tango
.io
.Stdout
; // use the tango loging?
60 private import gtkc
.atktypes
;
62 private import gtkc
.atk
;
65 private import glib
.Str
;
72 * AtkTable should be implemented by components which present elements
73 * ordered via rows and columns. It may also be used to present
74 * tree-structured information if the nodes of the trees can be said to
75 * contain multiple "columns". Individual elements of an AtkTable are
76 * typically referred to as "cells", and these cells are exposed by
77 * AtkTable as child AtkObjects of the AtkTable. Both row/column and
78 * child-index-based access to these children is provided.
79 * Children of AtkTable are frequently "lightweight" objects, that is,
80 * they may not have backing widgets in the host UI toolkit. They are
81 * therefore often transient.
82 * Since tables are often very complex, AtkTable includes provision for
83 * offering simplified summary information, as well as row and column
84 * headers and captions. Headers and captions are AtkObjects which may
85 * implement other interfaces (AtkText, AtkImage, etc.) as appropriate.
86 * AtkTable summaries may themselves be (simplified) AtkTables, etc.
91 /** the main Gtk struct */
92 protected AtkTable
* atkTable
;
95 public AtkTable
* getTableStruct()
101 /** the main Gtk struct as a void* */
102 protected void* getStruct()
104 return cast(void*)atkTable
;
108 * Sets our main struct and passes it to the parent class
110 public this (AtkTable
* atkTable
)
114 if ( atkTable
is null )
119 Stdout("struct atkTable is null on constructor").newline
;
123 printf("struct atkTable is null on constructor");
130 assert(atkTable
!is null, "struct atkTable is null on constructor");
132 this.atkTable
= atkTable
;
138 // imports for the signal processing
139 private import gobject
.Signals
;
140 private import gtkc
.gdktypes
;
141 int[char[]] connectedSignals
;
143 void delegate(gint
, gint
, Table
)[] onColumnDeletedListeners
;
144 void addOnColumnDeleted(void delegate(gint
, gint
, Table
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
146 if ( !("column-deleted" in connectedSignals
) )
151 cast(GCallback
)&callBackColumnDeleted
,
155 connectedSignals
["column-deleted"] = 1;
157 onColumnDeletedListeners
~= dlg
;
159 extern(C
) static void callBackColumnDeleted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
161 bool consumed
= false;
163 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onColumnDeletedListeners
)
165 dlg(arg1
, arg2
, table
);
171 void delegate(gint
, gint
, Table
)[] onColumnInsertedListeners
;
172 void addOnColumnInserted(void delegate(gint
, gint
, Table
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
174 if ( !("column-inserted" in connectedSignals
) )
179 cast(GCallback
)&callBackColumnInserted
,
183 connectedSignals
["column-inserted"] = 1;
185 onColumnInsertedListeners
~= dlg
;
187 extern(C
) static void callBackColumnInserted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
189 bool consumed
= false;
191 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onColumnInsertedListeners
)
193 dlg(arg1
, arg2
, table
);
199 void delegate(Table
)[] onColumnReorderedListeners
;
200 void addOnColumnReordered(void delegate(Table
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
202 if ( !("column-reordered" in connectedSignals
) )
207 cast(GCallback
)&callBackColumnReordered
,
211 connectedSignals
["column-reordered"] = 1;
213 onColumnReorderedListeners
~= dlg
;
215 extern(C
) static void callBackColumnReordered(AtkTable
* atktableStruct
, Table table
)
217 bool consumed
= false;
219 foreach ( void delegate(Table
) dlg
; table
.onColumnReorderedListeners
)
227 void delegate(Table
)[] onModelChangedListeners
;
228 void addOnModelChanged(void delegate(Table
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
230 if ( !("model-changed" in connectedSignals
) )
235 cast(GCallback
)&callBackModelChanged
,
239 connectedSignals
["model-changed"] = 1;
241 onModelChangedListeners
~= dlg
;
243 extern(C
) static void callBackModelChanged(AtkTable
* atktableStruct
, Table table
)
245 bool consumed
= false;
247 foreach ( void delegate(Table
) dlg
; table
.onModelChangedListeners
)
255 void delegate(gint
, gint
, Table
)[] onRowDeletedListeners
;
256 void addOnRowDeleted(void delegate(gint
, gint
, Table
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
258 if ( !("row-deleted" in connectedSignals
) )
263 cast(GCallback
)&callBackRowDeleted
,
267 connectedSignals
["row-deleted"] = 1;
269 onRowDeletedListeners
~= dlg
;
271 extern(C
) static void callBackRowDeleted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
273 bool consumed
= false;
275 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onRowDeletedListeners
)
277 dlg(arg1
, arg2
, table
);
283 void delegate(gint
, gint
, Table
)[] onRowInsertedListeners
;
284 void addOnRowInserted(void delegate(gint
, gint
, Table
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
286 if ( !("row-inserted" in connectedSignals
) )
291 cast(GCallback
)&callBackRowInserted
,
295 connectedSignals
["row-inserted"] = 1;
297 onRowInsertedListeners
~= dlg
;
299 extern(C
) static void callBackRowInserted(AtkTable
* atktableStruct
, gint arg1
, gint arg2
, Table table
)
301 bool consumed
= false;
303 foreach ( void delegate(gint
, gint
, Table
) dlg
; table
.onRowInsertedListeners
)
305 dlg(arg1
, arg2
, table
);
311 void delegate(Table
)[] onRowReorderedListeners
;
312 void addOnRowReordered(void delegate(Table
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
314 if ( !("row-reordered" in connectedSignals
) )
319 cast(GCallback
)&callBackRowReordered
,
323 connectedSignals
["row-reordered"] = 1;
325 onRowReorderedListeners
~= dlg
;
327 extern(C
) static void callBackRowReordered(AtkTable
* atktableStruct
, Table table
)
329 bool consumed
= false;
331 foreach ( void delegate(Table
) dlg
; table
.onRowReorderedListeners
)
342 * Get a reference to the table cell at row, column.
344 * a GObject instance that implements AtkTableIface
346 * a gint representing a row in table
348 * a gint representing a column in table
350 * a AtkObject* representing the referred to accessible
352 public AtkObject
* refAt(int row
, int column
)
354 // AtkObject* atk_table_ref_at (AtkTable *table, gint row, gint column);
355 return atk_table_ref_at(atkTable
, row
, column
);
359 * Gets a gint representing the index at the specified row and column.
361 * a GObject instance that implements AtkTableIface
363 * a gint representing a row in table
365 * a gint representing a column in table
367 * a gint representing the index at specified position.
368 * The value -1 is returned if the object at row,column is not a child
369 * of table or table does not implement this interface.
371 public int getIndexAt(int row
, int column
)
373 // gint atk_table_get_index_at (AtkTable *table, gint row, gint column);
374 return atk_table_get_index_at(atkTable
, row
, column
);
378 * Gets a gint representing the column at the specified index_.
380 * a GObject instance that implements AtkTableInterface
382 * a gint representing an index in table
384 * a gint representing the column at the specified index,
385 * or -1 if the table does not implement this interface
387 public int getColumnAtIndex(int index
)
389 // gint atk_table_get_column_at_index (AtkTable *table, gint index_);
390 return atk_table_get_column_at_index(atkTable
, index
);
394 * Gets a gint representing the row at the specified index_.
396 * a GObject instance that implements AtkTableInterface
398 * a gint representing an index in table
400 * a gint representing the row at the specified index,
401 * or -1 if the table does not implement this interface
403 public int getRowAtIndex(int index
)
405 // gint atk_table_get_row_at_index (AtkTable *table, gint index_);
406 return atk_table_get_row_at_index(atkTable
, index
);
410 * Gets the number of columns in the table.
412 * a GObject instance that implements AtkTableIface
414 * a gint representing the number of columns, or 0
415 * if value does not implement this interface.
417 public int getNColumns()
419 // gint atk_table_get_n_columns (AtkTable *table);
420 return atk_table_get_n_columns(atkTable
);
424 * Gets the number of rows in the table.
426 * a GObject instance that implements AtkTableIface
428 * a gint representing the number of rows, or 0
429 * if value does not implement this interface.
431 public int getNRows()
433 // gint atk_table_get_n_rows (AtkTable *table);
434 return atk_table_get_n_rows(atkTable
);
438 * Gets the number of columns occupied by the accessible object
439 * at the specified row and column in the table.
441 * a GObject instance that implements AtkTableIface
443 * a gint representing a row in table
445 * a gint representing a column in table
447 * a gint representing the column extent at specified position, or 0
448 * if value does not implement this interface.
450 public int getColumnExtentAt(int row
, int column
)
452 // gint atk_table_get_column_extent_at (AtkTable *table, gint row, gint column);
453 return atk_table_get_column_extent_at(atkTable
, row
, column
);
457 * Gets the number of rows occupied by the accessible object
458 * at a specified row and column in the table.
460 * a GObject instance that implements AtkTableIface
462 * a gint representing a row in table
464 * a gint representing a column in table
466 * a gint representing the row extent at specified position, or 0
467 * if value does not implement this interface.
469 public int getRowExtentAt(int row
, int column
)
471 // gint atk_table_get_row_extent_at (AtkTable *table, gint row, gint column);
472 return atk_table_get_row_extent_at(atkTable
, row
, column
);
476 * Gets the caption for the table.
478 * a GObject instance that implements AtkTableInterface
480 * a AtkObject* representing the table caption, or NULL
481 * if value does not implement this interface.
483 public AtkObject
* getCaption()
485 // AtkObject* atk_table_get_caption (AtkTable *table);
486 return atk_table_get_caption(atkTable
);
490 * Gets the description text of the specified column in the table
492 * a GObject instance that implements AtkTableIface
494 * a gint representing a column in table
496 * a gchar* representing the column description, or NULL
497 * if value does not implement this interface.
499 public char[] getColumnDescription(int column
)
501 // const gchar* atk_table_get_column_description (AtkTable *table, gint column);
502 return Str
.toString(atk_table_get_column_description(atkTable
, column
) );
506 * Gets the description text of the specified row in the table
508 * a GObject instance that implements AtkTableIface
510 * a gint representing a row in table
512 * a gchar* representing the row description, or NULL
513 * if value does not implement this interface.
515 public char[] getRowDescription(int row
)
517 // const gchar* atk_table_get_row_description (AtkTable *table, gint row);
518 return Str
.toString(atk_table_get_row_description(atkTable
, row
) );
522 * Gets the column header of a specified column in an accessible table.
524 * a GObject instance that implements AtkTableIface
526 * a gint representing a column in the table
528 * a AtkObject* representing the specified column header, or
529 * NULL if value does not implement this interface.
531 public AtkObject
* getColumnHeader(int column
)
533 // AtkObject* atk_table_get_column_header (AtkTable *table, gint column);
534 return atk_table_get_column_header(atkTable
, column
);
538 * Gets the row header of a specified row in an accessible table.
540 * a GObject instance that implements AtkTableIface
542 * a gint representing a row in the table
544 * a AtkObject* representing the specified row header, or
545 * NULL if value does not implement this interface.
547 public AtkObject
* getRowHeader(int row
)
549 // AtkObject* atk_table_get_row_header (AtkTable *table, gint row);
550 return atk_table_get_row_header(atkTable
, row
);
554 * Gets the summary description of the table.
556 * a GObject instance that implements AtkTableIface
558 * a AtkObject* representing a summary description of the table,
559 * or zero if value does not implement this interface.
561 public AtkObject
* getSummary()
563 // AtkObject* atk_table_get_summary (AtkTable *table);
564 return atk_table_get_summary(atkTable
);
568 * Sets the caption for the table.
570 * a GObject instance that implements AtkTableIface
572 * a AtkObject representing the caption to set for table
574 public void setCaption(AtkObject
* caption
)
576 // void atk_table_set_caption (AtkTable *table, AtkObject *caption);
577 atk_table_set_caption(atkTable
, caption
);
581 * Sets the description text for the specified row of table.
583 * a GObject instance that implements AtkTableIface
585 * a gint representing a row in table
587 * a gchar representing the description text
588 * to set for the specified row of table
590 public void setRowDescription(int row
, char[] description
)
592 // void atk_table_set_row_description (AtkTable *table, gint row, const gchar *description);
593 atk_table_set_row_description(atkTable
, row
, Str
.toStringz(description
));
597 * Sets the description text for the specified column of the table.
599 * a GObject instance that implements AtkTableIface
601 * a gint representing a column in table
603 * a gchar representing the description text
604 * to set for the specified column of the table
606 public void setColumnDescription(int column
, char[] description
)
608 // void atk_table_set_column_description (AtkTable *table, gint column, const gchar *description);
609 atk_table_set_column_description(atkTable
, column
, Str
.toStringz(description
));
613 * Sets the specified row header to header.
615 * a GObject instance that implements AtkTableIface
617 * a gint representing a row in table
621 public void setRowHeader(int row
, AtkObject
* header
)
623 // void atk_table_set_row_header (AtkTable *table, gint row, AtkObject *header);
624 atk_table_set_row_header(atkTable
, row
, header
);
628 * Sets the specified column header to header.
630 * a GObject instance that implements AtkTableIface
632 * a gint representing a column in table
636 public void setColumnHeader(int column
, AtkObject
* header
)
638 // void atk_table_set_column_header (AtkTable *table, gint column, AtkObject *header);
639 atk_table_set_column_header(atkTable
, column
, header
);
643 * Sets the summary description of the table.
645 * a GObject instance that implements AtkTableIface
647 * an AtkObject representing the summary description
650 public void setSummary(AtkObject
* accessible
)
652 // void atk_table_set_summary (AtkTable *table, AtkObject *accessible);
653 atk_table_set_summary(atkTable
, accessible
);
657 * Gets the selected columns of the table by initializing **selected with
658 * the selected column numbers. This array should be freed by the caller.
660 * a GObject instance that implements AtkTableIface
662 * a gint** that is to contain the selected columns numbers
664 * a gint representing the number of selected columns,
665 * or 0 if value does not implement this interface.
667 public int getSelectedColumns(int** selected
)
669 // gint atk_table_get_selected_columns (AtkTable *table, gint **selected);
670 return atk_table_get_selected_columns(atkTable
, selected
);
674 * Gets the selected rows of the table by initializing **selected with
675 * the selected row numbers. This array should be freed by the caller.
677 * a GObject instance that implements AtkTableIface
679 * a gint** that is to contain the selected row numbers
681 * a gint representing the number of selected rows,
682 * or zero if value does not implement this interface.
684 public int getSelectedRows(int** selected
)
686 // gint atk_table_get_selected_rows (AtkTable *table, gint **selected);
687 return atk_table_get_selected_rows(atkTable
, selected
);
691 * Gets a boolean value indicating whether the specified column
694 * a GObject instance that implements AtkTableIface
696 * a gint representing a column in table
698 * a gboolean representing if the column is selected, or 0
699 * if value does not implement this interface.
701 public int isColumnSelected(int column
)
703 // gboolean atk_table_is_column_selected (AtkTable *table, gint column);
704 return atk_table_is_column_selected(atkTable
, column
);
708 * Gets a boolean value indicating whether the specified row
711 * a GObject instance that implements AtkTableIface
713 * a gint representing a row in table
715 * a gboolean representing if the row is selected, or 0
716 * if value does not implement this interface.
718 public int isRowSelected(int row
)
720 // gboolean atk_table_is_row_selected (AtkTable *table, gint row);
721 return atk_table_is_row_selected(atkTable
, row
);
725 * Gets a boolean value indicating whether the accessible object
726 * at the specified row and column is selected
728 * a GObject instance that implements AtkTableIface
730 * a gint representing a row in table
732 * a gint representing a column in table
734 * a gboolean representing if the cell is selected, or 0
735 * if value does not implement this interface.
737 public int isSelected(int row
, int column
)
739 // gboolean atk_table_is_selected (AtkTable *table, gint row, gint column);
740 return atk_table_is_selected(atkTable
, row
, column
);
744 * Adds the specified column to the selection.
746 * a GObject instance that implements AtkTableIface
748 * a gint representing a column in table
750 * a gboolean representing if the column was successfully added to
751 * the selection, or 0 if value does not implement this interface.
753 public int addColumnSelection(int column
)
755 // gboolean atk_table_add_column_selection (AtkTable *table, gint column);
756 return atk_table_add_column_selection(atkTable
, column
);
760 * Adds the specified row to the selection.
762 * a GObject instance that implements AtkTableIface
764 * a gint representing a row in table
766 * a gboolean representing if row was successfully added to selection,
767 * or 0 if value does not implement this interface.
769 public int addRowSelection(int row
)
771 // gboolean atk_table_add_row_selection (AtkTable *table, gint row);
772 return atk_table_add_row_selection(atkTable
, row
);
776 * Adds the specified column to the selection.
778 * a GObject instance that implements AtkTableIface
780 * a gint representing a column in table
782 * a gboolean representing if the column was successfully removed from
783 * the selection, or 0 if value does not implement this interface.
785 public int removeColumnSelection(int column
)
787 // gboolean atk_table_remove_column_selection (AtkTable *table, gint column);
788 return atk_table_remove_column_selection(atkTable
, column
);
792 * Removes the specified row from the selection.
794 * a GObject instance that implements AtkTableIface
796 * a gint representing a row in table
798 * a gboolean representing if the row was successfully removed from
799 * the selection, or 0 if value does not implement this interface.
801 * The "column-deleted" signal
802 * void user_function (AtkTable *atktable,
805 * gpointer user_data) : Run Last
806 * The "column-deleted" signal is emitted by an object which implements the
807 * AtkTable interface when a column is deleted.
809 * the object which received the signal.
811 * The index of the first column deleted.
813 * The number of columns deleted.
815 * user data set when the signal handler was connected.
817 public int removeRowSelection(int row
)
819 // gboolean atk_table_remove_row_selection (AtkTable *table, gint row);
820 return atk_table_remove_row_selection(atkTable
, row
);