alternative to assert
[gtkD.git] / gtkD / src / gtk / TreeView.d
blobb666403f357d4f541652252d83cbd58d551e6130
1 /*
2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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 * module aliases:
69 * local aliases:
72 module gtk.TreeView;
74 version(noAssert)
76 version(Tango)
78 import tango.io.Stdout; // use the tango loging?
82 private import gtkc.gtktypes;
84 private import gtkc.gtk;
87 private import glib.Str;
88 private import gtk.TreeModel;
89 private import gtk.TreeSelection;
90 private import gtk.Adjustment;
91 private import gtk.TreeViewColumn;
92 private import gtk.CellRenderer;
93 private import glib.ListG;
94 private import gtk.TreePath;
95 private import gdk.Rectangle;
96 private import gdk.Window;
97 private import gdk.Pixmap;
98 private import gtk.TreeIter;
104 * Description
105 * Widget that displays any object that implements the GtkTreeModel interface.
106 * Please refer to the tree widget conceptual overview
107 * for an overview of all the objects and data types related to the tree widget and how
108 * they work together.
110 private import gtk.Container;
111 public class TreeView : Container
114 /** the main Gtk struct */
115 protected GtkTreeView* gtkTreeView;
118 public GtkTreeView* getTreeViewStruct()
120 return gtkTreeView;
124 /** the main Gtk struct as a void* */
125 protected void* getStruct()
127 return cast(void*)gtkTreeView;
131 * Sets our main struct and passes it to the parent class
133 public this (GtkTreeView* gtkTreeView)
135 version(noAssert)
137 if ( gtkTreeView is null )
139 int zero = 0;
140 version(Tango)
142 Stdout("struct gtkTreeView is null on constructor").newline;
144 else
146 printf("struct gtkTreeView is null on constructor");
148 zero = zero / zero;
151 else
153 assert(gtkTreeView !is null, "struct gtkTreeView is null on constructor");
155 super(cast(GtkContainer*)gtkTreeView);
156 this.gtkTreeView = gtkTreeView;
160 * Expands the row of the iter.
161 * @param iter
162 * @param openAll
163 * @return
165 int expandRow(TreeIter iter, TreeModel model, int openAll)
167 return expandRow(model.getPath(iter), openAll);
171 * Finds the path at the point (x, y), relative to widget coordinates. That
172 * is, x and y are relative to an events coordinates. x and y must come
173 * from an event on the tree_view only where event->window ==
174 * gtk_tree_view_get_bin (). It is primarily for things
175 * like popup menus. If path is non-NULL, then it will be filled with the
176 * GtkTreePath at that point. This path should be freed with gtk_tree_path_free().
177 * If column is non-NULL, then it will be filled with the column at that point.
178 * cell_x and cell_y return the coordinates relative to the cell background
179 * (i.e. the background_area passed to gtk_cell_renderer_render()). This
180 * function is only meaningful if tree_view is realized.
181 * tree_view:
182 * A GtkTreeView.
183 * x:
184 * The x position to be identified.
185 * y:
186 * The y position to be identified.
187 * path:
188 * A pointer to a GtkTreePath pointer to be filled in, or NULL
189 * column:
190 * A pointer to a GtkTreeViewColumn pointer to be filled in, or NULL
191 * cell_x:
192 * A pointer where the X coordinate relative to the cell can be placed, or NULL
193 * cell_y:
194 * A pointer where the Y coordinate relative to the cell can be placed, or NULL
195 * Returns:
196 * TRUE if a row exists at that coordinate.
198 int getPathAtPos(gint x, gint y, inout TreePath path, inout TreeViewColumn column, out gint cellX, out gint cellY)
200 GtkTreePath* p = path.getTreePathStruct();
201 GtkTreeViewColumn* c = column.getTreeViewColumnStruct();
203 int result = gtk_tree_view_get_path_at_pos(gtkTreeView, x, y, &p, &c, &cellX, &cellY)
204 == 0 ? false : true;
206 path = new TreePath(p);
207 column = new TreeViewColumn(c);
209 return result;
215 * gets the first selected iter or null if no rows are selected
217 TreeIter getSelectedIter()
219 TreeIter iter = new TreeIter();
220 TreeSelection selection = getSelection();
221 TreeModel model = getModel();
222 TreePath[] paths = selection.getSelectedRows(model);
223 if ( paths.length > 0 )
225 model.getIter(iter,paths[0]);
227 return iter;
230 TreeIter[] getSelectedIters()
232 TreeIter[] iters;
234 TreeIter iter = new TreeIter();
235 TreeSelection selection = getSelection();
236 TreeModel model = getModel();
237 TreePath[] paths = selection.getSelectedRows(model);
238 foreach ( TreePath p; selection.getSelectedRows(model) )
240 //iters.length = iters.length+1;
241 //iters[iters.length-1] = model.getIter(iter,p);
242 // iters ~= model.getIter(iter,p); >>> compile error can only concatenate arrays ???
243 if ( model.getIter(iter,p) )
245 iters ~= iter;
246 iter = new TreeIter();
250 //printf("TreeView.getSelectedIters iters.lenght = %d\n", iters.length);
251 return iters;
255 * Inserts a column and sets it's attributes
256 * @param position
257 * @param title
258 * @param renderer
259 * @param editable
260 * @return number of columns including the new one
262 gint insertEditableColumn(int position, char[] title, CellRenderer renderer, bool editable)
264 // OK, this is a trick because of my ignorance on how to pass variable argument lists
265 if ( position < 0 )
267 position = getColumns().length();
269 int tot = gtk_tree_view_insert_column_with_attributes(
270 gtkTreeView,
271 position,
272 Str.toStringz(title),
273 renderer.getCellRendererStruct(),
274 Str.toStringz("text"),position,//v1.getV(),
275 Str.toStringz("editable"),2,0);//v.getV(),0);
276 return tot;
285 // imports for the signal processing
286 private import gobject.Signals;
287 private import gtkc.gdktypes;
288 int[char[]] connectedSignals;
290 void delegate(TreeView)[] onColumnsChangedListeners;
291 void addOnColumnsChanged(void delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
293 if ( !("columns-changed" in connectedSignals) )
295 Signals.connectData(
296 getStruct(),
297 "columns-changed",
298 cast(GCallback)&callBackColumnsChanged,
299 cast(void*)this,
300 null,
301 connectFlags);
302 connectedSignals["columns-changed"] = 1;
304 onColumnsChangedListeners ~= dlg;
306 extern(C) static void callBackColumnsChanged(GtkTreeView* treeViewStruct, TreeView treeView)
308 bool consumed = false;
310 foreach ( void delegate(TreeView) dlg ; treeView.onColumnsChangedListeners )
312 dlg(treeView);
315 return consumed;
318 void delegate(TreeView)[] onCursorChangedListeners;
319 void addOnCursorChanged(void delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
321 if ( !("cursor-changed" in connectedSignals) )
323 Signals.connectData(
324 getStruct(),
325 "cursor-changed",
326 cast(GCallback)&callBackCursorChanged,
327 cast(void*)this,
328 null,
329 connectFlags);
330 connectedSignals["cursor-changed"] = 1;
332 onCursorChangedListeners ~= dlg;
334 extern(C) static void callBackCursorChanged(GtkTreeView* treeViewStruct, TreeView treeView)
336 bool consumed = false;
338 foreach ( void delegate(TreeView) dlg ; treeView.onCursorChangedListeners )
340 dlg(treeView);
343 return consumed;
346 gboolean delegate(gboolean, gboolean, gboolean, TreeView)[] onExpandCollapseCursorRowListeners;
347 void addOnExpandCollapseCursorRow(gboolean delegate(gboolean, gboolean, gboolean, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
349 if ( !("expand-collapse-cursor-row" in connectedSignals) )
351 Signals.connectData(
352 getStruct(),
353 "expand-collapse-cursor-row",
354 cast(GCallback)&callBackExpandCollapseCursorRow,
355 cast(void*)this,
356 null,
357 connectFlags);
358 connectedSignals["expand-collapse-cursor-row"] = 1;
360 onExpandCollapseCursorRowListeners ~= dlg;
362 extern(C) static void callBackExpandCollapseCursorRow(GtkTreeView* treeviewStruct, gboolean arg1, gboolean arg2, gboolean arg3, TreeView treeView)
364 bool consumed = false;
366 foreach ( gboolean delegate(gboolean, gboolean, gboolean, TreeView) dlg ; treeView.onExpandCollapseCursorRowListeners )
368 dlg(arg1, arg2, arg3, treeView);
371 return consumed;
374 gboolean delegate(GtkMovementStep, gint, TreeView)[] onMoveCursorListeners;
375 void addOnMoveCursor(gboolean delegate(GtkMovementStep, gint, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
377 if ( !("move-cursor" in connectedSignals) )
379 Signals.connectData(
380 getStruct(),
381 "move-cursor",
382 cast(GCallback)&callBackMoveCursor,
383 cast(void*)this,
384 null,
385 connectFlags);
386 connectedSignals["move-cursor"] = 1;
388 onMoveCursorListeners ~= dlg;
390 extern(C) static void callBackMoveCursor(GtkTreeView* treeviewStruct, GtkMovementStep arg1, gint arg2, TreeView treeView)
392 bool consumed = false;
394 foreach ( gboolean delegate(GtkMovementStep, gint, TreeView) dlg ; treeView.onMoveCursorListeners )
396 dlg(arg1, arg2, treeView);
399 return consumed;
402 void delegate(TreePath, TreeViewColumn, TreeView)[] onRowActivatedListeners;
403 void addOnRowActivated(void delegate(TreePath, TreeViewColumn, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
405 if ( !("row-activated" in connectedSignals) )
407 Signals.connectData(
408 getStruct(),
409 "row-activated",
410 cast(GCallback)&callBackRowActivated,
411 cast(void*)this,
412 null,
413 connectFlags);
414 connectedSignals["row-activated"] = 1;
416 onRowActivatedListeners ~= dlg;
418 extern(C) static void callBackRowActivated(GtkTreeView* treeViewStruct, GtkTreePath* path, GtkTreeViewColumn* column, TreeView treeView)
420 bool consumed = false;
422 foreach ( void delegate(TreePath, TreeViewColumn, TreeView) dlg ; treeView.onRowActivatedListeners )
424 dlg(new TreePath(path), new TreeViewColumn(column), treeView);
427 return consumed;
430 void delegate(GtkTreeIter*, TreePath, TreeView)[] onRowCollapsedListeners;
431 void addOnRowCollapsed(void delegate(GtkTreeIter*, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
433 if ( !("row-collapsed" in connectedSignals) )
435 Signals.connectData(
436 getStruct(),
437 "row-collapsed",
438 cast(GCallback)&callBackRowCollapsed,
439 cast(void*)this,
440 null,
441 connectFlags);
442 connectedSignals["row-collapsed"] = 1;
444 onRowCollapsedListeners ~= dlg;
446 extern(C) static void callBackRowCollapsed(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
448 bool consumed = false;
450 foreach ( void delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onRowCollapsedListeners )
452 dlg(iter, new TreePath(path), treeView);
455 return consumed;
458 void delegate(GtkTreeIter*, TreePath, TreeView)[] onRowExpandedListeners;
459 void addOnRowExpanded(void delegate(GtkTreeIter*, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
461 if ( !("row-expanded" in connectedSignals) )
463 Signals.connectData(
464 getStruct(),
465 "row-expanded",
466 cast(GCallback)&callBackRowExpanded,
467 cast(void*)this,
468 null,
469 connectFlags);
470 connectedSignals["row-expanded"] = 1;
472 onRowExpandedListeners ~= dlg;
474 extern(C) static void callBackRowExpanded(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
476 bool consumed = false;
478 foreach ( void delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onRowExpandedListeners )
480 dlg(iter, new TreePath(path), treeView);
483 return consumed;
486 gboolean delegate(TreeView)[] onSelectAllListeners;
487 void addOnSelectAll(gboolean delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
489 if ( !("select-all" in connectedSignals) )
491 Signals.connectData(
492 getStruct(),
493 "select-all",
494 cast(GCallback)&callBackSelectAll,
495 cast(void*)this,
496 null,
497 connectFlags);
498 connectedSignals["select-all"] = 1;
500 onSelectAllListeners ~= dlg;
502 extern(C) static void callBackSelectAll(GtkTreeView* treeviewStruct, TreeView treeView)
504 bool consumed = false;
506 foreach ( gboolean delegate(TreeView) dlg ; treeView.onSelectAllListeners )
508 dlg(treeView);
511 return consumed;
514 gboolean delegate(TreeView)[] onSelectCursorParentListeners;
515 void addOnSelectCursorParent(gboolean delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
517 if ( !("select-cursor-parent" in connectedSignals) )
519 Signals.connectData(
520 getStruct(),
521 "select-cursor-parent",
522 cast(GCallback)&callBackSelectCursorParent,
523 cast(void*)this,
524 null,
525 connectFlags);
526 connectedSignals["select-cursor-parent"] = 1;
528 onSelectCursorParentListeners ~= dlg;
530 extern(C) static void callBackSelectCursorParent(GtkTreeView* treeviewStruct, TreeView treeView)
532 bool consumed = false;
534 foreach ( gboolean delegate(TreeView) dlg ; treeView.onSelectCursorParentListeners )
536 dlg(treeView);
539 return consumed;
542 gboolean delegate(gboolean, TreeView)[] onSelectCursorRowListeners;
543 void addOnSelectCursorRow(gboolean delegate(gboolean, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
545 if ( !("select-cursor-row" in connectedSignals) )
547 Signals.connectData(
548 getStruct(),
549 "select-cursor-row",
550 cast(GCallback)&callBackSelectCursorRow,
551 cast(void*)this,
552 null,
553 connectFlags);
554 connectedSignals["select-cursor-row"] = 1;
556 onSelectCursorRowListeners ~= dlg;
558 extern(C) static void callBackSelectCursorRow(GtkTreeView* treeviewStruct, gboolean arg1, TreeView treeView)
560 bool consumed = false;
562 foreach ( gboolean delegate(gboolean, TreeView) dlg ; treeView.onSelectCursorRowListeners )
564 dlg(arg1, treeView);
567 return consumed;
570 void delegate(Adjustment, Adjustment, TreeView)[] onSetScrollAdjustmentsListeners;
571 void addOnSetScrollAdjustments(void delegate(Adjustment, Adjustment, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
573 if ( !("set-scroll-adjustments" in connectedSignals) )
575 Signals.connectData(
576 getStruct(),
577 "set-scroll-adjustments",
578 cast(GCallback)&callBackSetScrollAdjustments,
579 cast(void*)this,
580 null,
581 connectFlags);
582 connectedSignals["set-scroll-adjustments"] = 1;
584 onSetScrollAdjustmentsListeners ~= dlg;
586 extern(C) static void callBackSetScrollAdjustments(GtkTreeView* treeviewStruct, GtkAdjustment* arg1, GtkAdjustment* arg2, TreeView treeView)
588 bool consumed = false;
590 foreach ( void delegate(Adjustment, Adjustment, TreeView) dlg ; treeView.onSetScrollAdjustmentsListeners )
592 dlg(new Adjustment(arg1), new Adjustment(arg2), treeView);
595 return consumed;
598 gboolean delegate(TreeView)[] onStartInteractiveSearchListeners;
599 void addOnStartInteractiveSearch(gboolean delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
601 if ( !("start-interactive-search" in connectedSignals) )
603 Signals.connectData(
604 getStruct(),
605 "start-interactive-search",
606 cast(GCallback)&callBackStartInteractiveSearch,
607 cast(void*)this,
608 null,
609 connectFlags);
610 connectedSignals["start-interactive-search"] = 1;
612 onStartInteractiveSearchListeners ~= dlg;
614 extern(C) static void callBackStartInteractiveSearch(GtkTreeView* treeviewStruct, TreeView treeView)
616 bool consumed = false;
618 foreach ( gboolean delegate(TreeView) dlg ; treeView.onStartInteractiveSearchListeners )
620 dlg(treeView);
623 return consumed;
626 gboolean delegate(GtkTreeIter*, TreePath, TreeView)[] onTestCollapseRowListeners;
627 void addOnTestCollapseRow(gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
629 if ( !("test-collapse-row" in connectedSignals) )
631 Signals.connectData(
632 getStruct(),
633 "test-collapse-row",
634 cast(GCallback)&callBackTestCollapseRow,
635 cast(void*)this,
636 null,
637 connectFlags);
638 connectedSignals["test-collapse-row"] = 1;
640 onTestCollapseRowListeners ~= dlg;
642 extern(C) static void callBackTestCollapseRow(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
644 bool consumed = false;
646 foreach ( gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onTestCollapseRowListeners )
648 dlg(iter, new TreePath(path), treeView);
651 return consumed;
654 gboolean delegate(GtkTreeIter*, TreePath, TreeView)[] onTestExpandRowListeners;
655 void addOnTestExpandRow(gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
657 if ( !("test-expand-row" in connectedSignals) )
659 Signals.connectData(
660 getStruct(),
661 "test-expand-row",
662 cast(GCallback)&callBackTestExpandRow,
663 cast(void*)this,
664 null,
665 connectFlags);
666 connectedSignals["test-expand-row"] = 1;
668 onTestExpandRowListeners ~= dlg;
670 extern(C) static void callBackTestExpandRow(GtkTreeView* treeViewStruct, GtkTreeIter* iter, GtkTreePath* path, TreeView treeView)
672 bool consumed = false;
674 foreach ( gboolean delegate(GtkTreeIter*, TreePath, TreeView) dlg ; treeView.onTestExpandRowListeners )
676 dlg(iter, new TreePath(path), treeView);
679 return consumed;
682 gboolean delegate(TreeView)[] onToggleCursorRowListeners;
683 void addOnToggleCursorRow(gboolean delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
685 if ( !("toggle-cursor-row" in connectedSignals) )
687 Signals.connectData(
688 getStruct(),
689 "toggle-cursor-row",
690 cast(GCallback)&callBackToggleCursorRow,
691 cast(void*)this,
692 null,
693 connectFlags);
694 connectedSignals["toggle-cursor-row"] = 1;
696 onToggleCursorRowListeners ~= dlg;
698 extern(C) static void callBackToggleCursorRow(GtkTreeView* treeviewStruct, TreeView treeView)
700 bool consumed = false;
702 foreach ( gboolean delegate(TreeView) dlg ; treeView.onToggleCursorRowListeners )
704 dlg(treeView);
707 return consumed;
710 gboolean delegate(TreeView)[] onUnselectAllListeners;
711 void addOnUnselectAll(gboolean delegate(TreeView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
713 if ( !("unselect-all" in connectedSignals) )
715 Signals.connectData(
716 getStruct(),
717 "unselect-all",
718 cast(GCallback)&callBackUnselectAll,
719 cast(void*)this,
720 null,
721 connectFlags);
722 connectedSignals["unselect-all"] = 1;
724 onUnselectAllListeners ~= dlg;
726 extern(C) static void callBackUnselectAll(GtkTreeView* treeviewStruct, TreeView treeView)
728 bool consumed = false;
730 foreach ( gboolean delegate(TreeView) dlg ; treeView.onUnselectAllListeners )
732 dlg(treeView);
735 return consumed;
746 * Creates a new GtkTreeView widget.
747 * Returns:
748 * A newly created GtkTreeView widget.
750 public this ()
752 // GtkWidget* gtk_tree_view_new (void);
753 this(cast(GtkTreeView*)gtk_tree_view_new() );
757 * Returns the amount, in pixels, of extra indentation for child levels
758 * in tree_view.
759 * tree_view:
760 * a GtkTreeView.
761 * Returns:
762 * the amount of extra indentation for child levels in
763 * tree_view. A return value of 0 means that this feature is disabled.
764 * Since 2.12
766 public int getLevelIndentation()
768 // gint gtk_tree_view_get_level_indentation (GtkTreeView *tree_view);
769 return gtk_tree_view_get_level_indentation(gtkTreeView);
773 * Returns whether or not expanders are drawn in tree_view.
774 * tree_view:
775 * a GtkTreeView.
776 * Returns:
777 * TRUE if expanders are drawn in tree_view, FALSE
778 * otherwise.
779 * Since 2.12
781 public int getShowExpanders()
783 // gboolean gtk_tree_view_get_show_expanders (GtkTreeView *tree_view);
784 return gtk_tree_view_get_show_expanders(gtkTreeView);
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 * tree_view:
794 * a GtkTreeView
795 * indentation:
796 * the amount, in pixels, of extra indentation in tree_view.
797 * Since 2.12
799 public void setLevelIndentation(int indentation)
801 // void gtk_tree_view_set_level_indentation (GtkTreeView *tree_view, gint indentation);
802 gtk_tree_view_set_level_indentation(gtkTreeView, indentation);
806 * Sets whether to draw and enable expanders and indent child rows in
807 * tree_view. When disabled there will be no expanders visible in trees
808 * and there will be no way to expand and collapse rows by default. Also
809 * note that hiding the expanders will disable the default indentation. You
810 * can set a custom indentation in this case using
811 * gtk_tree_view_set_level_indentation().
812 * This does not have any visible effects for lists.
813 * tree_view:
814 * a GtkTreeView
815 * enabled:
816 * TRUE to enable expander drawing, FALSE otherwise.
817 * Since 2.12
819 public void setShowExpanders(int enabled)
821 // void gtk_tree_view_set_show_expanders (GtkTreeView *tree_view, gboolean enabled);
822 gtk_tree_view_set_show_expanders(gtkTreeView, enabled);
826 * Creates a new GtkTreeView widget with the model initialized to model.
827 * model:
828 * the model.
829 * Returns:
830 * A newly created GtkTreeView widget.
832 public this (TreeModel model)
834 // GtkWidget* gtk_tree_view_new_with_model (GtkTreeModel *model);
835 this(cast(GtkTreeView*)gtk_tree_view_new_with_model((model is null) ? null : model.getTreeModelStruct()) );
839 * Returns the model the GtkTreeView is based on. Returns NULL if the
840 * model is unset.
841 * tree_view:
842 * a GtkTreeView
843 * Returns:
844 * A GtkTreeModel, or NULL if none is currently being used.
846 public TreeModel getModel()
848 // GtkTreeModel* gtk_tree_view_get_model (GtkTreeView *tree_view);
849 return new TreeModel( gtk_tree_view_get_model(gtkTreeView) );
853 * Sets the model for a GtkTreeView. If the tree_view already has a model
854 * set, it will remove it before setting the new model. If model is NULL,
855 * then it will unset the old model.
856 * tree_view:
857 * A GtkTreeNode.
858 * model:
859 * The model.
861 public void setModel(TreeModel model)
863 // void gtk_tree_view_set_model (GtkTreeView *tree_view, GtkTreeModel *model);
864 gtk_tree_view_set_model(gtkTreeView, (model is null) ? null : model.getTreeModelStruct());
868 * Gets the GtkTreeSelection associated with tree_view.
869 * tree_view:
870 * A GtkTreeView.
871 * Returns:
872 * A GtkTreeSelection object.
874 public TreeSelection getSelection()
876 // GtkTreeSelection* gtk_tree_view_get_selection (GtkTreeView *tree_view);
877 return new TreeSelection( gtk_tree_view_get_selection(gtkTreeView) );
881 * Gets the GtkAdjustment currently being used for the horizontal aspect.
882 * tree_view:
883 * A GtkTreeView
884 * Returns:
885 * A GtkAdjustment object, or NULL if none is currently being
886 * used.
888 public Adjustment getHadjustment()
890 // GtkAdjustment* gtk_tree_view_get_hadjustment (GtkTreeView *tree_view);
891 return new Adjustment( gtk_tree_view_get_hadjustment(gtkTreeView) );
895 * Sets the GtkAdjustment for the current horizontal aspect.
896 * tree_view:
897 * A GtkTreeView
898 * adjustment:
899 * The GtkAdjustment to set, or NULL
901 public void setHadjustment(Adjustment adjustment)
903 // void gtk_tree_view_set_hadjustment (GtkTreeView *tree_view, GtkAdjustment *adjustment);
904 gtk_tree_view_set_hadjustment(gtkTreeView, (adjustment is null) ? null : adjustment.getAdjustmentStruct());
908 * Gets the GtkAdjustment currently being used for the vertical aspect.
909 * tree_view:
910 * A GtkTreeView
911 * Returns:
912 * A GtkAdjustment object, or NULL if none is currently being
913 * used.
915 public Adjustment getVadjustment()
917 // GtkAdjustment* gtk_tree_view_get_vadjustment (GtkTreeView *tree_view);
918 return new Adjustment( gtk_tree_view_get_vadjustment(gtkTreeView) );
922 * Sets the GtkAdjustment for the current vertical aspect.
923 * tree_view:
924 * A GtkTreeView
925 * adjustment:
926 * The GtkAdjustment to set, or NULL
928 public void setVadjustment(Adjustment adjustment)
930 // void gtk_tree_view_set_vadjustment (GtkTreeView *tree_view, GtkAdjustment *adjustment);
931 gtk_tree_view_set_vadjustment(gtkTreeView, (adjustment is null) ? null : adjustment.getAdjustmentStruct());
935 * Returns TRUE if the headers on the tree_view are visible.
936 * tree_view:
937 * A GtkTreeView.
938 * Returns:
939 * Whether the headers are visible or not.
941 public int getHeadersVisible()
943 // gboolean gtk_tree_view_get_headers_visible (GtkTreeView *tree_view);
944 return gtk_tree_view_get_headers_visible(gtkTreeView);
948 * Sets the visibility state of the headers.
949 * tree_view:
950 * A GtkTreeView.
951 * headers_visible:
952 * TRUE if the headers are visible
954 public void setHeadersVisible(int headersVisible)
956 // void gtk_tree_view_set_headers_visible (GtkTreeView *tree_view, gboolean headers_visible);
957 gtk_tree_view_set_headers_visible(gtkTreeView, headersVisible);
961 * Resizes all columns to their optimal width. Only works after the
962 * treeview has been realized.
963 * tree_view:
964 * A GtkTreeView.
966 public void columnsAutosize()
968 // void gtk_tree_view_columns_autosize (GtkTreeView *tree_view);
969 gtk_tree_view_columns_autosize(gtkTreeView);
973 * Returns whether all header columns are clickable.
974 * tree_view:
975 * A GtkTreeView.
976 * Returns:
977 * TRUE if all header columns are clickable, otherwise FALSE
978 * Since 2.10
980 public int getHeadersClickable()
982 // gboolean gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view);
983 return gtk_tree_view_get_headers_clickable(gtkTreeView);
987 * Allow the column title buttons to be clicked.
988 * tree_view:
989 * A GtkTreeView.
990 * setting:
991 * TRUE if the columns are clickable.
993 public void setHeadersClickable(int setting)
995 // void gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view, gboolean setting);
996 gtk_tree_view_set_headers_clickable(gtkTreeView, setting);
1000 * This function tells GTK+ that the user interface for your
1001 * application requires users to read across tree rows and associate
1002 * cells with one another. By default, GTK+ will then render the tree
1003 * with alternating row colors. Do not use it
1004 * just because you prefer the appearance of the ruled tree; that's a
1005 * question for the theme. Some themes will draw tree rows in
1006 * alternating colors even when rules are turned off, and users who
1007 * prefer that appearance all the time can choose those themes. You
1008 * should call this function only as a semantic
1009 * hint to the theme engine that your tree makes alternating colors
1010 * useful from a functional standpoint (since it has lots of columns,
1011 * generally).
1012 * tree_view:
1013 * a GtkTreeView
1014 * setting:
1015 * TRUE if the tree requires reading across rows
1017 public void setRulesHint(int setting)
1019 // void gtk_tree_view_set_rules_hint (GtkTreeView *tree_view, gboolean setting);
1020 gtk_tree_view_set_rules_hint(gtkTreeView, setting);
1024 * Gets the setting set by gtk_tree_view_set_rules_hint().
1025 * tree_view:
1026 * a GtkTreeView
1027 * Returns:
1028 * TRUE if rules are useful for the user of this tree
1030 public int getRulesHint()
1032 // gboolean gtk_tree_view_get_rules_hint (GtkTreeView *tree_view);
1033 return gtk_tree_view_get_rules_hint(gtkTreeView);
1037 * Appends column to the list of columns. If tree_view has "fixed_height"
1038 * mode enabled, then column must have its "sizing" property set to be
1039 * GTK_TREE_VIEW_COLUMN_FIXED.
1040 * tree_view:
1041 * A GtkTreeView.
1042 * column:
1043 * The GtkTreeViewColumn to add.
1044 * Returns:
1045 * The number of columns in tree_view after appending.
1047 public int appendColumn(TreeViewColumn column)
1049 // gint gtk_tree_view_append_column (GtkTreeView *tree_view, GtkTreeViewColumn *column);
1050 return gtk_tree_view_append_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct());
1054 * Removes column from tree_view.
1055 * tree_view:
1056 * A GtkTreeView.
1057 * column:
1058 * The GtkTreeViewColumn to remove.
1059 * Returns:
1060 * The number of columns in tree_view after removing.
1062 public int removeColumn(TreeViewColumn column)
1064 // gint gtk_tree_view_remove_column (GtkTreeView *tree_view, GtkTreeViewColumn *column);
1065 return gtk_tree_view_remove_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct());
1069 * This inserts the column into the tree_view at position. If position is
1070 * -1, then the column is inserted at the end. If tree_view has
1071 * "fixed_height" mode enabled, then column must have its "sizing" property
1072 * set to be GTK_TREE_VIEW_COLUMN_FIXED.
1073 * tree_view:
1074 * A GtkTreeView.
1075 * column:
1076 * The GtkTreeViewColumn to be inserted.
1077 * position:
1078 * The position to insert column in.
1079 * Returns:
1080 * The number of columns in tree_view after insertion.
1082 public int insertColumn(TreeViewColumn column, int position)
1084 // gint gtk_tree_view_insert_column (GtkTreeView *tree_view, GtkTreeViewColumn *column, gint position);
1085 return gtk_tree_view_insert_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct(), position);
1089 * Creates a new GtkTreeViewColumn and inserts it into the tree_view at
1090 * position. If position is -1, then the newly created column is inserted at
1091 * the end. The column is initialized with the attributes given. If tree_view
1092 * has "fixed_height" mode enabled, then the new column will have its sizing
1093 * property set to be GTK_TREE_VIEW_COLUMN_FIXED.
1094 * tree_view:
1095 * A GtkTreeView
1096 * position:
1097 * The position to insert the new column in.
1098 * title:
1099 * The title to set the header to.
1100 * cell:
1101 * The GtkCellRenderer.
1102 * ...:
1103 * A NULL-terminated list of attributes.
1104 * Returns:
1105 * The number of columns in tree_view after insertion.
1107 public int insertColumnWithAttributes(int position, char[] title, CellRenderer cell, ... )
1109 // gint gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, gint position, const gchar *title, GtkCellRenderer *cell, ...);
1110 return gtk_tree_view_insert_column_with_attributes(gtkTreeView, position, Str.toStringz(title), (cell is null) ? null : cell.getCellRendererStruct());
1114 * Convenience function that inserts a new column into the GtkTreeView
1115 * with the given cell renderer and a GtkCellDataFunc to set cell renderer
1116 * attributes (normally using data from the model). See also
1117 * gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
1118 * If tree_view has "fixed_height" mode enabled, then the new column will have its
1119 * "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED.
1120 * tree_view:
1121 * a GtkTreeView
1122 * position:
1123 * Position to insert, -1 for append
1124 * title:
1125 * column title
1126 * cell:
1127 * cell renderer for column
1128 * func:
1129 * function to set attributes of cell renderer
1130 * data:
1131 * data for func
1132 * dnotify:
1133 * destroy notifier for data
1134 * Returns:
1135 * number of columns in the tree view post-insert
1137 public int insertColumnWithDataFunc(int position, char[] title, CellRenderer cell, GtkTreeCellDataFunc func, void* data, GDestroyNotify dnotify)
1139 // 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);
1140 return gtk_tree_view_insert_column_with_data_func(gtkTreeView, position, Str.toStringz(title), (cell is null) ? null : cell.getCellRendererStruct(), func, data, dnotify);
1144 * Gets the GtkTreeViewColumn at the given position in the tree_view.
1145 * tree_view:
1146 * A GtkTreeView.
1147 * n:
1148 * The position of the column, counting from 0.
1149 * Returns:
1150 * The GtkTreeViewColumn, or NULL if the position is outside the
1151 * range of columns.
1153 public TreeViewColumn getColumn(int n)
1155 // GtkTreeViewColumn* gtk_tree_view_get_column (GtkTreeView *tree_view, gint n);
1156 return new TreeViewColumn( gtk_tree_view_get_column(gtkTreeView, n) );
1160 * Returns a GList of all the GtkTreeViewColumn s currently in tree_view.
1161 * The returned list must be freed with g_list_free().
1162 * tree_view:
1163 * A GtkTreeView
1164 * Returns:
1165 * A list of GtkTreeViewColumn s
1167 public ListG getColumns()
1169 // GList* gtk_tree_view_get_columns (GtkTreeView *tree_view);
1170 return new ListG( gtk_tree_view_get_columns(gtkTreeView) );
1174 * Moves column to be after to base_column. If base_column is NULL, then
1175 * column is placed in the first position.
1176 * tree_view:
1177 * A GtkTreeView
1178 * column:
1179 * The GtkTreeViewColumn to be moved.
1180 * base_column:
1181 * The GtkTreeViewColumn to be moved relative to, or NULL.
1183 public void moveColumnAfter(TreeViewColumn column, TreeViewColumn baseColumn)
1185 // void gtk_tree_view_move_column_after (GtkTreeView *tree_view, GtkTreeViewColumn *column, GtkTreeViewColumn *base_column);
1186 gtk_tree_view_move_column_after(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct(), (baseColumn is null) ? null : baseColumn.getTreeViewColumnStruct());
1190 * Sets the column to draw the expander arrow at. It must be in tree_view.
1191 * If column is NULL, then the expander arrow is always at the first
1192 * visible column.
1193 * If you do not want expander arrow to appear in your tree, set the
1194 * expander column to a hidden column.
1195 * tree_view:
1196 * A GtkTreeView
1197 * column:
1198 * NULL, or the column to draw the expander arrow at.
1200 public void setExpanderColumn(TreeViewColumn column)
1202 // void gtk_tree_view_set_expander_column (GtkTreeView *tree_view, GtkTreeViewColumn *column);
1203 gtk_tree_view_set_expander_column(gtkTreeView, (column is null) ? null : column.getTreeViewColumnStruct());
1207 * Returns the column that is the current expander column. This
1208 * column has the expander arrow drawn next to it.
1209 * tree_view:
1210 * A GtkTreeView
1211 * Returns:
1212 * The expander column.
1214 public TreeViewColumn getExpanderColumn()
1216 // GtkTreeViewColumn* gtk_tree_view_get_expander_column (GtkTreeView *tree_view);
1217 return new TreeViewColumn( gtk_tree_view_get_expander_column(gtkTreeView) );
1221 * Sets a user function for determining where a column may be dropped when
1222 * dragged. This function is called on every column pair in turn at the
1223 * beginning of a column drag to determine where a drop can take place. The
1224 * arguments passed to func are: the tree_view, the GtkTreeViewColumn being
1225 * dragged, the two GtkTreeViewColumn s determining the drop spot, and
1226 * user_data. If either of the GtkTreeViewColumn arguments for the drop spot
1227 * are NULL, then they indicate an edge. If func is set to be NULL, then
1228 * tree_view reverts to the default behavior of allowing all columns to be
1229 * dropped everywhere.
1230 * tree_view:
1231 * A GtkTreeView.
1232 * func:
1233 * A function to determine which columns are reorderable, or NULL.
1234 * user_data:
1235 * User data to be passed to func, or NULL
1236 * destroy:
1237 * Destroy notifier for user_data, or NULL
1239 public void setColumnDragFunction(GtkTreeViewColumnDropFunc func, void* userData, GtkDestroyNotify destroy)
1241 // void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view, GtkTreeViewColumnDropFunc func, gpointer user_data, GtkDestroyNotify destroy);
1242 gtk_tree_view_set_column_drag_function(gtkTreeView, func, userData, destroy);
1246 * Scrolls the tree view such that the top-left corner of the visible
1247 * area is tree_x, tree_y, where tree_x and tree_y are specified
1248 * in tree window coordinates. The tree_view must be realized before
1249 * this function is called. If it isn't, you probably want to be
1250 * using gtk_tree_view_scroll_to_cell().
1251 * If either tree_x or tree_y are -1, then that direction isn't scrolled.
1252 * tree_view:
1253 * a GtkTreeView
1254 * tree_x:
1255 * X coordinate of new top-left pixel of visible area, or -1
1256 * tree_y:
1257 * Y coordinate of new top-left pixel of visible area, or -1
1259 public void scrollToPoint(int treeX, int treeY)
1261 // void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view, gint tree_x, gint tree_y);
1262 gtk_tree_view_scroll_to_point(gtkTreeView, treeX, treeY);
1266 * Moves the alignments of tree_view to the position specified by column and
1267 * path. If column is NULL, then no horizontal scrolling occurs. Likewise,
1268 * if path is NULL no vertical scrolling occurs. At a minimum, one of column
1269 * or path need to be non-NULL. row_align determines where the row is
1270 * placed, and col_align determines where column is placed. Both are expected
1271 * to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
1272 * right/bottom alignment, 0.5 means center.
1273 * If use_align is FALSE, then the alignment arguments are ignored, and the
1274 * tree does the minimum amount of work to scroll the cell onto the screen.
1275 * This means that the cell will be scrolled to the edge closest to its current
1276 * position. If the cell is currently visible on the screen, nothing is done.
1277 * This function only works if the model is set, and path is a valid row on the
1278 * model. If the model changes before the tree_view is realized, the centered
1279 * path will be modified to reflect this change.
1280 * tree_view:
1281 * A GtkTreeView.
1282 * path:
1283 * The path of the row to move to, or NULL.
1284 * column:
1285 * The GtkTreeViewColumn to move horizontally to, or NULL.
1286 * use_align:
1287 * whether to use alignment arguments, or FALSE.
1288 * row_align:
1289 * The vertical alignment of the row specified by path.
1290 * col_align:
1291 * The horizontal alignment of the column specified by column.
1293 public void scrollToCell(TreePath path, TreeViewColumn column, int useAlign, float rowAlign, float colAlign)
1295 // void gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gboolean use_align, gfloat row_align, gfloat col_align);
1296 gtk_tree_view_scroll_to_cell(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct(), useAlign, rowAlign, colAlign);
1300 * Sets the current keyboard focus to be at path, and selects it. This is
1301 * useful when you want to focus the user's attention on a particular row. If
1302 * focus_column is not NULL, then focus is given to the column specified by
1303 * it. Additionally, if focus_column is specified, and start_editing is
1304 * TRUE, then editing should be started in the specified cell.
1305 * This function is often followed by gtk_widget_grab_focus (tree_view)
1306 * in order to give keyboard focus to the widget. Please note that editing
1307 * can only happen when the widget is realized.
1308 * tree_view:
1309 * A GtkTreeView
1310 * path:
1311 * A GtkTreePath
1312 * focus_column:
1313 * A GtkTreeViewColumn, or NULL
1314 * start_editing:
1315 * TRUE if the specified cell should start being edited.
1317 public void setCursor(TreePath path, TreeViewColumn focusColumn, int startEditing)
1319 // void gtk_tree_view_set_cursor (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *focus_column, gboolean start_editing);
1320 gtk_tree_view_set_cursor(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (focusColumn is null) ? null : focusColumn.getTreeViewColumnStruct(), startEditing);
1324 * Sets the current keyboard focus to be at path, and selects it. This is
1325 * useful when you want to focus the user's attention on a particular row. If
1326 * focus_column is not NULL, then focus is given to the column specified by
1327 * it. If focus_column and focus_cell are not NULL, and focus_column
1328 * contains 2 or more editable or activatable cells, then focus is given to
1329 * the cell specified by focus_cell. Additionally, if focus_column is
1330 * specified, and start_editing is TRUE, then editing should be started in
1331 * the specified cell. This function is often followed by
1332 * gtk_widget_grab_focus (tree_view) in order to give keyboard focus to the
1333 * widget. Please note that editing can only happen when the widget is
1334 * realized.
1335 * tree_view:
1336 * A GtkTreeView
1337 * path:
1338 * A GtkTreePath
1339 * focus_column:
1340 * A GtkTreeViewColumn, or NULL
1341 * focus_cell:
1342 * A GtkCellRenderer, or NULL
1343 * start_editing:
1344 * TRUE if the specified cell should start being edited.
1345 * Since 2.2
1347 public void setCursorOnCell(TreePath path, TreeViewColumn focusColumn, CellRenderer focusCell, int startEditing)
1349 // void gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *focus_column, GtkCellRenderer *focus_cell, gboolean start_editing);
1350 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);
1354 * Fills in path and focus_column with the current path and focus column. If
1355 * the cursor isn't currently set, then *path will be NULL. If no column
1356 * currently has focus, then *focus_column will be NULL.
1357 * The returned GtkTreePath must be freed with gtk_tree_path_free() when
1358 * you are done with it.
1359 * tree_view:
1360 * A GtkTreeView
1361 * path:
1362 * A pointer to be filled with the current cursor path, or NULL
1363 * focus_column:
1364 * A pointer to be filled with the current focus column, or NULL
1366 public void getCursor(GtkTreePath** path, GtkTreeViewColumn** focusColumn)
1368 // void gtk_tree_view_get_cursor (GtkTreeView *tree_view, GtkTreePath **path, GtkTreeViewColumn **focus_column);
1369 gtk_tree_view_get_cursor(gtkTreeView, path, focusColumn);
1373 * Activates the cell determined by path and column.
1374 * tree_view:
1375 * A GtkTreeView
1376 * path:
1377 * The GtkTreePath to be activated.
1378 * column:
1379 * The GtkTreeViewColumn to be activated.
1381 public void rowActivated(TreePath path, TreeViewColumn column)
1383 // void gtk_tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column);
1384 gtk_tree_view_row_activated(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), (column is null) ? null : column.getTreeViewColumnStruct());
1388 * Recursively expands all nodes in the tree_view.
1389 * tree_view:
1390 * A GtkTreeView.
1392 public void expandAll()
1394 // void gtk_tree_view_expand_all (GtkTreeView *tree_view);
1395 gtk_tree_view_expand_all(gtkTreeView);
1399 * Recursively collapses all visible, expanded nodes in tree_view.
1400 * tree_view:
1401 * A GtkTreeView.
1403 public void collapseAll()
1405 // void gtk_tree_view_collapse_all (GtkTreeView *tree_view);
1406 gtk_tree_view_collapse_all(gtkTreeView);
1410 * Expands the row at path. This will also expand all parent rows of
1411 * path as necessary.
1412 * tree_view:
1413 * A GtkTreeView.
1414 * path:
1415 * path to a row.
1416 * Since 2.2
1418 public void expandToPath(TreePath path)
1420 // void gtk_tree_view_expand_to_path (GtkTreeView *tree_view, GtkTreePath *path);
1421 gtk_tree_view_expand_to_path(gtkTreeView, (path is null) ? null : path.getTreePathStruct());
1425 * Opens the row so its children are visible.
1426 * tree_view:
1427 * a GtkTreeView
1428 * path:
1429 * path to a row
1430 * open_all:
1431 * whether to recursively expand, or just expand immediate children
1432 * Returns:
1433 * TRUE if the row existed and had children
1435 public int expandRow(TreePath path, int openAll)
1437 // gboolean gtk_tree_view_expand_row (GtkTreeView *tree_view, GtkTreePath *path, gboolean open_all);
1438 return gtk_tree_view_expand_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), openAll);
1442 * Collapses a row (hides its child rows, if they exist).
1443 * tree_view:
1444 * a GtkTreeView
1445 * path:
1446 * path to a row in the tree_view
1447 * Returns:
1448 * TRUE if the row was collapsed.
1450 public int collapseRow(TreePath path)
1452 // gboolean gtk_tree_view_collapse_row (GtkTreeView *tree_view, GtkTreePath *path);
1453 return gtk_tree_view_collapse_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct());
1457 * Calls func on all expanded rows.
1458 * tree_view:
1459 * A GtkTreeView
1460 * func:
1461 * A function to be called
1462 * data:
1463 * User data to be passed to the function.
1465 public void mapExpandedRows(GtkTreeViewMappingFunc func, void* data)
1467 // void gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view, GtkTreeViewMappingFunc func, gpointer data);
1468 gtk_tree_view_map_expanded_rows(gtkTreeView, func, data);
1472 * Returns TRUE if the node pointed to by path is expanded in tree_view.
1473 * tree_view:
1474 * A GtkTreeView.
1475 * path:
1476 * A GtkTreePath to test expansion state.
1477 * Returns:
1478 * TRUE if path is expanded.
1480 public int rowExpanded(TreePath path)
1482 // gboolean gtk_tree_view_row_expanded (GtkTreeView *tree_view, GtkTreePath *path);
1483 return gtk_tree_view_row_expanded(gtkTreeView, (path is null) ? null : path.getTreePathStruct());
1487 * This function is a convenience function to allow you to reorder models that
1488 * support the GtkDragSourceIface and the GtkDragDestIface. Both
1489 * GtkTreeStore and GtkListStore support these. If reorderable is TRUE, then
1490 * the user can reorder the model by dragging and dropping rows. The
1491 * developer can listen to these changes by connecting to the model's
1492 * row_inserted and row_deleted signals.
1493 * This function does not give you any degree of control over the order -- any
1494 * reordering is allowed. If more control is needed, you should probably
1495 * handle drag and drop manually.
1496 * tree_view:
1497 * A GtkTreeView.
1498 * reorderable:
1499 * TRUE, if the tree can be reordered.
1501 public void setReorderable(int reorderable)
1503 // void gtk_tree_view_set_reorderable (GtkTreeView *tree_view, gboolean reorderable);
1504 gtk_tree_view_set_reorderable(gtkTreeView, reorderable);
1508 * Retrieves whether the user can reorder the tree via drag-and-drop. See
1509 * gtk_tree_view_set_reorderable().
1510 * tree_view:
1511 * a GtkTreeView
1512 * Returns:
1513 * TRUE if the tree can be reordered.
1515 public int getReorderable()
1517 // gboolean gtk_tree_view_get_reorderable (GtkTreeView *tree_view);
1518 return gtk_tree_view_get_reorderable(gtkTreeView);
1522 * Finds the path at the point (x, y), relative to widget coordinates. That
1523 * is, x and y are relative to an events coordinates. x and y must come
1524 * from an event on the tree_view only where event->window ==
1525 * gtk_tree_view_get_bin (). It is primarily for things
1526 * like popup menus. If path is non-NULL, then it will be filled with the
1527 * GtkTreePath at that point. This path should be freed with gtk_tree_path_free().
1528 * If column is non-NULL, then it will be filled with the column at that point.
1529 * cell_x and cell_y return the coordinates relative to the cell background
1530 * (i.e. the background_area passed to gtk_cell_renderer_render()). This
1531 * function is only meaningful if tree_view is realized.
1532 * tree_view:
1533 * A GtkTreeView.
1534 * x:
1535 * The x position to be identified.
1536 * y:
1537 * The y position to be identified.
1538 * path:
1539 * A pointer to a GtkTreePath pointer to be filled in, or NULL
1540 * column:
1541 * A pointer to a GtkTreeViewColumn pointer to be filled in, or NULL
1542 * cell_x:
1543 * A pointer where the X coordinate relative to the cell can be placed, or NULL
1544 * cell_y:
1545 * A pointer where the Y coordinate relative to the cell can be placed, or NULL
1546 * Returns:
1547 * TRUE if a row exists at that coordinate.
1549 public int getPathAtPos(int x, int y, GtkTreePath** path, GtkTreeViewColumn** column, int* cellX, int* cellY)
1551 // 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);
1552 return gtk_tree_view_get_path_at_pos(gtkTreeView, x, y, path, column, cellX, cellY);
1556 * Fills the bounding rectangle in tree window coordinates for the cell at the
1557 * row specified by path and the column specified by column. If path is
1558 * NULL, or points to a path not currently displayed, the y and height fields
1559 * of the rectangle will be filled with 0. If column is NULL, the x and width
1560 * fields will be filled with 0. The sum of all cell rects does not cover the
1561 * entire tree; there are extra pixels in between rows, for example. The
1562 * returned rectangle is equivalent to the cell_area passed to
1563 * gtk_cell_renderer_render(). This function is only valid if tree_view is
1564 * realized.
1565 * tree_view:
1566 * a GtkTreeView
1567 * path:
1568 * a GtkTreePath for the row, or NULL to get only horizontal coordinates
1569 * column:
1570 * a GtkTreeViewColumn for the column, or NULL to get only vertical coordinates
1571 * rect:
1572 * rectangle to fill with cell rect
1574 public void getCellArea(TreePath path, TreeViewColumn column, Rectangle rect)
1576 // void gtk_tree_view_get_cell_area (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, GdkRectangle *rect);
1577 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());
1581 * Fills the bounding rectangle in tree window coordinates for the cell at the
1582 * row specified by path and the column specified by column. If path is
1583 * NULL, or points to a node not found in the tree, the y and height fields of
1584 * the rectangle will be filled with 0. If column is NULL, the x and width
1585 * fields will be filled with 0. The returned rectangle is equivalent to the
1586 * background_area passed to gtk_cell_renderer_render(). These background
1587 * areas tile to cover the entire tree window (except for the area used for
1588 * header buttons). Contrast with the cell_area, returned by
1589 * gtk_tree_view_get_cell_area(), which returns only the cell itself, excluding
1590 * surrounding borders and the tree expander area.
1591 * tree_view:
1592 * a GtkTreeView
1593 * path:
1594 * a GtkTreePath for the row, or NULL to get only horizontal coordinates
1595 * column:
1596 * a GtkTreeViewColumn for the column, or NULL to get only vertical coordiantes
1597 * rect:
1598 * rectangle to fill with cell background rect
1600 public void getBackgroundArea(TreePath path, TreeViewColumn column, Rectangle rect)
1602 // void gtk_tree_view_get_background_area (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, GdkRectangle *rect);
1603 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());
1607 * Fills visible_rect with the currently-visible region of the
1608 * buffer, in tree coordinates. Convert to widget coordinates with
1609 * gtk_tree_view_tree_to_widget_coords(). Tree coordinates start at
1610 * 0,0 for row 0 of the tree, and cover the entire scrollable area of
1611 * the tree.
1612 * tree_view:
1613 * a GtkTreeView
1614 * visible_rect:
1615 * rectangle to fill
1617 public void getVisibleRect(Rectangle visibleRect)
1619 // void gtk_tree_view_get_visible_rect (GtkTreeView *tree_view, GdkRectangle *visible_rect);
1620 gtk_tree_view_get_visible_rect(gtkTreeView, (visibleRect is null) ? null : visibleRect.getRectangleStruct());
1624 * Sets start_path and end_path to be the first and last visible path.
1625 * Note that there may be invisible paths in between.
1626 * The paths should be freed with gtk_tree_path_free() after use.
1627 * tree_view:
1628 * A GtkTreeView
1629 * start_path:
1630 * Return location for start of region, or NULL.
1631 * end_path:
1632 * Return location for end of region, or NULL.
1633 * Returns:
1634 * TRUE, if valid paths were placed in start_path and end_path.
1635 * Since 2.8
1637 public int getVisibleRange(GtkTreePath** startPath, GtkTreePath** endPath)
1639 // gboolean gtk_tree_view_get_visible_range (GtkTreeView *tree_view, GtkTreePath **start_path, GtkTreePath **end_path);
1640 return gtk_tree_view_get_visible_range(gtkTreeView, startPath, endPath);
1644 * Returns the window that tree_view renders to. This is used primarily to
1645 * compare to event->window to confirm that the event on
1646 * tree_view is on the right window.
1647 * tree_view:
1648 * A GtkTreeView
1649 * Returns:
1650 * A GdkWindow, or NULL when tree_view hasn't been realized yet
1652 public Window getBinWindow()
1654 // GdkWindow* gtk_tree_view_get_bin_window (GtkTreeView *tree_view);
1655 return new Window( gtk_tree_view_get_bin_window(gtkTreeView) );
1659 * Converts widget coordinates to coordinates for the
1660 * tree window (the full scrollable area of the tree).
1661 * tree_view:
1662 * a GtkTreeView
1663 * wx:
1664 * widget X coordinate
1665 * wy:
1666 * widget Y coordinate
1667 * tx:
1668 * return location for tree X coordinate
1669 * ty:
1670 * return location for tree Y coordinate
1672 public void widgetToTreeCoords(int wx, int wy, int* tx, int* ty)
1674 // void gtk_tree_view_widget_to_tree_coords (GtkTreeView *tree_view, gint wx, gint wy, gint *tx, gint *ty);
1675 gtk_tree_view_widget_to_tree_coords(gtkTreeView, wx, wy, tx, ty);
1679 * Converts tree coordinates (coordinates in full scrollable area of the tree)
1680 * to widget coordinates.
1681 * tree_view:
1682 * a GtkTreeView
1683 * tx:
1684 * tree X coordinate
1685 * ty:
1686 * tree Y coordinate
1687 * wx:
1688 * return location for widget X coordinate
1689 * wy:
1690 * return location for widget Y coordinate
1692 public void treeToWidgetCoords(int tx, int ty, int* wx, int* wy)
1694 // void gtk_tree_view_tree_to_widget_coords (GtkTreeView *tree_view, gint tx, gint ty, gint *wx, gint *wy);
1695 gtk_tree_view_tree_to_widget_coords(gtkTreeView, tx, ty, wx, wy);
1699 * Turns tree_view into a drop destination for automatic DND.
1700 * tree_view:
1701 * a GtkTreeView
1702 * targets:
1703 * the table of targets that the drag will support
1704 * n_targets:
1705 * the number of items in targets
1706 * actions:
1707 * the bitmask of possible actions for a drag from this
1708 * widget
1710 public void enableModelDragDest(GtkTargetEntry* targets, int nTargets, GdkDragAction actions)
1712 // void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions);
1713 gtk_tree_view_enable_model_drag_dest(gtkTreeView, targets, nTargets, actions);
1717 * Turns tree_view into a drag source for automatic DND.
1718 * tree_view:
1719 * a GtkTreeView
1720 * start_button_mask:
1721 * Mask of allowed buttons to start drag
1722 * targets:
1723 * the table of targets that the drag will support
1724 * n_targets:
1725 * the number of items in targets
1726 * actions:
1727 * the bitmask of possible actions for a drag from this
1728 * widget
1730 public void enableModelDragSource(GdkModifierType startButtonMask, GtkTargetEntry* targets, int nTargets, GdkDragAction actions)
1732 // void gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions);
1733 gtk_tree_view_enable_model_drag_source(gtkTreeView, startButtonMask, targets, nTargets, actions);
1737 * Undoes the effect of gtk_tree_view_enable_model_drag_source().
1738 * tree_view:
1739 * a GtkTreeView
1741 public void unsetRowsDragSource()
1743 // void gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view);
1744 gtk_tree_view_unset_rows_drag_source(gtkTreeView);
1748 * Undoes the effect of gtk_tree_view_enable_model_drag_dest().
1749 * tree_view:
1750 * a GtkTreeView
1752 public void unsetRowsDragDest()
1754 // void gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view);
1755 gtk_tree_view_unset_rows_drag_dest(gtkTreeView);
1759 * Sets the row that is highlighted for feedback.
1760 * tree_view:
1761 * a GtkTreeView
1762 * path:
1763 * The path of the row to highlight, or NULL.
1764 * pos:
1765 * Specifies whether to drop before, after or into the row
1767 public void setDragDestRow(TreePath path, GtkTreeViewDropPosition pos)
1769 // void gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewDropPosition pos);
1770 gtk_tree_view_set_drag_dest_row(gtkTreeView, (path is null) ? null : path.getTreePathStruct(), pos);
1774 * Gets information about the row that is highlighted for feedback.
1775 * tree_view:
1776 * a GtkTreeView
1777 * path:
1778 * Return location for the path of the highlighted row, or NULL.
1779 * pos:
1780 * Return location for the drop position, or NULL
1782 public void getDragDestRow(GtkTreePath** path, GtkTreeViewDropPosition* pos)
1784 // void gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view, GtkTreePath **path, GtkTreeViewDropPosition *pos);
1785 gtk_tree_view_get_drag_dest_row(gtkTreeView, path, pos);
1789 * Determines the destination row for a given position.
1790 * tree_view:
1791 * a GtkTreeView
1792 * drag_x:
1793 * the position to determine the destination row for
1794 * drag_y:
1795 * the position to determine the destination row for
1796 * path:
1797 * Return location for the path of the highlighted row, or NULL.
1798 * pos:
1799 * Return location for the drop position, or NULL
1800 * Returns:
1801 * whether there is a row at the given position.
1803 public int getDestRowAtPos(int dragX, int dragY, GtkTreePath** path, GtkTreeViewDropPosition* pos)
1805 // gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view, gint drag_x, gint drag_y, GtkTreePath **path, GtkTreeViewDropPosition *pos);
1806 return gtk_tree_view_get_dest_row_at_pos(gtkTreeView, dragX, dragY, path, pos);
1810 * Creates a GdkPixmap representation of the row at path.
1811 * This image is used for a drag icon.
1812 * tree_view:
1813 * a GtkTreeView
1814 * path:
1815 * a GtkTreePath in tree_view
1816 * Returns:
1817 * a newly-allocated pixmap of the drag icon.
1819 public Pixmap createRowDragIcon(TreePath path)
1821 // GdkPixmap* gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view, GtkTreePath *path);
1822 return new Pixmap( gtk_tree_view_create_row_drag_icon(gtkTreeView, (path is null) ? null : path.getTreePathStruct()) );
1826 * If enable_search is set, then the user can type in text to search through
1827 * the tree interactively (this is sometimes called "typeahead find").
1828 * Note that even if this is FALSE, the user can still initiate a search
1829 * using the "start-interactive-search" key binding.
1830 * tree_view:
1831 * A GtkTreeView
1832 * enable_search:
1833 * TRUE, if the user can search interactively
1835 public void setEnableSearch(int enableSearch)
1837 // void gtk_tree_view_set_enable_search (GtkTreeView *tree_view, gboolean enable_search);
1838 gtk_tree_view_set_enable_search(gtkTreeView, enableSearch);
1842 * Returns whether or not the tree allows to start interactive searching
1843 * by typing in text.
1844 * tree_view:
1845 * A GtkTreeView
1846 * Returns:
1847 * whether or not to let the user search interactively
1849 public int getEnableSearch()
1851 // gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view);
1852 return gtk_tree_view_get_enable_search(gtkTreeView);
1856 * Gets the column searched on by the interactive search code.
1857 * tree_view:
1858 * A GtkTreeView
1859 * Returns:
1860 * the column the interactive search code searches in.
1862 public int getSearchColumn()
1864 // gint gtk_tree_view_get_search_column (GtkTreeView *tree_view);
1865 return gtk_tree_view_get_search_column(gtkTreeView);
1869 * Sets column as the column where the interactive search code should
1870 * search in.
1871 * If the sort 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 model.
1875 * tree_view:
1876 * A GtkTreeView
1877 * column:
1878 * the column of the model to search in, or -1 to disable searching
1880 public void setSearchColumn(int column)
1882 // void gtk_tree_view_set_search_column (GtkTreeView *tree_view, gint column);
1883 gtk_tree_view_set_search_column(gtkTreeView, column);
1887 * Returns the compare function currently in use.
1888 * tree_view:
1889 * A GtkTreeView
1890 * Returns:
1891 * the currently used compare function for the search code.
1893 public GtkTreeViewSearchEqualFunc getSearchEqualFunc()
1895 // GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view);
1896 return gtk_tree_view_get_search_equal_func(gtkTreeView);
1900 * Sets the compare function for the interactive search capabilities; note
1901 * that somewhat like strcmp() returning 0 for equality
1902 * GtkTreeViewSearchEqualFunc returns FALSE on matches.
1903 * tree_view:
1904 * A GtkTreeView
1905 * search_equal_func:
1906 * the compare function to use during the search
1907 * search_user_data:
1908 * user data to pass to search_equal_func, or NULL
1909 * search_destroy:
1910 * Destroy notifier for search_user_data, or NULL
1912 public void setSearchEqualFunc(GtkTreeViewSearchEqualFunc searchEqualFunc, void* searchUserData, GtkDestroyNotify searchDestroy)
1914 // void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view, GtkTreeViewSearchEqualFunc search_equal_func, gpointer search_user_data, GtkDestroyNotify search_destroy);
1915 gtk_tree_view_set_search_equal_func(gtkTreeView, searchEqualFunc, searchUserData, searchDestroy);
1919 * Returns the GtkEntry which is currently in use as interactive search
1920 * entry for tree_view. In case the built-in entry is being used, NULL
1921 * will be returned.
1922 * tree_view:
1923 * A GtkTreeView
1924 * Returns:
1925 * the entry currently in use as search entry.
1926 * Since 2.10
1928 public GtkEntry* getSearchEntry()
1930 // GtkEntry* gtk_tree_view_get_search_entry (GtkTreeView *tree_view);
1931 return gtk_tree_view_get_search_entry(gtkTreeView);
1935 * Sets the entry which the interactive search code will use for this
1936 * tree_view. This is useful when you want to provide a search entry
1937 * in our interface at all time at a fixed position. Passing NULL for
1938 * entry will make the interactive search code use the built-in popup
1939 * entry again.
1940 * tree_view:
1941 * A GtkTreeView
1942 * entry:
1943 * the entry the interactive search code of tree_view should use or NULL
1944 * Since 2.10
1946 public void setSearchEntry(GtkEntry* entry)
1948 // void gtk_tree_view_set_search_entry (GtkTreeView *tree_view, GtkEntry *entry);
1949 gtk_tree_view_set_search_entry(gtkTreeView, entry);
1954 * Returns the positioning function currently in use.
1955 * tree_view:
1956 * A GtkTreeView
1957 * Returns:
1958 * the currently used function for positioning the search dialog.
1959 * Since 2.10
1961 public GtkTreeViewSearchPositionFunc getSearchPositionFunc()
1963 // GtkTreeViewSearchPositionFunc gtk_tree_view_get_search_position_func (GtkTreeView *tree_view);
1964 return gtk_tree_view_get_search_position_func(gtkTreeView);
1968 * Sets the function to use when positioning the seach dialog.
1969 * tree_view:
1970 * A GtkTreeView
1971 * func:
1972 * the function to use to position the search dialog, or NULL
1973 * to use the default search position function
1974 * data:
1975 * user data to pass to func, or NULL
1976 * destroy:
1977 * Destroy notifier for data, or NULL
1978 * Since 2.10
1980 public void setSearchPositionFunc(GtkTreeViewSearchPositionFunc func, void* data, GDestroyNotify destroy)
1982 // void gtk_tree_view_set_search_position_func (GtkTreeView *tree_view, GtkTreeViewSearchPositionFunc func, gpointer data, GDestroyNotify destroy);
1983 gtk_tree_view_set_search_position_func(gtkTreeView, func, data, destroy);
1987 * Returns whether fixed height mode is turned on for tree_view.
1988 * tree_view:
1989 * a GtkTreeView
1990 * Returns:
1991 * TRUE if tree_view is in fixed height mode
1992 * Since 2.6
1994 public int getFixedHeightMode()
1996 // gboolean gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view);
1997 return gtk_tree_view_get_fixed_height_mode(gtkTreeView);
2001 * Enables or disables the fixed height mode of tree_view.
2002 * Fixed height mode speeds up GtkTreeView by assuming that all
2003 * rows have the same height.
2004 * Only enable this option if all rows are the same height and all
2005 * columns are of type GTK_TREE_VIEW_COLUMN_FIXED.
2006 * tree_view:
2007 * a GtkTreeView
2008 * enable:
2009 * TRUE to enable fixed height mode
2010 * Since 2.6
2012 public void setFixedHeightMode(int enable)
2014 // void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view, gboolean enable);
2015 gtk_tree_view_set_fixed_height_mode(gtkTreeView, enable);
2019 * Returns whether hover selection mode is turned on for tree_view.
2020 * tree_view:
2021 * a GtkTreeView
2022 * Returns:
2023 * TRUE if tree_view is in hover selection mode
2024 * Since 2.6
2026 public int getHoverSelection()
2028 // gboolean gtk_tree_view_get_hover_selection (GtkTreeView *tree_view);
2029 return gtk_tree_view_get_hover_selection(gtkTreeView);
2033 * Enables of disables the hover selection mode of tree_view.
2034 * Hover selection makes the selected row follow the pointer.
2035 * Currently, this works only for the selection modes
2036 * GTK_SELECTION_SINGLE and GTK_SELECTION_BROWSE.
2037 * tree_view:
2038 * a GtkTreeView
2039 * hover:
2040 * TRUE to enable hover selection mode
2041 * Since 2.6
2043 public void setHoverSelection(int hover)
2045 // void gtk_tree_view_set_hover_selection (GtkTreeView *tree_view, gboolean hover);
2046 gtk_tree_view_set_hover_selection(gtkTreeView, hover);
2050 * Returns whether hover expansion mode is turned on for tree_view.
2051 * tree_view:
2052 * a GtkTreeView
2053 * Returns:
2054 * TRUE if tree_view is in hover expansion mode
2055 * Since 2.6
2057 public int getHoverExpand()
2059 // gboolean gtk_tree_view_get_hover_expand (GtkTreeView *tree_view);
2060 return gtk_tree_view_get_hover_expand(gtkTreeView);
2064 * Enables of disables the hover expansion mode of tree_view.
2065 * Hover expansion makes rows expand or collaps if the pointer
2066 * moves over them.
2067 * tree_view:
2068 * a GtkTreeView
2069 * expand:
2070 * TRUE to enable hover selection mode
2071 * Since 2.6
2073 public void setHoverExpand(int expand)
2075 // void gtk_tree_view_set_hover_expand (GtkTreeView *tree_view, gboolean expand);
2076 gtk_tree_view_set_hover_expand(gtkTreeView, expand);
2081 * This function should almost never be used. It is meant for private use by
2082 * ATK for determining the number of visible children that are removed when the
2083 * user collapses a row, or a row is deleted.
2084 * tree_view:
2085 * A GtkTreeView
2086 * func:
2087 * Function to be called when a view row is destroyed, or NULL
2088 * data:
2089 * User data to be passed to func, or NULL
2090 * destroy:
2091 * Destroy notifier for data, or NULL
2093 public void setDestroyCountFunc(GtkTreeDestroyCountFunc func, void* data, GtkDestroyNotify destroy)
2095 // void gtk_tree_view_set_destroy_count_func (GtkTreeView *tree_view, GtkTreeDestroyCountFunc func, gpointer data, GtkDestroyNotify destroy);
2096 gtk_tree_view_set_destroy_count_func(gtkTreeView, func, data, destroy);
2101 * Returns the current row separator function.
2102 * tree_view:
2103 * a GtkTreeView
2104 * Returns:
2105 * the current row separator function.
2106 * Since 2.6
2108 public GtkTreeViewRowSeparatorFunc getRowSeparatorFunc()
2110 // GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view);
2111 return gtk_tree_view_get_row_separator_func(gtkTreeView);
2115 * Sets the row separator function, which is used to determine
2116 * whether a row should be drawn as a separator. If the row separator
2117 * function is NULL, no separators are drawn. This is the default value.
2118 * tree_view:
2119 * a GtkTreeView
2120 * func:
2121 * a GtkTreeViewRowSeparatorFunc
2122 * data:
2123 * user data to pass to func, or NULL
2124 * destroy:
2125 * destroy notifier for data, or NULL
2126 * Since 2.6
2128 public void setRowSeparatorFunc(GtkTreeViewRowSeparatorFunc func, void* data, GtkDestroyNotify destroy)
2130 // void gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view, GtkTreeViewRowSeparatorFunc func, gpointer data, GtkDestroyNotify destroy);
2131 gtk_tree_view_set_row_separator_func(gtkTreeView, func, data, destroy);
2135 * Returns whether rubber banding is turned on for tree_view. If the
2136 * selection mode is GTK_SELECTION_MULTIPLE, rubber banding will allow the
2137 * user to select multiple rows by dragging the mouse.
2138 * tree_view:
2139 * a GtkTreeView
2140 * Returns:
2141 * TRUE if rubber banding in tree_view is enabled.
2142 * Since 2.10
2144 public int getRubberBanding()
2146 // gboolean gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view);
2147 return gtk_tree_view_get_rubber_banding(gtkTreeView);
2151 * Enables or disables rubber banding in tree_view. If the selection mode
2152 * is GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
2153 * multiple rows by dragging the mouse.
2154 * tree_view:
2155 * a GtkTreeView
2156 * enable:
2157 * TRUE to enable rubber banding
2158 * Since 2.10
2160 public void setRubberBanding(int enable)
2162 // void gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view, gboolean enable);
2163 gtk_tree_view_set_rubber_banding(gtkTreeView, enable);
2167 * Returns whether or not tree lines are drawn in tree_view.
2168 * tree_view:
2169 * a GtkTreeView.
2170 * Returns:
2171 * TRUE if tree lines are drawn in tree_view, FALSE
2172 * otherwise.
2173 * Since 2.10
2175 public int getEnableTreeLines()
2177 // gboolean gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view);
2178 return gtk_tree_view_get_enable_tree_lines(gtkTreeView);
2182 * Sets whether to draw lines interconnecting the expanders in tree_view.
2183 * This does not have any visible effects for lists.
2184 * tree_view:
2185 * a GtkTreeView
2186 * enabled:
2187 * TRUE to enable tree line drawing, FALSE otherwise.
2188 * Since 2.10
2190 public void setEnableTreeLines(int enabled)
2192 // void gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view, gboolean enabled);
2193 gtk_tree_view_set_enable_tree_lines(gtkTreeView, enabled);
2198 * Returns which grid lines are enabled in tree_view.
2199 * tree_view:
2200 * a GtkTreeView
2201 * Returns:
2202 * a GtkTreeViewGridLines value indicating which grid lines
2203 * are enabled.
2204 * Since 2.10
2206 public GtkTreeViewGridLines getGridLines()
2208 // GtkTreeViewGridLines gtk_tree_view_get_grid_lines (GtkTreeView *tree_view);
2209 return gtk_tree_view_get_grid_lines(gtkTreeView);
2213 * Sets which grid lines to draw in tree_view.
2214 * tree_view:
2215 * a GtkTreeView
2216 * grid_lines:
2217 * a GtkTreeViewGridLines value indicating which grid lines to
2218 * enable.
2219 * Since 2.10
2220 * Property Details
2221 * The "enable-grid-lines" property
2222 * "enable-grid-lines" GtkTreeViewGridLines : Read / Write
2223 * Whether grid lines should be drawn in the tree view.
2224 * Default value: GTK_TREE_VIEW_GRID_LINES_NONE
2226 public void setGridLines(GtkTreeViewGridLines gridLines)
2228 // void gtk_tree_view_set_grid_lines (GtkTreeView *tree_view, GtkTreeViewGridLines grid_lines);
2229 gtk_tree_view_set_grid_lines(gtkTreeView, gridLines);