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.navigationpolygoninstance;
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.classdb;
24 import godot.node2d;
25 import godot.navigationpolygon;
26 /**
27 
28 */
29 @GodotBaseClass struct NavigationPolygonInstance
30 {
31 	package(godot) enum string _GODOT_internal_name = "NavigationPolygonInstance";
32 public:
33 @nogc nothrow:
34 	union { /** */ godot_object _godot_object; /** */ Node2D _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("_navpoly_changed") GodotMethod!(void) _navpolyChanged;
42 		@GodotName("get_navigation_polygon") GodotMethod!(NavigationPolygon) getNavigationPolygon;
43 		@GodotName("is_enabled") GodotMethod!(bool) isEnabled;
44 		@GodotName("set_enabled") GodotMethod!(void, bool) setEnabled;
45 		@GodotName("set_navigation_polygon") GodotMethod!(void, NavigationPolygon) setNavigationPolygon;
46 	}
47 	/// 
48 	pragma(inline, true) bool opEquals(in NavigationPolygonInstance other) const
49 	{ return _godot_object.ptr is other._godot_object.ptr; }
50 	/// 
51 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
52 	{ _godot_object.ptr = n; return null; }
53 	/// 
54 	pragma(inline, true) bool opEquals(typeof(null) n) const
55 	{ return _godot_object.ptr is n; }
56 	/// 
57 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
58 	mixin baseCasts;
59 	/// Construct a new instance of NavigationPolygonInstance.
60 	/// Note: use `memnew!NavigationPolygonInstance` instead.
61 	static NavigationPolygonInstance _new()
62 	{
63 		static godot_class_constructor constructor;
64 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("NavigationPolygonInstance");
65 		if(constructor is null) return typeof(this).init;
66 		return cast(NavigationPolygonInstance)(constructor());
67 	}
68 	@disable new(size_t s);
69 	/**
70 	
71 	*/
72 	void _navpolyChanged()
73 	{
74 		Array _GODOT_args = Array.make();
75 		String _GODOT_method_name = String("_navpoly_changed");
76 		this.callv(_GODOT_method_name, _GODOT_args);
77 	}
78 	/**
79 	
80 	*/
81 	Ref!NavigationPolygon getNavigationPolygon() const
82 	{
83 		checkClassBinding!(typeof(this))();
84 		return ptrcall!(NavigationPolygon)(GDNativeClassBinding.getNavigationPolygon, _godot_object);
85 	}
86 	/**
87 	
88 	*/
89 	bool isEnabled() const
90 	{
91 		checkClassBinding!(typeof(this))();
92 		return ptrcall!(bool)(GDNativeClassBinding.isEnabled, _godot_object);
93 	}
94 	/**
95 	
96 	*/
97 	void setEnabled(in bool enabled)
98 	{
99 		checkClassBinding!(typeof(this))();
100 		ptrcall!(void)(GDNativeClassBinding.setEnabled, _godot_object, enabled);
101 	}
102 	/**
103 	
104 	*/
105 	void setNavigationPolygon(NavigationPolygon navpoly)
106 	{
107 		checkClassBinding!(typeof(this))();
108 		ptrcall!(void)(GDNativeClassBinding.setNavigationPolygon, _godot_object, navpoly);
109 	}
110 	/**
111 	
112 	*/
113 	@property bool enabled()
114 	{
115 		return isEnabled();
116 	}
117 	/// ditto
118 	@property void enabled(bool v)
119 	{
120 		setEnabled(v);
121 	}
122 	/**
123 	
124 	*/
125 	@property NavigationPolygon navpoly()
126 	{
127 		return getNavigationPolygon();
128 	}
129 	/// ditto
130 	@property void navpoly(NavigationPolygon v)
131 	{
132 		setNavigationPolygon(v);
133 	}
134 }