I've no idea here...
[gtkD.git] / src / gtk / TreeView.d
blob66c1fb7b0436b7ca3d3f9ed79338782d9d33f6b2
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkTreeView.html
26 * outPack = gtk
27 * outFile = TreeView
28 * strct = GtkTreeView
29 * realStrct=
30 * ctorStrct=
31 * clss = TreeView
32 * interf =
33 * class Code: Yes
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_tree_view_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * - glib.Str
46 * - gtk.TreeModel
47 * - gtk.TreeSelection
48 * - gtk.Adjustment
49 * - gtk.TreeViewColumn
50 * - gtk.CellRenderer
51 * - glib.ListG
52 * - gtk.TreePath
53 * - gdk.Rectangle
54 * - gdk.Window
55 * - gdk.Pixmap
56 * - gtk.TreeIter
57 * structWrap:
58 * - GList* -> ListG
59 * - GdkPixmap* -> Pixmap
60 * - GdkRectangle* -> Rectangle
61 * - GdkWindow* -> Window
62 * - GtkAdjustment* -> Adjustment
63 * - GtkCellRenderer* -> CellRenderer
64 * - GtkTreeModel* -> TreeModel
65 * - GtkTreePath* -> TreePath
66 * - GtkTreeSelection* -> TreeSelection
67 * - GtkTreeViewColumn* -> TreeViewColumn
68 * local aliases:
71 module gtk.TreeView;
73 private import gtk.gtktypes;
75 private import lib.gtk;
77 private import glib.Str;
78 private import gtk.TreeModel;
79 private import gtk.TreeSelection;
80 private import gtk.Adjustment;
81 private import gtk.TreeViewColumn;
82 private import gtk.CellRenderer;
83 private import glib.ListG;
84 private import gtk.TreePath;
85 private import gdk.Rectangle;
86 private import gdk.Window;
87 private import gdk.Pixmap;
88 private import gtk.TreeIter;
90 /**
91 * Description
92 * Widget that displays any object that implements the GtkTreeModel interface.
93 * Please refer to the tree widget conceptual overview
94 * for an overview of all the objects and data types related to the tree widget and how
95 * they work together.
97 private import gtk.Container;
98 public class TreeView : Container
101 /** the main Gtk struct */
102 protected GtkTreeView* gtkTreeView;
105 public GtkTreeView* getTreeViewStruct()
107 return gtkTreeView;
111 /** the main Gtk struct as a void* */
112 protected void* getStruct()
114 return cast(void*)gtkTreeView;
118 * Sets our main struct and passes it to the parent class
120 public this (GtkTreeView* gtkTreeView)
122 super(cast(GtkContainer*)gtkTreeView);
123 this.gtkTreeView = gtkTreeView;
127 * Expands the row of the iter.
128 * @param iter
129 * @param openAll
130 * @return
132 int expandRow(TreeIter iter, TreeModel model, int openAll)
134 return expandRow(model.getPath(iter), openAll);
138 * Finds the path at the point (x, y), relative to widget coordinates. That
139 * is, x and y are relative to an events coordinates. x and y must come
140 * from an event on the tree_view only where event->window ==
141 * gtk_tree_view_get_bin (). It is primarily for things
142 * like popup menus. If path is non-NULL, then it will be filled with the
143 * GtkTreePath at that point. This path should be freed with gtk_tree_path_free().
144 * If column is non-NULL, then it will be filled with the column at that point.
145 * cell_x and cell_y return the coordinates relative to the cell background
146 * (i.e. the background_area passed to gtk_cell_renderer_render()). This
147 * function is only meaningful if tree_view is realized.
148 * tree_view:
149 * A GtkTreeView.
150 * x:
151 * The x position to be identified.
152 * y:
153 * The y position to be identified.
154 * path:
155 * A pointer to a GtkTreePath pointer to be filled in, or NULL
156 * column:
157 * A pointer to a GtkTreeViewColumn pointer to be filled in, or NULL
158 * cell_x:
159 * A pointer where the X coordinate relative to the cell can be placed, or NULL
160 * cell_y:
161 * A pointer where the Y coordinate relative to the cell can be placed, or NULL
162 * Returns:
163 * TRUE if a row exists at that coordinate.
165 int getPathAtPos(gint x, gint y, inout TreePath path, inout TreeViewColumn column, out gint cellX, out gint cellY)
167 GtkTreePath* p = path.getTreePathStruct();
168 GtkTreeViewColumn* c = column.getTreeViewColumnStruct();
170 int result = gtk_tree_view_get_path_at_pos(gtkTreeView, x, y, &p, &c, &cellX, &cellY)
171 == 0 ? false : true;
173 path = new TreePath(p);
174 column = new TreeViewColumn(c);
176 return result;
182 * gets the first selected iter or null if no rows are selected
184 TreeIter getSelectedIter()
186 TreeIter iter = new TreeIter();
187 TreeSelection selection = getSelection();
188 TreeModel model = getModel();
189 TreePath[] paths = selection.getSelectedRows(model);
190 if ( paths.length > 0 )
192 model.getIter(iter,paths[0]);
194 return iter;
197 TreeIter[] getSelectedIters()
199 TreeIter[] iters;
201 TreeIter iter = new TreeIter();
202 TreeSelection selection = getSelection();
203 TreeModel model = getModel();
204 TreePath[] paths = selection.getSelectedRows(model);
205 foreach ( TreePath p; selection.getSelectedRows(model) )
207 //iters.length = iters.length+1;
208 //iters[iters.length-1] = model.getIter(iter,p);
209 // iters ~= model.getIter(iter,p); >>> compile error can only concatenate arrays ???
210 if ( model.getIter(iter,p) )
212 iters ~= iter;
213 iter = new TreeIter();
217 //printf("TreeView.getSelectedIters iters.lenght = %d\n", iters.length);
218 return iters;
222 * Inserts a column and sets it's attributes
223 * @param position
224 * @param title
225 * @param renderer
226 * @param editable
227 * @return number of columns including the new one
229 gint insertEditableColumn(int position, char[] title, CellRenderer renderer, bit editable)
231 // OK, this is a trick because of my ignorance on how to pass variable argument lists
232 if ( position < 0 )
234 position = getColumns().length();
236 int tot = gtk_tree_view_insert_column_with_attributes(
237 gtkTreeView,
238 position,
239 Str.toStringz(title),
240 renderer.getCellRendererStruct(),
241 Str.toStringz("text"),position,//v1.getV(),
242 Str.toStringz("editable"),2,0);//v.getV(),0);
243 return tot;
252 // imports for the signal processing
253 private import gobject.Signals;
254 private import gdk.gdktypes;
255 int[char[]] connectedSignals;
257 void delegate(TreeView)[] onColumnsChangedListeners;
258 void addOnColumnsChanged(void delegate(TreeView) dlg)
260 if ( !("columns-changed" in connectedSignals) )
262 Signals.connectData(
263 getStruct(),
264 "columns-changed",
265 cast(GCallback)&callBackColumnsChanged,
266 this,
267 null,
268 cast(ConnectFlags)0);
269 connectedSignals["columns-changed"] = 1;
271 onColumnsChangedListeners ~= dlg;
273 extern(C) static void callBackColumnsChanged(GtkTreeView* treeViewStruct, TreeView treeView)
275 bit consumed = false;
277 foreach ( void delegate(TreeView) dlg ; treeView.onColumnsChangedListeners )
279 dlg(treeView);
282 return consumed;
285 void delegate(TreeView)[] onCursorChangedListeners;
286 void addOnCursorChanged(void delegate(TreeView) dlg)
288 if ( !("cursor-changed" in connectedSignals) )
290 Signals.connectData(
291 getStruct(),
292 "cursor-changed",
293 cast(GCallback)&callBackCursorChanged,
294 this,
295 null,
296 cast(ConnectFlags)0);
297 connectedSignals["cursor-changed"] = 1;
299 onCursorChangedListeners ~= dlg;
301 extern(C) static void callBackCursorChanged(GtkTreeView* treeViewStruct, TreeView treeView)
303 bit consumed = false;
305 foreach ( void delegate(TreeView) dlg ; treeView.onCursorChangedListeners )
307 dlg(treeView);
310 return consumed;
313 gboolean delegate(gboolean, gboolean, gboolean, TreeView)[] onExpandCollapseCursorRowListeners;
314 void addOnExpandCollapseCursorRow(gboolean delegate(gboolean, gboolean, gboolean, TreeView) dlg)
316 if ( !("expand-collapse-cursor-row" in connectedSignals) )
318 Signals.connectData(
319 getStruct(),
320 "expand-collapse-cursor-row",
321 cast(GCallback)&callBackExpandCollapseCursorRow,
322 this,
323 null,
324 cast(ConnectFlags)0);
325 connectedSignals["expand-collapse-cursor-row"] = 1;
327 onExpandCollapseCursorRowListeners ~= dlg;
329 extern(C) static void callBackExpandCollapseCursorRow(GtkTreeView* treeviewStruct, gboolean arg1, gboolean arg2, gboolean arg3, TreeView treeView)
331 bit consumed = false;
333 foreach ( gboolean delegate(gboolean, gboolean, gboolean, TreeView) dlg ; treeView.onExpandCollapseCursorRowListeners )
335 dlg(arg1, arg2, arg3, treeView);
338 return consumed;
341 gboolean delegate(GtkMovementStep, gint, TreeView)[] onMoveCursorListeners;
342 void addOnMoveCursor(gboolean delegate(GtkMovementStep, gint, TreeView) dlg)
344 if ( !("move-cursor" in connectedSignals) )
346 Signals.connectData(
347 getStruct(),
348 "move-cursor",
349 cast(GCallback)&callBackMoveCursor,
350 this,
351 null,
352 cast(ConnectFlags)0);
353 connectedSignals["move-cursor"] = 1;
355 onMoveCursorListeners ~= dlg;
357 extern(C) static void callBackMoveCursor(GtkTreeView* treeviewStruct, GtkMovementStep arg1, gint arg2, TreeView treeView)
359 bit consumed = false;
361 foreach ( gboolean delegate(GtkMovementStep, gint, TreeView) dlg ; treeView.onMoveCursorListeners )
363 dlg(arg1, arg2, treeView);
366 return consumed;
369 void delegate(TreePath, TreeViewColumn, TreeView)[] onRowActivatedListeners;
370 void addOnRowActivated(void delegate(TreePath, TreeViewColumn, TreeView) dlg)
372 if ( !("row-activated" in connectedSignals) )
374 Signals.connectData(
375 getStruct(),
376 "row-activated",
377 cast(GCallback)&callBackRowActivated,
378 this,
379 null,
380 cast(ConnectFlags)0);
381 connectedSignals["row-activated"] = 1;
383 onRowActivatedListeners ~= dlg;
385 extern(C) static void callBackRowActivated(GtkTreeView* treeViewStruct, GtkTreePath* path, GtkTreeViewColumn* column, TreeView treeView)
387 bit consumed = false;
389 foreach ( void delegate(TreePath, TreeViewColumn, TreeView) dlg ; treeView.onRowActivatedListeners )
391 dlg(new TreePath(path), new TreeViewColumn(column), treeView);
394 return consumed;
397 void delegate(GtkTreeIter*, TreePath, TreeView)[] onRowCollapsedListeners;
398 void addOnRowCollapsed(void delegate(GtkTreeIter*, TreePath, TreeView) dlg)
400 if ( !("row-collapsed" in connectedSignals) )
402 Signals.connectData(
403 getStruct(),
404 "row-collapsed",
405 cast(GCallback)&callBackRowCollapsed,
406 this,
407 null,
408 cast(ConnectFlags)0);
409 connectedSignals["row-collapsed"] = 1;
411 onRowCollapsedListeners ~= dlg;
413 extern(C) static void callBackRowCollapsed(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
415 bit consumed = false;
417 foreach ( void delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onRowCollapsedListeners )
419 dlg(iter, new TreePath(path), treeView);
422 return consumed;
425 void delegate(GtkTreeIter*, TreePath, TreeView)[] onRowExpandedListeners;
426 void addOnRowExpanded(void delegate(GtkTreeIter*, TreePath, TreeView) dlg)
428 if ( !("row-expanded" in connectedSignals) )
430 Signals.connectData(
431 getStruct(),
432 "row-expanded",
433 cast(GCallback)&callBackRowExpanded,
434 this,
435 null,
436 cast(ConnectFlags)0);
437 connectedSignals["row-expanded"] = 1;
439 onRowExpandedListeners ~= dlg;
441 extern(C) static void callBackRowExpanded(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
443 bit consumed = false;
445 foreach ( void delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onRowExpandedListeners )
447 dlg(iter, new TreePath(path), treeView);
450 return consumed;
453 gboolean delegate(TreeView)[] onSelectAllListeners;
454 void addOnSelectAll(gboolean delegate(TreeView) dlg)
456 if ( !("select-all" in connectedSignals) )
458 Signals.connectData(
459 getStruct(),
460 "select-all",
461 cast(GCallback)&callBackSelectAll,
462 this,
463 null,
464 cast(ConnectFlags)0);
465 connectedSignals["select-all"] = 1;
467 onSelectAllListeners ~= dlg;
469 extern(C) static void callBackSelectAll(GtkTreeView* treeviewStruct, TreeView treeView)
471 bit consumed = false;
473 foreach ( gboolean delegate(TreeView) dlg ; treeView.onSelectAllListeners )
475 dlg(treeView);
478 return consumed;
481 gboolean delegate(TreeView)[] onSelectCursorParentListeners;
482 void addOnSelectCursorParent(gboolean delegate(TreeView) dlg)
484 if ( !("select-cursor-parent" in connectedSignals) )
486 Signals.connectData(
487 getStruct(),
488 "select-cursor-parent",
489 cast(GCallback)&callBackSelectCursorParent,
490 this,
491 null,
492 cast(ConnectFlags)0);
493 connectedSignals["select-cursor-parent"] = 1;
495 onSelectCursorParentListeners ~= dlg;
497 extern(C) static void callBackSelectCursorParent(GtkTreeView* treeviewStruct, TreeView treeView)
499 bit consumed = false;
501 foreach ( gboolean delegate(TreeView) dlg ; treeView.onSelectCursorParentListeners )
503 dlg(treeView);
506 return consumed;
509 gboolean delegate(gboolean, TreeView)[] onSelectCursorRowListeners;
510 void addOnSelectCursorRow(gboolean delegate(gboolean, TreeView) dlg)
512 if ( !("select-cursor-row" in connectedSignals) )
514 Signals.connectData(
515 getStruct(),
516 "select-cursor-row",
517 cast(GCallback)&callBackSelectCursorRow,
518 this,
519 null,
520 cast(ConnectFlags)0);
521 connectedSignals["select-cursor-row"] = 1;
523 onSelectCursorRowListeners ~= dlg;
525 extern(C) static void callBackSelectCursorRow(GtkTreeView* treeviewStruct, gboolean arg1, TreeView treeView)
527 bit consumed = false;
529 foreach ( gboolean delegate(gboolean, TreeView) dlg ; treeView.onSelectCursorRowListeners )
531 dlg(arg1, treeView);
534 return consumed;
537 void delegate(Adjustment, Adjustment, TreeView)[] onSetScrollAdjustmentsListeners;
538 void addOnSetScrollAdjustments(void delegate(Adjustment, Adjustment, TreeView) dlg)
540 if ( !("set-scroll-adjustments" in connectedSignals) )
542 Signals.connectData(
543 getStruct(),
544 "set-scroll-adjustments",
545 cast(GCallback)&callBackSetScrollAdjustments,
546 this,
547 null,
548 cast(ConnectFlags)0);
549 connectedSignals["set-scroll-adjustments"] = 1;
551 onSetScrollAdjustmentsListeners ~= dlg;
553 extern(C) static void callBackSetScrollAdjustments(GtkTreeView* treeviewStruct, GtkAdjustment* arg1, GtkAdjustment* arg2, TreeView treeView)
555 bit consumed = false;
557 foreach ( void delegate(Adjustment, Adjustment, TreeView) dlg ; treeView.onSetScrollAdjustmentsListeners )
559 dlg(new Adjustment(arg1), new Adjustment(arg2), treeView);
562 return consumed;
565 gboolean delegate(TreeView)[] onStartInteractiveSearchListeners;
566 void addOnStartInteractiveSearch(gboolean delegate(TreeView) dlg)
568 if ( !("start-interactive-search" in connectedSignals) )
570 Signals.connectData(
571 getStruct(),
572 "start-interactive-search",
573 cast(GCallback)&callBackStartInteractiveSearch,
574 this,
575 null,
576 cast(ConnectFlags)0);
577 connectedSignals["start-interactive-search"] = 1;
579 onStartInteractiveSearchListeners ~= dlg;
581 extern(C) static void callBackStartInteractiveSearch(GtkTreeView* treeviewStruct, TreeView treeView)
583 bit consumed = false;
585 foreach ( gboolean delegate(TreeView) dlg ; treeView.onStartInteractiveSearchListeners )
587 dlg(treeView);
590 return consumed;
593 gboolean delegate(GtkTreeIter*, TreePath, TreeView)[] onTestCollapseRowListeners;
594 void addOnTestCollapseRow(gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg)
596 if ( !("test-collapse-row" in connectedSignals) )
598 Signals.connectData(
599 getStruct(),
600 "test-collapse-row",
601 cast(GCallback)&callBackTestCollapseRow,
602 this,
603 null,
604 cast(ConnectFlags)0);
605 connectedSignals["test-collapse-row"] = 1;
607 onTestCollapseRowListeners ~= dlg;
609 extern(C) static void callBackTestCollapseRow(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
611 bit consumed = false;
613 foreach ( gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onTestCollapseRowListeners )
615 dlg(iter, new TreePath(path), treeView);
618 return consumed;
621 gboolean delegate(GtkTreeIter*, TreePath, TreeView)[] onTestExpandRowListeners;
622 void addOnTestExpandRow(gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg)
624 if ( !("test-expand-row" in connectedSignals) )
626 Signals.connectData(
627 getStruct(),
628 "test-expand-row",
629 cast(GCallback)&callBackTestExpandRow,
630 this,
631 null,
632 cast(ConnectFlags)0);
633 connectedSignals["test-expand-row"] = 1;
635 onTestExpandRowListeners ~= dlg;
637 extern(C) static void callBackTestExpandRow(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
639 bit consumed = false;
641 foreach ( gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onTestExpandRowListeners )
643 dlg(iter, new TreePath(path), treeView);
646 return consumed;
649 gboolean delegate(TreeView)[] onToggleCursorRowListeners;
650 void addOnToggleCursorRow(gboolean delegate(TreeView) dlg)
652 if ( !("toggle-cursor-row" in connectedSignals) )
654 Signals.connectData(
655 getStruct(),
656 "toggle-cursor-row",
657 cast(GCallback)&callBackToggleCursorRow,
658 this,
659 null,
660 cast(ConnectFlags)0);
661 connectedSignals["toggle-cursor-row"] = 1;
663 onToggleCursorRowListeners ~= dlg;
665 extern(C) static void callBackToggleCursorRow(GtkTreeView* treeviewStruct, TreeView treeView)
667 bit consumed = false;
669 foreach ( gboolean delegate(TreeView) dlg ; treeView.onToggleCursorRowListeners )
671 dlg(treeView);
674 return consumed;
677 gboolean delegate(TreeView)[] onUnselectAllListeners;
678 void addOnUnselectAll(gboolean delegate(TreeView) dlg)
680 if ( !("unselect-all" in connectedSignals) )
682 Signals.connectData(
683 getStruct(),
684 "unselect-all",
685 cast(GCallback)&callBackUnselectAll,
686 this,
687 null,
688 cast(ConnectFlags)0);
689 connectedSignals["unselect-all"] = 1;
691 onUnselectAllListeners ~= dlg;
693 extern(C) static void callBackUnselectAll(GtkTreeView* treeviewStruct, TreeView treeView)
695 bit consumed = false;
697 foreach ( gboolean delegate(TreeView) dlg ; treeView.onUnselectAllListeners )
699 dlg(treeView);
702 return consumed;
713 * Creates a new GtkTreeView widget.
714 * Returns:
715 * A newly created GtkTreeView widget.
717 public this ()
719 // GtkWidget* gtk_tree_view_new (void);
720 this(cast(GtkTreeView*)gtk_tree_view_new() );
724 * Creates a new GtkTreeView widget with the model initialized to model.
725 * model:
726 * the model.
727 * Returns:
728 * A newly created GtkTreeView widget.
730 public this (TreeModel model)
732 // GtkWidget* gtk_tree_view_new_with_model (GtkTreeModel *model);
733 this(cast(GtkTreeView*)gtk_tree_view_new_with_model((model is null) ? null : model.getTreeModelStruct()) );
737 * Returns the model the GtkTreeView is based on. Returns NULL if the
738 * model is unset.
739 * tree_view:
740 * a GtkTreeView
741 * Returns:
742 * A GtkTreeModel, or NULL if none is currently being used.
744 public TreeModel getModel()
746 // GtkTreeModel* gtk_tree_view_get_model (GtkTreeView *tree_view);
747 return new TreeModel( gtk_tree_view_get_model(gtkTreeView) );
751 * Sets the model for a GtkTreeView. If the tree_view already has a model
752 * set, it will remove it before setting the new model. If model is NULL,
753 * then it will unset the old model.
754 * tree_view:
755 * A GtkTreeNode.
756 * model:
757 * The model.
759 public void setModel(TreeModel model)
761 // void gtk_tree_view_set_model (GtkTreeView *tree_view, GtkTreeModel *model);
762 gtk_tree_view_set_model(gtkTreeView, (model is null) ? null : model.getTreeModelStruct());
766 * Gets the GtkTreeSelection associated with tree_view.
767 * tree_view:
768 * A GtkTreeView.
769 * Returns:
770 * A GtkTreeSelection object.
772 public TreeSelection getSelection()
774 // GtkTreeSelection* gtk_tree_view_get_selection (GtkTreeView *tree_view);
775 return new TreeSelection( gtk_tree_view_get_selection(gtkTreeView) );
779 * Gets the GtkAdjustment currently being used for the horizontal aspect.
780 * tree_view:
781 * A GtkTreeView
782 * Returns:
783 * A GtkAdjustment object, or NULL if none is currently being
784 * used.
786 public Adjustment getHadjustment()
788 // GtkAdjustment* gtk_tree_view_get_hadjustment (GtkTreeView *tree_view);
789 return new Adjustment( gtk_tree_view_get_hadjustment(gtkTreeView) );
793 * Sets the GtkAdjustment for the current horizontal aspect.
794 * tree_view:
795 * A GtkTreeView
796 * adjustment:
797 * The GtkAdjustment to set, or NULL
799 public void setHadjustment(Adjustment adjustment)
801 // void gtk_tree_view_set_hadjustment (GtkTreeView *tree_view, GtkAdjustment *adjustment);
802 gtk_tree_view_set_hadjustment(gtkTreeView, (adjustment is null) ? null : adjustment.getAdjustmentStruct());
806 * Gets the GtkAdjustment currently being used for the vertical aspect.
807 * tree_view:
808 * A GtkTreeView
809 * Returns:
810 * A GtkAdjustment object, or NULL if none is currently being
811 * used.
813 public Adjustment getVadjustment()
815 // GtkAdjustment* gtk_tree_view_get_vadjustment (GtkTreeView *tree_view);
816 return new Adjustment( gtk_tree_view_get_vadjustment(gtkTreeView) );
820 * Sets the GtkAdjustment for the current vertical aspect.
821 * tree_view:
822 * A GtkTreeView
823 * adjustment:
824 * The GtkAdjustment to set, or NULL
826 public void setVadjustment(Adjustment adjustment)
828 // void gtk_tree_view_set_vadjustment (GtkTreeView *tree_view, GtkAdjustment *adjustment);
829 gtk_tree_view_set_vadjustment(gtkTreeView, (adjustment is null) ? null : adjustment.getAdjustmentStruct());
833 * Returns TRUE if the headers on the tree_view are visible.
834 * tree_view:
835 * A GtkTreeView.
836 * Returns:
837 * Whether the headers are visible or not.
839 public int getHeadersVisible()
841 // gboolean gtk_tree_view_get_headers_visible (GtkTreeView *tree_view);
842 return gtk_tree_view_get_headers_visible(gtkTreeView);
846 * Sets the visibility state of the headers.
847 * tree_view:
848 * A GtkTreeView.
849 * headers_visible:
850 * TRUE if the headers are visible
852 public void setHeadersVisible(int headersVisible)
854 // void gtk_tree_view_set_headers_visible (GtkTreeView *tree_view, gboolean headers_visible);
855 gtk_tree_view_set_headers_visible(gtkTreeView, headersVisible);
859 * Resizes all columns to their optimal width. Only works after the
860 * treeview has been realized.
861 * tree_view:
862 * A GtkTreeView.
864 public void columnsAutosize()
866 // void gtk_tree_view_columns_autosize (GtkTreeView *tree_view);
867 gtk_tree_view_columns_autosize(gtkTreeView);
871 * Returns whether all header columns are clickable.
872 * tree_view:
873 * A GtkTreeView.
874 * Returns:
875 * TRUE if all header columns are clickable, otherwise FALSE
876 * Since 2.10
878 public int getHeadersClickable()
880 // gboolean gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view);
881 return gtk_tree_view_get_headers_clickable(gtkTreeView);
885 * Allow the column title buttons to be clicked.
886 * tree_view:
887 * A GtkTreeView.
888 * setting:
889 * TRUE if the columns are clickable.
891 public void setHeadersClickable(int setting)
893 // void gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view, gboolean setting);
894 gtk_tree_view_set_headers_clickable(gtkTreeView, setting);
898 * This function tells GTK+ that the user interface for your
899 * application requires users to read across tree rows and associate
900 * cells with one another. By default, GTK+ will then render the tree
901 * with alternating row colors. Do not use it
902 * just because you prefer the appearance of the ruled tree; that's a
903 * question for the theme. Some themes will draw tree rows in
904 * alternating colors even when rules are turned off, and users who
905 * prefer that appearance all the time can choose those themes. You
906 * should call this function only as a semantic
907 * hint to the theme engine that your tree makes alternating colors
908 * useful from a functional standpoint (since it has lots of columns,
909 * generally).
910 * tree_view:
911 * a GtkTreeView
912 * setting:
913 * TRUE if the tree requires reading across rows
915 public void setRulesHint(int setting)
917 // void gtk_tree_view_set_rules_hint (GtkTreeView *tree_view, gboolean setting);
918 gtk_tree_view_set_rules_hint(gtkTreeView, setting);
922 * Gets the setting set by gtk_tree_view_set_rules_hint().
923 * tree_view:
924 * a GtkTreeView
925 * Returns:
926 * TRUE if rules are useful for the user of this tree
928 public int getRulesHint()
930 // gboolean gtk_tree_view_get_rules_hint (GtkTreeView *tree_view);
931 return gtk_tree_view_get_rules_hint(gtkTreeView);
935 * Appends column to the list of columns. If tree_view has "fixed_height"
936 * mode enabled, then column must have its "sizing" property set to be
937 * GTK_TREE_VIEW_COLUMN_FIXED.
938 * tree_view:
939 * A GtkTreeView.
940 * column:
941 * The GtkTreeViewColumn to add.
942 * Returns:
943 * The number of columns in tree_view after appending.
945 public int appendColumn(TreeViewColumn column)
947 // gint gtk_tree_view_append_column (GtkTreeView *tree_view, GtkTreeViewColumn *column);
948 return gtk_tree_view_append_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct());
952 * Removes column from tree_view.
953 * tree_view:
954 * A GtkTreeView.
955 * column:
956 * The GtkTreeViewColumn to remove.
957 * Returns:
958 * The number of columns in tree_view after removing.
960 public int removeColumn(TreeViewColumn column)
962 // gint gtk_tree_view_remove_column (GtkTreeView *tree_view, GtkTreeViewColumn *column);
963 return gtk_tree_view_remove_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct());
967 * This inserts the column into the tree_view at position. If position is
968 * -1, then the column is inserted at the end. If tree_view has
969 * "fixed_height" mode enabled, then column must have its "sizing" property
970 * set to be GTK_TREE_VIEW_COLUMN_FIXED.
971 * tree_view:
972 * A GtkTreeView.
973 * column:
974 * The GtkTreeViewColumn to be inserted.
975 * position:
976 * The position to insert column in.
977 * Returns:
978 * The number of columns in tree_view after insertion.
980 public int insertColumn(TreeViewColumn column, int position)
982 // gint gtk_tree_view_insert_column (GtkTreeView *tree_view, GtkTreeViewColumn *column, gint position);
983 return gtk_tree_view_insert_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct(), position);
987 * Creates a new GtkTreeViewColumn and inserts it into the tree_view at
988 * position. If position is -1, then the newly created column is inserted at
989 * the end. The column is initialized with the attributes given. If tree_view
990 * has "fixed_height" mode enabled, then the new column will have its sizing
991 * property set to be GTK_TREE_VIEW_COLUMN_FIXED.
992 * tree_view:
993 * A GtkTreeView
994 * position:
995 * The position to insert the new column in.
996 * title:
997 * The title to set the header to.
998 * cell:
999 * The GtkCellRenderer.
1000 * ...:
1001 * A NULL-terminated list of attributes.
1002 * Returns:
1003 * The number of columns in tree_view after insertion.
1005 public int insertColumnWithAttributes(int position, char[] title, CellRenderer cell, ... )
1007 // gint gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, gint position, const gchar *title, GtkCellRenderer *cell, ...);
1008 return gtk_tree_view_insert_column_with_attributes(gtkTreeView, position, Str.toStringz(title), (cell is null) ? null : cell.getCellRendererStruct());
1012 * Convenience function that inserts a new column into the GtkTreeView
1013 * with the given cell renderer and a GtkCellDataFunc to set cell renderer
1014 * attributes (normally using data from the model). See also
1015 * gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
1016 * If tree_view has "fixed_height" mode enabled, then the new column will have its
1017 * "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED.
1018 * tree_view:
1019 * a GtkTreeView
1020 * position:
1021 * Position to insert, -1 for append
1022 * title:
1023 * column title
1024 * cell:
1025 * cell renderer for column
1026 * func:
1027 * function to set attributes of cell renderer
1028 * data:
1029 * data for func
1030 * dnotify:
1031 * destroy notifier for data
1032 * Returns:
1033 * number of columns in the tree view post-insert
1035 public int insertColumnWithDataFunc(int position, char[] title, CellRenderer cell, GtkTreeCellDataFunc func, void* data, GDestroyNotify dnotify)
1037 // 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);
1038 return gtk_tree_view_insert_column_with_data_func(gtkTreeView, position, Str.toStringz(title), (cell is null) ? null : cell.getCellRendererStruct(), func, data, dnotify);
1042 * Gets the GtkTreeViewColumn at the given position in the tree_view.
1043 * tree_view:
1044 * A GtkTreeView.
1045 * n:
1046 * The position of the column, counting from 0.
1047 * Returns:
1048 * The GtkTreeViewColumn, or NULL if the position is outside the
1049 * range of columns.
1051 public TreeViewColumn getColumn(int n)
1053 // GtkTreeViewColumn* gtk_tree_view_get_column (GtkTreeView *tree_view, gint n);
1054 return new TreeViewColumn( gtk_tree_view_get_column(gtkTreeView, n) );
1058 * Returns a GList of all the GtkTreeViewColumn s currently in tree_view.
1059 * The returned list must be freed with g_list_free().
1060 * tree_view:
1061 * A GtkTreeView
1062 * Returns:
1063 * A list of GtkTreeViewColumn s
1065 public ListG getColumns()
1067 // GList* gtk_tree_view_get_columns (GtkTreeView *tree_view);
1068 return new ListG( gtk_tree_view_get_columns(gtkTreeView) );
1072 * Moves column to be after to base_column. If base_column is NULL, then
1073 * column is placed in the first position.
1074 * tree_view:
1075 * A GtkTreeView
1076 * column:
1077 * The GtkTreeViewColumn to be moved.
1078 * base_column:
1079 * The GtkTreeViewColumn to be moved relative to, or NULL.
1081 public void moveColumnAfter(TreeViewColumn column, TreeViewColumn baseColumn)
1083 // void gtk_tree_view_move_column_after (GtkTreeView *tree_view, GtkTreeViewColumn *column, GtkTreeViewColumn *base_column);
1084 gtk_tree_view_move_column_after(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct(), (baseColumn is null) ? null : baseColumn.getTreeViewColumnStruct());
1088 * Sets the column to draw the expander arrow at. It must be in tree_view.
1089 * If column is NULL, then the expander arrow is always at the first
1090 * visible column.
1091 * If you do not want expander arrow to appear in your tree, set the
1092 * expander column to a hidden column.
1093 * tree_view:
1094 * A GtkTreeView
1095 * column:
1096 * NULL, or the column to draw the expander arrow at.
1098 public void setExpanderColumn(TreeViewColumn column)
1100 // void gtk_tree_view_set_expander_column (GtkTreeView *tree_view, GtkTreeViewColumn *column);
1101 gtk_tree_view_set_expander_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct());
1105 * Returns the column that is the current expander column. This
1106 * column has the expander arrow drawn next to it.
1107 * tree_view:
1108 * A GtkTreeView
1109 * Returns:
1110 * The expander column.
1112 public TreeViewColumn getExpanderColumn()
1114 // GtkTreeViewColumn* gtk_tree_view_get_expander_column (GtkTreeView *tree_view);
1115 return new TreeViewColumn( gtk_tree_view_get_expander_column(gtkTreeView) );
1119 * Sets a user function for determining where a column may be dropped when
1120 * dragged. This function is called on every column pair in turn at the
1121 * beginning of a column drag to determine where a drop can take place. The
1122 * arguments passed to func are: the tree_view, the GtkTreeViewColumn being
1123 * dragged, the two GtkTreeViewColumn s determining the drop spot, and
1124 * user_data. If either of the GtkTreeViewColumn arguments for the drop spot
1125 * are NULL, then they indicate an edge. If func is set to be NULL, then
1126 * tree_view reverts to the default behavior of allowing all columns to be
1127 * dropped everywhere.
1128 * tree_view:
1129 * A GtkTreeView.
1130 * func:
1131 * A function to determine which columns are reorderable, or NULL.
1132 * user_data:
1133 * User data to be passed to func, or NULL
1134 * destroy:
1135 * Destroy notifier for user_data, or NULL
1137 public void setColumnDragFunction(GtkTreeViewColumnDropFunc func, void* userData, GtkDestroyNotify destroy)
1139 // void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view, GtkTreeViewColumnDropFunc func, gpointer user_data, GtkDestroyNotify destroy);
1140 gtk_tree_view_set_column_drag_function(gtkTreeView, func, userData, destroy);
1144 * Scrolls the tree view such that the top-left corner of the visible
1145 * area is tree_x, tree_y, where tree_x and tree_y are specified
1146 * in tree window coordinates. The tree_view must be realized before
1147 * this function is called. If it isn't, you probably want to be
1148 * using gtk_tree_view_scroll_to_cell().
1149 * If either tree_x or tree_y are -1, then that direction isn't scrolled.
1150 * tree_view:
1151 * a GtkTreeView
1152 * tree_x:
1153 * X coordinate of new top-left pixel of visible area, or -1
1154 * tree_y:
1155 * Y coordinate of new top-left pixel of visible area, or -1
1157 public void scrollToPoint(int treeX, int treeY)
1159 // void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view, gint tree_x, gint tree_y);
1160 gtk_tree_view_scroll_to_point(gtkTreeView, treeX, treeY);
1164 * Moves the alignments of tree_view to the position specified by column and
1165 * path. If column is NULL, then no horizontal scrolling occurs. Likewise,
1166 * if path is NULL no vertical scrolling occurs. At a minimum, one of column
1167 * or path need to be non-NULL. row_align determines where the row is
1168 * placed, and col_align determines where column is placed. Both are expected
1169 * to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
1170 * right/bottom alignment, 0.5 means center.
1171 * If use_align is FALSE, then the alignment arguments are ignored, and the
1172 * tree does the minimum amount of work to scroll the cell onto the screen.
1173 * This means that the cell will be scrolled to the edge closest to its current
1174 * position. If the cell is currently visible on the screen, nothing is done.
1175 * This function only works if the model is set, and path is a valid row on the
1176 * model. If the model changes before the tree_view is realized, the centered
1177 * path will be modified to reflect this change.
1178 * tree_view:
1179 * A GtkTreeView.
1180 * path:
1181 * The path of the row to move to, or NULL.
1182 * column:
1183 * The GtkTreeViewColumn to move horizontally to, or NULL.
1184 * use_align:
1185 * whether to use alignment arguments, or FALSE.
1186 * row_align:
1187 * The vertical alignment of the row specified by path.
1188 * col_align:
1189 * The horizontal alignment of the column specified by column.
1191 public void scrollToCell(TreePath path, TreeViewColumn column, int useAlign, float rowAlign, float colAlign)
1193 // void gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gboolean use_align, gfloat row_align, gfloat col_align);
1194 gtk_tree_view_scroll_to_cell(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct(), useAlign, rowAlign, colAlign);
1198 * Sets the current keyboard focus to be at path, and selects it. This is
1199 * useful when you want to focus the user's attention on a particular row. If
1200 * focus_column is not NULL, then focus is given to the column specified by
1201 * it. Additionally, if focus_column is specified, and start_editing is
1202 * TRUE, then editing should be started in the specified cell.
1203 * This function is often followed by gtk_widget_grab_focus (tree_view)
1204 * in order to give keyboard focus to the widget. Please note that editing
1205 * can only happen when the widget is realized.
1206 * tree_view:
1207 * A GtkTreeView
1208 * path:
1209 * A GtkTreePath
1210 * focus_column:
1211 * A GtkTreeViewColumn, or NULL
1212 * start_editing:
1213 * TRUE if the specified cell should start being edited.
1215 public void setCursor(TreePath path, TreeViewColumn focusColumn, int startEditing)
1217 // void gtk_tree_view_set_cursor (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *focus_column, gboolean start_editing);
1218 gtk_tree_view_set_cursor(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (focusColumn is null) ? null : focusColumn.getTreeViewColumnStruct(), startEditing);
1222 * Sets the current keyboard focus to be at path, and selects it. This is
1223 * useful when you want to focus the user's attention on a particular row. If
1224 * focus_column is not NULL, then focus is given to the column specified by
1225 * it. If focus_column and focus_cell are not NULL, and focus_column
1226 * contains 2 or more editable or activatable cells, then focus is given to
1227 * the cell specified by focus_cell. Additionally, if focus_column is
1228 * specified, and start_editing is TRUE, then editing should be started in
1229 * the specified cell. This function is often followed by
1230 * gtk_widget_grab_focus (tree_view) in order to give keyboard focus to the
1231 * widget. Please note that editing can only happen when the widget is
1232 * realized.
1233 * tree_view:
1234 * A GtkTreeView
1235 * path:
1236 * A GtkTreePath
1237 * focus_column:
1238 * A GtkTreeViewColumn, or NULL
1239 * focus_cell:
1240 * A GtkCellRenderer, or NULL
1241 * start_editing:
1242 * TRUE if the specified cell should start being edited.
1243 * Since 2.2
1245 public void setCursorOnCell(TreePath path, TreeViewColumn focusColumn, CellRenderer focusCell, int startEditing)
1247 // void gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *focus_column, GtkCellRenderer *focus_cell, gboolean start_editing);
1248 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);
1252 * Fills in path and focus_column with the current path and focus column. If
1253 * the cursor isn't currently set, then *path will be NULL. If no column
1254 * currently has focus, then *focus_column will be NULL.
1255 * The returned GtkTreePath must be freed with gtk_tree_path_free() when
1256 * you are done with it.
1257 * tree_view:
1258 * A GtkTreeView
1259 * path:
1260 * A pointer to be filled with the current cursor path, or NULL
1261 * focus_column:
1262 * A pointer to be filled with the current focus column, or NULL
1264 public void getCursor(GtkTreePath** path, GtkTreeViewColumn** focusColumn)
1266 // void gtk_tree_view_get_cursor (GtkTreeView *tree_view, GtkTreePath **path, GtkTreeViewColumn **focus_column);
1267 gtk_tree_view_get_cursor(gtkTreeView, path, focusColumn);
1271 * Activates the cell determined by path and column.
1272 * tree_view:
1273 * A GtkTreeView
1274 * path:
1275 * The GtkTreePath to be activated.
1276 * column:
1277 * The GtkTreeViewColumn to be activated.
1279 public void rowActivated(TreePath path, TreeViewColumn column)
1281 // void gtk_tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column);
1282 gtk_tree_view_row_activated(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct());
1286 * Recursively expands all nodes in the tree_view.
1287 * tree_view:
1288 * A GtkTreeView.
1290 public void expandAll()
1292 // void gtk_tree_view_expand_all (GtkTreeView *tree_view);
1293 gtk_tree_view_expand_all(gtkTreeView);
1297 * Recursively collapses all visible, expanded nodes in tree_view.
1298 * tree_view:
1299 * A GtkTreeView.
1301 public void collapseAll()
1303 // void gtk_tree_view_collapse_all (GtkTreeView *tree_view);
1304 gtk_tree_view_collapse_all(gtkTreeView);
1308 * Expands the row at path. This will also expand all parent rows of
1309 * path as necessary.
1310 * tree_view:
1311 * A GtkTreeView.
1312 * path:
1313 * path to a row.
1314 * Since 2.2
1316 public void expandToPath(TreePath path)
1318 // void gtk_tree_view_expand_to_path (GtkTreeView *tree_view, GtkTreePath *path);
1319 gtk_tree_view_expand_to_path(gtkTreeView, (path is null) ? null : path.getTreePathStruct());
1323 * Opens the row so its children are visible.
1324 * tree_view:
1325 * a GtkTreeView
1326 * path:
1327 * path to a row
1328 * open_all:
1329 * whether to recursively expand, or just expand immediate children
1330 * Returns:
1331 * TRUE if the row existed and had children
1333 public int expandRow(TreePath path, int openAll)
1335 // gboolean gtk_tree_view_expand_row (GtkTreeView *tree_view, GtkTreePath *path, gboolean open_all);
1336 return gtk_tree_view_expand_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), openAll);
1340 * Collapses a row (hides its child rows, if they exist).
1341 * tree_view:
1342 * a GtkTreeView
1343 * path:
1344 * path to a row in the tree_view
1345 * Returns:
1346 * TRUE if the row was collapsed.
1348 public int collapseRow(TreePath path)
1350 // gboolean gtk_tree_view_collapse_row (GtkTreeView *tree_view, GtkTreePath *path);
1351 return gtk_tree_view_collapse_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct());
1355 * Calls func on all expanded rows.
1356 * tree_view:
1357 * A GtkTreeView
1358 * func:
1359 * A function to be called
1360 * data:
1361 * User data to be passed to the function.
1363 public void mapExpandedRows(GtkTreeViewMappingFunc func, void* data)
1365 // void gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view, GtkTreeViewMappingFunc func, gpointer data);
1366 gtk_tree_view_map_expanded_rows(gtkTreeView, func, data);
1370 * Returns TRUE if the node pointed to by path is expanded in tree_view.
1371 * tree_view:
1372 * A GtkTreeView.
1373 * path:
1374 * A GtkTreePath to test expansion state.
1375 * Returns:
1376 * TRUE if path is expanded.
1378 public int rowExpanded(TreePath path)
1380 // gboolean gtk_tree_view_row_expanded (GtkTreeView *tree_view, GtkTreePath *path);
1381 return gtk_tree_view_row_expanded(gtkTreeView, (path is null) ? null : path.getTreePathStruct());
1385 * This function is a convenience function to allow you to reorder models that
1386 * support the GtkDragSourceIface and the GtkDragDestIface. Both
1387 * GtkTreeStore and GtkListStore support these. If reorderable is TRUE, then
1388 * the user can reorder the model by dragging and dropping rows. The
1389 * developer can listen to these changes by connecting to the model's
1390 * row_inserted and row_deleted signals.
1391 * This function does not give you any degree of control over the order -- any
1392 * reordering is allowed. If more control is needed, you should probably
1393 * handle drag and drop manually.
1394 * tree_view:
1395 * A GtkTreeView.
1396 * reorderable:
1397 * TRUE, if the tree can be reordered.
1399 public void setReorderable(int reorderable)
1401 // void gtk_tree_view_set_reorderable (GtkTreeView *tree_view, gboolean reorderable);
1402 gtk_tree_view_set_reorderable(gtkTreeView, reorderable);
1406 * Retrieves whether the user can reorder the tree via drag-and-drop. See
1407 * gtk_tree_view_set_reorderable().
1408 * tree_view:
1409 * a GtkTreeView
1410 * Returns:
1411 * TRUE if the tree can be reordered.
1413 public int getReorderable()
1415 // gboolean gtk_tree_view_get_reorderable (GtkTreeView *tree_view);
1416 return gtk_tree_view_get_reorderable(gtkTreeView);
1420 * Finds the path at the point (x, y), relative to widget coordinates. That
1421 * is, x and y are relative to an events coordinates. x and y must come
1422 * from an event on the tree_view only where event->window ==
1423 * gtk_tree_view_get_bin (). It is primarily for things
1424 * like popup menus. If path is non-NULL, then it will be filled with the
1425 * GtkTreePath at that point. This path should be freed with gtk_tree_path_free().
1426 * If column is non-NULL, then it will be filled with the column at that point.
1427 * cell_x and cell_y return the coordinates relative to the cell background
1428 * (i.e. the background_area passed to gtk_cell_renderer_render()). This
1429 * function is only meaningful if tree_view is realized.
1430 * tree_view:
1431 * A GtkTreeView.
1432 * x:
1433 * The x position to be identified.
1434 * y:
1435 * The y position to be identified.
1436 * path:
1437 * A pointer to a GtkTreePath pointer to be filled in, or NULL
1438 * column:
1439 * A pointer to a GtkTreeViewColumn pointer to be filled in, or NULL
1440 * cell_x:
1441 * A pointer where the X coordinate relative to the cell can be placed, or NULL
1442 * cell_y:
1443 * A pointer where the Y coordinate relative to the cell can be placed, or NULL
1444 * Returns:
1445 * TRUE if a row exists at that coordinate.
1447 public int getPathAtPos(int x, int y, GtkTreePath** path, GtkTreeViewColumn** column, int* cellX, int* cellY)
1449 // 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);
1450 return gtk_tree_view_get_path_at_pos(gtkTreeView, x, y, path, column, cellX, cellY);
1454 * Fills the bounding rectangle in tree window coordinates for the cell at the
1455 * row specified by path and the column specified by column. If path is
1456 * NULL, or points to a path not currently displayed, the y and height fields
1457 * of the rectangle will be filled with 0. If column is NULL, the x and width
1458 * fields will be filled with 0. The sum of all cell rects does not cover the
1459 * entire tree; there are extra pixels in between rows, for example. The
1460 * returned rectangle is equivalent to the cell_area passed to
1461 * gtk_cell_renderer_render(). This function is only valid if tree_view is
1462 * realized.
1463 * tree_view:
1464 * a GtkTreeView
1465 * path:
1466 * a GtkTreePath for the row, or NULL to get only horizontal coordinates
1467 * column:
1468 * a GtkTreeViewColumn for the column, or NULL to get only vertical coordinates
1469 * rect:
1470 * rectangle to fill with cell rect
1472 public void getCellArea(TreePath path, TreeViewColumn column, Rectangle rect)
1474 // void gtk_tree_view_get_cell_area (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, GdkRectangle *rect);
1475 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());
1479 * Fills the bounding rectangle in tree window coordinates for the cell at the
1480 * row specified by path and the column specified by column. If path is
1481 * NULL, or points to a node not found in the tree, the y and height fields of
1482 * the rectangle will be filled with 0. If column is NULL, the x and width
1483 * fields will be filled with 0. The returned rectangle is equivalent to the
1484 * background_area passed to gtk_cell_renderer_render(). These background
1485 * areas tile to cover the entire tree window (except for the area used for
1486 * header buttons). Contrast with the cell_area, returned by
1487 * gtk_tree_view_get_cell_area(), which returns only the cell itself, excluding
1488 * surrounding borders and the tree expander area.
1489 * tree_view:
1490 * a GtkTreeView
1491 * path:
1492 * a GtkTreePath for the row, or NULL to get only horizontal coordinates
1493 * column:
1494 * a GtkTreeViewColumn for the column, or NULL to get only vertical coordiantes
1495 * rect:
1496 * rectangle to fill with cell background rect
1498 public void getBackgroundArea(TreePath path, TreeViewColumn column, Rectangle rect)
1500 // void gtk_tree_view_get_background_area (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, GdkRectangle *rect);
1501 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());
1505 * Fills visible_rect with the currently-visible region of the
1506 * buffer, in tree coordinates. Convert to widget coordinates with
1507 * gtk_tree_view_tree_to_widget_coords(). Tree coordinates start at
1508 * 0,0 for row 0 of the tree, and cover the entire scrollable area of
1509 * the tree.
1510 * tree_view:
1511 * a GtkTreeView
1512 * visible_rect:
1513 * rectangle to fill
1515 public void getVisibleRect(Rectangle visibleRect)
1517 // void gtk_tree_view_get_visible_rect (GtkTreeView *tree_view, GdkRectangle *visible_rect);
1518 gtk_tree_view_get_visible_rect(gtkTreeView, (visibleRect is null) ? null : visibleRect.getRectangleStruct());
1522 * Sets start_path and end_path to be the first and last visible path.
1523 * Note that there may be invisible paths in between.
1524 * The paths should be freed with gtk_tree_path_free() after use.
1525 * tree_view:
1526 * A GtkTreeView
1527 * start_path:
1528 * Return location for start of region, or NULL.
1529 * end_path:
1530 * Return location for end of region, or NULL.
1531 * Returns:
1532 * TRUE, if valid paths were placed in start_path and end_path.
1533 * Since 2.8
1535 public int getVisibleRange(GtkTreePath** startPath, GtkTreePath** endPath)
1537 // gboolean gtk_tree_view_get_visible_range (GtkTreeView *tree_view, GtkTreePath **start_path, GtkTreePath **end_path);
1538 return gtk_tree_view_get_visible_range(gtkTreeView, startPath, endPath);
1542 * Returns the window that tree_view renders to. This is used primarily to
1543 * compare to event->window to confirm that the event on
1544 * tree_view is on the right window.
1545 * tree_view:
1546 * A GtkTreeView
1547 * Returns:
1548 * A GdkWindow, or NULL when tree_view hasn't been realized yet
1550 public Window getBinWindow()
1552 // GdkWindow* gtk_tree_view_get_bin_window (GtkTreeView *tree_view);
1553 return new Window( gtk_tree_view_get_bin_window(gtkTreeView) );
1557 * Converts widget coordinates to coordinates for the
1558 * tree window (the full scrollable area of the tree).
1559 * tree_view:
1560 * a GtkTreeView
1561 * wx:
1562 * widget X coordinate
1563 * wy:
1564 * widget Y coordinate
1565 * tx:
1566 * return location for tree X coordinate
1567 * ty:
1568 * return location for tree Y coordinate
1570 public void widgetToTreeCoords(int wx, int wy, int* tx, int* ty)
1572 // void gtk_tree_view_widget_to_tree_coords (GtkTreeView *tree_view, gint wx, gint wy, gint *tx, gint *ty);
1573 gtk_tree_view_widget_to_tree_coords(gtkTreeView, wx, wy, tx, ty);
1577 * Converts tree coordinates (coordinates in full scrollable area of the tree)
1578 * to widget coordinates.
1579 * tree_view:
1580 * a GtkTreeView
1581 * tx:
1582 * tree X coordinate
1583 * ty:
1584 * tree Y coordinate
1585 * wx:
1586 * return location for widget X coordinate
1587 * wy:
1588 * return location for widget Y coordinate
1590 public void treeToWidgetCoords(int tx, int ty, int* wx, int* wy)
1592 // void gtk_tree_view_tree_to_widget_coords (GtkTreeView *tree_view, gint tx, gint ty, gint *wx, gint *wy);
1593 gtk_tree_view_tree_to_widget_coords(gtkTreeView, tx, ty, wx, wy);
1597 * Turns tree_view into a drop destination for automatic DND.
1598 * tree_view:
1599 * a GtkTreeView
1600 * targets:
1601 * the table of targets that the drag will support
1602 * n_targets:
1603 * the number of items in targets
1604 * actions:
1605 * the bitmask of possible actions for a drag from this
1606 * widget
1608 public void enableModelDragDest(GtkTargetEntry* targets, int nTargets, GdkDragAction actions)
1610 // void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions);
1611 gtk_tree_view_enable_model_drag_dest(gtkTreeView, targets, nTargets, actions);
1615 * Turns tree_view into a drag source for automatic DND.
1616 * tree_view:
1617 * a GtkTreeView
1618 * start_button_mask:
1619 * Mask of allowed buttons to start drag
1620 * targets:
1621 * the table of targets that the drag will support
1622 * n_targets:
1623 * the number of items in targets
1624 * actions:
1625 * the bitmask of possible actions for a drag from this
1626 * widget
1628 public void enableModelDragSource(GdkModifierType startButtonMask, GtkTargetEntry* targets, int nTargets, GdkDragAction actions)
1630 // void gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions);
1631 gtk_tree_view_enable_model_drag_source(gtkTreeView, startButtonMask, targets, nTargets, actions);
1635 * Undoes the effect of gtk_tree_view_enable_model_drag_source().
1636 * tree_view:
1637 * a GtkTreeView
1639 public void unsetRowsDragSource()
1641 // void gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view);
1642 gtk_tree_view_unset_rows_drag_source(gtkTreeView);
1646 * Undoes the effect of gtk_tree_view_enable_model_drag_dest().
1647 * tree_view:
1648 * a GtkTreeView
1650 public void unsetRowsDragDest()
1652 // void gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view);
1653 gtk_tree_view_unset_rows_drag_dest(gtkTreeView);
1657 * Sets the row that is highlighted for feedback.
1658 * tree_view:
1659 * a GtkTreeView
1660 * path:
1661 * The path of the row to highlight, or NULL.
1662 * pos:
1663 * Specifies whether to drop before, after or into the row
1665 public void setDragDestRow(TreePath path, GtkTreeViewDropPosition pos)
1667 // void gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewDropPosition pos);
1668 gtk_tree_view_set_drag_dest_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), pos);
1672 * Gets information about the row that is highlighted for feedback.
1673 * tree_view:
1674 * a GtkTreeView
1675 * path:
1676 * Return location for the path of the highlighted row, or NULL.
1677 * pos:
1678 * Return location for the drop position, or NULL
1680 public void getDragDestRow(GtkTreePath** path, GtkTreeViewDropPosition* pos)
1682 // void gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view, GtkTreePath **path, GtkTreeViewDropPosition *pos);
1683 gtk_tree_view_get_drag_dest_row(gtkTreeView, path, pos);
1687 * Determines the destination row for a given position.
1688 * tree_view:
1689 * a GtkTreeView
1690 * drag_x:
1691 * the position to determine the destination row for
1692 * drag_y:
1693 * the position to determine the destination row for
1694 * path:
1695 * Return location for the path of the highlighted row, or NULL.
1696 * pos:
1697 * Return location for the drop position, or NULL
1698 * Returns:
1699 * whether there is a row at the given position.
1701 public int getDestRowAtPos(int dragX, int dragY, GtkTreePath** path, GtkTreeViewDropPosition* pos)
1703 // gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view, gint drag_x, gint drag_y, GtkTreePath **path, GtkTreeViewDropPosition *pos);
1704 return gtk_tree_view_get_dest_row_at_pos(gtkTreeView, dragX, dragY, path, pos);
1708 * Creates a GdkPixmap representation of the row at path.
1709 * This image is used for a drag icon.
1710 * tree_view:
1711 * a GtkTreeView
1712 * path:
1713 * a GtkTreePath in tree_view
1714 * Returns:
1715 * a newly-allocated pixmap of the drag icon.
1717 public Pixmap createRowDragIcon(TreePath path)
1719 // GdkPixmap* gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view, GtkTreePath *path);
1720 return new Pixmap( gtk_tree_view_create_row_drag_icon(gtkTreeView, (path is null) ? null : path.getTreePathStruct()) );
1724 * If enable_search is set, then the user can type in text to search through
1725 * the tree interactively (this is sometimes called "typeahead find").
1726 * Note that even if this is FALSE, the user can still initiate a search
1727 * using the "start-interactive-search" key binding.
1728 * tree_view:
1729 * A GtkTreeView
1730 * enable_search:
1731 * TRUE, if the user can search interactively
1733 public void setEnableSearch(int enableSearch)
1735 // void gtk_tree_view_set_enable_search (GtkTreeView *tree_view, gboolean enable_search);
1736 gtk_tree_view_set_enable_search(gtkTreeView, enableSearch);
1740 * Returns whether or not the tree allows to start interactive searching
1741 * by typing in text.
1742 * tree_view:
1743 * A GtkTreeView
1744 * Returns:
1745 * whether or not to let the user search interactively
1747 public int getEnableSearch()
1749 // gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view);
1750 return gtk_tree_view_get_enable_search(gtkTreeView);
1754 * Gets the column searched on by the interactive search code.
1755 * tree_view:
1756 * A GtkTreeView
1757 * Returns:
1758 * the column the interactive search code searches in.
1760 public int getSearchColumn()
1762 // gint gtk_tree_view_get_search_column (GtkTreeView *tree_view);
1763 return gtk_tree_view_get_search_column(gtkTreeView);
1767 * Sets column as the column where the interactive search code should
1768 * search in.
1769 * If the sort column is set, users can use the "start-interactive-search"
1770 * key binding to bring up search popup. The enable-search property controls
1771 * whether simply typing text will also start an interactive search.
1772 * Note that column refers to a column of the model.
1773 * tree_view:
1774 * A GtkTreeView
1775 * column:
1776 * the column of the model to search in, or -1 to disable searching
1778 public void setSearchColumn(int column)
1780 // void gtk_tree_view_set_search_column (GtkTreeView *tree_view, gint column);
1781 gtk_tree_view_set_search_column(gtkTreeView, column);
1785 * Returns the compare function currently in use.
1786 * tree_view:
1787 * A GtkTreeView
1788 * Returns:
1789 * the currently used compare function for the search code.
1791 public GtkTreeViewSearchEqualFunc getSearchEqualFunc()
1793 // GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view);
1794 return gtk_tree_view_get_search_equal_func(gtkTreeView);
1798 * Sets the compare function for the interactive search capabilities; note
1799 * that somewhat like strcmp() returning 0 for equality
1800 * GtkTreeViewSearchEqualFunc returns FALSE on matches.
1801 * tree_view:
1802 * A GtkTreeView
1803 * search_equal_func:
1804 * the compare function to use during the search
1805 * search_user_data:
1806 * user data to pass to search_equal_func, or NULL
1807 * search_destroy:
1808 * Destroy notifier for search_user_data, or NULL
1810 public void setSearchEqualFunc(GtkTreeViewSearchEqualFunc searchEqualFunc, void* searchUserData, GtkDestroyNotify searchDestroy)
1812 // void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view, GtkTreeViewSearchEqualFunc search_equal_func, gpointer search_user_data, GtkDestroyNotify search_destroy);
1813 gtk_tree_view_set_search_equal_func(gtkTreeView, searchEqualFunc, searchUserData, searchDestroy);
1817 * Returns the GtkEntry which is currently in use as interactive search
1818 * entry for tree_view. In case the built-in entry is being used, NULL
1819 * will be returned.
1820 * tree_view:
1821 * A GtkTreeView
1822 * Returns:
1823 * the entry currently in use as search entry.
1824 * Since 2.10
1826 public GtkEntry* getSearchEntry()
1828 // GtkEntry* gtk_tree_view_get_search_entry (GtkTreeView *tree_view);
1829 return gtk_tree_view_get_search_entry(gtkTreeView);
1833 * Sets the entry which the interactive search code will use for this
1834 * tree_view. This is useful when you want to provide a search entry
1835 * in our interface at all time at a fixed position. Passing NULL for
1836 * entry will make the interactive search code use the built-in popup
1837 * entry again.
1838 * tree_view:
1839 * A GtkTreeView
1840 * entry:
1841 * the entry the interactive search code of tree_view should use or NULL
1842 * Since 2.10
1844 public void setSearchEntry(GtkEntry* entry)
1846 // void gtk_tree_view_set_search_entry (GtkTreeView *tree_view, GtkEntry *entry);
1847 gtk_tree_view_set_search_entry(gtkTreeView, entry);
1852 * Returns the positioning function currently in use.
1853 * tree_view:
1854 * A GtkTreeView
1855 * Returns:
1856 * the currently used function for positioning the search dialog.
1857 * Since 2.10
1859 public GtkTreeViewSearchPositionFunc getSearchPositionFunc()
1861 // GtkTreeViewSearchPositionFunc gtk_tree_view_get_search_position_func (GtkTreeView *tree_view);
1862 return gtk_tree_view_get_search_position_func(gtkTreeView);
1866 * Sets the function to use when positioning the seach dialog.
1867 * tree_view:
1868 * A GtkTreeView
1869 * func:
1870 * the function to use to position the search dialog, or NULL
1871 * to use the default search position function
1872 * data:
1873 * user data to pass to func, or NULL
1874 * destroy:
1875 * Destroy notifier for data, or NULL
1876 * Since 2.10
1878 public void setSearchPositionFunc(GtkTreeViewSearchPositionFunc func, void* data, GDestroyNotify destroy)
1880 // void gtk_tree_view_set_search_position_func (GtkTreeView *tree_view, GtkTreeViewSearchPositionFunc func, gpointer data, GDestroyNotify destroy);
1881 gtk_tree_view_set_search_position_func(gtkTreeView, func, data, destroy);
1885 * Returns whether fixed height mode is turned on for tree_view.
1886 * tree_view:
1887 * a GtkTreeView
1888 * Returns:
1889 * TRUE if tree_view is in fixed height mode
1890 * Since 2.6
1892 public int getFixedHeightMode()
1894 // gboolean gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view);
1895 return gtk_tree_view_get_fixed_height_mode(gtkTreeView);
1899 * Enables or disables the fixed height mode of tree_view.
1900 * Fixed height mode speeds up GtkTreeView by assuming that all
1901 * rows have the same height.
1902 * Only enable this option if all rows are the same height and all
1903 * columns are of type GTK_TREE_VIEW_COLUMN_FIXED.
1904 * tree_view:
1905 * a GtkTreeView
1906 * enable:
1907 * TRUE to enable fixed height mode
1908 * Since 2.6
1910 public void setFixedHeightMode(int enable)
1912 // void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view, gboolean enable);
1913 gtk_tree_view_set_fixed_height_mode(gtkTreeView, enable);
1917 * Returns whether hover selection mode is turned on for tree_view.
1918 * tree_view:
1919 * a GtkTreeView
1920 * Returns:
1921 * TRUE if tree_view is in hover selection mode
1922 * Since 2.6
1924 public int getHoverSelection()
1926 // gboolean gtk_tree_view_get_hover_selection (GtkTreeView *tree_view);
1927 return gtk_tree_view_get_hover_selection(gtkTreeView);
1931 * Enables of disables the hover selection mode of tree_view.
1932 * Hover selection makes the selected row follow the pointer.
1933 * Currently, this works only for the selection modes
1934 * GTK_SELECTION_SINGLE and GTK_SELECTION_BROWSE.
1935 * tree_view:
1936 * a GtkTreeView
1937 * hover:
1938 * TRUE to enable hover selection mode
1939 * Since 2.6
1941 public void setHoverSelection(int hover)
1943 // void gtk_tree_view_set_hover_selection (GtkTreeView *tree_view, gboolean hover);
1944 gtk_tree_view_set_hover_selection(gtkTreeView, hover);
1948 * Returns whether hover expansion mode is turned on for tree_view.
1949 * tree_view:
1950 * a GtkTreeView
1951 * Returns:
1952 * TRUE if tree_view is in hover expansion mode
1953 * Since 2.6
1955 public int getHoverExpand()
1957 // gboolean gtk_tree_view_get_hover_expand (GtkTreeView *tree_view);
1958 return gtk_tree_view_get_hover_expand(gtkTreeView);
1962 * Enables of disables the hover expansion mode of tree_view.
1963 * Hover expansion makes rows expand or collaps if the pointer
1964 * moves over them.
1965 * tree_view:
1966 * a GtkTreeView
1967 * expand:
1968 * TRUE to enable hover selection mode
1969 * Since 2.6
1971 public void setHoverExpand(int expand)
1973 // void gtk_tree_view_set_hover_expand (GtkTreeView *tree_view, gboolean expand);
1974 gtk_tree_view_set_hover_expand(gtkTreeView, expand);
1979 * This function should almost never be used. It is meant for private use by
1980 * ATK for determining the number of visible children that are removed when the
1981 * user collapses a row, or a row is deleted.
1982 * tree_view:
1983 * A GtkTreeView
1984 * func:
1985 * Function to be called when a view row is destroyed, or NULL
1986 * data:
1987 * User data to be passed to func, or NULL
1988 * destroy:
1989 * Destroy notifier for data, or NULL
1991 public void setDestroyCountFunc(GtkTreeDestroyCountFunc func, void* data, GtkDestroyNotify destroy)
1993 // void gtk_tree_view_set_destroy_count_func (GtkTreeView *tree_view, GtkTreeDestroyCountFunc func, gpointer data, GtkDestroyNotify destroy);
1994 gtk_tree_view_set_destroy_count_func(gtkTreeView, func, data, destroy);
1999 * Returns the current row separator function.
2000 * tree_view:
2001 * a GtkTreeView
2002 * Returns:
2003 * the current row separator function.
2004 * Since 2.6
2006 public GtkTreeViewRowSeparatorFunc getRowSeparatorFunc()
2008 // GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view);
2009 return gtk_tree_view_get_row_separator_func(gtkTreeView);
2013 * Sets the row separator function, which is used to determine
2014 * whether a row should be drawn as a separator. If the row separator
2015 * function is NULL, no separators are drawn. This is the default value.
2016 * tree_view:
2017 * a GtkTreeView
2018 * func:
2019 * a GtkTreeViewRowSeparatorFunc
2020 * data:
2021 * user data to pass to func, or NULL
2022 * destroy:
2023 * destroy notifier for data, or NULL
2024 * Since 2.6
2026 public void setRowSeparatorFunc(GtkTreeViewRowSeparatorFunc func, void* data, GtkDestroyNotify destroy)
2028 // void gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view, GtkTreeViewRowSeparatorFunc func, gpointer data, GtkDestroyNotify destroy);
2029 gtk_tree_view_set_row_separator_func(gtkTreeView, func, data, destroy);
2033 * Returns whether rubber banding is turned on for tree_view. If the
2034 * selection mode is GTK_SELECTION_MULTIPLE, rubber banding will allow the
2035 * user to select multiple rows by dragging the mouse.
2036 * tree_view:
2037 * a GtkTreeView
2038 * Returns:
2039 * TRUE if rubber banding in tree_view is enabled.
2040 * Since 2.10
2042 public int getRubberBanding()
2044 // gboolean gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view);
2045 return gtk_tree_view_get_rubber_banding(gtkTreeView);
2049 * Enables or disables rubber banding in tree_view. If the selection mode
2050 * is GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
2051 * multiple rows by dragging the mouse.
2052 * tree_view:
2053 * a GtkTreeView
2054 * enable:
2055 * TRUE to enable rubber banding
2056 * Since 2.10
2058 public void setRubberBanding(int enable)
2060 // void gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view, gboolean enable);
2061 gtk_tree_view_set_rubber_banding(gtkTreeView, enable);
2065 * Returns whether or not tree lines are drawn in tree_view.
2066 * tree_view:
2067 * a GtkTreeView.
2068 * Returns:
2069 * TRUE if tree lines are drawn in tree_view, FALSE
2070 * otherwise.
2071 * Since 2.10
2073 public int getEnableTreeLines()
2075 // gboolean gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view);
2076 return gtk_tree_view_get_enable_tree_lines(gtkTreeView);
2080 * Sets whether to draw lines interconnecting the expanders in tree_view.
2081 * This does not have any visible effects for lists.
2082 * tree_view:
2083 * a GtkTreeView
2084 * enabled:
2085 * TRUE to enable tree line drawing, FALSE otherwise.
2086 * Since 2.10
2088 public void setEnableTreeLines(int enabled)
2090 // void gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view, gboolean enabled);
2091 gtk_tree_view_set_enable_tree_lines(gtkTreeView, enabled);
2096 * Returns which grid lines are enabled in tree_view.
2097 * tree_view:
2098 * a GtkTreeView
2099 * Returns:
2100 * a GtkTreeViewGridLines value indicating which grid lines
2101 * are enabled.
2102 * Since 2.10
2104 public GtkTreeViewGridLines getGridLines()
2106 // GtkTreeViewGridLines gtk_tree_view_get_grid_lines (GtkTreeView *tree_view);
2107 return gtk_tree_view_get_grid_lines(gtkTreeView);
2111 * Sets which grid lines to draw in tree_view.
2112 * tree_view:
2113 * a GtkTreeView
2114 * grid_lines:
2115 * a GtkTreeViewGridLines value indicating which grid lines to
2116 * enable.
2117 * Since 2.10
2118 * Property Details
2119 * The "enable-grid-lines" property
2120 * "enable-grid-lines" GtkTreeViewGridLines : Read / Write
2121 * Whether grid lines should be drawn in the tree view.
2122 * Default value: GTK_TREE_VIEW_GRID_LINES_NONE
2124 public void setGridLines(GtkTreeViewGridLines gridLines)
2126 // void gtk_tree_view_set_grid_lines (GtkTreeView *tree_view, GtkTreeViewGridLines grid_lines);
2127 gtk_tree_view_set_grid_lines(gtkTreeView, gridLines);