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 * Conversion parameters: 26 * inFile = GtkTreeStore.html 27 * outPack = gtk 28 * outFile = TreeStore 29 * strct = GtkTreeStore 30 * realStrct= 31 * ctorStrct= 32 * clss = TreeStore 33 * interf = 34 * class Code: Yes 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * - TreeModelIF 40 * - TreeDragSourceIF 41 * - TreeDragDestIF 42 * - TreeSortableIF 43 * prefixes: 44 * - gtk_tree_store_ 45 * - gtk_ 46 * omit structs: 47 * omit prefixes: 48 * omit code: 49 * - gtk_tree_store_set 50 * omit signals: 51 * imports: 52 * - glib.Str 53 * - gtk.TreeIter 54 * - gobject.Value 55 * - gtk.TreeNode 56 * - gdk.Pixbuf; 57 * - gobject.Value; 58 * - gtk.TreeModelT 59 * - gtk.TreeModelIF 60 * - gtk.TreeDragSourceT 61 * - gtk.TreeDragSourceIF 62 * - gtk.TreeDragDestT 63 * - gtk.TreeDragDestIF 64 * - gtk.TreeSortableT 65 * - gtk.TreeSortableIF 66 * structWrap: 67 * - GValue* -> Value 68 * - GtkTreeIter* -> TreeIter 69 * module aliases: 70 * local aliases: 71 * overrides: 72 */ 73 74 module gtk.TreeStore; 75 76 public import gtkc.gtktypes; 77 78 private import gtkc.gtk; 79 private import glib.ConstructionException; 80 private import gobject.ObjectG; 81 82 83 private import glib.Str; 84 private import gtk.TreeIter; 85 private import gobject.Value; 86 private import gtk.TreeNode; 87 private import gdk.Pixbuf;; 88 private import gobject.Value;; 89 private import gtk.TreeModelT; 90 private import gtk.TreeModelIF; 91 private import gtk.TreeDragSourceT; 92 private import gtk.TreeDragSourceIF; 93 private import gtk.TreeDragDestT; 94 private import gtk.TreeDragDestIF; 95 private import gtk.TreeSortableT; 96 private import gtk.TreeSortableIF; 97 98 99 100 private import gobject.ObjectG; 101 102 /** 103 * Description 104 * The GtkTreeStore object is a list model for use with a GtkTreeView 105 * widget. It implements the GtkTreeModel interface, and consequentialy, 106 * can use all of the methods available there. It also implements the 107 * GtkTreeSortable interface so it can be sorted by the view. Finally, 108 * it also implements the tree drag and 109 * drop interfaces. 110 * GtkTreeStore as GtkBuildable 111 * The GtkTreeStore implementation of the GtkBuildable interface allows 112 * to specify the model columns with a <columns> element that may 113 * contain multiple <column> elements, each specifying one model 114 * column. The "type" attribute specifies the data type for the column. 115 * $(DDOC_COMMENT example) 116 */ 117 public class TreeStore : ObjectG, TreeModelIF, TreeDragSourceIF, TreeDragDestIF, TreeSortableIF 118 { 119 120 /** the main Gtk struct */ 121 protected GtkTreeStore* gtkTreeStore; 122 123 124 public GtkTreeStore* getTreeStoreStruct() 125 { 126 return gtkTreeStore; 127 } 128 129 130 /** the main Gtk struct as a void* */ 131 protected override void* getStruct() 132 { 133 return cast(void*)gtkTreeStore; 134 } 135 136 /** 137 * Sets our main struct and passes it to the parent class 138 */ 139 public this (GtkTreeStore* gtkTreeStore) 140 { 141 super(cast(GObject*)gtkTreeStore); 142 this.gtkTreeStore = gtkTreeStore; 143 } 144 145 protected override void setStruct(GObject* obj) 146 { 147 super.setStruct(obj); 148 gtkTreeStore = cast(GtkTreeStore*)obj; 149 } 150 151 // add the TreeModel capabilities 152 mixin TreeModelT!(GtkTreeStore); 153 154 // add the TreeDragSource capabilities 155 mixin TreeDragSourceT!(GtkTreeStore); 156 157 // add the TreeDragDest capabilities 158 mixin TreeDragDestT!(GtkTreeStore); 159 160 // add the TreeSortable capabilities 161 mixin TreeSortableT!(GtkTreeStore); 162 163 /** 164 * Creates a top level iteractor. 165 * I don't think lists have but the top level iteractor 166 */ 167 TreeIter createIter(TreeIter parent=null) 168 { 169 GtkTreeIter* iter = new GtkTreeIter; 170 gtk_tree_store_append(getTreeStoreStruct(), iter, (parent is null) ? null : parent.getTreeIterStruct()); 171 return new TreeIter(iter); 172 } 173 174 /** 175 * Sets one value into one cells. 176 * \todo confirm we need to destroy the Value instance 177 * Params: 178 * iter = the tree iteractor, effectivly the row 179 * column = to column number to set 180 * value = the value 181 */ 182 void setValue(TreeIter iter, int column, string value) 183 { 184 gtk_tree_store_set(gtkTreeStore, iter.getTreeIterStruct(), column, Str.toStringz(value) , -1); 185 } 186 187 /** */ 188 void setValue(TreeIter iter, int column, int value) 189 { 190 gtk_tree_store_set(gtkTreeStore, iter.getTreeIterStruct(), column, value, -1); 191 } 192 193 194 195 /** 196 * \todo confirm we need to destroy the Value instance 197 */ 198 void setValue(TreeIter iter, int column, Pixbuf pixbuf) 199 { 200 Value v = new Value(pixbuf); 201 gtk_tree_store_set_value(gtkTreeStore, iter.getTreeIterStruct(), column, v.getValueStruct()); 202 } 203 204 205 /** 206 * sets the values for one row 207 * Params: 208 * iter = the row iteractor 209 * columns = an arrays with the columns to set 210 * values = an arrays with the values 211 */ 212 void set(TreeIter iter, int [] columns, char*[] values) 213 { 214 for ( int i=0 ; i<columns.length && i<values.length; i++ ) 215 { 216 //Value v = new Value(values[i]); 217 //gtk_list_store_set(obj(), iter.getIter(), columns[i], v.getV(),-1); 218 gtk_tree_store_set( 219 gtkTreeStore, 220 iter.getTreeIterStruct(), 221 columns[i], 222 values[i],-1); 223 } 224 } 225 226 /** */ 227 void set(TreeIter iter, int [] columns, string[] values) 228 { 229 for ( int i=0 ; i<columns.length && i<values.length; i++ ) 230 { 231 //Value v = new Value(values[i]); 232 //gtk_list_store_set(obj(), iter.getIter(), columns[i], v.getV(),-1); 233 gtk_tree_store_set( 234 gtkTreeStore, 235 iter.getTreeIterStruct(), 236 columns[i], 237 Str.toStringz(values[i]),-1); 238 } 239 } 240 241 /** 242 * Sets an iteractor values from a tree node. 243 * This is the way to add a new row to the tree, 244 * the iteractor is either a top level iteractor created from createIter() 245 * or a nested iteractor created from append() 246 * Params: 247 * iter = the iteractor to set 248 * treeNode = the tree node 249 * See_Also: createIter(), append() 250 */ 251 void set(TreeIter iter, TreeNode treeNode) 252 { 253 int[] cols; 254 string[] vals; 255 for ( int i=0 ; i<treeNode.columnCount() ; i++ ) 256 { 257 //printf(">>>>>>>>>>>>> requesting value for %d\n",i); 258 cols ~= i; 259 string value = treeNode.getNodeValue(i); 260 if ( value is null ) 261 { 262 vals ~= ""; 263 } 264 else 265 { 266 vals ~= value; 267 } 268 } 269 set(iter, cols, vals); 270 } 271 272 273 /** 274 * Creates and prepends a new row to tree_store. If parent is non-NULL, then it will prepend 275 * the new row before the first child of parent, otherwise it will prepend a row 276 * to the top level. iter will be changed to point to this new row. The row 277 * will be empty after this function is called. To fill in values, you need to 278 * call gtk_tree_store_set() or gtk_tree_store_set_value(). 279 * Params: 280 * parent = A valid GtkTreeIter, or NULL 281 */ 282 public TreeIter prepend(TreeIter parent) 283 { 284 TreeIter iter = new TreeIter(); 285 // void gtk_tree_store_prepend (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent); 286 gtk_tree_store_prepend(gtkTreeStore, iter.getTreeIterStruct(), (parent is null) ? null : parent.getTreeIterStruct()); 287 return iter; 288 } 289 290 /** 291 * Creates and appends a new row to tree_store. If parent is non-NULL, then it will append the 292 * new row after the last child of parent, otherwise it will append a row to 293 * the top level. iter will be changed to point to this new row. The row will 294 * be empty after this function is called. To fill in values, you need to call 295 * gtk_tree_store_set() or gtk_tree_store_set_value(). 296 * Params: 297 * parent = A valid GtkTreeIter, or NULL 298 */ 299 public TreeIter append(TreeIter parent) 300 { 301 TreeIter iter = new TreeIter(); 302 // void gtk_tree_store_append (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent); 303 gtk_tree_store_append(gtkTreeStore, 304 iter.getTreeIterStruct(), 305 (parent is null) ? null : parent.getTreeIterStruct()); 306 return iter; 307 } 308 309 /** 310 */ 311 312 /** 313 * Non vararg creation function. Used primarily by language bindings. 314 * Params: 315 * types = an array of GType types for the columns, from first to last. [array length=n_columns] 316 * Throws: ConstructionException GTK+ fails to create the object. 317 */ 318 public this (GType[] types) 319 { 320 // GtkTreeStore * gtk_tree_store_newv (gint n_columns, GType *types); 321 auto p = gtk_tree_store_newv(cast(int) types.length, types.ptr); 322 if(p is null) 323 { 324 throw new ConstructionException("null returned by gtk_tree_store_newv(cast(int) types.length, types.ptr)"); 325 } 326 this(cast(GtkTreeStore*) p); 327 } 328 329 /** 330 * This function is meant primarily for GObjects that inherit from 331 * GtkTreeStore, and should only be used when constructing a new 332 * GtkTreeStore. It will not function after a row has been added, 333 * or a method on the GtkTreeModel interface is called. 334 * Params: 335 * types = An array of GType types, one for each column. [array length=n_columns] 336 */ 337 public void setColumnTypes(GType[] types) 338 { 339 // void gtk_tree_store_set_column_types (GtkTreeStore *tree_store, gint n_columns, GType *types); 340 gtk_tree_store_set_column_types(gtkTreeStore, cast(int) types.length, types.ptr); 341 } 342 343 /** 344 * Sets the data in the cell specified by iter and column. 345 * The type of value must be convertible to the type of the 346 * column. 347 * Params: 348 * iter = A valid GtkTreeIter for the row being modified 349 * column = column number to modify 350 * value = new value for the cell 351 */ 352 public void setValue(TreeIter iter, int column, Value value) 353 { 354 // void gtk_tree_store_set_value (GtkTreeStore *tree_store, GtkTreeIter *iter, gint column, GValue *value); 355 gtk_tree_store_set_value(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), column, (value is null) ? null : value.getValueStruct()); 356 } 357 358 /** 359 * See gtk_tree_store_set(); this version takes a va_list for 360 * use by language bindings. 361 * Params: 362 * iter = A valid GtkTreeIter for the row being modified 363 * varArgs = va_list of column/value pairs 364 */ 365 public void setValist(TreeIter iter, void* varArgs) 366 { 367 // void gtk_tree_store_set_valist (GtkTreeStore *tree_store, GtkTreeIter *iter, va_list var_args); 368 gtk_tree_store_set_valist(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), varArgs); 369 } 370 371 /** 372 * A variant of gtk_tree_store_set_valist() which takes 373 * the columns and values as two arrays, instead of varargs. This 374 * function is mainly intended for language bindings or in case 375 * the number of columns to change is not known until run-time. 376 * Since 2.12 377 * Params: 378 * iter = A valid GtkTreeIter for the row being modified 379 * columns = an array of column numbers. [array length=n_values] 380 * values = an array of GValues. [array length=n_values] 381 */ 382 public void setValuesv(TreeIter iter, int[] columns, GValue[] values) 383 { 384 // void gtk_tree_store_set_valuesv (GtkTreeStore *tree_store, GtkTreeIter *iter, gint *columns, GValue *values, gint n_values); 385 gtk_tree_store_set_valuesv(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), columns.ptr, values.ptr, cast(int) columns.length); 386 } 387 388 /** 389 * Removes iter from tree_store. After being removed, iter is set to the 390 * next valid row at that level, or invalidated if it previously pointed to the 391 * last one. 392 * Params: 393 * iter = A valid GtkTreeIter 394 * Returns: TRUE if iter is still valid, FALSE if not. 395 */ 396 public int remove(TreeIter iter) 397 { 398 // gboolean gtk_tree_store_remove (GtkTreeStore *tree_store, GtkTreeIter *iter); 399 return gtk_tree_store_remove(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct()); 400 } 401 402 /** 403 * Creates a new row at position. If parent is non-NULL, then the row will be 404 * made a child of parent. Otherwise, the row will be created at the toplevel. 405 * If position is larger than the number of rows at that level, then the new 406 * row will be inserted to the end of the list. iter will be changed to point 407 * to this new row. The row will be empty after this function is called. To 408 * fill in values, you need to call gtk_tree_store_set() or 409 * gtk_tree_store_set_value(). 410 * Params: 411 * iter = An unset GtkTreeIter to set to the new row. [out] 412 * parent = A valid GtkTreeIter, or NULL. [allow-none] 413 * position = position to insert the new row 414 */ 415 public void insert(TreeIter iter, TreeIter parent, int position) 416 { 417 // void gtk_tree_store_insert (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, gint position); 418 gtk_tree_store_insert(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (parent is null) ? null : parent.getTreeIterStruct(), position); 419 } 420 421 /** 422 * Inserts a new row before sibling. If sibling is NULL, then the row will 423 * be appended to parent 's children. If parent and sibling are NULL, then 424 * the row will be appended to the toplevel. If both sibling and parent are 425 * set, then parent must be the parent of sibling. When sibling is set, 426 * parent is optional. 427 * iter will be changed to point to this new row. The row will be empty after 428 * this function is called. To fill in values, you need to call 429 * gtk_tree_store_set() or gtk_tree_store_set_value(). 430 * Params: 431 * iter = An unset GtkTreeIter to set to the new row. [out] 432 * parent = A valid GtkTreeIter, or NULL. [allow-none] 433 * sibling = A valid GtkTreeIter, or NULL. [allow-none] 434 */ 435 public void insertBefore(TreeIter iter, TreeIter parent, TreeIter sibling) 436 { 437 // void gtk_tree_store_insert_before (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, GtkTreeIter *sibling); 438 gtk_tree_store_insert_before(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (parent is null) ? null : parent.getTreeIterStruct(), (sibling is null) ? null : sibling.getTreeIterStruct()); 439 } 440 441 /** 442 * Inserts a new row after sibling. If sibling is NULL, then the row will be 443 * prepended to parent 's children. If parent and sibling are NULL, then 444 * the row will be prepended to the toplevel. If both sibling and parent are 445 * set, then parent must be the parent of sibling. When sibling is set, 446 * parent is optional. 447 * iter will be changed to point to this new row. The row will be empty after 448 * this function is called. To fill in values, you need to call 449 * gtk_tree_store_set() or gtk_tree_store_set_value(). 450 * Params: 451 * iter = An unset GtkTreeIter to set to the new row. [out] 452 * parent = A valid GtkTreeIter, or NULL. [allow-none] 453 * sibling = A valid GtkTreeIter, or NULL. [allow-none] 454 */ 455 public void insertAfter(TreeIter iter, TreeIter parent, TreeIter sibling) 456 { 457 // void gtk_tree_store_insert_after (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, GtkTreeIter *sibling); 458 gtk_tree_store_insert_after(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (parent is null) ? null : parent.getTreeIterStruct(), (sibling is null) ? null : sibling.getTreeIterStruct()); 459 } 460 461 /** 462 * A variant of gtk_tree_store_insert_with_values() which takes 463 * the columns and values as two arrays, instead of varargs. This 464 * function is mainly intended for language bindings. 465 * Since 2.10 466 * Params: 467 * iter = An unset GtkTreeIter to set the new row, or NULL. [out][allow-none] 468 * parent = A valid GtkTreeIter, or NULL. [allow-none] 469 * position = position to insert the new row 470 * columns = an array of column numbers. [array length=n_values] 471 * values = an array of GValues. [array length=n_values] 472 */ 473 public void insertWithValuesv(TreeIter iter, TreeIter parent, int position, int[] columns, GValue[] values) 474 { 475 // void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, gint position, gint *columns, GValue *values, gint n_values); 476 gtk_tree_store_insert_with_valuesv(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (parent is null) ? null : parent.getTreeIterStruct(), position, columns.ptr, values.ptr, cast(int) columns.length); 477 } 478 479 /** 480 * Prepends a new row to tree_store. If parent is non-NULL, then it will prepend 481 * the new row before the first child of parent, otherwise it will prepend a row 482 * to the top level. iter will be changed to point to this new row. The row 483 * will be empty after this function is called. To fill in values, you need to 484 * call gtk_tree_store_set() or gtk_tree_store_set_value(). 485 * Params: 486 * iter = An unset GtkTreeIter to set to the prepended row. [out] 487 * parent = A valid GtkTreeIter, or NULL. [allow-none] 488 */ 489 public void prepend(TreeIter iter, TreeIter parent) 490 { 491 // void gtk_tree_store_prepend (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent); 492 gtk_tree_store_prepend(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (parent is null) ? null : parent.getTreeIterStruct()); 493 } 494 495 /** 496 * Appends a new row to tree_store. If parent is non-NULL, then it will append the 497 * new row after the last child of parent, otherwise it will append a row to 498 * the top level. iter will be changed to point to this new row. The row will 499 * be empty after this function is called. To fill in values, you need to call 500 * gtk_tree_store_set() or gtk_tree_store_set_value(). 501 * Params: 502 * iter = An unset GtkTreeIter to set to the appended row. [out] 503 * parent = A valid GtkTreeIter, or NULL. [allow-none] 504 */ 505 public void append(TreeIter iter, TreeIter parent) 506 { 507 // void gtk_tree_store_append (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent); 508 gtk_tree_store_append(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (parent is null) ? null : parent.getTreeIterStruct()); 509 } 510 511 /** 512 * Returns TRUE if iter is an ancestor of descendant. That is, iter is the 513 * parent (or grandparent or great-grandparent) of descendant. 514 * Params: 515 * iter = A valid GtkTreeIter 516 * descendant = A valid GtkTreeIter 517 * Returns: TRUE, if iter is an ancestor of descendant 518 */ 519 public int isAncestor(TreeIter iter, TreeIter descendant) 520 { 521 // gboolean gtk_tree_store_is_ancestor (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *descendant); 522 return gtk_tree_store_is_ancestor(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (descendant is null) ? null : descendant.getTreeIterStruct()); 523 } 524 525 /** 526 * Returns the depth of iter. This will be 0 for anything on the root level, 1 527 * for anything down a level, etc. 528 * Params: 529 * iter = A valid GtkTreeIter 530 * Returns: The depth of iter 531 */ 532 public int iterDepth(TreeIter iter) 533 { 534 // gint gtk_tree_store_iter_depth (GtkTreeStore *tree_store, GtkTreeIter *iter); 535 return gtk_tree_store_iter_depth(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct()); 536 } 537 538 /** 539 * Removes all rows from tree_store 540 */ 541 public void clear() 542 { 543 // void gtk_tree_store_clear (GtkTreeStore *tree_store); 544 gtk_tree_store_clear(gtkTreeStore); 545 } 546 547 /** 548 * WARNING: This function is slow. Only use it for debugging and/or testing 549 * purposes. 550 * Checks if the given iter is a valid iter for this GtkTreeStore. 551 * Since 2.2 552 * Params: 553 * iter = A GtkTreeIter. 554 * Returns: TRUE if the iter is valid, FALSE if the iter is invalid. 555 */ 556 public int iterIsValid(TreeIter iter) 557 { 558 // gboolean gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store, GtkTreeIter *iter); 559 return gtk_tree_store_iter_is_valid(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct()); 560 } 561 562 /** 563 * Reorders the children of parent in tree_store to follow the order 564 * indicated by new_order. Note that this function only works with 565 * unsorted stores. 566 * Since 2.2 567 * Params: 568 * parent = A GtkTreeIter. 569 * newOrder = an array of integers mapping the new position of each child 570 * to its old position before the re-ordering, 571 * i.e. new_order[newpos] = oldpos. [array] 572 */ 573 public void reorder(TreeIter parent, int[] newOrder) 574 { 575 // void gtk_tree_store_reorder (GtkTreeStore *tree_store, GtkTreeIter *parent, gint *new_order); 576 gtk_tree_store_reorder(gtkTreeStore, (parent is null) ? null : parent.getTreeIterStruct(), newOrder.ptr); 577 } 578 579 /** 580 * Swaps a and b in the same level of tree_store. Note that this function 581 * only works with unsorted stores. 582 * Since 2.2 583 * Params: 584 * a = A GtkTreeIter. 585 * b = Another GtkTreeIter. 586 */ 587 public void swap(TreeIter a, TreeIter b) 588 { 589 // void gtk_tree_store_swap (GtkTreeStore *tree_store, GtkTreeIter *a, GtkTreeIter *b); 590 gtk_tree_store_swap(gtkTreeStore, (a is null) ? null : a.getTreeIterStruct(), (b is null) ? null : b.getTreeIterStruct()); 591 } 592 593 /** 594 * Moves iter in tree_store to the position before position. iter and 595 * position should be in the same level. Note that this function only 596 * works with unsorted stores. If position is NULL, iter will be 597 * moved to the end of the level. 598 * Since 2.2 599 * Params: 600 * iter = A GtkTreeIter. 601 * position = A GtkTreeIter or NULL. [allow-none] 602 */ 603 public void moveBefore(TreeIter iter, TreeIter position) 604 { 605 // void gtk_tree_store_move_before (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *position); 606 gtk_tree_store_move_before(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (position is null) ? null : position.getTreeIterStruct()); 607 } 608 609 /** 610 * Moves iter in tree_store to the position after position. iter and 611 * position should be in the same level. Note that this function only 612 * works with unsorted stores. If position is NULL, iter will be moved 613 * to the start of the level. 614 * Since 2.2 615 * Params: 616 * iter = A GtkTreeIter. 617 * position = A GtkTreeIter. [allow-none] 618 */ 619 public void moveAfter(TreeIter iter, TreeIter position) 620 { 621 // void gtk_tree_store_move_after (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *position); 622 gtk_tree_store_move_after(gtkTreeStore, (iter is null) ? null : iter.getTreeIterStruct(), (position is null) ? null : position.getTreeIterStruct()); 623 } 624 }