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