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.TableCellT; 26 27 public import atk.ObjectAtk; 28 public import glib.PtrArray; 29 public import gobject.ObjectG; 30 public import gtkc.atk; 31 public import gtkc.atktypes; 32 33 34 /** 35 * Being #AtkTable a component which present elements ordered via rows 36 * and columns, an #AtkTableCell is the interface which each of those 37 * elements, so "cells" should implement. 38 * 39 * See also #AtkTable. 40 */ 41 public template TableCellT(TStruct) 42 { 43 /** Get the main Gtk struct */ 44 public AtkTableCell* getTableCellStruct() 45 { 46 return cast(AtkTableCell*)getStruct(); 47 } 48 49 50 /** 51 * Returns the column headers as an array of cell accessibles. 52 * 53 * Return: a GPtrArray of AtkObjects 54 * representing the column header cells. 55 * 56 * Since: 2.12 57 */ 58 public PtrArray getColumnHeaderCells() 59 { 60 auto p = atk_table_cell_get_column_header_cells(getTableCellStruct()); 61 62 if(p is null) 63 { 64 return null; 65 } 66 67 return new PtrArray(cast(GPtrArray*) p, true); 68 } 69 70 /** 71 * Returns the number of columns occupied by this cell accessible. 72 * 73 * Return: a gint representing the number of columns occupied by this cell, 74 * or 0 if the cell does not implement this method. 75 * 76 * Since: 2.12 77 */ 78 public int getColumnSpan() 79 { 80 return atk_table_cell_get_column_span(getTableCellStruct()); 81 } 82 83 /** 84 * Retrieves the tabular position of this cell. 85 * 86 * Params: 87 * row = the row of the given cell. 88 * column = the column of the given cell. 89 * 90 * Return: TRUE if successful; FALSE otherwise. 91 * 92 * Since: 2.12 93 */ 94 public bool getPosition(out int row, out int column) 95 { 96 return atk_table_cell_get_position(getTableCellStruct(), &row, &column) != 0; 97 } 98 99 /** 100 * Gets the row and column indexes and span of this cell accessible. 101 * 102 * Note: If the object does not implement this function, then, by default, atk 103 * will implement this function by calling get_row_span and get_column_span 104 * on the object. 105 * 106 * Params: 107 * row = the row index of the given cell. 108 * column = the column index of the given cell. 109 * rowSpan = the number of rows occupied by this cell. 110 * columnSpan = the number of columns occupied by this cell. 111 * 112 * Return: TRUE if successful; FALSE otherwise. 113 * 114 * Since: 2.12 115 */ 116 public bool getRowColumnSpan(out int row, out int column, out int rowSpan, out int columnSpan) 117 { 118 return atk_table_cell_get_row_column_span(getTableCellStruct(), &row, &column, &rowSpan, &columnSpan) != 0; 119 } 120 121 /** 122 * Returns the row headers as an array of cell accessibles. 123 * 124 * Return: a GPtrArray of AtkObjects 125 * representing the row header cells. 126 * 127 * Since: 2.12 128 */ 129 public PtrArray getRowHeaderCells() 130 { 131 auto p = atk_table_cell_get_row_header_cells(getTableCellStruct()); 132 133 if(p is null) 134 { 135 return null; 136 } 137 138 return new PtrArray(cast(GPtrArray*) p, true); 139 } 140 141 /** 142 * Returns the number of rows occupied by this cell accessible. 143 * 144 * Return: a gint representing the number of rows occupied by this cell, 145 * or 0 if the cell does not implement this method. 146 * 147 * Since: 2.12 148 */ 149 public int getRowSpan() 150 { 151 return atk_table_cell_get_row_span(getTableCellStruct()); 152 } 153 154 /** 155 * Returns a reference to the accessible of the containing table. 156 * 157 * Return: the atk object for the containing table. 158 * 159 * Since: 2.12 160 */ 161 public ObjectAtk getTable() 162 { 163 auto p = atk_table_cell_get_table(getTableCellStruct()); 164 165 if(p is null) 166 { 167 return null; 168 } 169 170 return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); 171 } 172 }