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 public import gtkc.gdktypes; 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(); 69 70 /** the main Gtk struct as a void* */ 71 protected void* getStruct(); 72 73 /** 74 */ 75 76 /** 77 * Adds the specified @column to the selection. 78 * 79 * Params: 80 * column = a #gint representing a column in @table 81 * 82 * Return: a gboolean representing if the column was successfully added to 83 * the selection, or 0 if value does not implement this interface. 84 */ 85 public bool addColumnSelection(int column); 86 87 /** 88 * Adds the specified @row to the selection. 89 * 90 * Params: 91 * row = a #gint representing a row in @table 92 * 93 * Return: a gboolean representing if row was successfully added to selection, 94 * or 0 if value does not implement this interface. 95 */ 96 public bool addRowSelection(int row); 97 98 /** 99 * Gets the caption for the @table. 100 * 101 * Return: a AtkObject* representing the 102 * table caption, or %NULL if value does not implement this interface. 103 */ 104 public ObjectAtk getCaption(); 105 106 /** 107 * Gets a #gint representing the column at the specified @index_. 108 * 109 * Deprecated: Since 2.12. 110 * 111 * Params: 112 * index = a #gint representing an index in @table 113 * 114 * Return: a gint representing the column at the specified index, 115 * or -1 if the table does not implement this method. 116 */ 117 public int getColumnAtIndex(int index); 118 119 /** 120 * Gets the description text of the specified @column in the table 121 * 122 * Params: 123 * column = a #gint representing a column in @table 124 * 125 * Return: a gchar* representing the column description, or %NULL 126 * if value does not implement this interface. 127 */ 128 public string getColumnDescription(int column); 129 130 /** 131 * Gets the number of columns occupied by the accessible object 132 * at the specified @row and @column in the @table. 133 * 134 * Params: 135 * row = a #gint representing a row in @table 136 * column = a #gint representing a column in @table 137 * 138 * Return: a gint representing the column extent at specified position, or 0 139 * if value does not implement this interface. 140 */ 141 public int getColumnExtentAt(int row, int column); 142 143 /** 144 * Gets the column header of a specified column in an accessible table. 145 * 146 * Params: 147 * column = a #gint representing a column in the table 148 * 149 * Return: a AtkObject* representing the 150 * specified column header, or %NULL if value does not implement this 151 * interface. 152 */ 153 public ObjectAtk getColumnHeader(int column); 154 155 /** 156 * Gets a #gint representing the index at the specified @row and 157 * @column. 158 * 159 * Deprecated: Since 2.12. Use atk_table_ref_at() in order to get the 160 * accessible that represents the cell at (@row, @column) 161 * 162 * Params: 163 * row = a #gint representing a row in @table 164 * column = a #gint representing a column in @table 165 * 166 * Return: a #gint representing the index at specified position. 167 * The value -1 is returned if the object at row,column is not a child 168 * of table or table does not implement this interface. 169 */ 170 public int getIndexAt(int row, int column); 171 172 /** 173 * Gets the number of columns in the table. 174 * 175 * Return: a gint representing the number of columns, or 0 176 * if value does not implement this interface. 177 */ 178 public int getNColumns(); 179 180 /** 181 * Gets the number of rows in the table. 182 * 183 * Return: a gint representing the number of rows, or 0 184 * if value does not implement this interface. 185 */ 186 public int getNRows(); 187 188 /** 189 * Gets a #gint representing the row at the specified @index_. 190 * 191 * Deprecated: since 2.12. 192 * 193 * Params: 194 * index = a #gint representing an index in @table 195 * 196 * Return: a gint representing the row at the specified index, 197 * or -1 if the table does not implement this method. 198 */ 199 public int getRowAtIndex(int index); 200 201 /** 202 * Gets the description text of the specified row in the table 203 * 204 * Params: 205 * row = a #gint representing a row in @table 206 * 207 * Return: a gchar* representing the row description, or 208 * %NULL if value does not implement this interface. 209 */ 210 public string getRowDescription(int row); 211 212 /** 213 * Gets the number of rows occupied by the accessible object 214 * at a specified @row and @column in the @table. 215 * 216 * Params: 217 * row = a #gint representing a row in @table 218 * column = a #gint representing a column in @table 219 * 220 * Return: a gint representing the row extent at specified position, or 0 221 * if value does not implement this interface. 222 */ 223 public int getRowExtentAt(int row, int column); 224 225 /** 226 * Gets the row header of a specified row in an accessible table. 227 * 228 * Params: 229 * row = a #gint representing a row in the table 230 * 231 * Return: a AtkObject* representing the 232 * specified row header, or %NULL if value does not implement this 233 * interface. 234 */ 235 public ObjectAtk getRowHeader(int row); 236 237 /** 238 * Gets the selected columns of the table by initializing **selected with 239 * the selected column numbers. This array should be freed by the caller. 240 * 241 * Params: 242 * selected = a #gint** that is to contain the selected columns numbers 243 * 244 * Return: a gint representing the number of selected columns, 245 * or %0 if value does not implement this interface. 246 */ 247 public int getSelectedColumns(int** selected); 248 249 /** 250 * Gets the selected rows of the table by initializing **selected with 251 * the selected row numbers. This array should be freed by the caller. 252 * 253 * Params: 254 * selected = a #gint** that is to contain the selected row numbers 255 * 256 * Return: a gint representing the number of selected rows, 257 * or zero if value does not implement this interface. 258 */ 259 public int getSelectedRows(int** selected); 260 261 /** 262 * Gets the summary description of the table. 263 * 264 * Return: a AtkObject* representing a summary description 265 * of the table, or zero if value does not implement this interface. 266 */ 267 public ObjectAtk getSummary(); 268 269 /** 270 * Gets a boolean value indicating whether the specified @column 271 * is selected 272 * 273 * Params: 274 * column = a #gint representing a column in @table 275 * 276 * Return: a gboolean representing if the column is selected, or 0 277 * if value does not implement this interface. 278 */ 279 public bool isColumnSelected(int column); 280 281 /** 282 * Gets a boolean value indicating whether the specified @row 283 * is selected 284 * 285 * Params: 286 * row = a #gint representing a row in @table 287 * 288 * Return: a gboolean representing if the row is selected, or 0 289 * if value does not implement this interface. 290 */ 291 public bool isRowSelected(int row); 292 293 /** 294 * Gets a boolean value indicating whether the accessible object 295 * at the specified @row and @column is selected 296 * 297 * Params: 298 * row = a #gint representing a row in @table 299 * column = a #gint representing a column in @table 300 * 301 * Return: a gboolean representing if the cell is selected, or 0 302 * if value does not implement this interface. 303 */ 304 public bool isSelected(int row, int column); 305 306 /** 307 * Get a reference to the table cell at @row, @column. This cell 308 * should implement the interface #AtkTableCell 309 * 310 * Params: 311 * row = a #gint representing a row in @table 312 * column = a #gint representing a column in @table 313 * 314 * Return: an #AtkObject representing the referred 315 * to accessible 316 */ 317 public ObjectAtk refAt(int row, int column); 318 319 /** 320 * Adds the specified @column to the selection. 321 * 322 * Params: 323 * column = a #gint representing a column in @table 324 * 325 * Return: a gboolean representing if the column was successfully removed from 326 * the selection, or 0 if value does not implement this interface. 327 */ 328 public bool removeColumnSelection(int column); 329 330 /** 331 * Removes the specified @row from the selection. 332 * 333 * Params: 334 * row = a #gint representing a row in @table 335 * 336 * Return: a gboolean representing if the row was successfully removed from 337 * the selection, or 0 if value does not implement this interface. 338 */ 339 public bool removeRowSelection(int row); 340 341 /** 342 * Sets the caption for the table. 343 * 344 * Params: 345 * caption = a #AtkObject representing the caption to set for @table 346 */ 347 public void setCaption(ObjectAtk caption); 348 349 /** 350 * Sets the description text for the specified @column of the @table. 351 * 352 * Params: 353 * column = a #gint representing a column in @table 354 * description = a #gchar representing the description text 355 * to set for the specified @column of the @table 356 */ 357 public void setColumnDescription(int column, string description); 358 359 /** 360 * Sets the specified column header to @header. 361 * 362 * Params: 363 * column = a #gint representing a column in @table 364 * header = an #AtkTable 365 */ 366 public void setColumnHeader(int column, ObjectAtk header); 367 368 /** 369 * Sets the description text for the specified @row of @table. 370 * 371 * Params: 372 * row = a #gint representing a row in @table 373 * description = a #gchar representing the description text 374 * to set for the specified @row of @table 375 */ 376 public void setRowDescription(int row, string description); 377 378 /** 379 * Sets the specified row header to @header. 380 * 381 * Params: 382 * row = a #gint representing a row in @table 383 * header = an #AtkTable 384 */ 385 public void setRowHeader(int row, ObjectAtk header); 386 387 /** 388 * Sets the summary description of the table. 389 * 390 * Params: 391 * accessible = an #AtkObject representing the summary description 392 * to set for @table 393 */ 394 public void setSummary(ObjectAtk accessible); 395 @property void delegate(int, int, TableIF)[] onColumnDeletedListeners(); 396 /** 397 * The "column-deleted" signal is emitted by an object which 398 * implements the AtkTable interface when a column is deleted. 399 * 400 * Params: 401 * arg1 = The index of the first column deleted. 402 * arg2 = The number of columns deleted. 403 */ 404 void addOnColumnDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 405 406 @property void delegate(int, int, TableIF)[] onColumnInsertedListeners(); 407 /** 408 * The "column-inserted" signal is emitted by an object which 409 * implements the AtkTable interface when a column is inserted. 410 * 411 * Params: 412 * arg1 = The index of the column inserted. 413 * arg2 = The number of colums inserted. 414 */ 415 void addOnColumnInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 416 417 @property void delegate(TableIF)[] onColumnReorderedListeners(); 418 /** 419 * The "column-reordered" signal is emitted by an object which 420 * implements the AtkTable interface when the columns are 421 * reordered. 422 */ 423 void addOnColumnReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 424 425 @property void delegate(TableIF)[] onModelChangedListeners(); 426 /** 427 * The "model-changed" signal is emitted by an object which 428 * implements the AtkTable interface when the model displayed by 429 * the table changes. 430 */ 431 void addOnModelChanged(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 432 433 @property void delegate(int, int, TableIF)[] onRowDeletedListeners(); 434 /** 435 * The "row-deleted" signal is emitted by an object which 436 * implements the AtkTable interface when a row is deleted. 437 * 438 * Params: 439 * arg1 = The index of the first row deleted. 440 * arg2 = The number of rows deleted. 441 */ 442 void addOnRowDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 443 444 @property void delegate(int, int, TableIF)[] onRowInsertedListeners(); 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 void addOnRowInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 454 455 @property void delegate(TableIF)[] onRowReorderedListeners(); 456 /** 457 * The "row-reordered" signal is emitted by an object which 458 * implements the AtkTable interface when the rows are 459 * reordered. 460 */ 461 void addOnRowReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 462 463 }