Release 4.0.0-preview1-00051
[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 using System;
19
20 namespace Tizen.NUI
21 {
22
23     /// <summary>
24     /// Position is a three dimensional vector.
25     /// </summary>
26     public class Position : global::System.IDisposable
27     {
28         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
29         protected bool swigCMemOwn;
30
31         internal Position(global::System.IntPtr cPtr, bool cMemoryOwn)
32         {
33             swigCMemOwn = cMemoryOwn;
34             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35         }
36
37         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position obj)
38         {
39             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
40         }
41
42         //A Flag to check who called Dispose(). (By User or DisposeQueue)
43         private bool isDisposeQueued = false;
44         //A Flat to check if it is already disposed.
45         protected bool disposed = false;
46
47         ~Position()
48         {
49             if(!isDisposeQueued)
50             {
51                 isDisposeQueued = true;
52                 DisposeQueue.Instance.Add(this);
53             }
54         }
55
56         public void Dispose()
57         {
58             //Throw excpetion if Dispose() is called in separate thread.
59             if (!Window.IsInstalled())
60             {
61                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
62             }
63
64             if (isDisposeQueued)
65             {
66                 Dispose(DisposeTypes.Implicit);
67             }
68             else
69             {
70                 Dispose(DisposeTypes.Explicit);
71                 System.GC.SuppressFinalize(this);
72             }
73         }
74
75         protected virtual void Dispose(DisposeTypes type)
76         {
77             if (disposed)
78             {
79                 return;
80             }
81
82             if(type == DisposeTypes.Explicit)
83             {
84                 //Called by User
85                 //Release your own managed resources here.
86                 //You should release all of your own disposable objects here.
87             }
88
89             //Release your own unmanaged resources here.
90             //You should not access any managed member here except static instance.
91             //because the execution order of Finalizes is non-deterministic.
92
93             if (swigCPtr.Handle != global::System.IntPtr.Zero)
94             {
95                 if (swigCMemOwn)
96                 {
97                     swigCMemOwn = false;
98                     NDalicPINVOKE.delete_Vector3(swigCPtr);
99                 }
100                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
101             }
102             disposed = true;
103         }
104
105
106         /// <summary>
107         /// Addition operator.
108         /// </summary>
109         /// <param name="arg1">Vector to add</param>
110         /// <param name="arg2">Vector to add</param>
111         /// <returns>A vector containing the result of the addition</returns>
112         public static Position operator +(Position arg1, Position arg2)
113         {
114             return arg1.Add(arg2);
115         }
116
117         /// <summary>
118         /// Subtraction operator.
119         /// </summary>
120         /// <param name="arg1">Vector to subtract</param>
121         /// <param name="arg2">Vector to subtract</param>
122         /// <returns>A vector containing the result of the subtraction</returns>
123         public static Position operator -(Position arg1, Position arg2)
124         {
125             return arg1.Subtract(arg2);
126         }
127
128         /// <summary>
129         /// Unary negation operator.
130         /// </summary>
131         /// <param name="arg1">Vector to netate</param>
132         /// <returns>A vector containg the negation</returns>
133         public static Position operator -(Position arg1)
134         {
135             return arg1.Subtract();
136         }
137
138         /// <summary>
139         /// Multiplication operator.
140         /// </summary>
141         /// <param name="arg1">The vector to multiply</param>
142         /// <param name="arg2">The vector to multiply</param>
143         /// <returns>A vector containing the result of the multiplication</returns>
144         public static Position operator *(Position arg1, Position arg2)
145         {
146             return arg1.Multiply(arg2);
147         }
148
149         /// <summary>
150         /// Multiplication operator.
151         /// </summary>
152         /// <param name="arg1">The vector to multiply</param>
153         /// <param name="arg2">The float value to scale the vector</param>
154         /// <returns>A vector containing the result of the scaling</returns>
155         public static Position operator *(Position arg1, float arg2)
156         {
157             return arg1.Multiply(arg2);
158         }
159
160         /// <summary>
161         /// Division operator.
162         /// </summary>
163         /// <param name="arg1">The vector to divide</param>
164         /// <param name="arg2">The vector to divide</param>
165         /// <returns>A vector containing the result of the division</returns>
166         public static Position operator /(Position arg1, Position arg2)
167         {
168             return arg1.Divide(arg2);
169         }
170
171         /// <summary>
172         /// Division operator.
173         /// </summary>
174         /// <param name="arg1">The vector to divide</param>
175         /// <param name="arg2">The float value to scale the vector by</param>
176         /// <returns>A vector containing the result of the scaling</returns>
177         public static Position operator /(Position arg1, float arg2)
178         {
179             return arg1.Divide(arg2);
180         }
181
182
183         /// <summary>
184         /// Const array subscript operator overload. Should be 0, 1 or 2.
185         /// </summary>
186         /// <param name="index">Subscript index</param>
187         /// <returns>The float at the given index</returns>
188         public float this[uint index]
189         {
190             get
191             {
192                 return ValueOfIndex(index);
193             }
194         }
195
196         /// <summary>
197         /// </summary>
198         internal static Position GetPositionFromPtr(global::System.IntPtr cPtr)
199         {
200             Position ret = new Position(cPtr, false);
201             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202             return ret;
203         }
204
205
206         /// <summary>
207         /// Constructor
208         /// </summary>
209         public Position() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true)
210         {
211             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212         }
213
214         /// <summary>
215         /// Constructor
216         /// </summary>
217         /// <param name="x">x component</param>
218         /// <param name="y">y component</param>
219         /// <param name="z">z component</param>
220         public Position(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true)
221         {
222             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223         }
224
225         /// <summary>
226         /// Constructor
227         /// </summary>
228         /// <param name="position2d">Position2D to create this vector from</param>
229         public Position(Position2D position2d) : this(NDalicPINVOKE.new_Vector3__SWIG_3(Position2D.getCPtr(position2d)), true)
230         {
231             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
232         }
233
234
235
236         private Position Add(Position rhs)
237         {
238             Position ret = new Position(NDalicPINVOKE.Vector3_Add(swigCPtr, Position.getCPtr(rhs)), true);
239             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240             return ret;
241         }
242
243         private Position Subtract(Position rhs)
244         {
245             Position ret = new Position(NDalicPINVOKE.Vector3_Subtract__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
246             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247             return ret;
248         }
249
250         private Position Multiply(Position rhs)
251         {
252             Position ret = new Position(NDalicPINVOKE.Vector3_Multiply__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
253             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254             return ret;
255         }
256
257         private Position Multiply(float rhs)
258         {
259             Position ret = new Position(NDalicPINVOKE.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
260             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261             return ret;
262         }
263
264         private Position Divide(Position rhs)
265         {
266             Position ret = new Position(NDalicPINVOKE.Vector3_Divide__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
267             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268             return ret;
269         }
270
271         private Position Divide(float rhs)
272         {
273             Position ret = new Position(NDalicPINVOKE.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
274             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275             return ret;
276         }
277
278         private Position Subtract()
279         {
280             Position ret = new Position(NDalicPINVOKE.Vector3_Subtract__SWIG_1(swigCPtr), true);
281             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282             return ret;
283         }
284
285         private float ValueOfIndex(uint index)
286         {
287             float ret = NDalicPINVOKE.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
288             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289             return ret;
290         }
291
292         /// <summary>
293         /// Compare if rhs is equal to
294         /// </summary>
295         /// <param name="rhs">The vector to compare</param>
296         /// <returns>Returns true if the two vectors are equal, otherwise false</returns>
297         public bool EqualTo(Position rhs)
298         {
299             bool ret = NDalicPINVOKE.Vector3_EqualTo(swigCPtr, Position.getCPtr(rhs));
300             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301             return ret;
302         }
303
304         /// <summary>
305         /// Compare if rhs is not equal to
306         /// </summary>
307         /// <param name="rhs">The vector to compare</param>
308         /// <returns>Returns true if the two vectors are not equal, otherwise false</returns>
309         public bool NotEqualTo(Position rhs)
310         {
311             bool ret = NDalicPINVOKE.Vector3_NotEqualTo(swigCPtr, Position.getCPtr(rhs));
312             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313             return ret;
314         }
315
316
317         /// <summary>
318         /// x component
319         /// </summary>
320         public float X
321         {
322             set
323             {
324                 NDalicPINVOKE.Vector3_X_set(swigCPtr, value);
325                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326             }
327             get
328             {
329                 float ret = NDalicPINVOKE.Vector3_X_get(swigCPtr);
330                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
331                 return ret;
332             }
333         }
334
335         /// <summary>
336         /// y component
337         /// </summary>
338         public float Y
339         {
340             set
341             {
342                 NDalicPINVOKE.Vector3_Y_set(swigCPtr, value);
343                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344             }
345             get
346             {
347                 float ret = NDalicPINVOKE.Vector3_Y_get(swigCPtr);
348                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349                 return ret;
350             }
351         }
352
353         /// <summary>
354         /// z component
355         /// </summary>
356         public float Z
357         {
358             set
359             {
360                 NDalicPINVOKE.Vector3_Z_set(swigCPtr, value);
361                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362             }
363             get
364             {
365                 float ret = NDalicPINVOKE.Vector3_Z_get(swigCPtr);
366                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
367                 return ret;
368             }
369         }
370
371         /// <summary>
372         /// ParentOrigin constants. It's 0.0.
373         /// </summary>
374         public static float ParentOriginTop
375         {
376             get
377             {
378                 float ret = NDalicPINVOKE.ParentOriginTop_get();
379                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
380                 return ret;
381             }
382         }
383
384         /// <summary>
385         /// ParentOrigin constants. It's 1.0.
386         /// </summary>
387         public static float ParentOriginBottom
388         {
389             get
390             {
391                 float ret = NDalicPINVOKE.ParentOriginBottom_get();
392                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
393                 return ret;
394             }
395         }
396
397         /// <summary>
398         /// ParentOrigin constants. It's 0.0.
399         /// </summary>
400         public static float ParentOriginLeft
401         {
402             get
403             {
404                 float ret = NDalicPINVOKE.ParentOriginLeft_get();
405                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406                 return ret;
407             }
408         }
409
410         /// <summary>
411         /// ParentOrigin constants. It's 1.0.
412         /// </summary>
413         public static float ParentOriginRight
414         {
415             get
416             {
417                 float ret = NDalicPINVOKE.ParentOriginRight_get();
418                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419                 return ret;
420             }
421         }
422
423         /// <summary>
424         /// ParentOrigin constants. It's 0.5.
425         /// </summary>
426         public static float ParentOriginMiddle
427         {
428             get
429             {
430                 float ret = NDalicPINVOKE.ParentOriginMiddle_get();
431                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
432                 return ret;
433             }
434         }
435
436         /// <summary>
437         /// ParentOrigin constants: 0.0, 0.0, 0.5
438         /// </summary>
439         public static Position ParentOriginTopLeft
440         {
441             get
442             {
443                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get();
444                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
445                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
446                 return ret;
447             }
448         }
449
450         /// <summary>
451         /// ParentOrigin constants: 0.5, 0.0, 0.5
452         /// </summary>
453         public static Position ParentOriginTopCenter
454         {
455             get
456             {
457                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get();
458                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
459                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
460                 return ret;
461             }
462         }
463
464         /// <summary>
465         /// ParentOrigin constants: 1.0, 0.0, 0.5
466         /// </summary>
467         public static Position ParentOriginTopRight
468         {
469             get
470             {
471                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get();
472                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
473                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
474                 return ret;
475             }
476         }
477
478         /// <summary>
479         /// ParentOrigin constants: 0.0, 0.5, 0.5
480         /// </summary>
481         public static Position ParentOriginCenterLeft
482         {
483             get
484             {
485                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get();
486                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
487                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
488                 return ret;
489             }
490         }
491
492         /// <summary>
493         /// ParentOrigin constants: 0.0, 0.5, 0.5
494         /// </summary>
495         public static Position ParentOriginCenter
496         {
497             get
498             {
499                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get();
500                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
501                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502                 return ret;
503             }
504         }
505
506         /// <summary>
507         /// ParentOrigin constants: 1.0, 0.5, 0.5
508         /// </summary>
509         public static Position ParentOriginCenterRight
510         {
511             get
512             {
513                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get();
514                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
515                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
516                 return ret;
517             }
518         }
519
520         /// <summary>
521         /// ParentOrigin constants: 0.0f, 1.0f, 0.5f
522         /// </summary>
523         public static Position ParentOriginBottomLeft
524         {
525             get
526             {
527                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get();
528                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
529                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
530                 return ret;
531             }
532         }
533
534         /// <summary>
535         /// ParentOrigin constants: 0.5, 1.0, 0.5
536         /// </summary>
537         public static Position ParentOriginBottomCenter
538         {
539             get
540             {
541                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get();
542                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
543                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
544                 return ret;
545             }
546         }
547
548         /// <summary>
549         /// ParentOrigin constants: 1.0, 1.0, 0.5
550         /// </summary>
551         public static Position ParentOriginBottomRight
552         {
553             get
554             {
555                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get();
556                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
557                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558                 return ret;
559             }
560         }
561
562         /// <summary>
563         /// PivotPoint constants: 0.0
564         /// </summary>
565         public static float PivotPointTop
566         {
567             get
568             {
569                 float ret = NDalicPINVOKE.AnchorPointTop_get();
570                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
571                 return ret;
572             }
573         }
574
575         /// <summary>
576         /// PivotPoint constants: 1.0
577         /// </summary>
578         public static float PivotPointBottom
579         {
580             get
581             {
582                 float ret = NDalicPINVOKE.AnchorPointBottom_get();
583                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
584                 return ret;
585             }
586         }
587
588         /// <summary>
589         /// PivotPoint constants: 0.0
590         /// </summary>
591         public static float PivotPointLeft
592         {
593             get
594             {
595                 float ret = NDalicPINVOKE.AnchorPointLeft_get();
596                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
597                 return ret;
598             }
599         }
600
601         /// <summary>
602         /// PivotPoint constants: 1.0
603         /// </summary>
604         public static float PivotPointRight
605         {
606             get
607             {
608                 float ret = NDalicPINVOKE.AnchorPointRight_get();
609                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
610                 return ret;
611             }
612         }
613
614         /// <summary>
615         /// PivotPoint constants: 0.0
616         /// </summary>
617         public static float PivotPointMiddle
618         {
619             get
620             {
621                 float ret = NDalicPINVOKE.AnchorPointMiddle_get();
622                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
623                 return ret;
624             }
625         }
626
627         /// <summary>
628         /// PivotPoint constants: 0.0, 0.0, 0.5
629         /// </summary>
630         public static Position PivotPointTopLeft
631         {
632             get
633             {
634                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get();
635                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
636                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
637                 return ret;
638             }
639         }
640
641         /// <summary>
642         /// PivotPoint constants: 0.5, 0.0, 0.5
643         /// </summary>
644         public static Position PivotPointTopCenter
645         {
646             get
647             {
648                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get();
649                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
650                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
651                 return ret;
652             }
653         }
654
655         /// <summary>
656         /// PivotPoint constants: 1.0, 0.0, 0.5
657         /// </summary>
658         public static Position PivotPointTopRight
659         {
660             get
661             {
662                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get();
663                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
664                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
665                 return ret;
666             }
667         }
668
669         /// <summary>
670         /// PivotPoint constants: 0.0, 0.5, 0.5
671         /// </summary>
672         public static Position PivotPointCenterLeft
673         {
674             get
675             {
676                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get();
677                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
678                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679                 return ret;
680             }
681         }
682
683         /// <summary>
684         /// PivotPoint constants: 0.5, 0.5, 0.5
685         /// </summary>
686         public static Position PivotPointCenter
687         {
688             get
689             {
690                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get();
691                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
692                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
693                 return ret;
694             }
695         }
696
697         /// <summary>
698         /// PivotPoint constants: 1.0, 0.5, 0.5
699         /// </summary>
700         public static Position PivotPointCenterRight
701         {
702             get
703             {
704                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get();
705                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
706                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
707                 return ret;
708             }
709         }
710
711         /// <summary>
712         /// PivotPoint constants: 0.0, 1.0, 0.5
713         /// </summary>
714         public static Position PivotPointBottomLeft
715         {
716             get
717             {
718                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get();
719                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
720                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
721                 return ret;
722             }
723         }
724
725         /// <summary>
726         /// PivotPoint constants: 0.5, 1.0, 0.5
727         /// </summary>
728         public static Position PivotPointBottomCenter
729         {
730             get
731             {
732                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get();
733                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
734                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
735                 return ret;
736             }
737         }
738
739         /// <summary>
740         /// PivotPoint constants: 1.0, 1.0, 0.5
741         /// </summary>
742         public static Position PivotPointBottomRight
743         {
744             get
745             {
746                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get();
747                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
748                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
749                 return ret;
750             }
751         }
752
753         /// <summary>
754         /// Constant ( 1.0f, 1.0f, 1.0f )
755         /// </summary>
756         public static Position One
757         {
758             get
759             {
760                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ONE_get();
761                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
762                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
763                 return ret;
764             }
765         }
766
767         internal static Position XAxis
768         {
769             get
770             {
771                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_XAXIS_get();
772                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
773                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
774                 return ret;
775             }
776         }
777
778         internal static Position YAxis
779         {
780             get
781             {
782                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_YAXIS_get();
783                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
784                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
785                 return ret;
786             }
787         }
788
789         internal static Position ZAxis
790         {
791             get
792             {
793                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZAXIS_get();
794                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
795                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
796                 return ret;
797             }
798         }
799
800         internal static Position NegativeXAxis
801         {
802             get
803             {
804                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_XAXIS_get();
805                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
806                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
807                 return ret;
808             }
809         }
810
811         internal static Position NegativeYAxis
812         {
813             get
814             {
815                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_YAXIS_get();
816                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
817                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
818                 return ret;
819             }
820         }
821
822         internal static Position NegativeZAxis
823         {
824             get
825             {
826                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_ZAXIS_get();
827                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
828                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829                 return ret;
830             }
831         }
832
833         /// <summary>
834         /// Constant ( 0.0f, 0.0f, 0.0f )
835         /// </summary>
836         public static Position Zero
837         {
838             get
839             {
840                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZERO_get();
841                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
842                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
843                 return ret;
844             }
845         }
846
847         /// <summary>
848         /// Convert a position instance to a vector3 instance.
849         /// </summary>
850         public static implicit operator Vector3(Position Position)
851         {
852             return new Vector3(Position.X, Position.Y, Position.Z);
853         }
854
855         /// <summary>
856         /// Convert a vector3 instance to a position instance.
857         /// </summary>
858         public static implicit operator Position(Vector3 vec)
859         {
860             return new Position(vec.X, vec.Y, vec.Z);
861         }
862
863
864         [Obsolete("Please do not use! this will be deprecated")]
865         public static float AnchorPointTop
866         {
867             get
868             {
869                 float ret = NDalicPINVOKE.AnchorPointTop_get();
870                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
871                 return ret;
872             }
873         }
874
875         [Obsolete("Please do not use! this will be deprecated")]
876         public static float AnchorPointBottom
877         {
878             get
879             {
880                 float ret = NDalicPINVOKE.AnchorPointBottom_get();
881                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
882                 return ret;
883             }
884         }
885
886         [Obsolete("Please do not use! this will be deprecated")]
887         public static float AnchorPointLeft
888         {
889             get
890             {
891                 float ret = NDalicPINVOKE.AnchorPointLeft_get();
892                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
893                 return ret;
894             }
895         }
896
897         [Obsolete("Please do not use! this will be deprecated")]
898         public static float AnchorPointRight
899         {
900             get
901             {
902                 float ret = NDalicPINVOKE.AnchorPointRight_get();
903                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
904                 return ret;
905             }
906         }
907
908         [Obsolete("Please do not use! this will be deprecated")]
909         public static float AnchorPointMiddle
910         {
911             get
912             {
913                 float ret = NDalicPINVOKE.AnchorPointMiddle_get();
914                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915                 return ret;
916             }
917         }
918
919         [Obsolete("Please do not use! this will be deprecated")]
920         public static Position AnchorPointTopLeft
921         {
922             get
923             {
924                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get();
925                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
926                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
927                 return ret;
928             }
929         }
930
931         [Obsolete("Please do not use! this will be deprecated")]
932         public static Position AnchorPointTopCenter
933         {
934             get
935             {
936                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get();
937                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
938                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
939                 return ret;
940             }
941         }
942
943         [Obsolete("Please do not use! this will be deprecated")]
944         public static Position AnchorPointTopRight
945         {
946             get
947             {
948                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get();
949                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
950                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
951                 return ret;
952             }
953         }
954
955         [Obsolete("Please do not use! this will be deprecated")]
956         public static Position AnchorPointCenterLeft
957         {
958             get
959             {
960                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get();
961                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
962                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
963                 return ret;
964             }
965         }
966
967
968         [Obsolete("Please do not use! this will be deprecated")]
969         public static Position AnchorPointCenter
970         {
971             get
972             {
973                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get();
974                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
975                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
976                 return ret;
977             }
978         }
979
980         [Obsolete("Please do not use! this will be deprecated")]
981         public static Position AnchorPointCenterRight
982         {
983             get
984             {
985                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get();
986                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
987                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
988                 return ret;
989             }
990         }
991
992         [Obsolete("Please do not use! this will be deprecated")]
993         public static Position AnchorPointBottomLeft
994         {
995             get
996             {
997                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get();
998                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
999                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1000                 return ret;
1001             }
1002         }
1003
1004         [Obsolete("Please do not use! this will be deprecated")]
1005         public static Position AnchorPointBottomCenter
1006         {
1007             get
1008             {
1009                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get();
1010                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1011                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1012                 return ret;
1013             }
1014         }
1015
1016         [Obsolete("Please do not use! this will be deprecated")]
1017         public static Position AnchorPointBottomRight
1018         {
1019             get
1020             {
1021                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get();
1022                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
1023                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1024                 return ret;
1025             }
1026         }
1027
1028     }
1029 }