1 /**
2 Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
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.itemlist;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.meta;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.object;
22 import godot.classdb;
23 import godot.control;
24 import godot.texture;
25 import godot.vscrollbar;
26 import godot.inputevent;
27 import godot.canvasitem;
28 import godot.node;
29 /**
30 Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
31 
32 This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list.
33 Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key).
34 */
35 @GodotBaseClass struct ItemList
36 {
37 	enum string _GODOT_internal_name = "ItemList";
38 public:
39 @nogc nothrow:
40 	union { godot_object _godot_object; Control _GODOT_base; }
41 	alias _GODOT_base this;
42 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
43 	package(godot) __gshared bool _classBindingInitialized = false;
44 	package(godot) static struct _classBinding
45 	{
46 		__gshared:
47 		@GodotName("add_item") GodotMethod!(void, String, Texture, bool) addItem;
48 		@GodotName("add_icon_item") GodotMethod!(void, Texture, bool) addIconItem;
49 		@GodotName("set_item_text") GodotMethod!(void, long, String) setItemText;
50 		@GodotName("get_item_text") GodotMethod!(String, long) getItemText;
51 		@GodotName("set_item_icon") GodotMethod!(void, long, Texture) setItemIcon;
52 		@GodotName("get_item_icon") GodotMethod!(Texture, long) getItemIcon;
53 		@GodotName("set_item_icon_region") GodotMethod!(void, long, Rect2) setItemIconRegion;
54 		@GodotName("get_item_icon_region") GodotMethod!(Rect2, long) getItemIconRegion;
55 		@GodotName("set_item_icon_modulate") GodotMethod!(void, long, Color) setItemIconModulate;
56 		@GodotName("get_item_icon_modulate") GodotMethod!(Color, long) getItemIconModulate;
57 		@GodotName("set_item_selectable") GodotMethod!(void, long, bool) setItemSelectable;
58 		@GodotName("is_item_selectable") GodotMethod!(bool, long) isItemSelectable;
59 		@GodotName("set_item_disabled") GodotMethod!(void, long, bool) setItemDisabled;
60 		@GodotName("is_item_disabled") GodotMethod!(bool, long) isItemDisabled;
61 		@GodotName("set_item_metadata") GodotMethod!(void, long, Variant) setItemMetadata;
62 		@GodotName("get_item_metadata") GodotMethod!(Variant, long) getItemMetadata;
63 		@GodotName("set_item_custom_bg_color") GodotMethod!(void, long, Color) setItemCustomBgColor;
64 		@GodotName("get_item_custom_bg_color") GodotMethod!(Color, long) getItemCustomBgColor;
65 		@GodotName("set_item_custom_fg_color") GodotMethod!(void, long, Color) setItemCustomFgColor;
66 		@GodotName("get_item_custom_fg_color") GodotMethod!(Color, long) getItemCustomFgColor;
67 		@GodotName("set_item_tooltip_enabled") GodotMethod!(void, long, bool) setItemTooltipEnabled;
68 		@GodotName("is_item_tooltip_enabled") GodotMethod!(bool, long) isItemTooltipEnabled;
69 		@GodotName("set_item_tooltip") GodotMethod!(void, long, String) setItemTooltip;
70 		@GodotName("get_item_tooltip") GodotMethod!(String, long) getItemTooltip;
71 		@GodotName("select") GodotMethod!(void, long, bool) select;
72 		@GodotName("unselect") GodotMethod!(void, long) unselect;
73 		@GodotName("unselect_all") GodotMethod!(void) unselectAll;
74 		@GodotName("is_selected") GodotMethod!(bool, long) isSelected;
75 		@GodotName("get_selected_items") GodotMethod!(PoolIntArray) getSelectedItems;
76 		@GodotName("move_item") GodotMethod!(void, long, long) moveItem;
77 		@GodotName("get_item_count") GodotMethod!(long) getItemCount;
78 		@GodotName("remove_item") GodotMethod!(void, long) removeItem;
79 		@GodotName("clear") GodotMethod!(void) clear;
80 		@GodotName("sort_items_by_text") GodotMethod!(void) sortItemsByText;
81 		@GodotName("set_fixed_column_width") GodotMethod!(void, long) setFixedColumnWidth;
82 		@GodotName("get_fixed_column_width") GodotMethod!(long) getFixedColumnWidth;
83 		@GodotName("set_same_column_width") GodotMethod!(void, bool) setSameColumnWidth;
84 		@GodotName("is_same_column_width") GodotMethod!(bool) isSameColumnWidth;
85 		@GodotName("set_max_text_lines") GodotMethod!(void, long) setMaxTextLines;
86 		@GodotName("get_max_text_lines") GodotMethod!(long) getMaxTextLines;
87 		@GodotName("set_max_columns") GodotMethod!(void, long) setMaxColumns;
88 		@GodotName("get_max_columns") GodotMethod!(long) getMaxColumns;
89 		@GodotName("set_select_mode") GodotMethod!(void, long) setSelectMode;
90 		@GodotName("get_select_mode") GodotMethod!(ItemList.SelectMode) getSelectMode;
91 		@GodotName("set_icon_mode") GodotMethod!(void, long) setIconMode;
92 		@GodotName("get_icon_mode") GodotMethod!(ItemList.IconMode) getIconMode;
93 		@GodotName("set_fixed_icon_size") GodotMethod!(void, Vector2) setFixedIconSize;
94 		@GodotName("get_fixed_icon_size") GodotMethod!(Vector2) getFixedIconSize;
95 		@GodotName("set_icon_scale") GodotMethod!(void, double) setIconScale;
96 		@GodotName("get_icon_scale") GodotMethod!(double) getIconScale;
97 		@GodotName("set_allow_rmb_select") GodotMethod!(void, bool) setAllowRmbSelect;
98 		@GodotName("get_allow_rmb_select") GodotMethod!(bool) getAllowRmbSelect;
99 		@GodotName("set_allow_reselect") GodotMethod!(void, bool) setAllowReselect;
100 		@GodotName("get_allow_reselect") GodotMethod!(bool) getAllowReselect;
101 		@GodotName("set_auto_height") GodotMethod!(void, bool) setAutoHeight;
102 		@GodotName("has_auto_height") GodotMethod!(bool) hasAutoHeight;
103 		@GodotName("is_anything_selected") GodotMethod!(bool) isAnythingSelected;
104 		@GodotName("get_item_at_position") GodotMethod!(long, Vector2, bool) getItemAtPosition;
105 		@GodotName("ensure_current_is_visible") GodotMethod!(void) ensureCurrentIsVisible;
106 		@GodotName("get_v_scroll") GodotMethod!(VScrollBar) getVScroll;
107 		@GodotName("_scroll_changed") GodotMethod!(void, double) _scrollChanged;
108 		@GodotName("_gui_input") GodotMethod!(void, InputEvent) _guiInput;
109 		@GodotName("_set_items") GodotMethod!(void, Array) _setItems;
110 		@GodotName("_get_items") GodotMethod!(Array) _getItems;
111 	}
112 	bool opEquals(in ItemList other) const { return _godot_object.ptr is other._godot_object.ptr; }
113 	ItemList opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
114 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
115 	mixin baseCasts;
116 	static ItemList _new()
117 	{
118 		static godot_class_constructor constructor;
119 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("ItemList");
120 		if(constructor is null) return typeof(this).init;
121 		return cast(ItemList)(constructor());
122 	}
123 	@disable new(size_t s);
124 	/// 
125 	enum SelectMode : int
126 	{
127 		/**
128 		
129 		*/
130 		selectSingle = 0,
131 		/**
132 		
133 		*/
134 		selectMulti = 1,
135 	}
136 	/// 
137 	enum IconMode : int
138 	{
139 		/**
140 		
141 		*/
142 		iconModeTop = 0,
143 		/**
144 		
145 		*/
146 		iconModeLeft = 1,
147 	}
148 	/// 
149 	enum Constants : int
150 	{
151 		selectSingle = 0,
152 		iconModeTop = 0,
153 		iconModeLeft = 1,
154 		selectMulti = 1,
155 	}
156 	/**
157 	Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon.
158 	If selectable is true the list item will be selectable.
159 	*/
160 	void addItem(StringArg0)(in StringArg0 text, Texture icon = Texture.init, in bool selectable = true)
161 	{
162 		checkClassBinding!(typeof(this))();
163 		ptrcall!(void)(_classBinding.addItem, _godot_object, text, icon, selectable);
164 	}
165 	/**
166 	Adds an item to the item list with no text, only an icon.
167 	*/
168 	void addIconItem(Texture icon, in bool selectable = true)
169 	{
170 		checkClassBinding!(typeof(this))();
171 		ptrcall!(void)(_classBinding.addIconItem, _godot_object, icon, selectable);
172 	}
173 	/**
174 	Sets text of item at specified index.
175 	*/
176 	void setItemText(StringArg1)(in long idx, in StringArg1 text)
177 	{
178 		checkClassBinding!(typeof(this))();
179 		ptrcall!(void)(_classBinding.setItemText, _godot_object, idx, text);
180 	}
181 	/**
182 	Return the text for specified item index.
183 	*/
184 	String getItemText(in long idx) const
185 	{
186 		checkClassBinding!(typeof(this))();
187 		return ptrcall!(String)(_classBinding.getItemText, _godot_object, idx);
188 	}
189 	/**
190 	Set (or replace) icon of the item at the specified index.
191 	*/
192 	void setItemIcon(in long idx, Texture icon)
193 	{
194 		checkClassBinding!(typeof(this))();
195 		ptrcall!(void)(_classBinding.setItemIcon, _godot_object, idx, icon);
196 	}
197 	/**
198 	
199 	*/
200 	Ref!Texture getItemIcon(in long idx) const
201 	{
202 		checkClassBinding!(typeof(this))();
203 		return ptrcall!(Texture)(_classBinding.getItemIcon, _godot_object, idx);
204 	}
205 	/**
206 	
207 	*/
208 	void setItemIconRegion(in long idx, in Rect2 rect)
209 	{
210 		checkClassBinding!(typeof(this))();
211 		ptrcall!(void)(_classBinding.setItemIconRegion, _godot_object, idx, rect);
212 	}
213 	/**
214 	
215 	*/
216 	Rect2 getItemIconRegion(in long idx) const
217 	{
218 		checkClassBinding!(typeof(this))();
219 		return ptrcall!(Rect2)(_classBinding.getItemIconRegion, _godot_object, idx);
220 	}
221 	/**
222 	Sets a modulating $(D Color) for item's icon at the specified index.
223 	*/
224 	void setItemIconModulate(in long idx, in Color modulate)
225 	{
226 		checkClassBinding!(typeof(this))();
227 		ptrcall!(void)(_classBinding.setItemIconModulate, _godot_object, idx, modulate);
228 	}
229 	/**
230 	Returns a $(D Color) modulating item's icon at the specified index.
231 	*/
232 	Color getItemIconModulate(in long idx) const
233 	{
234 		checkClassBinding!(typeof(this))();
235 		return ptrcall!(Color)(_classBinding.getItemIconModulate, _godot_object, idx);
236 	}
237 	/**
238 	Allow or disallow selection of the item at the specified index.
239 	*/
240 	void setItemSelectable(in long idx, in bool selectable)
241 	{
242 		checkClassBinding!(typeof(this))();
243 		ptrcall!(void)(_classBinding.setItemSelectable, _godot_object, idx, selectable);
244 	}
245 	/**
246 	Returns whether or not the item at the specified index is selectable.
247 	*/
248 	bool isItemSelectable(in long idx) const
249 	{
250 		checkClassBinding!(typeof(this))();
251 		return ptrcall!(bool)(_classBinding.isItemSelectable, _godot_object, idx);
252 	}
253 	/**
254 	Disable (or enable) item at specified index.
255 	Disabled items are not be selectable and do not fire activation (Enter or double-click) signals.
256 	*/
257 	void setItemDisabled(in long idx, in bool disabled)
258 	{
259 		checkClassBinding!(typeof(this))();
260 		ptrcall!(void)(_classBinding.setItemDisabled, _godot_object, idx, disabled);
261 	}
262 	/**
263 	Returns whether or not the item at the specified index is disabled
264 	*/
265 	bool isItemDisabled(in long idx) const
266 	{
267 		checkClassBinding!(typeof(this))();
268 		return ptrcall!(bool)(_classBinding.isItemDisabled, _godot_object, idx);
269 	}
270 	/**
271 	Sets a value (of any type) to be stored with the item at the specified index.
272 	*/
273 	void setItemMetadata(VariantArg1)(in long idx, in VariantArg1 metadata)
274 	{
275 		checkClassBinding!(typeof(this))();
276 		ptrcall!(void)(_classBinding.setItemMetadata, _godot_object, idx, metadata);
277 	}
278 	/**
279 	
280 	*/
281 	Variant getItemMetadata(in long idx) const
282 	{
283 		checkClassBinding!(typeof(this))();
284 		return ptrcall!(Variant)(_classBinding.getItemMetadata, _godot_object, idx);
285 	}
286 	/**
287 	
288 	*/
289 	void setItemCustomBgColor(in long idx, in Color custom_bg_color)
290 	{
291 		checkClassBinding!(typeof(this))();
292 		ptrcall!(void)(_classBinding.setItemCustomBgColor, _godot_object, idx, custom_bg_color);
293 	}
294 	/**
295 	
296 	*/
297 	Color getItemCustomBgColor(in long idx) const
298 	{
299 		checkClassBinding!(typeof(this))();
300 		return ptrcall!(Color)(_classBinding.getItemCustomBgColor, _godot_object, idx);
301 	}
302 	/**
303 	
304 	*/
305 	void setItemCustomFgColor(in long idx, in Color custom_fg_color)
306 	{
307 		checkClassBinding!(typeof(this))();
308 		ptrcall!(void)(_classBinding.setItemCustomFgColor, _godot_object, idx, custom_fg_color);
309 	}
310 	/**
311 	
312 	*/
313 	Color getItemCustomFgColor(in long idx) const
314 	{
315 		checkClassBinding!(typeof(this))();
316 		return ptrcall!(Color)(_classBinding.getItemCustomFgColor, _godot_object, idx);
317 	}
318 	/**
319 	Sets whether the tooltip is enabled for specified item index.
320 	*/
321 	void setItemTooltipEnabled(in long idx, in bool enable)
322 	{
323 		checkClassBinding!(typeof(this))();
324 		ptrcall!(void)(_classBinding.setItemTooltipEnabled, _godot_object, idx, enable);
325 	}
326 	/**
327 	Returns whether the tooltip is enabled for specified item index.
328 	*/
329 	bool isItemTooltipEnabled(in long idx) const
330 	{
331 		checkClassBinding!(typeof(this))();
332 		return ptrcall!(bool)(_classBinding.isItemTooltipEnabled, _godot_object, idx);
333 	}
334 	/**
335 	Sets tooltip hint for item at specified index.
336 	*/
337 	void setItemTooltip(StringArg1)(in long idx, in StringArg1 tooltip)
338 	{
339 		checkClassBinding!(typeof(this))();
340 		ptrcall!(void)(_classBinding.setItemTooltip, _godot_object, idx, tooltip);
341 	}
342 	/**
343 	Return tooltip hint for specified item index.
344 	*/
345 	String getItemTooltip(in long idx) const
346 	{
347 		checkClassBinding!(typeof(this))();
348 		return ptrcall!(String)(_classBinding.getItemTooltip, _godot_object, idx);
349 	}
350 	/**
351 	Select the item at the specified index.
352 	Note: This method does not trigger the item selection signal.
353 	*/
354 	void select(in long idx, in bool single = true)
355 	{
356 		checkClassBinding!(typeof(this))();
357 		ptrcall!(void)(_classBinding.select, _godot_object, idx, single);
358 	}
359 	/**
360 	Ensure item at specified index is not selected.
361 	*/
362 	void unselect(in long idx)
363 	{
364 		checkClassBinding!(typeof(this))();
365 		ptrcall!(void)(_classBinding.unselect, _godot_object, idx);
366 	}
367 	/**
368 	Ensure there are no items selected.
369 	*/
370 	void unselectAll()
371 	{
372 		checkClassBinding!(typeof(this))();
373 		ptrcall!(void)(_classBinding.unselectAll, _godot_object);
374 	}
375 	/**
376 	Returns whether or not item at the specified index is currently selected.
377 	*/
378 	bool isSelected(in long idx) const
379 	{
380 		checkClassBinding!(typeof(this))();
381 		return ptrcall!(bool)(_classBinding.isSelected, _godot_object, idx);
382 	}
383 	/**
384 	Returns the list of selected indexes.
385 	*/
386 	PoolIntArray getSelectedItems()
387 	{
388 		checkClassBinding!(typeof(this))();
389 		return ptrcall!(PoolIntArray)(_classBinding.getSelectedItems, _godot_object);
390 	}
391 	/**
392 	Moves item at index `from_idx` to `to_idx`.
393 	*/
394 	void moveItem(in long from_idx, in long to_idx)
395 	{
396 		checkClassBinding!(typeof(this))();
397 		ptrcall!(void)(_classBinding.moveItem, _godot_object, from_idx, to_idx);
398 	}
399 	/**
400 	Return count of items currently in the item list.
401 	*/
402 	long getItemCount() const
403 	{
404 		checkClassBinding!(typeof(this))();
405 		return ptrcall!(long)(_classBinding.getItemCount, _godot_object);
406 	}
407 	/**
408 	Remove item at specified index from the list.
409 	*/
410 	void removeItem(in long idx)
411 	{
412 		checkClassBinding!(typeof(this))();
413 		ptrcall!(void)(_classBinding.removeItem, _godot_object, idx);
414 	}
415 	/**
416 	Remove all items from the list.
417 	*/
418 	void clear()
419 	{
420 		checkClassBinding!(typeof(this))();
421 		ptrcall!(void)(_classBinding.clear, _godot_object);
422 	}
423 	/**
424 	Sorts items in the list by their text.
425 	*/
426 	void sortItemsByText()
427 	{
428 		checkClassBinding!(typeof(this))();
429 		ptrcall!(void)(_classBinding.sortItemsByText, _godot_object);
430 	}
431 	/**
432 	
433 	*/
434 	void setFixedColumnWidth(in long width)
435 	{
436 		checkClassBinding!(typeof(this))();
437 		ptrcall!(void)(_classBinding.setFixedColumnWidth, _godot_object, width);
438 	}
439 	/**
440 	
441 	*/
442 	long getFixedColumnWidth() const
443 	{
444 		checkClassBinding!(typeof(this))();
445 		return ptrcall!(long)(_classBinding.getFixedColumnWidth, _godot_object);
446 	}
447 	/**
448 	
449 	*/
450 	void setSameColumnWidth(in bool enable)
451 	{
452 		checkClassBinding!(typeof(this))();
453 		ptrcall!(void)(_classBinding.setSameColumnWidth, _godot_object, enable);
454 	}
455 	/**
456 	
457 	*/
458 	bool isSameColumnWidth() const
459 	{
460 		checkClassBinding!(typeof(this))();
461 		return ptrcall!(bool)(_classBinding.isSameColumnWidth, _godot_object);
462 	}
463 	/**
464 	
465 	*/
466 	void setMaxTextLines(in long lines)
467 	{
468 		checkClassBinding!(typeof(this))();
469 		ptrcall!(void)(_classBinding.setMaxTextLines, _godot_object, lines);
470 	}
471 	/**
472 	
473 	*/
474 	long getMaxTextLines() const
475 	{
476 		checkClassBinding!(typeof(this))();
477 		return ptrcall!(long)(_classBinding.getMaxTextLines, _godot_object);
478 	}
479 	/**
480 	
481 	*/
482 	void setMaxColumns(in long amount)
483 	{
484 		checkClassBinding!(typeof(this))();
485 		ptrcall!(void)(_classBinding.setMaxColumns, _godot_object, amount);
486 	}
487 	/**
488 	
489 	*/
490 	long getMaxColumns() const
491 	{
492 		checkClassBinding!(typeof(this))();
493 		return ptrcall!(long)(_classBinding.getMaxColumns, _godot_object);
494 	}
495 	/**
496 	
497 	*/
498 	void setSelectMode(in long mode)
499 	{
500 		checkClassBinding!(typeof(this))();
501 		ptrcall!(void)(_classBinding.setSelectMode, _godot_object, mode);
502 	}
503 	/**
504 	
505 	*/
506 	ItemList.SelectMode getSelectMode() const
507 	{
508 		checkClassBinding!(typeof(this))();
509 		return ptrcall!(ItemList.SelectMode)(_classBinding.getSelectMode, _godot_object);
510 	}
511 	/**
512 	
513 	*/
514 	void setIconMode(in long mode)
515 	{
516 		checkClassBinding!(typeof(this))();
517 		ptrcall!(void)(_classBinding.setIconMode, _godot_object, mode);
518 	}
519 	/**
520 	
521 	*/
522 	ItemList.IconMode getIconMode() const
523 	{
524 		checkClassBinding!(typeof(this))();
525 		return ptrcall!(ItemList.IconMode)(_classBinding.getIconMode, _godot_object);
526 	}
527 	/**
528 	
529 	*/
530 	void setFixedIconSize(in Vector2 size)
531 	{
532 		checkClassBinding!(typeof(this))();
533 		ptrcall!(void)(_classBinding.setFixedIconSize, _godot_object, size);
534 	}
535 	/**
536 	
537 	*/
538 	Vector2 getFixedIconSize() const
539 	{
540 		checkClassBinding!(typeof(this))();
541 		return ptrcall!(Vector2)(_classBinding.getFixedIconSize, _godot_object);
542 	}
543 	/**
544 	
545 	*/
546 	void setIconScale(in double scale)
547 	{
548 		checkClassBinding!(typeof(this))();
549 		ptrcall!(void)(_classBinding.setIconScale, _godot_object, scale);
550 	}
551 	/**
552 	
553 	*/
554 	double getIconScale() const
555 	{
556 		checkClassBinding!(typeof(this))();
557 		return ptrcall!(double)(_classBinding.getIconScale, _godot_object);
558 	}
559 	/**
560 	
561 	*/
562 	void setAllowRmbSelect(in bool allow)
563 	{
564 		checkClassBinding!(typeof(this))();
565 		ptrcall!(void)(_classBinding.setAllowRmbSelect, _godot_object, allow);
566 	}
567 	/**
568 	
569 	*/
570 	bool getAllowRmbSelect() const
571 	{
572 		checkClassBinding!(typeof(this))();
573 		return ptrcall!(bool)(_classBinding.getAllowRmbSelect, _godot_object);
574 	}
575 	/**
576 	
577 	*/
578 	void setAllowReselect(in bool allow)
579 	{
580 		checkClassBinding!(typeof(this))();
581 		ptrcall!(void)(_classBinding.setAllowReselect, _godot_object, allow);
582 	}
583 	/**
584 	
585 	*/
586 	bool getAllowReselect() const
587 	{
588 		checkClassBinding!(typeof(this))();
589 		return ptrcall!(bool)(_classBinding.getAllowReselect, _godot_object);
590 	}
591 	/**
592 	
593 	*/
594 	void setAutoHeight(in bool enable)
595 	{
596 		checkClassBinding!(typeof(this))();
597 		ptrcall!(void)(_classBinding.setAutoHeight, _godot_object, enable);
598 	}
599 	/**
600 	
601 	*/
602 	bool hasAutoHeight() const
603 	{
604 		checkClassBinding!(typeof(this))();
605 		return ptrcall!(bool)(_classBinding.hasAutoHeight, _godot_object);
606 	}
607 	/**
608 	Returns `true` if one or more items are selected.
609 	*/
610 	bool isAnythingSelected()
611 	{
612 		checkClassBinding!(typeof(this))();
613 		return ptrcall!(bool)(_classBinding.isAnythingSelected, _godot_object);
614 	}
615 	/**
616 	Given a position within the control return the item (if any) at that point.
617 	*/
618 	long getItemAtPosition(in Vector2 position, in bool exact = false) const
619 	{
620 		checkClassBinding!(typeof(this))();
621 		return ptrcall!(long)(_classBinding.getItemAtPosition, _godot_object, position, exact);
622 	}
623 	/**
624 	Ensure selection is visible, adjusting the scroll position as necessary.
625 	*/
626 	void ensureCurrentIsVisible()
627 	{
628 		checkClassBinding!(typeof(this))();
629 		ptrcall!(void)(_classBinding.ensureCurrentIsVisible, _godot_object);
630 	}
631 	/**
632 	Returns the current vertical scroll bar for the List.
633 	*/
634 	VScrollBar getVScroll()
635 	{
636 		checkClassBinding!(typeof(this))();
637 		return ptrcall!(VScrollBar)(_classBinding.getVScroll, _godot_object);
638 	}
639 	/**
640 	
641 	*/
642 	void _scrollChanged(in double arg0)
643 	{
644 		Array _GODOT_args = Array.empty_array;
645 		_GODOT_args.append(arg0);
646 		String _GODOT_method_name = String("_scroll_changed");
647 		this.callv(_GODOT_method_name, _GODOT_args);
648 	}
649 	/**
650 	
651 	*/
652 	void _guiInput(InputEvent arg0)
653 	{
654 		Array _GODOT_args = Array.empty_array;
655 		_GODOT_args.append(arg0);
656 		String _GODOT_method_name = String("_gui_input");
657 		this.callv(_GODOT_method_name, _GODOT_args);
658 	}
659 	/**
660 	
661 	*/
662 	void _setItems(in Array arg0)
663 	{
664 		Array _GODOT_args = Array.empty_array;
665 		_GODOT_args.append(arg0);
666 		String _GODOT_method_name = String("_set_items");
667 		this.callv(_GODOT_method_name, _GODOT_args);
668 	}
669 	/**
670 	
671 	*/
672 	Array _getItems() const
673 	{
674 		Array _GODOT_args = Array.empty_array;
675 		String _GODOT_method_name = String("_get_items");
676 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!Array);
677 	}
678 	/**
679 	
680 	*/
681 	@property Array items()
682 	{
683 		return _getItems();
684 	}
685 	/// ditto
686 	@property void items(Array v)
687 	{
688 		_setItems(v);
689 	}
690 	/**
691 	Allow single or multiple selection. See the `SELECT_*` constants.
692 	*/
693 	@property ItemList.SelectMode selectMode()
694 	{
695 		return getSelectMode();
696 	}
697 	/// ditto
698 	@property void selectMode(long v)
699 	{
700 		setSelectMode(v);
701 	}
702 	/**
703 	If `true` the currently selected item may be selected again.
704 	*/
705 	@property bool allowReselect()
706 	{
707 		return getAllowReselect();
708 	}
709 	/// ditto
710 	@property void allowReselect(bool v)
711 	{
712 		setAllowReselect(v);
713 	}
714 	/**
715 	If `true` a right mouse button click can select items.
716 	*/
717 	@property bool allowRmbSelect()
718 	{
719 		return getAllowRmbSelect();
720 	}
721 	/// ditto
722 	@property void allowRmbSelect(bool v)
723 	{
724 		setAllowRmbSelect(v);
725 	}
726 	/**
727 	
728 	*/
729 	@property long maxTextLines()
730 	{
731 		return getMaxTextLines();
732 	}
733 	/// ditto
734 	@property void maxTextLines(long v)
735 	{
736 		setMaxTextLines(v);
737 	}
738 	/**
739 	
740 	*/
741 	@property bool autoHeight()
742 	{
743 		return hasAutoHeight();
744 	}
745 	/// ditto
746 	@property void autoHeight(bool v)
747 	{
748 		setAutoHeight(v);
749 	}
750 	/**
751 	
752 	*/
753 	@property long maxColumns()
754 	{
755 		return getMaxColumns();
756 	}
757 	/// ditto
758 	@property void maxColumns(long v)
759 	{
760 		setMaxColumns(v);
761 	}
762 	/**
763 	
764 	*/
765 	@property bool sameColumnWidth()
766 	{
767 		return isSameColumnWidth();
768 	}
769 	/// ditto
770 	@property void sameColumnWidth(bool v)
771 	{
772 		setSameColumnWidth(v);
773 	}
774 	/**
775 	
776 	*/
777 	@property long fixedColumnWidth()
778 	{
779 		return getFixedColumnWidth();
780 	}
781 	/// ditto
782 	@property void fixedColumnWidth(long v)
783 	{
784 		setFixedColumnWidth(v);
785 	}
786 	/**
787 	
788 	*/
789 	@property ItemList.IconMode iconMode()
790 	{
791 		return getIconMode();
792 	}
793 	/// ditto
794 	@property void iconMode(long v)
795 	{
796 		setIconMode(v);
797 	}
798 	/**
799 	
800 	*/
801 	@property double iconScale()
802 	{
803 		return getIconScale();
804 	}
805 	/// ditto
806 	@property void iconScale(double v)
807 	{
808 		setIconScale(v);
809 	}
810 	/**
811 	
812 	*/
813 	@property Vector2 fixedIconSize()
814 	{
815 		return getFixedIconSize();
816 	}
817 	/// ditto
818 	@property void fixedIconSize(Vector2 v)
819 	{
820 		setFixedIconSize(v);
821 	}
822 }