1 /**
2 PopupMenu displays a list of options.
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.popupmenu;
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.popup;
24 import godot.inputevent;
25 import godot.texture;
26 import godot.shortcut;
27 import godot.control;
28 import godot.canvasitem;
29 import godot.node;
30 /**
31 PopupMenu displays a list of options.
32 
33 PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus.
34 */
35 @GodotBaseClass struct PopupMenu
36 {
37 	enum string _GODOT_internal_name = "PopupMenu";
38 public:
39 @nogc nothrow:
40 	union { godot_object _godot_object; Popup _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("_gui_input") GodotMethod!(void, InputEvent) _guiInput;
48 		@GodotName("add_icon_item") GodotMethod!(void, Texture, String, long, long) addIconItem;
49 		@GodotName("add_item") GodotMethod!(void, String, long, long) addItem;
50 		@GodotName("add_icon_check_item") GodotMethod!(void, Texture, String, long, long) addIconCheckItem;
51 		@GodotName("add_check_item") GodotMethod!(void, String, long, long) addCheckItem;
52 		@GodotName("add_radio_check_item") GodotMethod!(void, String, long, long) addRadioCheckItem;
53 		@GodotName("add_submenu_item") GodotMethod!(void, String, String, long) addSubmenuItem;
54 		@GodotName("add_icon_shortcut") GodotMethod!(void, Texture, ShortCut, long, bool) addIconShortcut;
55 		@GodotName("add_shortcut") GodotMethod!(void, ShortCut, long, bool) addShortcut;
56 		@GodotName("add_icon_check_shortcut") GodotMethod!(void, Texture, ShortCut, long, bool) addIconCheckShortcut;
57 		@GodotName("add_check_shortcut") GodotMethod!(void, ShortCut, long, bool) addCheckShortcut;
58 		@GodotName("add_radio_check_shortcut") GodotMethod!(void, ShortCut, long, bool) addRadioCheckShortcut;
59 		@GodotName("set_item_text") GodotMethod!(void, long, String) setItemText;
60 		@GodotName("set_item_icon") GodotMethod!(void, long, Texture) setItemIcon;
61 		@GodotName("set_item_checked") GodotMethod!(void, long, bool) setItemChecked;
62 		@GodotName("set_item_id") GodotMethod!(void, long, long) setItemId;
63 		@GodotName("set_item_accelerator") GodotMethod!(void, long, long) setItemAccelerator;
64 		@GodotName("set_item_metadata") GodotMethod!(void, long, Variant) setItemMetadata;
65 		@GodotName("set_item_disabled") GodotMethod!(void, long, bool) setItemDisabled;
66 		@GodotName("set_item_submenu") GodotMethod!(void, long, String) setItemSubmenu;
67 		@GodotName("set_item_as_separator") GodotMethod!(void, long, bool) setItemAsSeparator;
68 		@GodotName("set_item_as_checkable") GodotMethod!(void, long, bool) setItemAsCheckable;
69 		@GodotName("set_item_as_radio_checkable") GodotMethod!(void, long, bool) setItemAsRadioCheckable;
70 		@GodotName("set_item_tooltip") GodotMethod!(void, long, String) setItemTooltip;
71 		@GodotName("set_item_shortcut") GodotMethod!(void, long, ShortCut, bool) setItemShortcut;
72 		@GodotName("set_item_multistate") GodotMethod!(void, long, long) setItemMultistate;
73 		@GodotName("set_item_shortcut_disabled") GodotMethod!(void, long, bool) setItemShortcutDisabled;
74 		@GodotName("toggle_item_checked") GodotMethod!(void, long) toggleItemChecked;
75 		@GodotName("toggle_item_multistate") GodotMethod!(void, long) toggleItemMultistate;
76 		@GodotName("get_item_text") GodotMethod!(String, long) getItemText;
77 		@GodotName("get_item_icon") GodotMethod!(Texture, long) getItemIcon;
78 		@GodotName("is_item_checked") GodotMethod!(bool, long) isItemChecked;
79 		@GodotName("get_item_id") GodotMethod!(long, long) getItemId;
80 		@GodotName("get_item_index") GodotMethod!(long, long) getItemIndex;
81 		@GodotName("get_item_accelerator") GodotMethod!(long, long) getItemAccelerator;
82 		@GodotName("get_item_metadata") GodotMethod!(Variant, long) getItemMetadata;
83 		@GodotName("is_item_disabled") GodotMethod!(bool, long) isItemDisabled;
84 		@GodotName("get_item_submenu") GodotMethod!(String, long) getItemSubmenu;
85 		@GodotName("is_item_separator") GodotMethod!(bool, long) isItemSeparator;
86 		@GodotName("is_item_checkable") GodotMethod!(bool, long) isItemCheckable;
87 		@GodotName("is_item_radio_checkable") GodotMethod!(bool, long) isItemRadioCheckable;
88 		@GodotName("is_item_shortcut_disabled") GodotMethod!(bool, long) isItemShortcutDisabled;
89 		@GodotName("get_item_tooltip") GodotMethod!(String, long) getItemTooltip;
90 		@GodotName("get_item_shortcut") GodotMethod!(ShortCut, long) getItemShortcut;
91 		@GodotName("get_item_count") GodotMethod!(long) getItemCount;
92 		@GodotName("remove_item") GodotMethod!(void, long) removeItem;
93 		@GodotName("add_separator") GodotMethod!(void, String) addSeparator;
94 		@GodotName("clear") GodotMethod!(void) clear;
95 		@GodotName("_set_items") GodotMethod!(void, Array) _setItems;
96 		@GodotName("_get_items") GodotMethod!(Array) _getItems;
97 		@GodotName("set_hide_on_item_selection") GodotMethod!(void, bool) setHideOnItemSelection;
98 		@GodotName("is_hide_on_item_selection") GodotMethod!(bool) isHideOnItemSelection;
99 		@GodotName("set_hide_on_checkable_item_selection") GodotMethod!(void, bool) setHideOnCheckableItemSelection;
100 		@GodotName("is_hide_on_checkable_item_selection") GodotMethod!(bool) isHideOnCheckableItemSelection;
101 		@GodotName("set_hide_on_state_item_selection") GodotMethod!(void, bool) setHideOnStateItemSelection;
102 		@GodotName("is_hide_on_state_item_selection") GodotMethod!(bool) isHideOnStateItemSelection;
103 		@GodotName("set_submenu_popup_delay") GodotMethod!(void, double) setSubmenuPopupDelay;
104 		@GodotName("get_submenu_popup_delay") GodotMethod!(double) getSubmenuPopupDelay;
105 		@GodotName("set_hide_on_window_lose_focus") GodotMethod!(void, bool) setHideOnWindowLoseFocus;
106 		@GodotName("is_hide_on_window_lose_focus") GodotMethod!(bool) isHideOnWindowLoseFocus;
107 		@GodotName("_submenu_timeout") GodotMethod!(void) _submenuTimeout;
108 	}
109 	bool opEquals(in PopupMenu other) const { return _godot_object.ptr is other._godot_object.ptr; }
110 	PopupMenu opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
111 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
112 	mixin baseCasts;
113 	static PopupMenu _new()
114 	{
115 		static godot_class_constructor constructor;
116 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PopupMenu");
117 		if(constructor is null) return typeof(this).init;
118 		return cast(PopupMenu)(constructor());
119 	}
120 	@disable new(size_t s);
121 	/**
122 	
123 	*/
124 	void _guiInput(InputEvent arg0)
125 	{
126 		Array _GODOT_args = Array.empty_array;
127 		_GODOT_args.append(arg0);
128 		String _GODOT_method_name = String("_gui_input");
129 		this.callv(_GODOT_method_name, _GODOT_args);
130 	}
131 	/**
132 	Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
133 	*/
134 	void addIconItem(StringArg1)(Texture texture, in StringArg1 label, in long id = -1, in long accel = 0)
135 	{
136 		checkClassBinding!(typeof(this))();
137 		ptrcall!(void)(_classBinding.addIconItem, _godot_object, texture, label, id, accel);
138 	}
139 	/**
140 	Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
141 	*/
142 	void addItem(StringArg0)(in StringArg0 label, in long id = -1, in long accel = 0)
143 	{
144 		checkClassBinding!(typeof(this))();
145 		ptrcall!(void)(_classBinding.addItem, _godot_object, label, id, accel);
146 	}
147 	/**
148 	Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be
149 	created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
150 	*/
151 	void addIconCheckItem(StringArg1)(Texture texture, in StringArg1 label, in long id = -1, in long accel = 0)
152 	{
153 		checkClassBinding!(typeof(this))();
154 		ptrcall!(void)(_classBinding.addIconCheckItem, _godot_object, texture, label, id, accel);
155 	}
156 	/**
157 	Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
158 	*/
159 	void addCheckItem(StringArg0)(in StringArg0 label, in long id = -1, in long accel = 0)
160 	{
161 		checkClassBinding!(typeof(this))();
162 		ptrcall!(void)(_classBinding.addCheckItem, _godot_object, label, id, accel);
163 	}
164 	/**
165 	The same as $(D addCheckItem) but the inserted item will look as a radio button. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups.
166 	*/
167 	void addRadioCheckItem(StringArg0)(in StringArg0 label, in long id = -1, in long accel = 0)
168 	{
169 		checkClassBinding!(typeof(this))();
170 		ptrcall!(void)(_classBinding.addRadioCheckItem, _godot_object, label, id, accel);
171 	}
172 	/**
173 	Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index.
174 	*/
175 	void addSubmenuItem(StringArg0, StringArg1)(in StringArg0 label, in StringArg1 submenu, in long id = -1)
176 	{
177 		checkClassBinding!(typeof(this))();
178 		ptrcall!(void)(_classBinding.addSubmenuItem, _godot_object, label, submenu, id);
179 	}
180 	/**
181 	
182 	*/
183 	void addIconShortcut(Texture texture, ShortCut shortcut, in long id = -1, in bool global = false)
184 	{
185 		checkClassBinding!(typeof(this))();
186 		ptrcall!(void)(_classBinding.addIconShortcut, _godot_object, texture, shortcut, id, global);
187 	}
188 	/**
189 	
190 	*/
191 	void addShortcut(ShortCut shortcut, in long id = -1, in bool global = false)
192 	{
193 		checkClassBinding!(typeof(this))();
194 		ptrcall!(void)(_classBinding.addShortcut, _godot_object, shortcut, id, global);
195 	}
196 	/**
197 	
198 	*/
199 	void addIconCheckShortcut(Texture texture, ShortCut shortcut, in long id = -1, in bool global = false)
200 	{
201 		checkClassBinding!(typeof(this))();
202 		ptrcall!(void)(_classBinding.addIconCheckShortcut, _godot_object, texture, shortcut, id, global);
203 	}
204 	/**
205 	
206 	*/
207 	void addCheckShortcut(ShortCut shortcut, in long id = -1, in bool global = false)
208 	{
209 		checkClassBinding!(typeof(this))();
210 		ptrcall!(void)(_classBinding.addCheckShortcut, _godot_object, shortcut, id, global);
211 	}
212 	/**
213 	
214 	*/
215 	void addRadioCheckShortcut(ShortCut shortcut, in long id = -1, in bool global = false)
216 	{
217 		checkClassBinding!(typeof(this))();
218 		ptrcall!(void)(_classBinding.addRadioCheckShortcut, _godot_object, shortcut, id, global);
219 	}
220 	/**
221 	Set the text of the item at index "idx".
222 	*/
223 	void setItemText(StringArg1)(in long idx, in StringArg1 text)
224 	{
225 		checkClassBinding!(typeof(this))();
226 		ptrcall!(void)(_classBinding.setItemText, _godot_object, idx, text);
227 	}
228 	/**
229 	
230 	*/
231 	void setItemIcon(in long idx, Texture icon)
232 	{
233 		checkClassBinding!(typeof(this))();
234 		ptrcall!(void)(_classBinding.setItemIcon, _godot_object, idx, icon);
235 	}
236 	/**
237 	Set the checkstate status of the item at index "idx".
238 	*/
239 	void setItemChecked(in long idx, in bool checked)
240 	{
241 		checkClassBinding!(typeof(this))();
242 		ptrcall!(void)(_classBinding.setItemChecked, _godot_object, idx, checked);
243 	}
244 	/**
245 	Set the id of the item at index "idx".
246 	*/
247 	void setItemId(in long idx, in long id)
248 	{
249 		checkClassBinding!(typeof(this))();
250 		ptrcall!(void)(_classBinding.setItemId, _godot_object, idx, id);
251 	}
252 	/**
253 	Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
254 	*/
255 	void setItemAccelerator(in long idx, in long accel)
256 	{
257 		checkClassBinding!(typeof(this))();
258 		ptrcall!(void)(_classBinding.setItemAccelerator, _godot_object, idx, accel);
259 	}
260 	/**
261 	Sets the metadata of an item, which might be of any type. You can later get it with $(D getItemMetadata), which provides a simple way of assigning context data to items.
262 	*/
263 	void setItemMetadata(VariantArg1)(in long idx, in VariantArg1 metadata)
264 	{
265 		checkClassBinding!(typeof(this))();
266 		ptrcall!(void)(_classBinding.setItemMetadata, _godot_object, idx, metadata);
267 	}
268 	/**
269 	Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked.
270 	*/
271 	void setItemDisabled(in long idx, in bool disabled)
272 	{
273 		checkClassBinding!(typeof(this))();
274 		ptrcall!(void)(_classBinding.setItemDisabled, _godot_object, idx, disabled);
275 	}
276 	/**
277 	Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked.
278 	*/
279 	void setItemSubmenu(StringArg1)(in long idx, in StringArg1 submenu)
280 	{
281 		checkClassBinding!(typeof(this))();
282 		ptrcall!(void)(_classBinding.setItemSubmenu, _godot_object, idx, submenu);
283 	}
284 	/**
285 	Mark the item at index "idx" as a separator, which means that it would be displayed as a mere line.
286 	*/
287 	void setItemAsSeparator(in long idx, in bool enable)
288 	{
289 		checkClassBinding!(typeof(this))();
290 		ptrcall!(void)(_classBinding.setItemAsSeparator, _godot_object, idx, enable);
291 	}
292 	/**
293 	Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
294 	*/
295 	void setItemAsCheckable(in long idx, in bool enable)
296 	{
297 		checkClassBinding!(typeof(this))();
298 		ptrcall!(void)(_classBinding.setItemAsCheckable, _godot_object, idx, enable);
299 	}
300 	/**
301 	The same as $(D setItemAsCheckable) but placing a radio button in case of enabling. If used for disabling, it's the same.
302 	Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups.
303 	*/
304 	void setItemAsRadioCheckable(in long idx, in bool enable)
305 	{
306 		checkClassBinding!(typeof(this))();
307 		ptrcall!(void)(_classBinding.setItemAsRadioCheckable, _godot_object, idx, enable);
308 	}
309 	/**
310 	
311 	*/
312 	void setItemTooltip(StringArg1)(in long idx, in StringArg1 tooltip)
313 	{
314 		checkClassBinding!(typeof(this))();
315 		ptrcall!(void)(_classBinding.setItemTooltip, _godot_object, idx, tooltip);
316 	}
317 	/**
318 	
319 	*/
320 	void setItemShortcut(in long idx, ShortCut shortcut, in bool global = false)
321 	{
322 		checkClassBinding!(typeof(this))();
323 		ptrcall!(void)(_classBinding.setItemShortcut, _godot_object, idx, shortcut, global);
324 	}
325 	/**
326 	
327 	*/
328 	void setItemMultistate(in long idx, in long state)
329 	{
330 		checkClassBinding!(typeof(this))();
331 		ptrcall!(void)(_classBinding.setItemMultistate, _godot_object, idx, state);
332 	}
333 	/**
334 	
335 	*/
336 	void setItemShortcutDisabled(in long idx, in bool disabled)
337 	{
338 		checkClassBinding!(typeof(this))();
339 		ptrcall!(void)(_classBinding.setItemShortcutDisabled, _godot_object, idx, disabled);
340 	}
341 	/**
342 	
343 	*/
344 	void toggleItemChecked(in long idx)
345 	{
346 		checkClassBinding!(typeof(this))();
347 		ptrcall!(void)(_classBinding.toggleItemChecked, _godot_object, idx);
348 	}
349 	/**
350 	
351 	*/
352 	void toggleItemMultistate(in long idx)
353 	{
354 		checkClassBinding!(typeof(this))();
355 		ptrcall!(void)(_classBinding.toggleItemMultistate, _godot_object, idx);
356 	}
357 	/**
358 	Return the text of the item at index "idx".
359 	*/
360 	String getItemText(in long idx) const
361 	{
362 		checkClassBinding!(typeof(this))();
363 		return ptrcall!(String)(_classBinding.getItemText, _godot_object, idx);
364 	}
365 	/**
366 	Return the icon of the item at index "idx".
367 	*/
368 	Ref!Texture getItemIcon(in long idx) const
369 	{
370 		checkClassBinding!(typeof(this))();
371 		return ptrcall!(Texture)(_classBinding.getItemIcon, _godot_object, idx);
372 	}
373 	/**
374 	Return whether the item at index "idx" is checked.
375 	*/
376 	bool isItemChecked(in long idx) const
377 	{
378 		checkClassBinding!(typeof(this))();
379 		return ptrcall!(bool)(_classBinding.isItemChecked, _godot_object, idx);
380 	}
381 	/**
382 	Return the id of the item at index "idx".
383 	*/
384 	long getItemId(in long idx) const
385 	{
386 		checkClassBinding!(typeof(this))();
387 		return ptrcall!(long)(_classBinding.getItemId, _godot_object, idx);
388 	}
389 	/**
390 	Find and return the index of the item containing a given id.
391 	*/
392 	long getItemIndex(in long id) const
393 	{
394 		checkClassBinding!(typeof(this))();
395 		return ptrcall!(long)(_classBinding.getItemIndex, _godot_object, id);
396 	}
397 	/**
398 	Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
399 	*/
400 	long getItemAccelerator(in long idx) const
401 	{
402 		checkClassBinding!(typeof(this))();
403 		return ptrcall!(long)(_classBinding.getItemAccelerator, _godot_object, idx);
404 	}
405 	/**
406 	Return the metadata of an item, which might be of any type. You can set it with $(D setItemMetadata), which provides a simple way of assigning context data to items.
407 	*/
408 	Variant getItemMetadata(in long idx) const
409 	{
410 		checkClassBinding!(typeof(this))();
411 		return ptrcall!(Variant)(_classBinding.getItemMetadata, _godot_object, idx);
412 	}
413 	/**
414 	Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked.
415 	*/
416 	bool isItemDisabled(in long idx) const
417 	{
418 		checkClassBinding!(typeof(this))();
419 		return ptrcall!(bool)(_classBinding.isItemDisabled, _godot_object, idx);
420 	}
421 	/**
422 	Return the submenu name of the item at index "idx".
423 	*/
424 	String getItemSubmenu(in long idx) const
425 	{
426 		checkClassBinding!(typeof(this))();
427 		return ptrcall!(String)(_classBinding.getItemSubmenu, _godot_object, idx);
428 	}
429 	/**
430 	Return whether the item is a separator. If it is, it would be displayed as a line.
431 	*/
432 	bool isItemSeparator(in long idx) const
433 	{
434 		checkClassBinding!(typeof(this))();
435 		return ptrcall!(bool)(_classBinding.isItemSeparator, _godot_object, idx);
436 	}
437 	/**
438 	Return whether the item at index "idx" is checkable in some way, i.e., whether has a checkbox or radio button. Note that checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually.
439 	*/
440 	bool isItemCheckable(in long idx) const
441 	{
442 		checkClassBinding!(typeof(this))();
443 		return ptrcall!(bool)(_classBinding.isItemCheckable, _godot_object, idx);
444 	}
445 	/**
446 	Return whether the item at index "idx" has radio-button-style checkability. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups.
447 	*/
448 	bool isItemRadioCheckable(in long idx) const
449 	{
450 		checkClassBinding!(typeof(this))();
451 		return ptrcall!(bool)(_classBinding.isItemRadioCheckable, _godot_object, idx);
452 	}
453 	/**
454 	
455 	*/
456 	bool isItemShortcutDisabled(in long idx) const
457 	{
458 		checkClassBinding!(typeof(this))();
459 		return ptrcall!(bool)(_classBinding.isItemShortcutDisabled, _godot_object, idx);
460 	}
461 	/**
462 	
463 	*/
464 	String getItemTooltip(in long idx) const
465 	{
466 		checkClassBinding!(typeof(this))();
467 		return ptrcall!(String)(_classBinding.getItemTooltip, _godot_object, idx);
468 	}
469 	/**
470 	
471 	*/
472 	Ref!ShortCut getItemShortcut(in long idx) const
473 	{
474 		checkClassBinding!(typeof(this))();
475 		return ptrcall!(ShortCut)(_classBinding.getItemShortcut, _godot_object, idx);
476 	}
477 	/**
478 	Return the amount of items.
479 	*/
480 	long getItemCount() const
481 	{
482 		checkClassBinding!(typeof(this))();
483 		return ptrcall!(long)(_classBinding.getItemCount, _godot_object);
484 	}
485 	/**
486 	Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one.
487 	*/
488 	void removeItem(in long idx)
489 	{
490 		checkClassBinding!(typeof(this))();
491 		ptrcall!(void)(_classBinding.removeItem, _godot_object, idx);
492 	}
493 	/**
494 	Add a separator between items. Separators also occupy an index.
495 	*/
496 	void addSeparator(StringArg0)(in StringArg0 label = "")
497 	{
498 		checkClassBinding!(typeof(this))();
499 		ptrcall!(void)(_classBinding.addSeparator, _godot_object, label);
500 	}
501 	/**
502 	Clear the popup menu, in effect removing all items.
503 	*/
504 	void clear()
505 	{
506 		checkClassBinding!(typeof(this))();
507 		ptrcall!(void)(_classBinding.clear, _godot_object);
508 	}
509 	/**
510 	
511 	*/
512 	void _setItems(in Array arg0)
513 	{
514 		Array _GODOT_args = Array.empty_array;
515 		_GODOT_args.append(arg0);
516 		String _GODOT_method_name = String("_set_items");
517 		this.callv(_GODOT_method_name, _GODOT_args);
518 	}
519 	/**
520 	
521 	*/
522 	Array _getItems() const
523 	{
524 		Array _GODOT_args = Array.empty_array;
525 		String _GODOT_method_name = String("_get_items");
526 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!Array);
527 	}
528 	/**
529 	
530 	*/
531 	void setHideOnItemSelection(in bool enable)
532 	{
533 		checkClassBinding!(typeof(this))();
534 		ptrcall!(void)(_classBinding.setHideOnItemSelection, _godot_object, enable);
535 	}
536 	/**
537 	
538 	*/
539 	bool isHideOnItemSelection() const
540 	{
541 		checkClassBinding!(typeof(this))();
542 		return ptrcall!(bool)(_classBinding.isHideOnItemSelection, _godot_object);
543 	}
544 	/**
545 	
546 	*/
547 	void setHideOnCheckableItemSelection(in bool enable)
548 	{
549 		checkClassBinding!(typeof(this))();
550 		ptrcall!(void)(_classBinding.setHideOnCheckableItemSelection, _godot_object, enable);
551 	}
552 	/**
553 	
554 	*/
555 	bool isHideOnCheckableItemSelection() const
556 	{
557 		checkClassBinding!(typeof(this))();
558 		return ptrcall!(bool)(_classBinding.isHideOnCheckableItemSelection, _godot_object);
559 	}
560 	/**
561 	
562 	*/
563 	void setHideOnStateItemSelection(in bool enable)
564 	{
565 		checkClassBinding!(typeof(this))();
566 		ptrcall!(void)(_classBinding.setHideOnStateItemSelection, _godot_object, enable);
567 	}
568 	/**
569 	
570 	*/
571 	bool isHideOnStateItemSelection() const
572 	{
573 		checkClassBinding!(typeof(this))();
574 		return ptrcall!(bool)(_classBinding.isHideOnStateItemSelection, _godot_object);
575 	}
576 	/**
577 	
578 	*/
579 	void setSubmenuPopupDelay(in double seconds)
580 	{
581 		checkClassBinding!(typeof(this))();
582 		ptrcall!(void)(_classBinding.setSubmenuPopupDelay, _godot_object, seconds);
583 	}
584 	/**
585 	
586 	*/
587 	double getSubmenuPopupDelay() const
588 	{
589 		checkClassBinding!(typeof(this))();
590 		return ptrcall!(double)(_classBinding.getSubmenuPopupDelay, _godot_object);
591 	}
592 	/**
593 	
594 	*/
595 	void setHideOnWindowLoseFocus(in bool enable)
596 	{
597 		checkClassBinding!(typeof(this))();
598 		ptrcall!(void)(_classBinding.setHideOnWindowLoseFocus, _godot_object, enable);
599 	}
600 	/**
601 	
602 	*/
603 	bool isHideOnWindowLoseFocus() const
604 	{
605 		checkClassBinding!(typeof(this))();
606 		return ptrcall!(bool)(_classBinding.isHideOnWindowLoseFocus, _godot_object);
607 	}
608 	/**
609 	
610 	*/
611 	void _submenuTimeout()
612 	{
613 		Array _GODOT_args = Array.empty_array;
614 		String _GODOT_method_name = String("_submenu_timeout");
615 		this.callv(_GODOT_method_name, _GODOT_args);
616 	}
617 	/**
618 	
619 	*/
620 	@property Array items()
621 	{
622 		return _getItems();
623 	}
624 	/// ditto
625 	@property void items(Array v)
626 	{
627 		_setItems(v);
628 	}
629 	/**
630 	
631 	*/
632 	@property bool hideOnItemSelection()
633 	{
634 		return isHideOnItemSelection();
635 	}
636 	/// ditto
637 	@property void hideOnItemSelection(bool v)
638 	{
639 		setHideOnItemSelection(v);
640 	}
641 	/**
642 	
643 	*/
644 	@property bool hideOnCheckableItemSelection()
645 	{
646 		return isHideOnCheckableItemSelection();
647 	}
648 	/// ditto
649 	@property void hideOnCheckableItemSelection(bool v)
650 	{
651 		setHideOnCheckableItemSelection(v);
652 	}
653 	/**
654 	
655 	*/
656 	@property bool hideOnStateItemSelection()
657 	{
658 		return isHideOnStateItemSelection();
659 	}
660 	/// ditto
661 	@property void hideOnStateItemSelection(bool v)
662 	{
663 		setHideOnStateItemSelection(v);
664 	}
665 	/**
666 	Sets the delay time for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. Default value: `0.3` seconds.
667 	*/
668 	@property double submenuPopupDelay()
669 	{
670 		return getSubmenuPopupDelay();
671 	}
672 	/// ditto
673 	@property void submenuPopupDelay(double v)
674 	{
675 		setSubmenuPopupDelay(v);
676 	}
677 }