112bbd3dbb6c943be15c02535eedd97c75023b16
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Position.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 namespace Tizen.NUI
19 {
20
21     /// <summary>
22     /// Position is a three dimensional vector.
23     /// </summary>
24     public class Position : global::System.IDisposable
25     {
26         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27         protected bool swigCMemOwn;
28
29         internal Position(global::System.IntPtr cPtr, bool cMemoryOwn)
30         {
31             swigCMemOwn = cMemoryOwn;
32             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33         }
34
35         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position obj)
36         {
37             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38         }
39
40         ~Position()
41         {
42             DisposeQueue.Instance.Add(this);
43         }
44
45         public virtual void Dispose()
46         {
47             if (!Stage.IsInstalled())
48             {
49                 DisposeQueue.Instance.Add(this);
50                 return;
51             }
52
53             lock (this)
54             {
55                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
56                 {
57                     if (swigCMemOwn)
58                     {
59                         swigCMemOwn = false;
60                         NDalicPINVOKE.delete_Vector3(swigCPtr);
61                     }
62                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
63                 }
64                 global::System.GC.SuppressFinalize(this);
65             }
66         }
67
68
69         /// <summary>
70         /// Addition operator.
71         /// </summary>
72         /// <param name="arg1">Vector to add</param>
73         /// <param name="arg2">Vector to add</param>
74         /// <returns>A vector containing the result of the addition</returns>
75         public static Position operator +(Position arg1, Position arg2)
76         {
77             return arg1.Add(arg2);
78         }
79
80         /// <summary>
81         /// Subtraction operator.
82         /// </summary>
83         /// <param name="arg1">Vector to subtract</param>
84         /// <param name="arg2">Vector to subtract</param>
85         /// <returns>A vector containing the result of the subtraction</returns>
86         public static Position operator -(Position arg1, Position arg2)
87         {
88             return arg1.Subtract(arg2);
89         }
90
91         /// <summary>
92         /// Unary negation operator.
93         /// </summary>
94         /// <param name="arg1">Vector to netate</param>
95         /// <returns>A vector containg the negation</returns>
96         public static Position operator -(Position arg1)
97         {
98             return arg1.Subtract();
99         }
100
101         /// <summary>
102         /// Multiplication operator.
103         /// </summary>
104         /// <param name="arg1">The vector to multiply</param>
105         /// <param name="arg2">The vector to multiply</param>
106         /// <returns>A vector containing the result of the multiplication</returns>
107         public static Position operator *(Position arg1, Position arg2)
108         {
109             return arg1.Multiply(arg2);
110         }
111
112         /// <summary>
113         /// Multiplication operator.
114         /// </summary>
115         /// <param name="arg1">The vector to multiply</param>
116         /// <param name="arg2">The float value to scale the vector</param>
117         /// <returns>A vector containing the result of the scaling</returns>
118         public static Position operator *(Position arg1, float arg2)
119         {
120             return arg1.Multiply(arg2);
121         }
122
123         /// <summary>
124         /// Division operator.
125         /// </summary>
126         /// <param name="arg1">The vector to divide</param>
127         /// <param name="arg2">The vector to divide</param>
128         /// <returns>A vector containing the result of the division</returns>
129         public static Position operator /(Position arg1, Position arg2)
130         {
131             return arg1.Divide(arg2);
132         }
133
134         /// <summary>
135         /// Division operator.
136         /// </summary>
137         /// <param name="arg1">The vector to divide</param>
138         /// <param name="arg2">The float value to scale the vector by</param>
139         /// <returns>A vector containing the result of the scaling</returns>
140         public static Position operator /(Position arg1, float arg2)
141         {
142             return arg1.Divide(arg2);
143         }
144
145
146         /// <summary>
147         /// Const array subscript operator overload. Should be 0, 1 or 2.
148         /// </summary>
149         /// <param name="index">Subscript index</param>
150         /// <returns>The float at the given index</returns>
151         public float this[uint index]
152         {
153             get
154             {
155                 return ValueOfIndex(index);
156             }
157         }
158
159         /// <summary>
160         /// </summary>
161         internal static Position GetPositionFromPtr(global::System.IntPtr cPtr)
162         {
163             Position ret = new Position(cPtr, false);
164             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165             return ret;
166         }
167
168
169         /// <summary>
170         /// Constructor
171         /// </summary>
172         public Position() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true)
173         {
174             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175         }
176
177         /// <summary>
178         /// Constructor
179         /// </summary>
180         /// <param name="x">x component</param>
181         /// <param name="y">y component</param>
182         /// <param name="z">z component</param>
183         public Position(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true)
184         {
185             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186         }
187
188         /// <summary>
189         /// Constructor
190         /// </summary>
191         /// <param name="position2d">Position2D to create this vector from</param>
192         public Position(Position2D position2d) : this(NDalicPINVOKE.new_Vector3__SWIG_3(Position2D.getCPtr(position2d)), true)
193         {
194             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195         }
196
197
198
199         private Position Add(Position rhs)
200         {
201             Position ret = new Position(NDalicPINVOKE.Vector3_Add(swigCPtr, Position.getCPtr(rhs)), true);
202             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203             return ret;
204         }
205
206         private Position Subtract(Position rhs)
207         {
208             Position ret = new Position(NDalicPINVOKE.Vector3_Subtract__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
209             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210             return ret;
211         }
212
213         private Position Multiply(Position rhs)
214         {
215             Position ret = new Position(NDalicPINVOKE.Vector3_Multiply__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
216             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217             return ret;
218         }
219
220         private Position Multiply(float rhs)
221         {
222             Position ret = new Position(NDalicPINVOKE.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
223             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224             return ret;
225         }
226
227         private Position Divide(Position rhs)
228         {
229             Position ret = new Position(NDalicPINVOKE.Vector3_Divide__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
230             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231             return ret;
232         }
233
234         private Position Divide(float rhs)
235         {
236             Position ret = new Position(NDalicPINVOKE.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
237             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238             return ret;
239         }
240
241         private Position Subtract()
242         {
243             Position ret = new Position(NDalicPINVOKE.Vector3_Subtract__SWIG_1(swigCPtr), true);
244             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245             return ret;
246         }
247
248         private float ValueOfIndex(uint index)
249         {
250             float ret = NDalicPINVOKE.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
251             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252             return ret;
253         }
254
255         /// <summary>
256         /// Compare if rhs is equal to
257         /// </summary>
258         /// <param name="rhs">The vector to compare</param>
259         /// <returns>Returns true if the two vectors are equal, otherwise false</returns>
260         public bool EqualTo(Position rhs)
261         {
262             bool ret = NDalicPINVOKE.Vector3_EqualTo(swigCPtr, Position.getCPtr(rhs));
263             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264             return ret;
265         }
266
267         /// <summary>
268         /// Compare if rhs is not equal to
269         /// </summary>
270         /// <param name="rhs">The vector to compare</param>
271         /// <returns>Returns true if the two vectors are not equal, otherwise false</returns>
272         public bool NotEqualTo(Position rhs)
273         {
274             bool ret = NDalicPINVOKE.Vector3_NotEqualTo(swigCPtr, Position.getCPtr(rhs));
275             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276             return ret;
277         }
278
279
280         /// <summary>
281         /// x component
282         /// </summary>
283         public float X
284         {
285             set
286             {
287                 NDalicPINVOKE.Vector3_X_set(swigCPtr, value);
288                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289             }
290             get
291             {
292                 float ret = NDalicPINVOKE.Vector3_X_get(swigCPtr);
293                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
294                 return ret;
295             }
296         }
297
298         /// <summary>
299         /// y component
300         /// </summary>
301         public float Y
302         {
303             set
304             {
305                 NDalicPINVOKE.Vector3_Y_set(swigCPtr, value);
306                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307             }
308             get
309             {
310                 float ret = NDalicPINVOKE.Vector3_Y_get(swigCPtr);
311                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312                 return ret;
313             }
314         }
315
316         /// <summary>
317         /// z component
318         /// </summary>
319         public float Z
320         {
321             set
322             {
323                 NDalicPINVOKE.Vector3_Z_set(swigCPtr, value);
324                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325             }
326             get
327             {
328                 float ret = NDalicPINVOKE.Vector3_Z_get(swigCPtr);
329                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330                 return ret;
331             }
332         }
333
334         /// <summary>
335         /// ParentOrigin constants. It's 0.0.
336         /// </summary>
337         public static float ParentOriginTop
338         {
339             get
340             {
341                 float ret = NDalicPINVOKE.ParentOriginTop_get();
342                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343                 return ret;
344             }
345         }
346
347         /// <summary>
348         /// ParentOrigin constants. It's 1.0.
349         /// </summary>
350         public static float ParentOriginBottom
351         {
352             get
353             {
354                 float ret = NDalicPINVOKE.ParentOriginBottom_get();
355                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356                 return ret;
357             }
358         }
359
360         /// <summary>
361         /// ParentOrigin constants. It's 0.0.
362         /// </summary>
363         public static float ParentOriginLeft
364         {
365             get
366             {
367                 float ret = NDalicPINVOKE.ParentOriginLeft_get();
368                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
369                 return ret;
370             }
371         }
372
373         /// <summary>
374         /// ParentOrigin constants. It's 1.0.
375         /// </summary>
376         public static float ParentOriginRight
377         {
378             get
379             {
380                 float ret = NDalicPINVOKE.ParentOriginRight_get();
381                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382                 return ret;
383             }
384         }
385
386         /// <summary>
387         /// ParentOrigin constants. It's 0.5.
388         /// </summary>
389         public static float ParentOriginMiddle
390         {
391             get
392             {
393                 float ret = NDalicPINVOKE.ParentOriginMiddle_get();
394                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
395                 return ret;
396             }
397         }
398
399         /// <summary>
400         /// ParentOrigin constants: 0.0, 0.0, 0.5
401         /// </summary>
402         public static Position ParentOriginTopLeft
403         {
404             get
405             {
406                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get();
407                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
408                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409                 return ret;
410             }
411         }
412
413         /// <summary>
414         /// ParentOrigin constants: 0.5, 0.0, 0.5
415         /// </summary>
416         public static Position ParentOriginTopCenter
417         {
418             get
419             {
420                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get();
421                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
422                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
423                 return ret;
424             }
425         }
426
427         /// <summary>
428         /// ParentOrigin constants: 1.0, 0.0, 0.5
429         /// </summary>
430         public static Position ParentOriginTopRight
431         {
432             get
433             {
434                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get();
435                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
436                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
437                 return ret;
438             }
439         }
440
441         /// <summary>
442         /// ParentOrigin constants: 0.0, 0.5, 0.5
443         /// </summary>
444         public static Position ParentOriginCenterLeft
445         {
446             get
447             {
448                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get();
449                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
450                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
451                 return ret;
452             }
453         }
454
455         /// <summary>
456         /// ParentOrigin constants: 0.0, 0.5, 0.5
457         /// </summary>
458         public static Position ParentOriginCenter
459         {
460             get
461             {
462                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get();
463                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
464                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
465                 return ret;
466             }
467         }
468
469         /// <summary>
470         /// ParentOrigin constants: 1.0, 0.5, 0.5
471         /// </summary>
472         public static Position ParentOriginCenterRight
473         {
474             get
475             {
476                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get();
477                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
478                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
479                 return ret;
480             }
481         }
482
483         /// <summary>
484         /// ParentOrigin constants: 0.0f, 1.0f, 0.5f
485         /// </summary>
486         public static Position ParentOriginBottomLeft
487         {
488             get
489             {
490                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get();
491                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
492                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
493                 return ret;
494             }
495         }
496
497         /// <summary>
498         /// ParentOrigin constants: 0.5, 1.0, 0.5
499         /// </summary>
500         public static Position ParentOriginBottomCenter
501         {
502             get
503             {
504                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get();
505                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
506                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507                 return ret;
508             }
509         }
510
511         /// <summary>
512         /// ParentOrigin constants: 1.0, 1.0, 0.5
513         /// </summary>
514         public static Position ParentOriginBottomRight
515         {
516             get
517             {
518                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get();
519                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
520                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
521                 return ret;
522             }
523         }
524
525         /// <summary>
526         /// AnchorPoint constants: 0.0
527         /// </summary>
528         public static float AnchorPointTop
529         {
530             get
531             {
532                 float ret = NDalicPINVOKE.AnchorPointTop_get();
533                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
534                 return ret;
535             }
536         }
537
538         /// <summary>
539         /// AnchorPoint constants: 1.0
540         /// </summary>
541         public static float AnchorPointBottom
542         {
543             get
544             {
545                 float ret = NDalicPINVOKE.AnchorPointBottom_get();
546                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547                 return ret;
548             }
549         }
550
551         /// <summary>
552         /// AnchorPoint constants: 0.0
553         /// </summary>
554         public static float AnchorPointLeft
555         {
556             get
557             {
558                 float ret = NDalicPINVOKE.AnchorPointLeft_get();
559                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
560                 return ret;
561             }
562         }
563
564         /// <summary>
565         /// AnchorPoint constants: 1.0
566         /// </summary>
567         public static float AnchorPointRight
568         {
569             get
570             {
571                 float ret = NDalicPINVOKE.AnchorPointRight_get();
572                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
573                 return ret;
574             }
575         }
576
577         /// <summary>
578         /// AnchorPoint constants: 0.0
579         /// </summary>
580         public static float AnchorPointMiddle
581         {
582             get
583             {
584                 float ret = NDalicPINVOKE.AnchorPointMiddle_get();
585                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
586                 return ret;
587             }
588         }
589
590         /// <summary>
591         /// AnchorPoint constants: 0.0, 0.0, 0.5
592         /// </summary>
593         public static Position AnchorPointTopLeft
594         {
595             get
596             {
597                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get();
598                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
599                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
600                 return ret;
601             }
602         }
603
604         /// <summary>
605         /// AnchorPoint constants: 0.5, 0.0, 0.5
606         /// </summary>
607         public static Position AnchorPointTopCenter
608         {
609             get
610             {
611                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get();
612                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
613                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
614                 return ret;
615             }
616         }
617
618         /// <summary>
619         /// AnchorPoint constants: 1.0, 0.0, 0.5
620         /// </summary>
621         public static Position AnchorPointTopRight
622         {
623             get
624             {
625                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get();
626                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
627                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
628                 return ret;
629             }
630         }
631
632         /// <summary>
633         /// AnchorPoint constants: 0.0, 0.5, 0.5
634         /// </summary>
635         public static Position AnchorPointCenterLeft
636         {
637             get
638             {
639                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get();
640                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
641                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
642                 return ret;
643             }
644         }
645
646         /// <summary>
647         /// AnchorPoint constants: 0.5, 0.5, 0.5
648         /// </summary>
649         public static Position AnchorPointCenter
650         {
651             get
652             {
653                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get();
654                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
655                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
656                 return ret;
657             }
658         }
659
660         /// <summary>
661         /// AnchorPoint constants: 1.0, 0.5, 0.5
662         /// </summary>
663         public static Position AnchorPointCenterRight
664         {
665             get
666             {
667                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get();
668                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
669                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
670                 return ret;
671             }
672         }
673
674         /// <summary>
675         /// AnchorPoint constants: 0.0, 1.0, 0.5
676         /// </summary>
677         public static Position AnchorPointBottomLeft
678         {
679             get
680             {
681                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get();
682                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
683                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
684                 return ret;
685             }
686         }
687
688         /// <summary>
689         /// AnchorPoint constants: 0.5, 1.0, 0.5
690         /// </summary>
691         public static Position AnchorPointBottomCenter
692         {
693             get
694             {
695                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get();
696                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
697                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
698                 return ret;
699             }
700         }
701
702         /// <summary>
703         /// AnchorPoint constants: 1.0, 1.0, 0.5
704         /// </summary>
705         public static Position AnchorPointBottomRight
706         {
707             get
708             {
709                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get();
710                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
711                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
712                 return ret;
713             }
714         }
715
716         /// <summary>
717         /// Constant ( 1.0f, 1.0f, 1.0f )
718         /// </summary>
719         public static Position One
720         {
721             get
722             {
723                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ONE_get();
724                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
725                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
726                 return ret;
727             }
728         }
729
730         internal static Position XAxis
731         {
732             get
733             {
734                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_XAXIS_get();
735                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
736                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
737                 return ret;
738             }
739         }
740
741         internal static Position YAxis
742         {
743             get
744             {
745                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_YAXIS_get();
746                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
747                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
748                 return ret;
749             }
750         }
751
752         internal static Position ZAxis
753         {
754             get
755             {
756                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZAXIS_get();
757                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
758                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
759                 return ret;
760             }
761         }
762
763         internal static Position NegativeXAxis
764         {
765             get
766             {
767                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_XAXIS_get();
768                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
769                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
770                 return ret;
771             }
772         }
773
774         internal static Position NegativeYAxis
775         {
776             get
777             {
778                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_YAXIS_get();
779                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
780                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
781                 return ret;
782             }
783         }
784
785         internal static Position NegativeZAxis
786         {
787             get
788             {
789                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_ZAXIS_get();
790                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
791                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
792                 return ret;
793             }
794         }
795
796         /// <summary>
797         /// Constant ( 0.0f, 0.0f, 0.0f )
798         /// </summary>
799         public static Position Zero
800         {
801             get
802             {
803                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZERO_get();
804                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
805                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
806                 return ret;
807             }
808         }
809
810         /// <summary>
811         /// Convert a position instance to a vector3 instance.
812         /// </summary>
813         public static implicit operator Vector3(Position Position)
814         {
815             return new Vector3(Position.X, Position.Y, Position.Z);
816         }
817
818         /// <summary>
819         /// Convert a vector3 instance to a position instance.
820         /// </summary>
821         public static implicit operator Position(Vector3 vec)
822         {
823             return new Position(vec.X, vec.Y, vec.Z);
824         }
825
826     }
827
828     /// <summary>
829     /// ParentOrigin constants.
830     /// </summary>
831     public struct ParentOrigin
832     {
833         public static float Top
834         {
835             get
836             {
837                 float ret = NDalicPINVOKE.ParentOriginTop_get();
838                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
839                 return ret;
840             }
841         }
842         public static float Bottom
843         {
844             get
845             {
846                 float ret = NDalicPINVOKE.ParentOriginBottom_get();
847                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
848                 return ret;
849             }
850         }
851         public static float Left
852         {
853             get
854             {
855                 float ret = NDalicPINVOKE.ParentOriginLeft_get();
856                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
857                 return ret;
858             }
859         }
860         public static float Right
861         {
862             get
863             {
864                 float ret = NDalicPINVOKE.ParentOriginRight_get();
865                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
866                 return ret;
867             }
868         }
869         public static float Middle
870         {
871             get
872             {
873                 float ret = NDalicPINVOKE.ParentOriginMiddle_get();
874                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875                 return ret;
876             }
877         }
878         public static Position TopLeft
879         {
880             get
881             {
882                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get();
883                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
884                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
885                 return ret;
886             }
887         }
888         public static Position TopCenter
889         {
890             get
891             {
892                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get();
893                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
894                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
895                 return ret;
896             }
897         }
898         public static Position TopRight
899         {
900             get
901             {
902                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get();
903                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
904                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
905                 return ret;
906             }
907         }
908         public static Position CenterLeft
909         {
910             get
911             {
912                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get();
913                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
914                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915                 return ret;
916             }
917         }
918         public static Position Center
919         {
920             get
921             {
922                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get();
923                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
924                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
925                 return ret;
926             }
927         }
928         public static Position CenterRight
929         {
930             get
931             {
932                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get();
933                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
934                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935                 return ret;
936             }
937         }
938         public static Position BottomLeft
939         {
940             get
941             {
942                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get();
943                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
944                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
945                 return ret;
946             }
947         }
948         public static Position BottomCenter
949         {
950             get
951             {
952                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get();
953                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
954                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
955                 return ret;
956             }
957         }
958         public static Position BottomRight
959         {
960             get
961             {
962                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get();
963                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
964                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
965                 return ret;
966             }
967         }
968     }
969
970     /// <summary>
971     /// AnchorPoint constants.
972     /// </summary>
973     public struct AnchorPoint
974     {
975         public static float Top
976         {
977             get
978             {
979                 float ret = NDalicPINVOKE.AnchorPointTop_get();
980                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
981                 return ret;
982             }
983         }
984         public static float Bottom
985         {
986             get
987             {
988                 float ret = NDalicPINVOKE.AnchorPointBottom_get();
989                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
990                 return ret;
991             }
992         }
993         public static float Left
994         {
995             get
996             {
997                 float ret = NDalicPINVOKE.AnchorPointLeft_get();
998                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
999                 return ret;
1000             }
1001         }
1002         public static float Right
1003         {
1004             get
1005             {
1006                 float ret = NDalicPINVOKE.AnchorPointRight_get();
1007                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1008                 return ret;
1009             }
1010         }
1011         public static float Middle
1012         {
1013             get
1014             {
1015                 float ret = NDalicPINVOKE.AnchorPointMiddle_get();
1016                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1017                 return ret;
1018             }
1019         }
1020         public static Position TopLeft
1021         {
1022             get
1023             {
1024                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get();
1025                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1026                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1027                 return ret;
1028             }
1029         }
1030         public static Position TopCenter
1031         {
1032             get
1033             {
1034                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get();
1035                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1036                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1037                 return ret;
1038             }
1039         }
1040         public static Position TopRight
1041         {
1042             get
1043             {
1044                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get();
1045                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1046                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1047                 return ret;
1048             }
1049         }
1050         public static Position CenterLeft
1051         {
1052             get
1053             {
1054                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get();
1055                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1056                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1057                 return ret;
1058             }
1059         }
1060         public static Position Center
1061         {
1062             get
1063             {
1064                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get();
1065                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1066                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1067                 return ret;
1068             }
1069         }
1070         public static Position CenterRight
1071         {
1072             get
1073             {
1074                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get();
1075                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1076                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1077                 return ret;
1078             }
1079         }
1080         public static Position BottomLeft
1081         {
1082             get
1083             {
1084                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get();
1085                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1086                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1087                 return ret;
1088             }
1089         }
1090         public static Position BottomCenter
1091         {
1092             get
1093             {
1094                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get();
1095                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1096                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1097                 return ret;
1098             }
1099         }
1100         public static Position BottomRight
1101         {
1102             get
1103             {
1104                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get();
1105                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1106                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1107                 return ret;
1108             }
1109     }
1110     }
1111     /// <summary>
1112     /// PositionAxis constants.
1113     /// </summary>
1114     public struct PositionAxis
1115     {
1116             public static Position X
1117             {
1118                 get
1119                 {
1120                     global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_XAXIS_get();
1121                     Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1122                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1123                     return ret;
1124                 }
1125             }
1126             public static Position Y
1127             {
1128                 get
1129                 {
1130                     global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_YAXIS_get();
1131                     Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1132                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1133                     return ret;
1134                 }
1135             }
1136             public static Position Z
1137             {
1138                 get
1139                 {
1140                     global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZAXIS_get();
1141                     Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1142                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1143                     return ret;
1144                 }
1145             }
1146             public static Position NegativeX
1147             {
1148                 get
1149                 {
1150                     global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_XAXIS_get();
1151                     Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1152                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1153                     return ret;
1154                 }
1155             }
1156             public static Position NegativeY
1157             {
1158                 get
1159                 {
1160                     global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_YAXIS_get();
1161                     Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1162                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1163                     return ret;
1164                 }
1165             }
1166             public static Position NegativeZ
1167             {
1168                 get
1169                 {
1170                     global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_ZAXIS_get();
1171                     Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1172                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1173                     return ret;
1174                 }
1175             }
1176     }
1177 }