1 /**
2 
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.editorinspectorplugin;
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.reference;
24 /**
25 
26 */
27 @GodotBaseClass struct EditorInspectorPlugin
28 {
29 	enum string _GODOT_internal_name = "EditorInspectorPlugin";
30 public:
31 @nogc nothrow:
32 	union { godot_object _godot_object; Reference _GODOT_base; }
33 	alias _GODOT_base this;
34 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
35 	package(godot) __gshared bool _classBindingInitialized = false;
36 	package(godot) static struct _classBinding
37 	{
38 		__gshared:
39 		@GodotName("can_handle") GodotMethod!(bool, GodotObject) canHandle;
40 		@GodotName("parse_begin") GodotMethod!(void, GodotObject) parseBegin;
41 		@GodotName("parse_category") GodotMethod!(void, GodotObject, String) parseCategory;
42 		@GodotName("parse_property") GodotMethod!(bool, GodotObject, long, String, long, String, long) parseProperty;
43 		@GodotName("parse_end") GodotMethod!(void) parseEnd;
44 		@GodotName("add_custom_control") GodotMethod!(void, GodotObject) addCustomControl;
45 		@GodotName("add_property_editor") GodotMethod!(void, String, GodotObject) addPropertyEditor;
46 		@GodotName("add_property_editor_for_multiple_properties") GodotMethod!(void, String, PoolStringArray, GodotObject) addPropertyEditorForMultipleProperties;
47 	}
48 	bool opEquals(in EditorInspectorPlugin other) const { return _godot_object.ptr is other._godot_object.ptr; }
49 	EditorInspectorPlugin opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
50 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
51 	mixin baseCasts;
52 	static EditorInspectorPlugin _new()
53 	{
54 		static godot_class_constructor constructor;
55 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("EditorInspectorPlugin");
56 		if(constructor is null) return typeof(this).init;
57 		return cast(EditorInspectorPlugin)(constructor());
58 	}
59 	@disable new(size_t s);
60 	/**
61 	
62 	*/
63 	bool canHandle(GodotObject object)
64 	{
65 		Array _GODOT_args = Array.empty_array;
66 		_GODOT_args.append(object);
67 		String _GODOT_method_name = String("can_handle");
68 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!bool);
69 	}
70 	/**
71 	
72 	*/
73 	void parseBegin(GodotObject object)
74 	{
75 		Array _GODOT_args = Array.empty_array;
76 		_GODOT_args.append(object);
77 		String _GODOT_method_name = String("parse_begin");
78 		this.callv(_GODOT_method_name, _GODOT_args);
79 	}
80 	/**
81 	
82 	*/
83 	void parseCategory(StringArg1)(GodotObject object, in StringArg1 category)
84 	{
85 		Array _GODOT_args = Array.empty_array;
86 		_GODOT_args.append(object);
87 		_GODOT_args.append(category);
88 		String _GODOT_method_name = String("parse_category");
89 		this.callv(_GODOT_method_name, _GODOT_args);
90 	}
91 	/**
92 	
93 	*/
94 	bool parseProperty(StringArg2, StringArg4)(GodotObject object, in long type, in StringArg2 path, in long hint, in StringArg4 hint_text, in long usage)
95 	{
96 		Array _GODOT_args = Array.empty_array;
97 		_GODOT_args.append(object);
98 		_GODOT_args.append(type);
99 		_GODOT_args.append(path);
100 		_GODOT_args.append(hint);
101 		_GODOT_args.append(hint_text);
102 		_GODOT_args.append(usage);
103 		String _GODOT_method_name = String("parse_property");
104 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!bool);
105 	}
106 	/**
107 	
108 	*/
109 	void parseEnd()
110 	{
111 		Array _GODOT_args = Array.empty_array;
112 		String _GODOT_method_name = String("parse_end");
113 		this.callv(_GODOT_method_name, _GODOT_args);
114 	}
115 	/**
116 	
117 	*/
118 	void addCustomControl(GodotObject control)
119 	{
120 		checkClassBinding!(typeof(this))();
121 		ptrcall!(void)(_classBinding.addCustomControl, _godot_object, control);
122 	}
123 	/**
124 	
125 	*/
126 	void addPropertyEditor(StringArg0)(in StringArg0 property, GodotObject editor)
127 	{
128 		checkClassBinding!(typeof(this))();
129 		ptrcall!(void)(_classBinding.addPropertyEditor, _godot_object, property, editor);
130 	}
131 	/**
132 	
133 	*/
134 	void addPropertyEditorForMultipleProperties(StringArg0)(in StringArg0 label, in PoolStringArray properties, GodotObject editor)
135 	{
136 		checkClassBinding!(typeof(this))();
137 		ptrcall!(void)(_classBinding.addPropertyEditorForMultipleProperties, _godot_object, label, properties, editor);
138 	}
139 }