1 /** 2 A Visual Script virtual class for in-graph editable nodes. 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.visualscriptlists; 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.visualscriptnode; 24 /** 25 A Visual Script virtual class for in-graph editable nodes. 26 27 A Visual Script virtual class that defines the shape and the default behavior of the nodes that have to be in-graph editable nodes. 28 */ 29 @GodotBaseClass struct VisualScriptLists 30 { 31 package(godot) enum string _GODOT_internal_name = "VisualScriptLists"; 32 public: 33 @nogc nothrow: 34 union { /** */ godot_object _godot_object; /** */ VisualScriptNode _GODOT_base; } 35 alias _GODOT_base this; 36 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 37 package(godot) __gshared bool _classBindingInitialized = false; 38 package(godot) static struct GDNativeClassBinding 39 { 40 __gshared: 41 @GodotName("add_input_data_port") GodotMethod!(void, long, String, long) addInputDataPort; 42 @GodotName("add_output_data_port") GodotMethod!(void, long, String, long) addOutputDataPort; 43 @GodotName("remove_input_data_port") GodotMethod!(void, long) removeInputDataPort; 44 @GodotName("remove_output_data_port") GodotMethod!(void, long) removeOutputDataPort; 45 @GodotName("set_input_data_port_name") GodotMethod!(void, long, String) setInputDataPortName; 46 @GodotName("set_input_data_port_type") GodotMethod!(void, long, long) setInputDataPortType; 47 @GodotName("set_output_data_port_name") GodotMethod!(void, long, String) setOutputDataPortName; 48 @GodotName("set_output_data_port_type") GodotMethod!(void, long, long) setOutputDataPortType; 49 } 50 /// 51 pragma(inline, true) bool opEquals(in VisualScriptLists other) const 52 { return _godot_object.ptr is other._godot_object.ptr; } 53 /// 54 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 55 { _godot_object.ptr = n; return null; } 56 /// 57 pragma(inline, true) bool opEquals(typeof(null) n) const 58 { return _godot_object.ptr is n; } 59 /// 60 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 61 mixin baseCasts; 62 /// Construct a new instance of VisualScriptLists. 63 /// Note: use `memnew!VisualScriptLists` instead. 64 static VisualScriptLists _new() 65 { 66 static godot_class_constructor constructor; 67 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptLists"); 68 if(constructor is null) return typeof(this).init; 69 return cast(VisualScriptLists)(constructor()); 70 } 71 @disable new(size_t s); 72 /** 73 74 */ 75 void addInputDataPort(in long type, in String name, in long index) 76 { 77 checkClassBinding!(typeof(this))(); 78 ptrcall!(void)(GDNativeClassBinding.addInputDataPort, _godot_object, type, name, index); 79 } 80 /** 81 82 */ 83 void addOutputDataPort(in long type, in String name, in long index) 84 { 85 checkClassBinding!(typeof(this))(); 86 ptrcall!(void)(GDNativeClassBinding.addOutputDataPort, _godot_object, type, name, index); 87 } 88 /** 89 90 */ 91 void removeInputDataPort(in long index) 92 { 93 checkClassBinding!(typeof(this))(); 94 ptrcall!(void)(GDNativeClassBinding.removeInputDataPort, _godot_object, index); 95 } 96 /** 97 98 */ 99 void removeOutputDataPort(in long index) 100 { 101 checkClassBinding!(typeof(this))(); 102 ptrcall!(void)(GDNativeClassBinding.removeOutputDataPort, _godot_object, index); 103 } 104 /** 105 106 */ 107 void setInputDataPortName(in long index, in String name) 108 { 109 checkClassBinding!(typeof(this))(); 110 ptrcall!(void)(GDNativeClassBinding.setInputDataPortName, _godot_object, index, name); 111 } 112 /** 113 114 */ 115 void setInputDataPortType(in long index, in long type) 116 { 117 checkClassBinding!(typeof(this))(); 118 ptrcall!(void)(GDNativeClassBinding.setInputDataPortType, _godot_object, index, type); 119 } 120 /** 121 122 */ 123 void setOutputDataPortName(in long index, in String name) 124 { 125 checkClassBinding!(typeof(this))(); 126 ptrcall!(void)(GDNativeClassBinding.setOutputDataPortName, _godot_object, index, name); 127 } 128 /** 129 130 */ 131 void setOutputDataPortType(in long index, in long type) 132 { 133 checkClassBinding!(typeof(this))(); 134 ptrcall!(void)(GDNativeClassBinding.setOutputDataPortType, _godot_object, index, type); 135 } 136 }