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 = GtkTreeView.html 27 * outPack = gtk 28 * outFile = TreeView 29 * strct = GtkTreeView 30 * realStrct= 31 * ctorStrct= 32 * clss = TreeView 33 * interf = 34 * class Code: Yes 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_tree_view_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - glib.Str 48 * - gtk.TreeModel 49 * - gtk.TreeModelIF 50 * - gtk.TreeSelection 51 * - gtk.Adjustment 52 * - gtk.TreeViewColumn 53 * - gtk.CellRenderer 54 * - glib.ListG 55 * - gtk.TreePath 56 * - gdk.Rectangle 57 * - gdk.Window 58 * - gtk.Tooltip 59 * - gdk.Pixmap 60 * - gtk.TreeIter 61 * - gtk.Entry 62 * structWrap: 63 * - GList* -> ListG 64 * - GdkPixmap* -> Pixmap 65 * - GdkRectangle* -> Rectangle 66 * - GdkWindow* -> Window 67 * - GtkAdjustment* -> Adjustment 68 * - GtkCellRenderer* -> CellRenderer 69 * - GtkEntry* -> Entry 70 * - GtkTooltip* -> Tooltip 71 * - GtkTreeIter* -> TreeIter 72 * - GtkTreeModel* -> TreeModelIF 73 * - GtkTreePath* -> TreePath 74 * - GtkTreeSelection* -> TreeSelection 75 * - GtkTreeViewColumn* -> TreeViewColumn 76 * module aliases: 77 * local aliases: 78 * overrides: 79 */ 80 81 module gtk.TreeView; 82 83 public import gtkc.gtktypes; 84 85 private import gtkc.gtk; 86 private import glib.ConstructionException; 87 private import gobject.ObjectG; 88 89 private import gobject.Signals; 90 public import gtkc.gdktypes; 91 92 private import glib.Str; 93 private import gtk.TreeModel; 94 private import gtk.TreeModelIF; 95 private import gtk.TreeSelection; 96 private import gtk.Adjustment; 97 private import gtk.TreeViewColumn; 98 private import gtk.CellRenderer; 99 private import glib.ListG; 100 private import gtk.TreePath; 101 private import gdk.Rectangle; 102 private import gdk.Window; 103 private import gtk.Tooltip; 104 private import gdk.Pixmap; 105 private import gtk.TreeIter; 106 private import gtk.Entry; 107 108 109 110 private import gtk.Container; 111 112 /** 113 * Description 114 * Widget that displays any object that implements the GtkTreeModel interface. 115 * Please refer to the tree widget conceptual 116 * overview for an overview of all the objects and data types related 117 * to the tree widget and how they work together. 118 * Several different coordinate systems are exposed in the GtkTreeView API. 119 * These are: 120 * Widget coordinates -- coordinates relative to the widget 121 * (usually widget->window. 122 * Bin window coordinates -- coordinates relative to the window 123 * that GtkTreeView renders to. 124 * Tree coordinates -- coordinates relative to the entire scrollable 125 * area of GtkTreeView. These coordinates start at (0, 0) for row 0 of the 126 * tree. 127 * Several functions are available for converting between the different 128 * coordinate systems. The most common translations are between widget and bin 129 * window coordinates and between bin window and tree coordinates. For the 130 * former you can use gtk_tree_view_convert_widget_to_bin_window_coords() 131 * (and vice versa), for the latter gtk_tree_view_convert_bin_window_to_tree_coords() 132 * (and vice versa). 133 * GtkTreeView as GtkBuildable 134 * The GtkTreeView implementation of the GtkBuildable interface accepts 135 * GtkTreeViewColumn objects as <child> elements and exposes the 136 * internal GtkTreeSelection in UI definitions. 137 * $(DDOC_COMMENT example) 138 */ 139 public class TreeView : Container 140 { 141 142 /** the main Gtk struct */ 143 protected GtkTreeView* gtkTreeView; 144 145 146 public GtkTreeView* getTreeViewStruct() 147 { 148 return gtkTreeView; 149 } 150 151 152 /** the main Gtk struct as a void* */ 153 protected override void* getStruct() 154 { 155 return cast(void*)gtkTreeView; 156 } 157 158 /** 159 * Sets our main struct and passes it to the parent class 160 */ 161 public this (GtkTreeView* gtkTreeView) 162 { 163 super(cast(GtkContainer*)gtkTreeView); 164 this.gtkTreeView = gtkTreeView; 165 } 166 167 protected override void setStruct(GObject* obj) 168 { 169 super.setStruct(obj); 170 gtkTreeView = cast(GtkTreeView*)obj; 171 } 172 173 /** 174 * Expands the row of the iter. 175 * Params: 176 * iter = 177 * openAll = 178 * Returns = 179 */ 180 int expandRow(TreeIter iter, TreeModelIF model, int openAll) 181 { 182 return expandRow(model.getPath(iter), openAll); 183 } 184 185 /** 186 * gets the first selected iter or null if no rows are selected 187 */ 188 TreeIter getSelectedIter() 189 { 190 TreeIter iter = null; 191 TreeSelection selection = getSelection(); 192 TreeModelIF model = getModel(); 193 TreePath[] paths = selection.getSelectedRows(model); 194 if ( paths.length > 0 ) 195 { 196 iter = new TreeIter(); 197 model.getIter(iter,paths[0]); 198 } 199 return iter; 200 } 201 202 /** */ 203 TreeIter[] getSelectedIters() 204 { 205 TreeIter[] iters; 206 207 TreeIter iter = new TreeIter(); 208 TreeSelection selection = getSelection(); 209 TreeModelIF model = getModel(); 210 TreePath[] paths = selection.getSelectedRows(model); 211 foreach ( TreePath p; selection.getSelectedRows(model) ) 212 { 213 //iters.length = iters.length+1; 214 //iters[iters.length-1] = model.getIter(iter,p); 215 // iters ~= model.getIter(iter,p); >>> compile error can only concatenate arrays ??? 216 if ( model.getIter(iter,p) ) 217 { 218 iters ~= iter; 219 iter = new TreeIter(); 220 } 221 } 222 223 //printf("TreeView.getSelectedIters iters.lenght = %d\n", iters.length); 224 return iters; 225 } 226 227 /** 228 * Inserts a column and sets it's attributes 229 * Params: 230 * position = 231 * title = 232 * renderer = 233 * editable = 234 * Returns: number of columns including the new one 235 */ 236 gint insertEditableColumn(int position, string title, CellRenderer renderer, bool editable) 237 { 238 // OK, this is a trick because of my ignorance on how to pass variable argument lists 239 if ( position < 0 ) 240 { 241 position = getColumns().length(); 242 } 243 int tot = gtk_tree_view_insert_column_with_attributes( 244 gtkTreeView, 245 position, 246 Str.toStringz(title), 247 renderer.getCellRendererStruct(), 248 Str.toStringz("text"),position,//v1.getV(), 249 Str.toStringz("editable"),2,0);//v.getV(),0); 250 return tot; 251 } 252 253 254 255 256 /** 257 */ 258 int[string] connectedSignals; 259 260 void delegate(TreeView)[] onColumnsChangedListeners; 261 /** 262 * The number of columns of the treeview has changed. 263 */ 264 void addOnColumnsChanged(void delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 265 { 266 if ( !("columns-changed" in connectedSignals) ) 267 { 268 Signals.connectData( 269 getStruct(), 270 "columns-changed", 271 cast(GCallback)&callBackColumnsChanged, 272 cast(void*)this, 273 null, 274 connectFlags); 275 connectedSignals["columns-changed"] = 1; 276 } 277 onColumnsChangedListeners ~= dlg; 278 } 279 extern(C) static void callBackColumnsChanged(GtkTreeView* treeViewStruct, TreeView _treeView) 280 { 281 foreach ( void delegate(TreeView) dlg ; _treeView.onColumnsChangedListeners ) 282 { 283 dlg(_treeView); 284 } 285 } 286 287 void delegate(TreeView)[] onCursorChangedListeners; 288 /** 289 * The position of the cursor (focused cell) has changed. 290 */ 291 void addOnCursorChanged(void delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 292 { 293 if ( !("cursor-changed" in connectedSignals) ) 294 { 295 Signals.connectData( 296 getStruct(), 297 "cursor-changed", 298 cast(GCallback)&callBackCursorChanged, 299 cast(void*)this, 300 null, 301 connectFlags); 302 connectedSignals["cursor-changed"] = 1; 303 } 304 onCursorChangedListeners ~= dlg; 305 } 306 extern(C) static void callBackCursorChanged(GtkTreeView* treeViewStruct, TreeView _treeView) 307 { 308 foreach ( void delegate(TreeView) dlg ; _treeView.onCursorChangedListeners ) 309 { 310 dlg(_treeView); 311 } 312 } 313 314 bool delegate(gboolean, gboolean, gboolean, TreeView)[] onExpandCollapseCursorRowListeners; 315 /** 316 */ 317 void addOnExpandCollapseCursorRow(bool delegate(gboolean, gboolean, gboolean, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 318 { 319 if ( !("expand-collapse-cursor-row" in connectedSignals) ) 320 { 321 Signals.connectData( 322 getStruct(), 323 "expand-collapse-cursor-row", 324 cast(GCallback)&callBackExpandCollapseCursorRow, 325 cast(void*)this, 326 null, 327 connectFlags); 328 connectedSignals["expand-collapse-cursor-row"] = 1; 329 } 330 onExpandCollapseCursorRowListeners ~= dlg; 331 } 332 extern(C) static gboolean callBackExpandCollapseCursorRow(GtkTreeView* treeviewStruct, gboolean arg1, gboolean arg2, gboolean arg3, TreeView _treeView) 333 { 334 foreach ( bool delegate(gboolean, gboolean, gboolean, TreeView) dlg ; _treeView.onExpandCollapseCursorRowListeners ) 335 { 336 if ( dlg(arg1, arg2, arg3, _treeView) ) 337 { 338 return 1; 339 } 340 } 341 342 return 0; 343 } 344 345 bool delegate(GtkMovementStep, gint, TreeView)[] onMoveCursorListeners; 346 /** 347 */ 348 void addOnMoveCursor(bool delegate(GtkMovementStep, gint, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 349 { 350 if ( !("move-cursor" in connectedSignals) ) 351 { 352 Signals.connectData( 353 getStruct(), 354 "move-cursor", 355 cast(GCallback)&callBackMoveCursor, 356 cast(void*)this, 357 null, 358 connectFlags); 359 connectedSignals["move-cursor"] = 1; 360 } 361 onMoveCursorListeners ~= dlg; 362 } 363 extern(C) static gboolean callBackMoveCursor(GtkTreeView* treeviewStruct, GtkMovementStep arg1, gint arg2, TreeView _treeView) 364 { 365 foreach ( bool delegate(GtkMovementStep, gint, TreeView) dlg ; _treeView.onMoveCursorListeners ) 366 { 367 if ( dlg(arg1, arg2, _treeView) ) 368 { 369 return 1; 370 } 371 } 372 373 return 0; 374 } 375 376 void delegate(TreePath, TreeViewColumn, TreeView)[] onRowActivatedListeners; 377 /** 378 * The "row-activated" signal is emitted when the method 379 * gtk_tree_view_row_activated() is called or the user double clicks 380 * a treeview row. It is also emitted when a non-editable row is 381 * selected and one of the keys: Space, Shift+Space, Return or 382 * Enter is pressed. 383 * For selection handling refer to the tree 384 * widget conceptual overview as well as GtkTreeSelection. 385 */ 386 void addOnRowActivated(void delegate(TreePath, TreeViewColumn, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 387 { 388 if ( !("row-activated" in connectedSignals) ) 389 { 390 Signals.connectData( 391 getStruct(), 392 "row-activated", 393 cast(GCallback)&callBackRowActivated, 394 cast(void*)this, 395 null, 396 connectFlags); 397 connectedSignals["row-activated"] = 1; 398 } 399 onRowActivatedListeners ~= dlg; 400 } 401 extern(C) static void callBackRowActivated(GtkTreeView* treeViewStruct, GtkTreePath* path, GtkTreeViewColumn* column, TreeView _treeView) 402 { 403 foreach ( void delegate(TreePath, TreeViewColumn, TreeView) dlg ; _treeView.onRowActivatedListeners ) 404 { 405 dlg(ObjectG.getDObject!(TreePath)(path), ObjectG.getDObject!(TreeViewColumn)(column), _treeView); 406 } 407 } 408 409 void delegate(TreeIter, TreePath, TreeView)[] onRowCollapsedListeners; 410 /** 411 * The given row has been collapsed (child nodes are hidden). 412 */ 413 void addOnRowCollapsed(void delegate(TreeIter, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 414 { 415 if ( !("row-collapsed" in connectedSignals) ) 416 { 417 Signals.connectData( 418 getStruct(), 419 "row-collapsed", 420 cast(GCallback)&callBackRowCollapsed, 421 cast(void*)this, 422 null, 423 connectFlags); 424 connectedSignals["row-collapsed"] = 1; 425 } 426 onRowCollapsedListeners ~= dlg; 427 } 428 extern(C) static void callBackRowCollapsed(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView _treeView) 429 { 430 foreach ( void delegate(TreeIter, TreePath, TreeView) dlg ; _treeView.onRowCollapsedListeners ) 431 { 432 dlg(ObjectG.getDObject!(TreeIter)(iter), ObjectG.getDObject!(TreePath)(path), _treeView); 433 } 434 } 435 436 void delegate(TreeIter, TreePath, TreeView)[] onRowExpandedListeners; 437 /** 438 * The given row has been expanded (child nodes are shown). 439 */ 440 void addOnRowExpanded(void delegate(TreeIter, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 441 { 442 if ( !("row-expanded" in connectedSignals) ) 443 { 444 Signals.connectData( 445 getStruct(), 446 "row-expanded", 447 cast(GCallback)&callBackRowExpanded, 448 cast(void*)this, 449 null, 450 connectFlags); 451 connectedSignals["row-expanded"] = 1; 452 } 453 onRowExpandedListeners ~= dlg; 454 } 455 extern(C) static void callBackRowExpanded(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView _treeView) 456 { 457 foreach ( void delegate(TreeIter, TreePath, TreeView) dlg ; _treeView.onRowExpandedListeners ) 458 { 459 dlg(ObjectG.getDObject!(TreeIter)(iter), ObjectG.getDObject!(TreePath)(path), _treeView); 460 } 461 } 462 463 bool delegate(TreeView)[] onSelectAllListeners; 464 /** 465 */ 466 void addOnSelectAll(bool delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 467 { 468 if ( !("select-all" in connectedSignals) ) 469 { 470 Signals.connectData( 471 getStruct(), 472 "select-all", 473 cast(GCallback)&callBackSelectAll, 474 cast(void*)this, 475 null, 476 connectFlags); 477 connectedSignals["select-all"] = 1; 478 } 479 onSelectAllListeners ~= dlg; 480 } 481 extern(C) static gboolean callBackSelectAll(GtkTreeView* treeviewStruct, TreeView _treeView) 482 { 483 foreach ( bool delegate(TreeView) dlg ; _treeView.onSelectAllListeners ) 484 { 485 if ( dlg(_treeView) ) 486 { 487 return 1; 488 } 489 } 490 491 return 0; 492 } 493 494 bool delegate(TreeView)[] onSelectCursorParentListeners; 495 /** 496 */ 497 void addOnSelectCursorParent(bool delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 498 { 499 if ( !("select-cursor-parent" in connectedSignals) ) 500 { 501 Signals.connectData( 502 getStruct(), 503 "select-cursor-parent", 504 cast(GCallback)&callBackSelectCursorParent, 505 cast(void*)this, 506 null, 507 connectFlags); 508 connectedSignals["select-cursor-parent"] = 1; 509 } 510 onSelectCursorParentListeners ~= dlg; 511 } 512 extern(C) static gboolean callBackSelectCursorParent(GtkTreeView* treeviewStruct, TreeView _treeView) 513 { 514 foreach ( bool delegate(TreeView) dlg ; _treeView.onSelectCursorParentListeners ) 515 { 516 if ( dlg(_treeView) ) 517 { 518 return 1; 519 } 520 } 521 522 return 0; 523 } 524 525 bool delegate(gboolean, TreeView)[] onSelectCursorRowListeners; 526 /** 527 */ 528 void addOnSelectCursorRow(bool delegate(gboolean, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 529 { 530 if ( !("select-cursor-row" in connectedSignals) ) 531 { 532 Signals.connectData( 533 getStruct(), 534 "select-cursor-row", 535 cast(GCallback)&callBackSelectCursorRow, 536 cast(void*)this, 537 null, 538 connectFlags); 539 connectedSignals["select-cursor-row"] = 1; 540 } 541 onSelectCursorRowListeners ~= dlg; 542 } 543 extern(C) static gboolean callBackSelectCursorRow(GtkTreeView* treeviewStruct, gboolean arg1, TreeView _treeView) 544 { 545 foreach ( bool delegate(gboolean, TreeView) dlg ; _treeView.onSelectCursorRowListeners ) 546 { 547 if ( dlg(arg1, _treeView) ) 548 { 549 return 1; 550 } 551 } 552 553 return 0; 554 } 555 556 void delegate(Adjustment, Adjustment, TreeView)[] onSetScrollAdjustmentsListeners; 557 /** 558 * Set the scroll adjustments for the tree view. Usually scrolled containers 559 * like GtkScrolledWindow will emit this signal to connect two instances 560 * of GtkScrollbar to the scroll directions of the GtkTreeView. 561 */ 562 void addOnSetScrollAdjustments(void delegate(Adjustment, Adjustment, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 563 { 564 if ( !("set-scroll-adjustments" in connectedSignals) ) 565 { 566 Signals.connectData( 567 getStruct(), 568 "set-scroll-adjustments", 569 cast(GCallback)&callBackSetScrollAdjustments, 570 cast(void*)this, 571 null, 572 connectFlags); 573 connectedSignals["set-scroll-adjustments"] = 1; 574 } 575 onSetScrollAdjustmentsListeners ~= dlg; 576 } 577 extern(C) static void callBackSetScrollAdjustments(GtkTreeView* horizontalStruct, GtkAdjustment* vertical, GtkAdjustment* arg2, TreeView _treeView) 578 { 579 foreach ( void delegate(Adjustment, Adjustment, TreeView) dlg ; _treeView.onSetScrollAdjustmentsListeners ) 580 { 581 dlg(ObjectG.getDObject!(Adjustment)(vertical), ObjectG.getDObject!(Adjustment)(arg2), _treeView); 582 } 583 } 584 585 bool delegate(TreeView)[] onStartInteractiveSearchListeners; 586 /** 587 */ 588 void addOnStartInteractiveSearch(bool delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 589 { 590 if ( !("start-interactive-search" in connectedSignals) ) 591 { 592 Signals.connectData( 593 getStruct(), 594 "start-interactive-search", 595 cast(GCallback)&callBackStartInteractiveSearch, 596 cast(void*)this, 597 null, 598 connectFlags); 599 connectedSignals["start-interactive-search"] = 1; 600 } 601 onStartInteractiveSearchListeners ~= dlg; 602 } 603 extern(C) static gboolean callBackStartInteractiveSearch(GtkTreeView* treeviewStruct, TreeView _treeView) 604 { 605 foreach ( bool delegate(TreeView) dlg ; _treeView.onStartInteractiveSearchListeners ) 606 { 607 if ( dlg(_treeView) ) 608 { 609 return 1; 610 } 611 } 612 613 return 0; 614 } 615 616 bool delegate(TreeIter, TreePath, TreeView)[] onTestCollapseRowListeners; 617 /** 618 * The given row is about to be collapsed (hide its children nodes). Use this 619 * signal if you need to control the collapsibility of individual rows. 620 * FALSE to allow collapsing, TRUE to reject 621 */ 622 void addOnTestCollapseRow(bool delegate(TreeIter, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 623 { 624 if ( !("test-collapse-row" in connectedSignals) ) 625 { 626 Signals.connectData( 627 getStruct(), 628 "test-collapse-row", 629 cast(GCallback)&callBackTestCollapseRow, 630 cast(void*)this, 631 null, 632 connectFlags); 633 connectedSignals["test-collapse-row"] = 1; 634 } 635 onTestCollapseRowListeners ~= dlg; 636 } 637 extern(C) static gboolean callBackTestCollapseRow(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView _treeView) 638 { 639 foreach ( bool delegate(TreeIter, TreePath, TreeView) dlg ; _treeView.onTestCollapseRowListeners ) 640 { 641 if ( dlg(ObjectG.getDObject!(TreeIter)(iter), ObjectG.getDObject!(TreePath)(path), _treeView) ) 642 { 643 return 1; 644 } 645 } 646 647 return 0; 648 } 649 650 bool delegate(TreeIter, TreePath, TreeView)[] onTestExpandRowListeners; 651 /** 652 * The given row is about to be expanded (show its children nodes). Use this 653 * signal if you need to control the expandability of individual rows. 654 * FALSE to allow expansion, TRUE to reject 655 */ 656 void addOnTestExpandRow(bool delegate(TreeIter, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 657 { 658 if ( !("test-expand-row" in connectedSignals) ) 659 { 660 Signals.connectData( 661 getStruct(), 662 "test-expand-row", 663 cast(GCallback)&callBackTestExpandRow, 664 cast(void*)this, 665 null, 666 connectFlags); 667 connectedSignals["test-expand-row"] = 1; 668 } 669 onTestExpandRowListeners ~= dlg; 670 } 671 extern(C) static gboolean callBackTestExpandRow(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView _treeView) 672 { 673 foreach ( bool delegate(TreeIter, TreePath, TreeView) dlg ; _treeView.onTestExpandRowListeners ) 674 { 675 if ( dlg(ObjectG.getDObject!(TreeIter)(iter), ObjectG.getDObject!(TreePath)(path), _treeView) ) 676 { 677 return 1; 678 } 679 } 680 681 return 0; 682 } 683 684 bool delegate(TreeView)[] onToggleCursorRowListeners; 685 /** 686 */ 687 void addOnToggleCursorRow(bool delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 688 { 689 if ( !("toggle-cursor-row" in connectedSignals) ) 690 { 691 Signals.connectData( 692 getStruct(), 693 "toggle-cursor-row", 694 cast(GCallback)&callBackToggleCursorRow, 695 cast(void*)this, 696 null, 697 connectFlags); 698 connectedSignals["toggle-cursor-row"] = 1; 699 } 700 onToggleCursorRowListeners ~= dlg; 701 } 702 extern(C) static gboolean callBackToggleCursorRow(GtkTreeView* treeviewStruct, TreeView _treeView) 703 { 704 foreach ( bool delegate(TreeView) dlg ; _treeView.onToggleCursorRowListeners ) 705 { 706 if ( dlg(_treeView) ) 707 { 708 return 1; 709 } 710 } 711 712 return 0; 713 } 714 715 bool delegate(TreeView)[] onUnselectAllListeners; 716 /** 717 * See Also 718 * GtkTreeViewColumn, GtkTreeSelection, GtkTreeDnd, GtkTreeMode, GtkTreeSortable, GtkTreeModelSort, GtkListStore, GtkTreeStore, GtkCellRenderer, GtkCellEditable, GtkCellRendererPixbuf, GtkCellRendererText, GtkCellRendererToggle 719 */ 720 void addOnUnselectAll(bool delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 721 { 722 if ( !("unselect-all" in connectedSignals) ) 723 { 724 Signals.connectData( 725 getStruct(), 726 "unselect-all", 727 cast(GCallback)&callBackUnselectAll, 728 cast(void*)this, 729 null, 730 connectFlags); 731 connectedSignals["unselect-all"] = 1; 732 } 733 onUnselectAllListeners ~= dlg; 734 } 735 extern(C) static gboolean callBackUnselectAll(GtkTreeView* treeviewStruct, TreeView _treeView) 736 { 737 foreach ( bool delegate(TreeView) dlg ; _treeView.onUnselectAllListeners ) 738 { 739 if ( dlg(_treeView) ) 740 { 741 return 1; 742 } 743 } 744 745 return 0; 746 } 747 748 749 /** 750 * Creates a new GtkTreeView widget. 751 * Throws: ConstructionException GTK+ fails to create the object. 752 */ 753 public this () 754 { 755 // GtkWidget * gtk_tree_view_new (void); 756 auto p = gtk_tree_view_new(); 757 if(p is null) 758 { 759 throw new ConstructionException("null returned by gtk_tree_view_new()"); 760 } 761 this(cast(GtkTreeView*) p); 762 } 763 764 /** 765 * Returns the amount, in pixels, of extra indentation for child levels 766 * in tree_view. 767 * Since 2.12 768 * Returns: the amount of extra indentation for child levels in tree_view. A return value of 0 means that this feature is disabled. 769 */ 770 public int getLevelIndentation() 771 { 772 // gint gtk_tree_view_get_level_indentation (GtkTreeView *tree_view); 773 return gtk_tree_view_get_level_indentation(gtkTreeView); 774 } 775 776 /** 777 * Returns whether or not expanders are drawn in tree_view. 778 * Since 2.12 779 * Returns: TRUE if expanders are drawn in tree_view, FALSE otherwise. 780 */ 781 public int getShowExpanders() 782 { 783 // gboolean gtk_tree_view_get_show_expanders (GtkTreeView *tree_view); 784 return gtk_tree_view_get_show_expanders(gtkTreeView); 785 } 786 787 /** 788 * Sets the amount of extra indentation for child levels to use in tree_view 789 * in addition to the default indentation. The value should be specified in 790 * pixels, a value of 0 disables this feature and in this case only the default 791 * indentation will be used. 792 * This does not have any visible effects for lists. 793 * Since 2.12 794 * Params: 795 * indentation = the amount, in pixels, of extra indentation in tree_view. 796 */ 797 public void setLevelIndentation(int indentation) 798 { 799 // void gtk_tree_view_set_level_indentation (GtkTreeView *tree_view, gint indentation); 800 gtk_tree_view_set_level_indentation(gtkTreeView, indentation); 801 } 802 803 /** 804 * Sets whether to draw and enable expanders and indent child rows in 805 * tree_view. When disabled there will be no expanders visible in trees 806 * and there will be no way to expand and collapse rows by default. Also 807 * note that hiding the expanders will disable the default indentation. You 808 * can set a custom indentation in this case using 809 * gtk_tree_view_set_level_indentation(). 810 * This does not have any visible effects for lists. 811 * Since 2.12 812 * Params: 813 * enabled = TRUE to enable expander drawing, FALSE otherwise. 814 */ 815 public void setShowExpanders(int enabled) 816 { 817 // void gtk_tree_view_set_show_expanders (GtkTreeView *tree_view, gboolean enabled); 818 gtk_tree_view_set_show_expanders(gtkTreeView, enabled); 819 } 820 821 /** 822 * Creates a new GtkTreeView widget with the model initialized to model. 823 * Params: 824 * model = the model. 825 * Throws: ConstructionException GTK+ fails to create the object. 826 */ 827 public this (TreeModelIF model) 828 { 829 // GtkWidget * gtk_tree_view_new_with_model (GtkTreeModel *model); 830 auto p = gtk_tree_view_new_with_model((model is null) ? null : model.getTreeModelTStruct()); 831 if(p is null) 832 { 833 throw new ConstructionException("null returned by gtk_tree_view_new_with_model((model is null) ? null : model.getTreeModelTStruct())"); 834 } 835 this(cast(GtkTreeView*) p); 836 } 837 838 /** 839 * Returns the model the GtkTreeView is based on. Returns NULL if the 840 * model is unset. 841 * Returns: A GtkTreeModel, or NULL if none is currently being used. [transfer none] 842 */ 843 public TreeModelIF getModel() 844 { 845 // GtkTreeModel * gtk_tree_view_get_model (GtkTreeView *tree_view); 846 auto p = gtk_tree_view_get_model(gtkTreeView); 847 848 if(p is null) 849 { 850 return null; 851 } 852 853 return ObjectG.getDObject!(TreeModel, TreeModelIF)(cast(GtkTreeModel*) p); 854 } 855 856 /** 857 * Sets the model for a GtkTreeView. If the tree_view already has a model 858 * set, it will remove it before setting the new model. If model is NULL, 859 * then it will unset the old model. 860 * Params: 861 * model = The model. [allow-none] 862 */ 863 public void setModel(TreeModelIF model) 864 { 865 // void gtk_tree_view_set_model (GtkTreeView *tree_view, GtkTreeModel *model); 866 gtk_tree_view_set_model(gtkTreeView, (model is null) ? null : model.getTreeModelTStruct()); 867 } 868 869 /** 870 * Gets the GtkTreeSelection associated with tree_view. 871 * Returns: A GtkTreeSelection object. [transfer none] 872 */ 873 public TreeSelection getSelection() 874 { 875 // GtkTreeSelection * gtk_tree_view_get_selection (GtkTreeView *tree_view); 876 auto p = gtk_tree_view_get_selection(gtkTreeView); 877 878 if(p is null) 879 { 880 return null; 881 } 882 883 return ObjectG.getDObject!(TreeSelection)(cast(GtkTreeSelection*) p); 884 } 885 886 /** 887 * Gets the GtkAdjustment currently being used for the horizontal aspect. 888 * Returns: A GtkAdjustment object, or NULL if none is currently being used. [transfer none] 889 */ 890 public Adjustment getHadjustment() 891 { 892 // GtkAdjustment * gtk_tree_view_get_hadjustment (GtkTreeView *tree_view); 893 auto p = gtk_tree_view_get_hadjustment(gtkTreeView); 894 895 if(p is null) 896 { 897 return null; 898 } 899 900 return ObjectG.getDObject!(Adjustment)(cast(GtkAdjustment*) p); 901 } 902 903 /** 904 * Sets the GtkAdjustment for the current horizontal aspect. 905 * Params: 906 * adjustment = The GtkAdjustment to set, or NULL. [allow-none] 907 */ 908 public void setHadjustment(Adjustment adjustment) 909 { 910 // void gtk_tree_view_set_hadjustment (GtkTreeView *tree_view, GtkAdjustment *adjustment); 911 gtk_tree_view_set_hadjustment(gtkTreeView, (adjustment is null) ? null : adjustment.getAdjustmentStruct()); 912 } 913 914 /** 915 * Gets the GtkAdjustment currently being used for the vertical aspect. 916 * Returns: A GtkAdjustment object, or NULL if none is currently being used. [transfer none] 917 */ 918 public Adjustment getVadjustment() 919 { 920 // GtkAdjustment * gtk_tree_view_get_vadjustment (GtkTreeView *tree_view); 921 auto p = gtk_tree_view_get_vadjustment(gtkTreeView); 922 923 if(p is null) 924 { 925 return null; 926 } 927 928 return ObjectG.getDObject!(Adjustment)(cast(GtkAdjustment*) p); 929 } 930 931 /** 932 * Sets the GtkAdjustment for the current vertical aspect. 933 * Params: 934 * adjustment = The GtkAdjustment to set, or NULL. [allow-none] 935 */ 936 public void setVadjustment(Adjustment adjustment) 937 { 938 // void gtk_tree_view_set_vadjustment (GtkTreeView *tree_view, GtkAdjustment *adjustment); 939 gtk_tree_view_set_vadjustment(gtkTreeView, (adjustment is null) ? null : adjustment.getAdjustmentStruct()); 940 } 941 942 /** 943 * Returns TRUE if the headers on the tree_view are visible. 944 * Returns: Whether the headers are visible or not. 945 */ 946 public int getHeadersVisible() 947 { 948 // gboolean gtk_tree_view_get_headers_visible (GtkTreeView *tree_view); 949 return gtk_tree_view_get_headers_visible(gtkTreeView); 950 } 951 952 /** 953 * Sets the visibility state of the headers. 954 * Params: 955 * headersVisible = TRUE if the headers are visible 956 */ 957 public void setHeadersVisible(int headersVisible) 958 { 959 // void gtk_tree_view_set_headers_visible (GtkTreeView *tree_view, gboolean headers_visible); 960 gtk_tree_view_set_headers_visible(gtkTreeView, headersVisible); 961 } 962 963 /** 964 * Resizes all columns to their optimal width. Only works after the 965 * treeview has been realized. 966 */ 967 public void columnsAutosize() 968 { 969 // void gtk_tree_view_columns_autosize (GtkTreeView *tree_view); 970 gtk_tree_view_columns_autosize(gtkTreeView); 971 } 972 973 /** 974 * Returns whether all header columns are clickable. 975 * Since 2.10 976 * Returns: TRUE if all header columns are clickable, otherwise FALSE 977 */ 978 public int getHeadersClickable() 979 { 980 // gboolean gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view); 981 return gtk_tree_view_get_headers_clickable(gtkTreeView); 982 } 983 984 /** 985 * Allow the column title buttons to be clicked. 986 * Params: 987 * setting = TRUE if the columns are clickable. 988 */ 989 public void setHeadersClickable(int setting) 990 { 991 // void gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view, gboolean setting); 992 gtk_tree_view_set_headers_clickable(gtkTreeView, setting); 993 } 994 995 /** 996 * This function tells GTK+ that the user interface for your 997 * application requires users to read across tree rows and associate 998 * cells with one another. By default, GTK+ will then render the tree 999 * with alternating row colors. Do not use it 1000 * just because you prefer the appearance of the ruled tree; that's a 1001 * question for the theme. Some themes will draw tree rows in 1002 * alternating colors even when rules are turned off, and users who 1003 * prefer that appearance all the time can choose those themes. You 1004 * should call this function only as a semantic 1005 * hint to the theme engine that your tree makes alternating colors 1006 * useful from a functional standpoint (since it has lots of columns, 1007 * generally). 1008 * Params: 1009 * setting = TRUE if the tree requires reading across rows 1010 */ 1011 public void setRulesHint(int setting) 1012 { 1013 // void gtk_tree_view_set_rules_hint (GtkTreeView *tree_view, gboolean setting); 1014 gtk_tree_view_set_rules_hint(gtkTreeView, setting); 1015 } 1016 1017 /** 1018 * Gets the setting set by gtk_tree_view_set_rules_hint(). 1019 * Returns: TRUE if rules are useful for the user of this tree 1020 */ 1021 public int getRulesHint() 1022 { 1023 // gboolean gtk_tree_view_get_rules_hint (GtkTreeView *tree_view); 1024 return gtk_tree_view_get_rules_hint(gtkTreeView); 1025 } 1026 1027 /** 1028 * Appends column to the list of columns. If tree_view has "fixed_height" 1029 * mode enabled, then column must have its "sizing" property set to be 1030 * GTK_TREE_VIEW_COLUMN_FIXED. 1031 * Params: 1032 * column = The GtkTreeViewColumn to add. 1033 * Returns: The number of columns in tree_view after appending. 1034 */ 1035 public int appendColumn(TreeViewColumn column) 1036 { 1037 // gint gtk_tree_view_append_column (GtkTreeView *tree_view, GtkTreeViewColumn *column); 1038 return gtk_tree_view_append_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct()); 1039 } 1040 1041 /** 1042 * Removes column from tree_view. 1043 * Params: 1044 * column = The GtkTreeViewColumn to remove. 1045 * Returns: The number of columns in tree_view after removing. 1046 */ 1047 public int removeColumn(TreeViewColumn column) 1048 { 1049 // gint gtk_tree_view_remove_column (GtkTreeView *tree_view, GtkTreeViewColumn *column); 1050 return gtk_tree_view_remove_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct()); 1051 } 1052 1053 /** 1054 * This inserts the column into the tree_view at position. If position is 1055 * -1, then the column is inserted at the end. If tree_view has 1056 * "fixed_height" mode enabled, then column must have its "sizing" property 1057 * set to be GTK_TREE_VIEW_COLUMN_FIXED. 1058 * Params: 1059 * column = The GtkTreeViewColumn to be inserted. 1060 * position = The position to insert column in. 1061 * Returns: The number of columns in tree_view after insertion. 1062 */ 1063 public int insertColumn(TreeViewColumn column, int position) 1064 { 1065 // gint gtk_tree_view_insert_column (GtkTreeView *tree_view, GtkTreeViewColumn *column, gint position); 1066 return gtk_tree_view_insert_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct(), position); 1067 } 1068 1069 /** 1070 * Convenience function that inserts a new column into the GtkTreeView 1071 * with the given cell renderer and a GtkCellDataFunc to set cell renderer 1072 * attributes (normally using data from the model). See also 1073 * gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start(). 1074 * If tree_view has "fixed_height" mode enabled, then the new column will have its 1075 * "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED. 1076 * Params: 1077 * position = Position to insert, -1 for append 1078 * title = column title 1079 * cell = cell renderer for column 1080 * func = function to set attributes of cell renderer 1081 * data = data for func 1082 * dnotify = destroy notifier for data 1083 * Returns: number of columns in the tree view post-insert 1084 */ 1085 public int insertColumnWithDataFunc(int position, string title, CellRenderer cell, GtkTreeCellDataFunc func, void* data, GDestroyNotify dnotify) 1086 { 1087 // gint gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view, gint position, const gchar *title, GtkCellRenderer *cell, GtkTreeCellDataFunc func, gpointer data, GDestroyNotify dnotify); 1088 return gtk_tree_view_insert_column_with_data_func(gtkTreeView, position, Str.toStringz(title), (cell is null) ? null : cell.getCellRendererStruct(), func, data, dnotify); 1089 } 1090 1091 /** 1092 * Gets the GtkTreeViewColumn at the given position in the tree_view. 1093 * Params: 1094 * n = The position of the column, counting from 0. 1095 * Returns: The GtkTreeViewColumn, or NULL if the position is outside the range of columns. [transfer none] 1096 */ 1097 public TreeViewColumn getColumn(int n) 1098 { 1099 // GtkTreeViewColumn * gtk_tree_view_get_column (GtkTreeView *tree_view, gint n); 1100 auto p = gtk_tree_view_get_column(gtkTreeView, n); 1101 1102 if(p is null) 1103 { 1104 return null; 1105 } 1106 1107 return ObjectG.getDObject!(TreeViewColumn)(cast(GtkTreeViewColumn*) p); 1108 } 1109 1110 /** 1111 * Returns a GList of all the GtkTreeViewColumn s currently in tree_view. 1112 * The returned list must be freed with g_list_free(). 1113 * Returns: A list of GtkTreeViewColumn s. [element-type GtkTreeViewColumn][transfer container] 1114 */ 1115 public ListG getColumns() 1116 { 1117 // GList * gtk_tree_view_get_columns (GtkTreeView *tree_view); 1118 auto p = gtk_tree_view_get_columns(gtkTreeView); 1119 1120 if(p is null) 1121 { 1122 return null; 1123 } 1124 1125 return ObjectG.getDObject!(ListG)(cast(GList*) p); 1126 } 1127 1128 /** 1129 * Moves column to be after to base_column. If base_column is NULL, then 1130 * column is placed in the first position. 1131 * Params: 1132 * column = The GtkTreeViewColumn to be moved. 1133 * baseColumn = The GtkTreeViewColumn to be moved relative to, or NULL. [allow-none] 1134 */ 1135 public void moveColumnAfter(TreeViewColumn column, TreeViewColumn baseColumn) 1136 { 1137 // void gtk_tree_view_move_column_after (GtkTreeView *tree_view, GtkTreeViewColumn *column, GtkTreeViewColumn *base_column); 1138 gtk_tree_view_move_column_after(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct(), (baseColumn is null) ? null : baseColumn.getTreeViewColumnStruct()); 1139 } 1140 1141 /** 1142 * Sets the column to draw the expander arrow at. It must be in tree_view. 1143 * If column is NULL, then the expander arrow is always at the first 1144 * visible column. 1145 * If you do not want expander arrow to appear in your tree, set the 1146 * expander column to a hidden column. 1147 * Params: 1148 * column = NULL, or the column to draw the expander arrow at. 1149 */ 1150 public void setExpanderColumn(TreeViewColumn column) 1151 { 1152 // void gtk_tree_view_set_expander_column (GtkTreeView *tree_view, GtkTreeViewColumn *column); 1153 gtk_tree_view_set_expander_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct()); 1154 } 1155 1156 /** 1157 * Returns the column that is the current expander column. 1158 * This column has the expander arrow drawn next to it. 1159 * Returns: The expander column. [transfer none] 1160 */ 1161 public TreeViewColumn getExpanderColumn() 1162 { 1163 // GtkTreeViewColumn * gtk_tree_view_get_expander_column (GtkTreeView *tree_view); 1164 auto p = gtk_tree_view_get_expander_column(gtkTreeView); 1165 1166 if(p is null) 1167 { 1168 return null; 1169 } 1170 1171 return ObjectG.getDObject!(TreeViewColumn)(cast(GtkTreeViewColumn*) p); 1172 } 1173 1174 /** 1175 * Sets a user function for determining where a column may be dropped when 1176 * dragged. This function is called on every column pair in turn at the 1177 * beginning of a column drag to determine where a drop can take place. The 1178 * arguments passed to func are: the tree_view, the GtkTreeViewColumn being 1179 * dragged, the two GtkTreeViewColumn s determining the drop spot, and 1180 * user_data. If either of the GtkTreeViewColumn arguments for the drop spot 1181 * are NULL, then they indicate an edge. If func is set to be NULL, then 1182 * tree_view reverts to the default behavior of allowing all columns to be 1183 * dropped everywhere. 1184 * Params: 1185 * func = A function to determine which columns are reorderable, or NULL. [allow-none] 1186 * userData = User data to be passed to func, or NULL. [allow-none] 1187 * destroy = Destroy notifier for user_data, or NULL. [allow-none] 1188 */ 1189 public void setColumnDragFunction(GtkTreeViewColumnDropFunc func, void* userData, GDestroyNotify destroy) 1190 { 1191 // void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view, GtkTreeViewColumnDropFunc func, gpointer user_data, GDestroyNotify destroy); 1192 gtk_tree_view_set_column_drag_function(gtkTreeView, func, userData, destroy); 1193 } 1194 1195 /** 1196 * Scrolls the tree view such that the top-left corner of the visible 1197 * area is tree_x, tree_y, where tree_x and tree_y are specified 1198 * in tree coordinates. The tree_view must be realized before 1199 * this function is called. If it isn't, you probably want to be 1200 * using gtk_tree_view_scroll_to_cell(). 1201 * If either tree_x or tree_y are -1, then that direction isn't scrolled. 1202 * Params: 1203 * treeX = X coordinate of new top-left pixel of visible area, or -1 1204 * treeY = Y coordinate of new top-left pixel of visible area, or -1 1205 */ 1206 public void scrollToPoint(int treeX, int treeY) 1207 { 1208 // void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view, gint tree_x, gint tree_y); 1209 gtk_tree_view_scroll_to_point(gtkTreeView, treeX, treeY); 1210 } 1211 1212 /** 1213 * Moves the alignments of tree_view to the position specified by column and 1214 * path. If column is NULL, then no horizontal scrolling occurs. Likewise, 1215 * if path is NULL no vertical scrolling occurs. At a minimum, one of column 1216 * or path need to be non-NULL. row_align determines where the row is 1217 * placed, and col_align determines where column is placed. Both are expected 1218 * to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means 1219 * right/bottom alignment, 0.5 means center. 1220 * If use_align is FALSE, then the alignment arguments are ignored, and the 1221 * tree does the minimum amount of work to scroll the cell onto the screen. 1222 * This means that the cell will be scrolled to the edge closest to its current 1223 * position. If the cell is currently visible on the screen, nothing is done. 1224 * This function only works if the model is set, and path is a valid row on the 1225 * model. If the model changes before the tree_view is realized, the centered 1226 * path will be modified to reflect this change. 1227 * Params: 1228 * path = The path of the row to move to, or NULL. [allow-none] 1229 * column = The GtkTreeViewColumn to move horizontally to, or NULL. [allow-none] 1230 * useAlign = whether to use alignment arguments, or FALSE. 1231 * rowAlign = The vertical alignment of the row specified by path. 1232 * colAlign = The horizontal alignment of the column specified by column. 1233 */ 1234 public void scrollToCell(TreePath path, TreeViewColumn column, int useAlign, float rowAlign, float colAlign) 1235 { 1236 // void gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gboolean use_align, gfloat row_align, gfloat col_align); 1237 gtk_tree_view_scroll_to_cell(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct(), useAlign, rowAlign, colAlign); 1238 } 1239 1240 /** 1241 * Sets the current keyboard focus to be at path, and selects it. This is 1242 * useful when you want to focus the user's attention on a particular row. If 1243 * focus_column is not NULL, then focus is given to the column specified by 1244 * it. Additionally, if focus_column is specified, and start_editing is 1245 * TRUE, then editing should be started in the specified cell. 1246 * This function is often followed by gtk_widget_grab_focus (tree_view) 1247 * in order to give keyboard focus to the widget. Please note that editing 1248 * can only happen when the widget is realized. 1249 * If path is invalid for model, the current cursor (if any) will be unset 1250 * and the function will return without failing. 1251 * Params: 1252 * path = A GtkTreePath 1253 * focusColumn = A GtkTreeViewColumn, or NULL. [allow-none] 1254 * startEditing = TRUE if the specified cell should start being edited. 1255 */ 1256 public void setCursor(TreePath path, TreeViewColumn focusColumn, int startEditing) 1257 { 1258 // void gtk_tree_view_set_cursor (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *focus_column, gboolean start_editing); 1259 gtk_tree_view_set_cursor(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (focusColumn is null) ? null : focusColumn.getTreeViewColumnStruct(), startEditing); 1260 } 1261 1262 /** 1263 * Sets the current keyboard focus to be at path, and selects it. This is 1264 * useful when you want to focus the user's attention on a particular row. If 1265 * focus_column is not NULL, then focus is given to the column specified by 1266 * it. If focus_column and focus_cell are not NULL, and focus_column 1267 * contains 2 or more editable or activatable cells, then focus is given to 1268 * the cell specified by focus_cell. Additionally, if focus_column is 1269 * specified, and start_editing is TRUE, then editing should be started in 1270 * the specified cell. This function is often followed by 1271 * gtk_widget_grab_focus (tree_view) in order to give keyboard focus to the 1272 * widget. Please note that editing can only happen when the widget is 1273 * realized. 1274 * If path is invalid for model, the current cursor (if any) will be unset 1275 * and the function will return without failing. 1276 * Since 2.2 1277 * Params: 1278 * path = A GtkTreePath 1279 * focusColumn = A GtkTreeViewColumn, or NULL. [allow-none] 1280 * focusCell = A GtkCellRenderer, or NULL. [allow-none] 1281 * startEditing = TRUE if the specified cell should start being edited. 1282 */ 1283 public void setCursorOnCell(TreePath path, TreeViewColumn focusColumn, CellRenderer focusCell, int startEditing) 1284 { 1285 // void gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *focus_column, GtkCellRenderer *focus_cell, gboolean start_editing); 1286 gtk_tree_view_set_cursor_on_cell(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (focusColumn is null) ? null : focusColumn.getTreeViewColumnStruct(), (focusCell is null) ? null : focusCell.getCellRendererStruct(), startEditing); 1287 } 1288 1289 /** 1290 * Fills in path and focus_column with the current path and focus column. If 1291 * the cursor isn't currently set, then *path will be NULL. If no column 1292 * currently has focus, then *focus_column will be NULL. 1293 * The returned GtkTreePath must be freed with gtk_tree_path_free() when 1294 * you are done with it. 1295 * Params: 1296 * path = A pointer to be filled with the current cursor path, or NULL. [out][transfer full][allow-none] 1297 * focusColumn = A pointer to be filled with the current focus column, or NULL. [out][transfer none][allow-none] 1298 */ 1299 public void getCursor(out TreePath path, out TreeViewColumn focusColumn) 1300 { 1301 // void gtk_tree_view_get_cursor (GtkTreeView *tree_view, GtkTreePath **path, GtkTreeViewColumn **focus_column); 1302 GtkTreePath* outpath = null; 1303 GtkTreeViewColumn* outfocusColumn = null; 1304 1305 gtk_tree_view_get_cursor(gtkTreeView, &outpath, &outfocusColumn); 1306 1307 path = ObjectG.getDObject!(TreePath)(outpath); 1308 focusColumn = ObjectG.getDObject!(TreeViewColumn)(outfocusColumn); 1309 } 1310 1311 /** 1312 * Activates the cell determined by path and column. 1313 * Params: 1314 * path = The GtkTreePath to be activated. 1315 * column = The GtkTreeViewColumn to be activated. 1316 */ 1317 public void rowActivated(TreePath path, TreeViewColumn column) 1318 { 1319 // void gtk_tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column); 1320 gtk_tree_view_row_activated(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct()); 1321 } 1322 1323 /** 1324 * Recursively expands all nodes in the tree_view. 1325 */ 1326 public void expandAll() 1327 { 1328 // void gtk_tree_view_expand_all (GtkTreeView *tree_view); 1329 gtk_tree_view_expand_all(gtkTreeView); 1330 } 1331 1332 /** 1333 * Recursively collapses all visible, expanded nodes in tree_view. 1334 */ 1335 public void collapseAll() 1336 { 1337 // void gtk_tree_view_collapse_all (GtkTreeView *tree_view); 1338 gtk_tree_view_collapse_all(gtkTreeView); 1339 } 1340 1341 /** 1342 * Expands the row at path. This will also expand all parent rows of 1343 * path as necessary. 1344 * Since 2.2 1345 * Params: 1346 * path = path to a row. 1347 */ 1348 public void expandToPath(TreePath path) 1349 { 1350 // void gtk_tree_view_expand_to_path (GtkTreeView *tree_view, GtkTreePath *path); 1351 gtk_tree_view_expand_to_path(gtkTreeView, (path is null) ? null : path.getTreePathStruct()); 1352 } 1353 1354 /** 1355 * Opens the row so its children are visible. 1356 * Params: 1357 * path = path to a row 1358 * openAll = whether to recursively expand, or just expand immediate children 1359 * Returns: TRUE if the row existed and had children 1360 */ 1361 public int expandRow(TreePath path, int openAll) 1362 { 1363 // gboolean gtk_tree_view_expand_row (GtkTreeView *tree_view, GtkTreePath *path, gboolean open_all); 1364 return gtk_tree_view_expand_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), openAll); 1365 } 1366 1367 /** 1368 * Collapses a row (hides its child rows, if they exist). 1369 * Params: 1370 * path = path to a row in the tree_view 1371 * Returns: TRUE if the row was collapsed. 1372 */ 1373 public int collapseRow(TreePath path) 1374 { 1375 // gboolean gtk_tree_view_collapse_row (GtkTreeView *tree_view, GtkTreePath *path); 1376 return gtk_tree_view_collapse_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct()); 1377 } 1378 1379 /** 1380 * Calls func on all expanded rows. 1381 * Params: 1382 * func = A function to be called. [scope call] 1383 * data = User data to be passed to the function. 1384 */ 1385 public void mapExpandedRows(GtkTreeViewMappingFunc func, void* data) 1386 { 1387 // void gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view, GtkTreeViewMappingFunc func, gpointer data); 1388 gtk_tree_view_map_expanded_rows(gtkTreeView, func, data); 1389 } 1390 1391 /** 1392 * Returns TRUE if the node pointed to by path is expanded in tree_view. 1393 * Params: 1394 * path = A GtkTreePath to test expansion state. 1395 * Returns: TRUE if path is expanded. 1396 */ 1397 public int rowExpanded(TreePath path) 1398 { 1399 // gboolean gtk_tree_view_row_expanded (GtkTreeView *tree_view, GtkTreePath *path); 1400 return gtk_tree_view_row_expanded(gtkTreeView, (path is null) ? null : path.getTreePathStruct()); 1401 } 1402 1403 /** 1404 * This function is a convenience function to allow you to reorder 1405 * models that support the GtkDragSourceIface and the 1406 * GtkDragDestIface. Both GtkTreeStore and GtkListStore support 1407 * these. If reorderable is TRUE, then the user can reorder the 1408 * model by dragging and dropping rows. The developer can listen to 1409 * these changes by connecting to the model's row_inserted and 1410 * row_deleted signals. The reordering is implemented by setting up 1411 * the tree view as a drag source and destination. Therefore, drag and 1412 * drop can not be used in a reorderable view for any other purpose. 1413 * This function does not give you any degree of control over the order -- any 1414 * reordering is allowed. If more control is needed, you should probably 1415 * handle drag and drop manually. 1416 * Params: 1417 * reorderable = TRUE, if the tree can be reordered. 1418 */ 1419 public void setReorderable(int reorderable) 1420 { 1421 // void gtk_tree_view_set_reorderable (GtkTreeView *tree_view, gboolean reorderable); 1422 gtk_tree_view_set_reorderable(gtkTreeView, reorderable); 1423 } 1424 1425 /** 1426 * Retrieves whether the user can reorder the tree via drag-and-drop. See 1427 * gtk_tree_view_set_reorderable(). 1428 * Returns: TRUE if the tree can be reordered. 1429 */ 1430 public int getReorderable() 1431 { 1432 // gboolean gtk_tree_view_get_reorderable (GtkTreeView *tree_view); 1433 return gtk_tree_view_get_reorderable(gtkTreeView); 1434 } 1435 1436 /** 1437 * Finds the path at the point (x, y), relative to bin_window coordinates 1438 * (please see gtk_tree_view_get_bin_window()). 1439 * That is, x and y are relative to an events coordinates. x and y must 1440 * come from an event on the tree_view only where event->window == 1441 * gtk_tree_view_get_bin_window (). It is primarily for 1442 * things like popup menus. If path is non-NULL, then it will be filled 1443 * with the GtkTreePath at that point. This path should be freed with 1444 * gtk_tree_path_free(). If column is non-NULL, then it will be filled 1445 * with the column at that point. cell_x and cell_y return the coordinates 1446 * relative to the cell background (i.e. the background_area passed to 1447 * gtk_cell_renderer_render()). This function is only meaningful if 1448 * tree_view is realized. Therefore this function will always return FALSE 1449 * if tree_view is not realized or does not have a model. 1450 * For converting widget coordinates (eg. the ones you get from 1451 * GtkWidget::query-tooltip), please see 1452 * gtk_tree_view_convert_widget_to_bin_window_coords(). 1453 * Params: 1454 * x = The x position to be identified (relative to bin_window). 1455 * y = The y position to be identified (relative to bin_window). 1456 * path = A pointer to a GtkTreePath pointer to be filled in, or NULL. [out][allow-none] 1457 * column = A pointer to a GtkTreeViewColumn pointer to be filled in, or NULL. [out][transfer none][allow-none] 1458 * cellX = A pointer where the X coordinate relative to the cell can be placed, or NULL. [out][allow-none] 1459 * cellY = A pointer where the Y coordinate relative to the cell can be placed, or NULL. [out][allow-none] 1460 * Returns: TRUE if a row exists at that coordinate. 1461 */ 1462 public int getPathAtPos(int x, int y, ref TreePath path, ref TreeViewColumn column, out int cellX, out int cellY) 1463 { 1464 // gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view, gint x, gint y, GtkTreePath **path, GtkTreeViewColumn **column, gint *cell_x, gint *cell_y); 1465 GtkTreePath* outpath = (path is null) ? null : path.getTreePathStruct(); 1466 GtkTreeViewColumn* outcolumn = (column is null) ? null : column.getTreeViewColumnStruct(); 1467 1468 auto p = gtk_tree_view_get_path_at_pos(gtkTreeView, x, y, &outpath, &outcolumn, &cellX, &cellY); 1469 1470 path = ObjectG.getDObject!(TreePath)(outpath); 1471 column = ObjectG.getDObject!(TreeViewColumn)(outcolumn); 1472 return p; 1473 } 1474 1475 /** 1476 * Fills the bounding rectangle in bin_window coordinates for the cell at the 1477 * row specified by path and the column specified by column. If path is 1478 * NULL, or points to a path not currently displayed, the y and height fields 1479 * of the rectangle will be filled with 0. If column is NULL, the x and width 1480 * fields will be filled with 0. The sum of all cell rects does not cover the 1481 * entire tree; there are extra pixels in between rows, for example. The 1482 * returned rectangle is equivalent to the cell_area passed to 1483 * gtk_cell_renderer_render(). This function is only valid if tree_view is 1484 * realized. 1485 * Params: 1486 * path = a GtkTreePath for the row, or NULL to get only horizontal coordinates. [allow-none] 1487 * column = a GtkTreeViewColumn for the column, or NULL to get only vertical coordinates. [allow-none] 1488 * rect = rectangle to fill with cell rect. [out] 1489 */ 1490 public void getCellArea(TreePath path, TreeViewColumn column, Rectangle rect) 1491 { 1492 // void gtk_tree_view_get_cell_area (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, GdkRectangle *rect); 1493 gtk_tree_view_get_cell_area(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct(), (rect is null) ? null : rect.getRectangleStruct()); 1494 } 1495 1496 /** 1497 * Fills the bounding rectangle in bin_window coordinates for the cell at the 1498 * row specified by path and the column specified by column. If path is 1499 * NULL, or points to a node not found in the tree, the y and height fields of 1500 * the rectangle will be filled with 0. If column is NULL, the x and width 1501 * fields will be filled with 0. The returned rectangle is equivalent to the 1502 * background_area passed to gtk_cell_renderer_render(). These background 1503 * areas tile to cover the entire bin window. Contrast with the cell_area, 1504 * returned by gtk_tree_view_get_cell_area(), which returns only the cell 1505 * itself, excluding surrounding borders and the tree expander area. 1506 * Params: 1507 * path = a GtkTreePath for the row, or NULL to get only horizontal coordinates. [allow-none] 1508 * column = a GtkTreeViewColumn for the column, or NULL to get only vertical coordiantes. [allow-none] 1509 * rect = rectangle to fill with cell background rect. [out] 1510 */ 1511 public void getBackgroundArea(TreePath path, TreeViewColumn column, Rectangle rect) 1512 { 1513 // void gtk_tree_view_get_background_area (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, GdkRectangle *rect); 1514 gtk_tree_view_get_background_area(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct(), (rect is null) ? null : rect.getRectangleStruct()); 1515 } 1516 1517 /** 1518 * Fills visible_rect with the currently-visible region of the 1519 * buffer, in tree coordinates. Convert to bin_window coordinates with 1520 * gtk_tree_view_convert_tree_to_bin_window_coords(). 1521 * Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire 1522 * scrollable area of the tree. 1523 * Params: 1524 * visibleRect = rectangle to fill. [out] 1525 */ 1526 public void getVisibleRect(Rectangle visibleRect) 1527 { 1528 // void gtk_tree_view_get_visible_rect (GtkTreeView *tree_view, GdkRectangle *visible_rect); 1529 gtk_tree_view_get_visible_rect(gtkTreeView, (visibleRect is null) ? null : visibleRect.getRectangleStruct()); 1530 } 1531 1532 /** 1533 * Sets start_path and end_path to be the first and last visible path. 1534 * Note that there may be invisible paths in between. 1535 * The paths should be freed with gtk_tree_path_free() after use. 1536 * Since 2.8 1537 * Params: 1538 * startPath = Return location for start of region, 1539 * or NULL. [out][allow-none] 1540 * endPath = Return location for end of region, or NULL. [out][allow-none] 1541 * Returns: TRUE, if valid paths were placed in start_path and end_path. 1542 */ 1543 public int getVisibleRange(out TreePath startPath, out TreePath endPath) 1544 { 1545 // gboolean gtk_tree_view_get_visible_range (GtkTreeView *tree_view, GtkTreePath **start_path, GtkTreePath **end_path); 1546 GtkTreePath* outstartPath = null; 1547 GtkTreePath* outendPath = null; 1548 1549 auto p = gtk_tree_view_get_visible_range(gtkTreeView, &outstartPath, &outendPath); 1550 1551 startPath = ObjectG.getDObject!(TreePath)(outstartPath); 1552 endPath = ObjectG.getDObject!(TreePath)(outendPath); 1553 return p; 1554 } 1555 1556 /** 1557 * Returns the window that tree_view renders to. 1558 * This is used primarily to compare to event->window 1559 * to confirm that the event on tree_view is on the right window. 1560 * Returns: A GdkWindow, or NULL when tree_view hasn't been realized yet. [transfer none] 1561 */ 1562 public Window getBinWindow() 1563 { 1564 // GdkWindow * gtk_tree_view_get_bin_window (GtkTreeView *tree_view); 1565 auto p = gtk_tree_view_get_bin_window(gtkTreeView); 1566 1567 if(p is null) 1568 { 1569 return null; 1570 } 1571 1572 return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); 1573 } 1574 1575 /** 1576 * Warning 1577 * gtk_tree_view_widget_to_tree_coords has been deprecated since version 2.12 and should not be used in newly-written code. Due to historial reasons the name of this function is 1578 * incorrect. For converting coordinates relative to the widget to 1579 * bin_window coordinates, please see 1580 * gtk_tree_view_convert_widget_to_bin_window_coords(). 1581 * Converts bin_window coordinates to coordinates for the 1582 * tree (the full scrollable area of the tree). 1583 * Params: 1584 * wx = X coordinate relative to bin_window 1585 * wy = Y coordinate relative to bin_window 1586 * tx = return location for tree X coordinate 1587 * ty = return location for tree Y coordinate 1588 */ 1589 public void widgetToTreeCoords(int wx, int wy, out int tx, out int ty) 1590 { 1591 // void gtk_tree_view_widget_to_tree_coords (GtkTreeView *tree_view, gint wx, gint wy, gint *tx, gint *ty); 1592 gtk_tree_view_widget_to_tree_coords(gtkTreeView, wx, wy, &tx, &ty); 1593 } 1594 1595 /** 1596 * Warning 1597 * gtk_tree_view_tree_to_widget_coords has been deprecated since version 2.12 and should not be used in newly-written code. Due to historial reasons the name of this function is 1598 * incorrect. For converting bin_window coordinates to coordinates relative 1599 * to bin_window, please see 1600 * gtk_tree_view_convert_bin_window_to_widget_coords(). 1601 * Converts tree coordinates (coordinates in full scrollable area of the tree) 1602 * to bin_window coordinates. 1603 * Params: 1604 * tx = tree X coordinate 1605 * ty = tree Y coordinate 1606 * wx = return location for X coordinate relative to bin_window 1607 * wy = return location for Y coordinate relative to bin_window 1608 */ 1609 public void treeToWidgetCoords(int tx, int ty, out int wx, out int wy) 1610 { 1611 // void gtk_tree_view_tree_to_widget_coords (GtkTreeView *tree_view, gint tx, gint ty, gint *wx, gint *wy); 1612 gtk_tree_view_tree_to_widget_coords(gtkTreeView, tx, ty, &wx, &wy); 1613 } 1614 1615 /** 1616 * Converts bin_window coordinates to coordinates for the 1617 * tree (the full scrollable area of the tree). 1618 * Since 2.12 1619 * Params: 1620 * bx = X coordinate relative to bin_window 1621 * by = Y coordinate relative to bin_window 1622 * tx = return location for tree X coordinate. [out] 1623 * ty = return location for tree Y coordinate. [out] 1624 */ 1625 public void convertBinWindowToTreeCoords(int bx, int by, out int tx, out int ty) 1626 { 1627 // void gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view, gint bx, gint by, gint *tx, gint *ty); 1628 gtk_tree_view_convert_bin_window_to_tree_coords(gtkTreeView, bx, by, &tx, &ty); 1629 } 1630 1631 /** 1632 * Converts bin_window coordinates (see gtk_tree_view_get_bin_window()) 1633 * to widget relative coordinates. 1634 * Since 2.12 1635 * Params: 1636 * bx = bin_window X coordinate 1637 * by = bin_window Y coordinate 1638 * wx = return location for widget X coordinate. [out] 1639 * wy = return location for widget Y coordinate. [out] 1640 */ 1641 public void convertBinWindowToWidgetCoords(int bx, int by, out int wx, out int wy) 1642 { 1643 // void gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view, gint bx, gint by, gint *wx, gint *wy); 1644 gtk_tree_view_convert_bin_window_to_widget_coords(gtkTreeView, bx, by, &wx, &wy); 1645 } 1646 1647 /** 1648 * Converts tree coordinates (coordinates in full scrollable area of the tree) 1649 * to bin_window coordinates. 1650 * Since 2.12 1651 * Params: 1652 * tx = tree X coordinate 1653 * ty = tree Y coordinate 1654 * bx = return location for X coordinate relative to bin_window. [out] 1655 * by = return location for Y coordinate relative to bin_window. [out] 1656 */ 1657 public void convertTreeToBinWindowCoords(int tx, int ty, out int bx, out int by) 1658 { 1659 // void gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view, gint tx, gint ty, gint *bx, gint *by); 1660 gtk_tree_view_convert_tree_to_bin_window_coords(gtkTreeView, tx, ty, &bx, &by); 1661 } 1662 1663 /** 1664 * Converts tree coordinates (coordinates in full scrollable area of the tree) 1665 * to widget coordinates. 1666 * Since 2.12 1667 * Params: 1668 * tx = X coordinate relative to the tree 1669 * ty = Y coordinate relative to the tree 1670 * wx = return location for widget X coordinate. [out] 1671 * wy = return location for widget Y coordinate. [out] 1672 */ 1673 public void convertTreeToWidgetCoords(int tx, int ty, out int wx, out int wy) 1674 { 1675 // void gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view, gint tx, gint ty, gint *wx, gint *wy); 1676 gtk_tree_view_convert_tree_to_widget_coords(gtkTreeView, tx, ty, &wx, &wy); 1677 } 1678 1679 /** 1680 * Converts widget coordinates to coordinates for the bin_window 1681 * (see gtk_tree_view_get_bin_window()). 1682 * Since 2.12 1683 * Params: 1684 * wx = X coordinate relative to the widget 1685 * wy = Y coordinate relative to the widget 1686 * bx = return location for bin_window X coordinate. [out] 1687 * by = return location for bin_window Y coordinate. [out] 1688 */ 1689 public void convertWidgetToBinWindowCoords(int wx, int wy, out int bx, out int by) 1690 { 1691 // void gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view, gint wx, gint wy, gint *bx, gint *by); 1692 gtk_tree_view_convert_widget_to_bin_window_coords(gtkTreeView, wx, wy, &bx, &by); 1693 } 1694 1695 /** 1696 * Converts widget coordinates to coordinates for the 1697 * tree (the full scrollable area of the tree). 1698 * Since 2.12 1699 * Params: 1700 * wx = X coordinate relative to the widget 1701 * wy = Y coordinate relative to the widget 1702 * tx = return location for tree X coordinate. [out] 1703 * ty = return location for tree Y coordinate. [out] 1704 */ 1705 public void convertWidgetToTreeCoords(int wx, int wy, out int tx, out int ty) 1706 { 1707 // void gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view, gint wx, gint wy, gint *tx, gint *ty); 1708 gtk_tree_view_convert_widget_to_tree_coords(gtkTreeView, wx, wy, &tx, &ty); 1709 } 1710 1711 /** 1712 * Turns tree_view into a drop destination for automatic DND. Calling 1713 * this method sets "reorderable" to FALSE. 1714 * Params: 1715 * targets = the table of targets that the drag will support. [array length=n_targets] 1716 * actions = the bitmask of possible actions for a drag from this 1717 * widget 1718 */ 1719 public void enableModelDragDest(GtkTargetEntry[] targets, GdkDragAction actions) 1720 { 1721 // void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions); 1722 gtk_tree_view_enable_model_drag_dest(gtkTreeView, targets.ptr, cast(int) targets.length, actions); 1723 } 1724 1725 /** 1726 * Turns tree_view into a drag source for automatic DND. Calling this 1727 * method sets "reorderable" to FALSE. 1728 * Params: 1729 * startButtonMask = Mask of allowed buttons to start drag 1730 * targets = the table of targets that the drag will support. [array length=n_targets] 1731 * actions = the bitmask of possible actions for a drag from this 1732 * widget 1733 */ 1734 public void enableModelDragSource(GdkModifierType startButtonMask, GtkTargetEntry[] targets, GdkDragAction actions) 1735 { 1736 // void gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions); 1737 gtk_tree_view_enable_model_drag_source(gtkTreeView, startButtonMask, targets.ptr, cast(int) targets.length, actions); 1738 } 1739 1740 /** 1741 * Undoes the effect of 1742 * gtk_tree_view_enable_model_drag_source(). Calling this method sets 1743 * "reorderable" to FALSE. 1744 */ 1745 public void unsetRowsDragSource() 1746 { 1747 // void gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view); 1748 gtk_tree_view_unset_rows_drag_source(gtkTreeView); 1749 } 1750 1751 /** 1752 * Undoes the effect of 1753 * gtk_tree_view_enable_model_drag_dest(). Calling this method sets 1754 * "reorderable" to FALSE. 1755 */ 1756 public void unsetRowsDragDest() 1757 { 1758 // void gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view); 1759 gtk_tree_view_unset_rows_drag_dest(gtkTreeView); 1760 } 1761 1762 /** 1763 * Sets the row that is highlighted for feedback. 1764 * Params: 1765 * path = The path of the row to highlight, or NULL. [allow-none] 1766 * pos = Specifies whether to drop before, after or into the row 1767 */ 1768 public void setDragDestRow(TreePath path, GtkTreeViewDropPosition pos) 1769 { 1770 // void gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewDropPosition pos); 1771 gtk_tree_view_set_drag_dest_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), pos); 1772 } 1773 1774 /** 1775 * Gets information about the row that is highlighted for feedback. 1776 * Params: 1777 * path = Return location for the path of the highlighted row, or NULL. [out][allow-none] 1778 * pos = Return location for the drop position, or NULL. [out][allow-none] 1779 */ 1780 public void getDragDestRow(out TreePath path, out GtkTreeViewDropPosition pos) 1781 { 1782 // void gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view, GtkTreePath **path, GtkTreeViewDropPosition *pos); 1783 GtkTreePath* outpath = null; 1784 1785 gtk_tree_view_get_drag_dest_row(gtkTreeView, &outpath, &pos); 1786 1787 path = ObjectG.getDObject!(TreePath)(outpath); 1788 } 1789 1790 /** 1791 * Determines the destination row for a given position. drag_x and 1792 * drag_y are expected to be in widget coordinates. This function is only 1793 * meaningful if tree_view is realized. Therefore this function will always 1794 * return FALSE if tree_view is not realized or does not have a model. 1795 * Params: 1796 * dragX = the position to determine the destination row for 1797 * dragY = the position to determine the destination row for 1798 * path = Return location for the path of the highlighted row, or NULL. [out][allow-none] 1799 * pos = Return location for the drop position, or NULL. [out][allow-none] 1800 * Returns: whether there is a row at the given position, TRUE if this is indeed the case. 1801 */ 1802 public int getDestRowAtPos(int dragX, int dragY, out TreePath path, out GtkTreeViewDropPosition pos) 1803 { 1804 // gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view, gint drag_x, gint drag_y, GtkTreePath **path, GtkTreeViewDropPosition *pos); 1805 GtkTreePath* outpath = null; 1806 1807 auto p = gtk_tree_view_get_dest_row_at_pos(gtkTreeView, dragX, dragY, &outpath, &pos); 1808 1809 path = ObjectG.getDObject!(TreePath)(outpath); 1810 return p; 1811 } 1812 1813 /** 1814 * Creates a GdkPixmap representation of the row at path. 1815 * This image is used for a drag icon. 1816 * Params: 1817 * path = a GtkTreePath in tree_view 1818 * Returns: a newly-allocated pixmap of the drag icon. [transfer none] 1819 */ 1820 public Pixmap createRowDragIcon(TreePath path) 1821 { 1822 // GdkPixmap * gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view, GtkTreePath *path); 1823 auto p = gtk_tree_view_create_row_drag_icon(gtkTreeView, (path is null) ? null : path.getTreePathStruct()); 1824 1825 if(p is null) 1826 { 1827 return null; 1828 } 1829 1830 return ObjectG.getDObject!(Pixmap)(cast(GdkPixmap*) p); 1831 } 1832 1833 /** 1834 * If enable_search is set, then the user can type in text to search through 1835 * the tree interactively (this is sometimes called "typeahead find"). 1836 * Note that even if this is FALSE, the user can still initiate a search 1837 * using the "start-interactive-search" key binding. 1838 * Params: 1839 * enableSearch = TRUE, if the user can search interactively 1840 */ 1841 public void setEnableSearch(int enableSearch) 1842 { 1843 // void gtk_tree_view_set_enable_search (GtkTreeView *tree_view, gboolean enable_search); 1844 gtk_tree_view_set_enable_search(gtkTreeView, enableSearch); 1845 } 1846 1847 /** 1848 * Returns whether or not the tree allows to start interactive searching 1849 * by typing in text. 1850 * Returns: whether or not to let the user search interactively 1851 */ 1852 public int getEnableSearch() 1853 { 1854 // gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view); 1855 return gtk_tree_view_get_enable_search(gtkTreeView); 1856 } 1857 1858 /** 1859 * Gets the column searched on by the interactive search code. 1860 * Returns: the column the interactive search code searches in. 1861 */ 1862 public int getSearchColumn() 1863 { 1864 // gint gtk_tree_view_get_search_column (GtkTreeView *tree_view); 1865 return gtk_tree_view_get_search_column(gtkTreeView); 1866 } 1867 1868 /** 1869 * Sets column as the column where the interactive search code should 1870 * search in for the current model. 1871 * If the search column is set, users can use the "start-interactive-search" 1872 * key binding to bring up search popup. The enable-search property controls 1873 * whether simply typing text will also start an interactive search. 1874 * Note that column refers to a column of the current model. The search 1875 * column is reset to -1 when the model is changed. 1876 * Params: 1877 * column = the column of the model to search in, or -1 to disable searching 1878 */ 1879 public void setSearchColumn(int column) 1880 { 1881 // void gtk_tree_view_set_search_column (GtkTreeView *tree_view, gint column); 1882 gtk_tree_view_set_search_column(gtkTreeView, column); 1883 } 1884 1885 /** 1886 * Returns the compare function currently in use. 1887 * Returns: the currently used compare function for the search code. 1888 */ 1889 public GtkTreeViewSearchEqualFunc getSearchEqualFunc() 1890 { 1891 // GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view); 1892 return gtk_tree_view_get_search_equal_func(gtkTreeView); 1893 } 1894 1895 /** 1896 * Sets the compare function for the interactive search capabilities; note 1897 * that somewhat like strcmp() returning 0 for equality 1898 * GtkTreeViewSearchEqualFunc returns FALSE on matches. 1899 * Params: 1900 * searchEqualFunc = the compare function to use during the search 1901 * searchUserData = user data to pass to search_equal_func, or NULL. [allow-none] 1902 * searchDestroy = Destroy notifier for search_user_data, or NULL. [allow-none] 1903 */ 1904 public void setSearchEqualFunc(GtkTreeViewSearchEqualFunc searchEqualFunc, void* searchUserData, GDestroyNotify searchDestroy) 1905 { 1906 // void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view, GtkTreeViewSearchEqualFunc search_equal_func, gpointer search_user_data, GDestroyNotify search_destroy); 1907 gtk_tree_view_set_search_equal_func(gtkTreeView, searchEqualFunc, searchUserData, searchDestroy); 1908 } 1909 1910 /** 1911 * Returns the GtkEntry which is currently in use as interactive search 1912 * entry for tree_view. In case the built-in entry is being used, NULL 1913 * will be returned. 1914 * Since 2.10 1915 * Returns: the entry currently in use as search entry. [transfer none] 1916 */ 1917 public Entry getSearchEntry() 1918 { 1919 // GtkEntry * gtk_tree_view_get_search_entry (GtkTreeView *tree_view); 1920 auto p = gtk_tree_view_get_search_entry(gtkTreeView); 1921 1922 if(p is null) 1923 { 1924 return null; 1925 } 1926 1927 return ObjectG.getDObject!(Entry)(cast(GtkEntry*) p); 1928 } 1929 1930 /** 1931 * Sets the entry which the interactive search code will use for this 1932 * tree_view. This is useful when you want to provide a search entry 1933 * in our interface at all time at a fixed position. Passing NULL for 1934 * entry will make the interactive search code use the built-in popup 1935 * entry again. 1936 * Since 2.10 1937 * Params: 1938 * entry = the entry the interactive search code of tree_view should use or NULL. [allow-none] 1939 */ 1940 public void setSearchEntry(Entry entry) 1941 { 1942 // void gtk_tree_view_set_search_entry (GtkTreeView *tree_view, GtkEntry *entry); 1943 gtk_tree_view_set_search_entry(gtkTreeView, (entry is null) ? null : entry.getEntryStruct()); 1944 } 1945 1946 /** 1947 * Returns the positioning function currently in use. 1948 * Since 2.10 1949 * Returns: the currently used function for positioning the search dialog. 1950 */ 1951 public GtkTreeViewSearchPositionFunc getSearchPositionFunc() 1952 { 1953 // GtkTreeViewSearchPositionFunc gtk_tree_view_get_search_position_func (GtkTreeView *tree_view); 1954 return gtk_tree_view_get_search_position_func(gtkTreeView); 1955 } 1956 1957 /** 1958 * Sets the function to use when positioning the search dialog. 1959 * Since 2.10 1960 * Params: 1961 * func = the function to use to position the search dialog, or NULL 1962 * to use the default search position function. [allow-none] 1963 * data = user data to pass to func, or NULL. [allow-none] 1964 * destroy = Destroy notifier for data, or NULL. [allow-none] 1965 */ 1966 public void setSearchPositionFunc(GtkTreeViewSearchPositionFunc func, void* data, GDestroyNotify destroy) 1967 { 1968 // void gtk_tree_view_set_search_position_func (GtkTreeView *tree_view, GtkTreeViewSearchPositionFunc func, gpointer data, GDestroyNotify destroy); 1969 gtk_tree_view_set_search_position_func(gtkTreeView, func, data, destroy); 1970 } 1971 1972 /** 1973 * Returns whether fixed height mode is turned on for tree_view. 1974 * Since 2.6 1975 * Returns: TRUE if tree_view is in fixed height mode 1976 */ 1977 public int getFixedHeightMode() 1978 { 1979 // gboolean gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view); 1980 return gtk_tree_view_get_fixed_height_mode(gtkTreeView); 1981 } 1982 1983 /** 1984 * Enables or disables the fixed height mode of tree_view. 1985 * Fixed height mode speeds up GtkTreeView by assuming that all 1986 * rows have the same height. 1987 * Only enable this option if all rows are the same height and all 1988 * columns are of type GTK_TREE_VIEW_COLUMN_FIXED. 1989 * Since 2.6 1990 * Params: 1991 * enable = TRUE to enable fixed height mode 1992 */ 1993 public void setFixedHeightMode(int enable) 1994 { 1995 // void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view, gboolean enable); 1996 gtk_tree_view_set_fixed_height_mode(gtkTreeView, enable); 1997 } 1998 1999 /** 2000 * Returns whether hover selection mode is turned on for tree_view. 2001 * Since 2.6 2002 * Returns: TRUE if tree_view is in hover selection mode 2003 */ 2004 public int getHoverSelection() 2005 { 2006 // gboolean gtk_tree_view_get_hover_selection (GtkTreeView *tree_view); 2007 return gtk_tree_view_get_hover_selection(gtkTreeView); 2008 } 2009 2010 /** 2011 * Enables of disables the hover selection mode of tree_view. 2012 * Hover selection makes the selected row follow the pointer. 2013 * Currently, this works only for the selection modes 2014 * GTK_SELECTION_SINGLE and GTK_SELECTION_BROWSE. 2015 * Since 2.6 2016 * Params: 2017 * hover = TRUE to enable hover selection mode 2018 */ 2019 public void setHoverSelection(int hover) 2020 { 2021 // void gtk_tree_view_set_hover_selection (GtkTreeView *tree_view, gboolean hover); 2022 gtk_tree_view_set_hover_selection(gtkTreeView, hover); 2023 } 2024 2025 /** 2026 * Returns whether hover expansion mode is turned on for tree_view. 2027 * Since 2.6 2028 * Returns: TRUE if tree_view is in hover expansion mode 2029 */ 2030 public int getHoverExpand() 2031 { 2032 // gboolean gtk_tree_view_get_hover_expand (GtkTreeView *tree_view); 2033 return gtk_tree_view_get_hover_expand(gtkTreeView); 2034 } 2035 2036 /** 2037 * Enables of disables the hover expansion mode of tree_view. 2038 * Hover expansion makes rows expand or collapse if the pointer 2039 * moves over them. 2040 * Since 2.6 2041 * Params: 2042 * expand = TRUE to enable hover selection mode 2043 */ 2044 public void setHoverExpand(int expand) 2045 { 2046 // void gtk_tree_view_set_hover_expand (GtkTreeView *tree_view, gboolean expand); 2047 gtk_tree_view_set_hover_expand(gtkTreeView, expand); 2048 } 2049 2050 /** 2051 * This function should almost never be used. It is meant for private use by 2052 * ATK for determining the number of visible children that are removed when the 2053 * user collapses a row, or a row is deleted. 2054 * Params: 2055 * func = Function to be called when a view row is destroyed, or NULL. [allow-none] 2056 * data = User data to be passed to func, or NULL. [allow-none] 2057 * destroy = Destroy notifier for data, or NULL. [allow-none] 2058 */ 2059 public void setDestroyCountFunc(GtkTreeDestroyCountFunc func, void* data, GDestroyNotify destroy) 2060 { 2061 // void gtk_tree_view_set_destroy_count_func (GtkTreeView *tree_view, GtkTreeDestroyCountFunc func, gpointer data, GDestroyNotify destroy); 2062 gtk_tree_view_set_destroy_count_func(gtkTreeView, func, data, destroy); 2063 } 2064 2065 /** 2066 * Returns the current row separator function. 2067 * Since 2.6 2068 * Returns: the current row separator function. 2069 */ 2070 public GtkTreeViewRowSeparatorFunc getRowSeparatorFunc() 2071 { 2072 // GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view); 2073 return gtk_tree_view_get_row_separator_func(gtkTreeView); 2074 } 2075 2076 /** 2077 * Sets the row separator function, which is used to determine 2078 * whether a row should be drawn as a separator. If the row separator 2079 * function is NULL, no separators are drawn. This is the default value. 2080 * Since 2.6 2081 * Params: 2082 * func = a GtkTreeViewRowSeparatorFunc 2083 * data = user data to pass to func, or NULL. [allow-none] 2084 * destroy = destroy notifier for data, or NULL. [allow-none] 2085 */ 2086 public void setRowSeparatorFunc(GtkTreeViewRowSeparatorFunc func, void* data, GDestroyNotify destroy) 2087 { 2088 // void gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view, GtkTreeViewRowSeparatorFunc func, gpointer data, GDestroyNotify destroy); 2089 gtk_tree_view_set_row_separator_func(gtkTreeView, func, data, destroy); 2090 } 2091 2092 /** 2093 * Returns whether rubber banding is turned on for tree_view. If the 2094 * selection mode is GTK_SELECTION_MULTIPLE, rubber banding will allow the 2095 * user to select multiple rows by dragging the mouse. 2096 * Since 2.10 2097 * Returns: TRUE if rubber banding in tree_view is enabled. 2098 */ 2099 public int getRubberBanding() 2100 { 2101 // gboolean gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view); 2102 return gtk_tree_view_get_rubber_banding(gtkTreeView); 2103 } 2104 2105 /** 2106 * Enables or disables rubber banding in tree_view. If the selection mode 2107 * is GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select 2108 * multiple rows by dragging the mouse. 2109 * Since 2.10 2110 * Params: 2111 * enable = TRUE to enable rubber banding 2112 */ 2113 public void setRubberBanding(int enable) 2114 { 2115 // void gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view, gboolean enable); 2116 gtk_tree_view_set_rubber_banding(gtkTreeView, enable); 2117 } 2118 2119 /** 2120 * Returns whether a rubber banding operation is currently being done 2121 * in tree_view. 2122 * Since 2.12 2123 * Returns: TRUE if a rubber banding operation is currently being done in tree_view. 2124 */ 2125 public int isRubberBandingActive() 2126 { 2127 // gboolean gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view); 2128 return gtk_tree_view_is_rubber_banding_active(gtkTreeView); 2129 } 2130 2131 /** 2132 * Returns whether or not tree lines are drawn in tree_view. 2133 * Since 2.10 2134 * Returns: TRUE if tree lines are drawn in tree_view, FALSE otherwise. 2135 */ 2136 public int getEnableTreeLines() 2137 { 2138 // gboolean gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view); 2139 return gtk_tree_view_get_enable_tree_lines(gtkTreeView); 2140 } 2141 2142 /** 2143 * Sets whether to draw lines interconnecting the expanders in tree_view. 2144 * This does not have any visible effects for lists. 2145 * Since 2.10 2146 * Params: 2147 * enabled = TRUE to enable tree line drawing, FALSE otherwise. 2148 */ 2149 public void setEnableTreeLines(int enabled) 2150 { 2151 // void gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view, gboolean enabled); 2152 gtk_tree_view_set_enable_tree_lines(gtkTreeView, enabled); 2153 } 2154 2155 /** 2156 * Returns which grid lines are enabled in tree_view. 2157 * Since 2.10 2158 * Returns: a GtkTreeViewGridLines value indicating which grid lines are enabled. 2159 */ 2160 public GtkTreeViewGridLines getGridLines() 2161 { 2162 // GtkTreeViewGridLines gtk_tree_view_get_grid_lines (GtkTreeView *tree_view); 2163 return gtk_tree_view_get_grid_lines(gtkTreeView); 2164 } 2165 2166 /** 2167 * Sets which grid lines to draw in tree_view. 2168 * Since 2.10 2169 * Params: 2170 * gridLines = a GtkTreeViewGridLines value indicating which grid lines to 2171 * enable. 2172 */ 2173 public void setGridLines(GtkTreeViewGridLines gridLines) 2174 { 2175 // void gtk_tree_view_set_grid_lines (GtkTreeView *tree_view, GtkTreeViewGridLines grid_lines); 2176 gtk_tree_view_set_grid_lines(gtkTreeView, gridLines); 2177 } 2178 2179 /** 2180 * Sets the tip area of tooltip to be the area covered by the row at path. 2181 * See also gtk_tree_view_set_tooltip_column() for a simpler alternative. 2182 * See also gtk_tooltip_set_tip_area(). 2183 * Since 2.12 2184 * Params: 2185 * tooltip = a GtkTooltip 2186 * path = a GtkTreePath 2187 */ 2188 public void setTooltipRow(Tooltip tooltip, TreePath path) 2189 { 2190 // void gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view, GtkTooltip *tooltip, GtkTreePath *path); 2191 gtk_tree_view_set_tooltip_row(gtkTreeView, (tooltip is null) ? null : tooltip.getTooltipStruct(), (path is null) ? null : path.getTreePathStruct()); 2192 } 2193 2194 /** 2195 * Sets the tip area of tooltip to the area path, column and cell have 2196 * in common. For example if path is NULL and column is set, the tip 2197 * area will be set to the full area covered by column. See also 2198 * gtk_tooltip_set_tip_area(). 2199 * Note that if path is not specified and cell is set and part of a column 2200 * containing the expander, the tooltip might not show and hide at the correct 2201 * position. In such cases path must be set to the current node under the 2202 * mouse cursor for this function to operate correctly. 2203 * See also gtk_tree_view_set_tooltip_column() for a simpler alternative. 2204 * Since 2.12 2205 * Params: 2206 * tooltip = a GtkTooltip 2207 * path = a GtkTreePath or NULL. [allow-none] 2208 * column = a GtkTreeViewColumn or NULL. [allow-none] 2209 * cell = a GtkCellRenderer or NULL. [allow-none] 2210 */ 2211 public void setTooltipCell(Tooltip tooltip, TreePath path, TreeViewColumn column, CellRenderer cell) 2212 { 2213 // void gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view, GtkTooltip *tooltip, GtkTreePath *path, GtkTreeViewColumn *column, GtkCellRenderer *cell); 2214 gtk_tree_view_set_tooltip_cell(gtkTreeView, (tooltip is null) ? null : tooltip.getTooltipStruct(), (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct(), (cell is null) ? null : cell.getCellRendererStruct()); 2215 } 2216 2217 /** 2218 * This function is supposed to be used in a "query-tooltip" 2219 * signal handler for GtkTreeView. The x, y and keyboard_tip values 2220 * which are received in the signal handler, should be passed to this 2221 * function without modification. 2222 * The return value indicates whether there is a tree view row at the given 2223 * coordinates (TRUE) or not (FALSE) for mouse tooltips. For keyboard 2224 * tooltips the row returned will be the cursor row. When TRUE, then any of 2225 * model, path and iter which have been provided will be set to point to 2226 * that row and the corresponding model. x and y will always be converted 2227 * to be relative to tree_view's bin_window if keyboard_tooltip is FALSE. 2228 * Since 2.12 2229 * Params: 2230 * x = the x coordinate (relative to widget coordinates). [inout] 2231 * y = the y coordinate (relative to widget coordinates). [inout] 2232 * keyboardTip = whether this is a keyboard tooltip or not 2233 * model = a pointer to receive a GtkTreeModel or NULL. [out][allow-none] 2234 * path = a pointer to receive a GtkTreePath or NULL. [out][allow-none] 2235 * iter = a pointer to receive a GtkTreeIter or NULL. [out][allow-none] 2236 * Returns: whether or not the given tooltip context points to a row. 2237 */ 2238 public int getTooltipContext(int* x, int* y, int keyboardTip, out TreeModelIF model, out TreePath path, TreeIter iter) 2239 { 2240 // gboolean gtk_tree_view_get_tooltip_context (GtkTreeView *tree_view, gint *x, gint *y, gboolean keyboard_tip, GtkTreeModel **model, GtkTreePath **path, GtkTreeIter *iter); 2241 GtkTreeModel* outmodel = null; 2242 GtkTreePath* outpath = null; 2243 2244 auto p = gtk_tree_view_get_tooltip_context(gtkTreeView, x, y, keyboardTip, &outmodel, &outpath, (iter is null) ? null : iter.getTreeIterStruct()); 2245 2246 model = ObjectG.getDObject!(TreeModel, TreeModelIF)(outmodel); 2247 path = ObjectG.getDObject!(TreePath)(outpath); 2248 return p; 2249 } 2250 2251 /** 2252 * Returns the column of tree_view's model which is being used for 2253 * displaying tooltips on tree_view's rows. 2254 * Since 2.12 2255 * Returns: the index of the tooltip column that is currently being used, or -1 if this is disabled. 2256 */ 2257 public int getTooltipColumn() 2258 { 2259 // gint gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view); 2260 return gtk_tree_view_get_tooltip_column(gtkTreeView); 2261 } 2262 2263 /** 2264 * If you only plan to have simple (text-only) tooltips on full rows, you 2265 * can use this function to have GtkTreeView handle these automatically 2266 * for you. column should be set to the column in tree_view's model 2267 * containing the tooltip texts, or -1 to disable this feature. 2268 * When enabled, "has-tooltip" will be set to TRUE and 2269 * tree_view will connect a "query-tooltip" signal handler. 2270 * Note that the signal handler sets the text with gtk_tooltip_set_markup(), 2271 * so , <, etc have to be escaped in the text. 2272 * Since 2.12 2273 * Params: 2274 * column = an integer, which is a valid column number for tree_view's model 2275 */ 2276 public void setTooltipColumn(int column) 2277 { 2278 // void gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view, gint column); 2279 gtk_tree_view_set_tooltip_column(gtkTreeView, column); 2280 } 2281 }