1 /**
2 Control to show a tree of items.
3 
4 Copyright:
5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
7 Copyright (c) 2017-2018 Godot-D contributors  
8 
9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
10 
11 
12 */
13 module godot.tree;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.control;
25 import godot.canvasitem;
26 import godot.node;
27 import godot.inputevent;
28 import godot.treeitem;
29 /**
30 Control to show a tree of items.
31 
32 This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structured displays and interactions.
33 Trees are built via code, using $(D TreeItem) objects to create the structure. They have a single root but multiple roots can be simulated if a dummy hidden root is added.
34 
35 
36 func _ready():
37     var tree = Tree.new()
38     var root = tree.create_item()
39     tree.set_hide_root(true)
40     var child1 = tree.create_item(root)
41     var child2 = tree.create_item(root)
42     var subchild1 = tree.create_item(child1)
43     subchild1.set_text(0, "Subchild1")
44 
45 
46 To iterate over all the $(D TreeItem) objects in a $(D Tree) object, use $(D TreeItem.getNext) and $(D TreeItem.getChildren) after getting the root through $(D getRoot). You can use $(D GodotObject.free) on a $(D TreeItem) to remove it from the $(D Tree).
47 */
48 @GodotBaseClass struct Tree
49 {
50 	package(godot) enum string _GODOT_internal_name = "Tree";
51 public:
52 @nogc nothrow:
53 	union { /** */ godot_object _godot_object; /** */ Control _GODOT_base; }
54 	alias _GODOT_base this;
55 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
56 	package(godot) __gshared bool _classBindingInitialized = false;
57 	package(godot) static struct GDNativeClassBinding
58 	{
59 		__gshared:
60 		@GodotName("_gui_input") GodotMethod!(void, InputEvent) _guiInput;
61 		@GodotName("_popup_select") GodotMethod!(void, long) _popupSelect;
62 		@GodotName("_range_click_timeout") GodotMethod!(void) _rangeClickTimeout;
63 		@GodotName("_scroll_moved") GodotMethod!(void, double) _scrollMoved;
64 		@GodotName("_text_editor_enter") GodotMethod!(void, String) _textEditorEnter;
65 		@GodotName("_text_editor_modal_close") GodotMethod!(void) _textEditorModalClose;
66 		@GodotName("_value_editor_changed") GodotMethod!(void, double) _valueEditorChanged;
67 		@GodotName("are_column_titles_visible") GodotMethod!(bool) areColumnTitlesVisible;
68 		@GodotName("clear") GodotMethod!(void) clear;
69 		@GodotName("create_item") GodotMethod!(TreeItem, GodotObject, long) createItem;
70 		@GodotName("edit_selected") GodotMethod!(bool) editSelected;
71 		@GodotName("ensure_cursor_is_visible") GodotMethod!(void) ensureCursorIsVisible;
72 		@GodotName("get_allow_reselect") GodotMethod!(bool) getAllowReselect;
73 		@GodotName("get_allow_rmb_select") GodotMethod!(bool) getAllowRmbSelect;
74 		@GodotName("get_column_at_position") GodotMethod!(long, Vector2) getColumnAtPosition;
75 		@GodotName("get_column_title") GodotMethod!(String, long) getColumnTitle;
76 		@GodotName("get_column_width") GodotMethod!(long, long) getColumnWidth;
77 		@GodotName("get_columns") GodotMethod!(long) getColumns;
78 		@GodotName("get_custom_popup_rect") GodotMethod!(Rect2) getCustomPopupRect;
79 		@GodotName("get_drop_mode_flags") GodotMethod!(long) getDropModeFlags;
80 		@GodotName("get_drop_section_at_position") GodotMethod!(long, Vector2) getDropSectionAtPosition;
81 		@GodotName("get_edited") GodotMethod!(TreeItem) getEdited;
82 		@GodotName("get_edited_column") GodotMethod!(long) getEditedColumn;
83 		@GodotName("get_item_area_rect") GodotMethod!(Rect2, GodotObject, long) getItemAreaRect;
84 		@GodotName("get_item_at_position") GodotMethod!(TreeItem, Vector2) getItemAtPosition;
85 		@GodotName("get_next_selected") GodotMethod!(TreeItem, GodotObject) getNextSelected;
86 		@GodotName("get_pressed_button") GodotMethod!(long) getPressedButton;
87 		@GodotName("get_root") GodotMethod!(TreeItem) getRoot;
88 		@GodotName("get_scroll") GodotMethod!(Vector2) getScroll;
89 		@GodotName("get_select_mode") GodotMethod!(Tree.SelectMode) getSelectMode;
90 		@GodotName("get_selected") GodotMethod!(TreeItem) getSelected;
91 		@GodotName("get_selected_column") GodotMethod!(long) getSelectedColumn;
92 		@GodotName("is_folding_hidden") GodotMethod!(bool) isFoldingHidden;
93 		@GodotName("is_root_hidden") GodotMethod!(bool) isRootHidden;
94 		@GodotName("scroll_to_item") GodotMethod!(void, GodotObject) scrollToItem;
95 		@GodotName("set_allow_reselect") GodotMethod!(void, bool) setAllowReselect;
96 		@GodotName("set_allow_rmb_select") GodotMethod!(void, bool) setAllowRmbSelect;
97 		@GodotName("set_column_expand") GodotMethod!(void, long, bool) setColumnExpand;
98 		@GodotName("set_column_min_width") GodotMethod!(void, long, long) setColumnMinWidth;
99 		@GodotName("set_column_title") GodotMethod!(void, long, String) setColumnTitle;
100 		@GodotName("set_column_titles_visible") GodotMethod!(void, bool) setColumnTitlesVisible;
101 		@GodotName("set_columns") GodotMethod!(void, long) setColumns;
102 		@GodotName("set_drop_mode_flags") GodotMethod!(void, long) setDropModeFlags;
103 		@GodotName("set_hide_folding") GodotMethod!(void, bool) setHideFolding;
104 		@GodotName("set_hide_root") GodotMethod!(void, bool) setHideRoot;
105 		@GodotName("set_select_mode") GodotMethod!(void, long) setSelectMode;
106 	}
107 	/// 
108 	pragma(inline, true) bool opEquals(in Tree other) const
109 	{ return _godot_object.ptr is other._godot_object.ptr; }
110 	/// 
111 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
112 	{ _godot_object.ptr = n; return null; }
113 	/// 
114 	pragma(inline, true) bool opEquals(typeof(null) n) const
115 	{ return _godot_object.ptr is n; }
116 	/// 
117 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
118 	mixin baseCasts;
119 	/// Construct a new instance of Tree.
120 	/// Note: use `memnew!Tree` instead.
121 	static Tree _new()
122 	{
123 		static godot_class_constructor constructor;
124 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("Tree");
125 		if(constructor is null) return typeof(this).init;
126 		return cast(Tree)(constructor());
127 	}
128 	@disable new(size_t s);
129 	/// 
130 	enum SelectMode : int
131 	{
132 		/**
133 		Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item.
134 		The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item.
135 		*/
136 		selectSingle = 0,
137 		/**
138 		Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item.
139 		The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item.
140 		*/
141 		selectRow = 1,
142 		/**
143 		Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item.
144 		The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected.
145 		*/
146 		selectMulti = 2,
147 	}
148 	/// 
149 	enum DropModeFlags : int
150 	{
151 		/**
152 		Disables all drop sections, but still allows to detect the "on item" drop section by $(D getDropSectionAtPosition).
153 		$(B Note:) This is the default flag, it has no effect when combined with other flags.
154 		*/
155 		dropModeDisabled = 0,
156 		/**
157 		Enables the "on item" drop section. This drop section covers the entire item.
158 		When combined with $(D constant DROP_MODE_INBETWEEN), this drop section halves the height and stays centered vertically.
159 		*/
160 		dropModeOnItem = 1,
161 		/**
162 		Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half.
163 		When combined with $(D constant DROP_MODE_ON_ITEM), these drop sections halves the height and stays on top / bottom accordingly.
164 		*/
165 		dropModeInbetween = 2,
166 	}
167 	/// 
168 	enum Constants : int
169 	{
170 		dropModeDisabled = 0,
171 		selectSingle = 0,
172 		dropModeOnItem = 1,
173 		selectRow = 1,
174 		dropModeInbetween = 2,
175 		selectMulti = 2,
176 	}
177 	/**
178 	
179 	*/
180 	void _guiInput(InputEvent arg0)
181 	{
182 		Array _GODOT_args = Array.make();
183 		_GODOT_args.append(arg0);
184 		String _GODOT_method_name = String("_gui_input");
185 		this.callv(_GODOT_method_name, _GODOT_args);
186 	}
187 	/**
188 	
189 	*/
190 	void _popupSelect(in long arg0)
191 	{
192 		Array _GODOT_args = Array.make();
193 		_GODOT_args.append(arg0);
194 		String _GODOT_method_name = String("_popup_select");
195 		this.callv(_GODOT_method_name, _GODOT_args);
196 	}
197 	/**
198 	
199 	*/
200 	void _rangeClickTimeout()
201 	{
202 		Array _GODOT_args = Array.make();
203 		String _GODOT_method_name = String("_range_click_timeout");
204 		this.callv(_GODOT_method_name, _GODOT_args);
205 	}
206 	/**
207 	
208 	*/
209 	void _scrollMoved(in double arg0)
210 	{
211 		Array _GODOT_args = Array.make();
212 		_GODOT_args.append(arg0);
213 		String _GODOT_method_name = String("_scroll_moved");
214 		this.callv(_GODOT_method_name, _GODOT_args);
215 	}
216 	/**
217 	
218 	*/
219 	void _textEditorEnter(in String arg0)
220 	{
221 		Array _GODOT_args = Array.make();
222 		_GODOT_args.append(arg0);
223 		String _GODOT_method_name = String("_text_editor_enter");
224 		this.callv(_GODOT_method_name, _GODOT_args);
225 	}
226 	/**
227 	
228 	*/
229 	void _textEditorModalClose()
230 	{
231 		Array _GODOT_args = Array.make();
232 		String _GODOT_method_name = String("_text_editor_modal_close");
233 		this.callv(_GODOT_method_name, _GODOT_args);
234 	}
235 	/**
236 	
237 	*/
238 	void _valueEditorChanged(in double arg0)
239 	{
240 		Array _GODOT_args = Array.make();
241 		_GODOT_args.append(arg0);
242 		String _GODOT_method_name = String("_value_editor_changed");
243 		this.callv(_GODOT_method_name, _GODOT_args);
244 	}
245 	/**
246 	Returns `true` if the column titles are being shown.
247 	*/
248 	bool areColumnTitlesVisible() const
249 	{
250 		checkClassBinding!(typeof(this))();
251 		return ptrcall!(bool)(GDNativeClassBinding.areColumnTitlesVisible, _godot_object);
252 	}
253 	/**
254 	Clears the tree. This removes all items.
255 	*/
256 	void clear()
257 	{
258 		checkClassBinding!(typeof(this))();
259 		ptrcall!(void)(GDNativeClassBinding.clear, _godot_object);
260 	}
261 	/**
262 	Creates an item in the tree and adds it as a child of `parent`.
263 	If `parent` is `null`, the root item will be the parent, or the new item will be the root itself if the tree is empty.
264 	The new item will be the `idx`th child of parent, or it will be the last child if there are not enough siblings.
265 	*/
266 	TreeItem createItem(GodotObject parent = GodotObject.init, in long idx = -1)
267 	{
268 		checkClassBinding!(typeof(this))();
269 		return ptrcall!(TreeItem)(GDNativeClassBinding.createItem, _godot_object, parent, idx);
270 	}
271 	/**
272 	Edits the selected tree item as if it was clicked. The item must be set editable with $(D TreeItem.setEditable). Returns `true` if the item could be edited. Fails if no item is selected.
273 	*/
274 	bool editSelected()
275 	{
276 		checkClassBinding!(typeof(this))();
277 		return ptrcall!(bool)(GDNativeClassBinding.editSelected, _godot_object);
278 	}
279 	/**
280 	Makes the currently focused cell visible.
281 	This will scroll the tree if necessary. In $(D constant SELECT_ROW) mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically.
282 	$(B Note:) Despite the name of this method, the focus cursor itself is only visible in $(D constant SELECT_MULTI) mode.
283 	*/
284 	void ensureCursorIsVisible()
285 	{
286 		checkClassBinding!(typeof(this))();
287 		ptrcall!(void)(GDNativeClassBinding.ensureCursorIsVisible, _godot_object);
288 	}
289 	/**
290 	
291 	*/
292 	bool getAllowReselect() const
293 	{
294 		checkClassBinding!(typeof(this))();
295 		return ptrcall!(bool)(GDNativeClassBinding.getAllowReselect, _godot_object);
296 	}
297 	/**
298 	
299 	*/
300 	bool getAllowRmbSelect() const
301 	{
302 		checkClassBinding!(typeof(this))();
303 		return ptrcall!(bool)(GDNativeClassBinding.getAllowRmbSelect, _godot_object);
304 	}
305 	/**
306 	Returns the column index at `position`, or -1 if no item is there.
307 	*/
308 	long getColumnAtPosition(in Vector2 position) const
309 	{
310 		checkClassBinding!(typeof(this))();
311 		return ptrcall!(long)(GDNativeClassBinding.getColumnAtPosition, _godot_object, position);
312 	}
313 	/**
314 	Returns the column's title.
315 	*/
316 	String getColumnTitle(in long column) const
317 	{
318 		checkClassBinding!(typeof(this))();
319 		return ptrcall!(String)(GDNativeClassBinding.getColumnTitle, _godot_object, column);
320 	}
321 	/**
322 	Returns the column's width in pixels.
323 	*/
324 	long getColumnWidth(in long column) const
325 	{
326 		checkClassBinding!(typeof(this))();
327 		return ptrcall!(long)(GDNativeClassBinding.getColumnWidth, _godot_object, column);
328 	}
329 	/**
330 	
331 	*/
332 	long getColumns() const
333 	{
334 		checkClassBinding!(typeof(this))();
335 		return ptrcall!(long)(GDNativeClassBinding.getColumns, _godot_object);
336 	}
337 	/**
338 	Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See $(D TreeItem.setCellMode).
339 	*/
340 	Rect2 getCustomPopupRect() const
341 	{
342 		checkClassBinding!(typeof(this))();
343 		return ptrcall!(Rect2)(GDNativeClassBinding.getCustomPopupRect, _godot_object);
344 	}
345 	/**
346 	
347 	*/
348 	long getDropModeFlags() const
349 	{
350 		checkClassBinding!(typeof(this))();
351 		return ptrcall!(long)(GDNativeClassBinding.getDropModeFlags, _godot_object);
352 	}
353 	/**
354 	Returns the drop section at `position`, or -100 if no item is there.
355 	Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See $(D dropmodeflags) for a description of each drop section.
356 	To get the item which the returned drop section is relative to, use $(D getItemAtPosition).
357 	*/
358 	long getDropSectionAtPosition(in Vector2 position) const
359 	{
360 		checkClassBinding!(typeof(this))();
361 		return ptrcall!(long)(GDNativeClassBinding.getDropSectionAtPosition, _godot_object, position);
362 	}
363 	/**
364 	Returns the currently edited item. Can be used with $(D itemEdited) to get the item that was modified.
365 	
366 	
367 	func _ready():
368 	    $Tree.item_edited.connect(on_Tree_item_edited)
369 	
370 	func on_Tree_item_edited():
371 	    print($Tree.get_edited()) # This item just got edited (e.g. checked).
372 	
373 	
374 	*/
375 	TreeItem getEdited() const
376 	{
377 		checkClassBinding!(typeof(this))();
378 		return ptrcall!(TreeItem)(GDNativeClassBinding.getEdited, _godot_object);
379 	}
380 	/**
381 	Returns the column for the currently edited item.
382 	*/
383 	long getEditedColumn() const
384 	{
385 		checkClassBinding!(typeof(this))();
386 		return ptrcall!(long)(GDNativeClassBinding.getEditedColumn, _godot_object);
387 	}
388 	/**
389 	Returns the rectangle area for the specified item. If `column` is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
390 	*/
391 	Rect2 getItemAreaRect(GodotObject item, in long column = -1) const
392 	{
393 		checkClassBinding!(typeof(this))();
394 		return ptrcall!(Rect2)(GDNativeClassBinding.getItemAreaRect, _godot_object, item, column);
395 	}
396 	/**
397 	Returns the tree item at the specified position (relative to the tree origin position).
398 	*/
399 	TreeItem getItemAtPosition(in Vector2 position) const
400 	{
401 		checkClassBinding!(typeof(this))();
402 		return ptrcall!(TreeItem)(GDNativeClassBinding.getItemAtPosition, _godot_object, position);
403 	}
404 	/**
405 	Returns the next selected item after the given one, or `null` if the end is reached.
406 	If `from` is `null`, this returns the first selected item.
407 	*/
408 	TreeItem getNextSelected(GodotObject from)
409 	{
410 		checkClassBinding!(typeof(this))();
411 		return ptrcall!(TreeItem)(GDNativeClassBinding.getNextSelected, _godot_object, from);
412 	}
413 	/**
414 	Returns the last pressed button's index.
415 	*/
416 	long getPressedButton() const
417 	{
418 		checkClassBinding!(typeof(this))();
419 		return ptrcall!(long)(GDNativeClassBinding.getPressedButton, _godot_object);
420 	}
421 	/**
422 	Returns the tree's root item, or `null` if the tree is empty.
423 	*/
424 	TreeItem getRoot()
425 	{
426 		checkClassBinding!(typeof(this))();
427 		return ptrcall!(TreeItem)(GDNativeClassBinding.getRoot, _godot_object);
428 	}
429 	/**
430 	Returns the current scrolling position.
431 	*/
432 	Vector2 getScroll() const
433 	{
434 		checkClassBinding!(typeof(this))();
435 		return ptrcall!(Vector2)(GDNativeClassBinding.getScroll, _godot_object);
436 	}
437 	/**
438 	
439 	*/
440 	Tree.SelectMode getSelectMode() const
441 	{
442 		checkClassBinding!(typeof(this))();
443 		return ptrcall!(Tree.SelectMode)(GDNativeClassBinding.getSelectMode, _godot_object);
444 	}
445 	/**
446 	Returns the currently focused item, or `null` if no item is focused.
447 	In $(D constant SELECT_ROW) and $(D constant SELECT_SINGLE) modes, the focused item is same as the selected item. In $(D constant SELECT_MULTI) mode, the focused item is the item under the focus cursor, not necessarily selected.
448 	To get the currently selected item(s), use $(D getNextSelected).
449 	*/
450 	TreeItem getSelected() const
451 	{
452 		checkClassBinding!(typeof(this))();
453 		return ptrcall!(TreeItem)(GDNativeClassBinding.getSelected, _godot_object);
454 	}
455 	/**
456 	Returns the currently focused column, or -1 if no column is focused.
457 	In $(D constant SELECT_SINGLE) mode, the focused column is the selected column. In $(D constant SELECT_ROW) mode, the focused column is always 0 if any item is selected. In $(D constant SELECT_MULTI) mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected.
458 	To tell whether a column of an item is selected, use $(D TreeItem.isSelected).
459 	*/
460 	long getSelectedColumn() const
461 	{
462 		checkClassBinding!(typeof(this))();
463 		return ptrcall!(long)(GDNativeClassBinding.getSelectedColumn, _godot_object);
464 	}
465 	/**
466 	
467 	*/
468 	bool isFoldingHidden() const
469 	{
470 		checkClassBinding!(typeof(this))();
471 		return ptrcall!(bool)(GDNativeClassBinding.isFoldingHidden, _godot_object);
472 	}
473 	/**
474 	
475 	*/
476 	bool isRootHidden() const
477 	{
478 		checkClassBinding!(typeof(this))();
479 		return ptrcall!(bool)(GDNativeClassBinding.isRootHidden, _godot_object);
480 	}
481 	/**
482 	Causes the $(D Tree) to jump to the specified item.
483 	*/
484 	void scrollToItem(GodotObject item)
485 	{
486 		checkClassBinding!(typeof(this))();
487 		ptrcall!(void)(GDNativeClassBinding.scrollToItem, _godot_object, item);
488 	}
489 	/**
490 	
491 	*/
492 	void setAllowReselect(in bool allow)
493 	{
494 		checkClassBinding!(typeof(this))();
495 		ptrcall!(void)(GDNativeClassBinding.setAllowReselect, _godot_object, allow);
496 	}
497 	/**
498 	
499 	*/
500 	void setAllowRmbSelect(in bool allow)
501 	{
502 		checkClassBinding!(typeof(this))();
503 		ptrcall!(void)(GDNativeClassBinding.setAllowRmbSelect, _godot_object, allow);
504 	}
505 	/**
506 	If `true`, the column will have the "Expand" flag of $(D Control). Columns that have the "Expand" flag will use their "min_width" in a similar fashion to $(D Control.sizeFlagsStretchRatio).
507 	*/
508 	void setColumnExpand(in long column, in bool expand)
509 	{
510 		checkClassBinding!(typeof(this))();
511 		ptrcall!(void)(GDNativeClassBinding.setColumnExpand, _godot_object, column, expand);
512 	}
513 	/**
514 	Sets the minimum width of a column. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to $(D Control.sizeFlagsStretchRatio).
515 	*/
516 	void setColumnMinWidth(in long column, in long min_width)
517 	{
518 		checkClassBinding!(typeof(this))();
519 		ptrcall!(void)(GDNativeClassBinding.setColumnMinWidth, _godot_object, column, min_width);
520 	}
521 	/**
522 	Sets the title of a column.
523 	*/
524 	void setColumnTitle(in long column, in String title)
525 	{
526 		checkClassBinding!(typeof(this))();
527 		ptrcall!(void)(GDNativeClassBinding.setColumnTitle, _godot_object, column, title);
528 	}
529 	/**
530 	If `true`, column titles are visible.
531 	*/
532 	void setColumnTitlesVisible(in bool visible)
533 	{
534 		checkClassBinding!(typeof(this))();
535 		ptrcall!(void)(GDNativeClassBinding.setColumnTitlesVisible, _godot_object, visible);
536 	}
537 	/**
538 	
539 	*/
540 	void setColumns(in long amount)
541 	{
542 		checkClassBinding!(typeof(this))();
543 		ptrcall!(void)(GDNativeClassBinding.setColumns, _godot_object, amount);
544 	}
545 	/**
546 	
547 	*/
548 	void setDropModeFlags(in long flags)
549 	{
550 		checkClassBinding!(typeof(this))();
551 		ptrcall!(void)(GDNativeClassBinding.setDropModeFlags, _godot_object, flags);
552 	}
553 	/**
554 	
555 	*/
556 	void setHideFolding(in bool hide)
557 	{
558 		checkClassBinding!(typeof(this))();
559 		ptrcall!(void)(GDNativeClassBinding.setHideFolding, _godot_object, hide);
560 	}
561 	/**
562 	
563 	*/
564 	void setHideRoot(in bool enable)
565 	{
566 		checkClassBinding!(typeof(this))();
567 		ptrcall!(void)(GDNativeClassBinding.setHideRoot, _godot_object, enable);
568 	}
569 	/**
570 	
571 	*/
572 	void setSelectMode(in long mode)
573 	{
574 		checkClassBinding!(typeof(this))();
575 		ptrcall!(void)(GDNativeClassBinding.setSelectMode, _godot_object, mode);
576 	}
577 	/**
578 	If `true`, the currently selected cell may be selected again.
579 	*/
580 	@property bool allowReselect()
581 	{
582 		return getAllowReselect();
583 	}
584 	/// ditto
585 	@property void allowReselect(bool v)
586 	{
587 		setAllowReselect(v);
588 	}
589 	/**
590 	If `true`, a right mouse button click can select items.
591 	*/
592 	@property bool allowRmbSelect()
593 	{
594 		return getAllowRmbSelect();
595 	}
596 	/// ditto
597 	@property void allowRmbSelect(bool v)
598 	{
599 		setAllowRmbSelect(v);
600 	}
601 	/**
602 	The number of columns.
603 	*/
604 	@property long columns()
605 	{
606 		return getColumns();
607 	}
608 	/// ditto
609 	@property void columns(long v)
610 	{
611 		setColumns(v);
612 	}
613 	/**
614 	The drop mode as an OR combination of flags. See $(D dropmodeflags) constants. Once dropping is done, reverts to $(D constant DROP_MODE_DISABLED). Setting this during $(D Control.canDropData) is recommended.
615 	This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
616 	*/
617 	@property long dropModeFlags()
618 	{
619 		return getDropModeFlags();
620 	}
621 	/// ditto
622 	@property void dropModeFlags(long v)
623 	{
624 		setDropModeFlags(v);
625 	}
626 	/**
627 	If `true`, the folding arrow is hidden.
628 	*/
629 	@property bool hideFolding()
630 	{
631 		return isFoldingHidden();
632 	}
633 	/// ditto
634 	@property void hideFolding(bool v)
635 	{
636 		setHideFolding(v);
637 	}
638 	/**
639 	If `true`, the tree's root is hidden.
640 	*/
641 	@property bool hideRoot()
642 	{
643 		return isRootHidden();
644 	}
645 	/// ditto
646 	@property void hideRoot(bool v)
647 	{
648 		setHideRoot(v);
649 	}
650 	/**
651 	Allows single or multiple selection. See the $(D selectmode) constants.
652 	*/
653 	@property Tree.SelectMode selectMode()
654 	{
655 		return getSelectMode();
656 	}
657 	/// ditto
658 	@property void selectMode(long v)
659 	{
660 		setSelectMode(v);
661 	}
662 }