1 /**
2 A Visual Script node used to annotate the script.
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.visualscriptcomment;
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.visualscriptnode;
24 import godot.resource;
25 import godot.reference;
26 /**
27 A Visual Script node used to annotate the script.
28 
29 A Visual Script node used to display annotations in the script, so that code may be documented.
30 Comment nodes can be resized so they encompass a group of nodes.
31 */
32 @GodotBaseClass struct VisualScriptComment
33 {
34 	enum string _GODOT_internal_name = "VisualScriptComment";
35 public:
36 @nogc nothrow:
37 	union { godot_object _godot_object; VisualScriptNode _GODOT_base; }
38 	alias _GODOT_base this;
39 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
40 	package(godot) __gshared bool _classBindingInitialized = false;
41 	package(godot) static struct _classBinding
42 	{
43 		__gshared:
44 		@GodotName("set_title") GodotMethod!(void, String) setTitle;
45 		@GodotName("get_title") GodotMethod!(String) getTitle;
46 		@GodotName("set_description") GodotMethod!(void, String) setDescription;
47 		@GodotName("get_description") GodotMethod!(String) getDescription;
48 		@GodotName("set_size") GodotMethod!(void, Vector2) setSize;
49 		@GodotName("get_size") GodotMethod!(Vector2) getSize;
50 	}
51 	bool opEquals(in VisualScriptComment other) const { return _godot_object.ptr is other._godot_object.ptr; }
52 	VisualScriptComment opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
53 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
54 	mixin baseCasts;
55 	static VisualScriptComment _new()
56 	{
57 		static godot_class_constructor constructor;
58 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptComment");
59 		if(constructor is null) return typeof(this).init;
60 		return cast(VisualScriptComment)(constructor());
61 	}
62 	@disable new(size_t s);
63 	/**
64 	
65 	*/
66 	void setTitle(StringArg0)(in StringArg0 title)
67 	{
68 		checkClassBinding!(typeof(this))();
69 		ptrcall!(void)(_classBinding.setTitle, _godot_object, title);
70 	}
71 	/**
72 	
73 	*/
74 	String getTitle() const
75 	{
76 		checkClassBinding!(typeof(this))();
77 		return ptrcall!(String)(_classBinding.getTitle, _godot_object);
78 	}
79 	/**
80 	
81 	*/
82 	void setDescription(StringArg0)(in StringArg0 description)
83 	{
84 		checkClassBinding!(typeof(this))();
85 		ptrcall!(void)(_classBinding.setDescription, _godot_object, description);
86 	}
87 	/**
88 	
89 	*/
90 	String getDescription() const
91 	{
92 		checkClassBinding!(typeof(this))();
93 		return ptrcall!(String)(_classBinding.getDescription, _godot_object);
94 	}
95 	/**
96 	
97 	*/
98 	void setSize(in Vector2 size)
99 	{
100 		checkClassBinding!(typeof(this))();
101 		ptrcall!(void)(_classBinding.setSize, _godot_object, size);
102 	}
103 	/**
104 	
105 	*/
106 	Vector2 getSize() const
107 	{
108 		checkClassBinding!(typeof(this))();
109 		return ptrcall!(Vector2)(_classBinding.getSize, _godot_object);
110 	}
111 	/**
112 	The comment node's title.
113 	*/
114 	@property String title()
115 	{
116 		return getTitle();
117 	}
118 	/// ditto
119 	@property void title(String v)
120 	{
121 		setTitle(v);
122 	}
123 	/**
124 	The text inside the comment node.
125 	*/
126 	@property String description()
127 	{
128 		return getDescription();
129 	}
130 	/// ditto
131 	@property void description(String v)
132 	{
133 		setDescription(v);
134 	}
135 	/**
136 	The comment node's size (in pixels).
137 	*/
138 	@property Vector2 size()
139 	{
140 		return getSize();
141 	}
142 	/// ditto
143 	@property void size(Vector2 v)
144 	{
145 		setSize(v);
146 	}
147 }