1 /** 2 Dialog for confirmation of actions. 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.confirmationdialog; 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.acceptdialog; 24 import godot.button; 25 import godot.windowdialog; 26 import godot.popup; 27 import godot.control; 28 import godot.canvasitem; 29 import godot.node; 30 /** 31 Dialog for confirmation of actions. 32 33 This dialog inherits from $(D AcceptDialog), but has by default an OK and Cancel button (in host OS order). 34 */ 35 @GodotBaseClass struct ConfirmationDialog 36 { 37 enum string _GODOT_internal_name = "ConfirmationDialog"; 38 public: 39 @nogc nothrow: 40 union { godot_object _godot_object; AcceptDialog _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("get_cancel") GodotMethod!(Button) getCancel; 48 } 49 bool opEquals(in ConfirmationDialog other) const { return _godot_object.ptr is other._godot_object.ptr; } 50 ConfirmationDialog opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 51 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 52 mixin baseCasts; 53 static ConfirmationDialog _new() 54 { 55 static godot_class_constructor constructor; 56 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("ConfirmationDialog"); 57 if(constructor is null) return typeof(this).init; 58 return cast(ConfirmationDialog)(constructor()); 59 } 60 @disable new(size_t s); 61 /** 62 Return the cancel button. 63 */ 64 Button getCancel() 65 { 66 checkClassBinding!(typeof(this))(); 67 return ptrcall!(Button)(_classBinding.getCancel, _godot_object); 68 } 69 }