1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
15 /// A PinchGesture is emitted when the user moves two fingers towards or away from each other.<br>
16 /// A pinch gesture will continue to be sent to the actor under the center point of the pinch until the pinch ends.<br>
18 public class PinchGesture : Gesture
20 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 internal PinchGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PinchGesture_SWIGUpcast(cPtr), cMemoryOwn)
24 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PinchGesture obj)
29 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
32 public override void Dispose()
34 if (!Window.IsInstalled())
36 DisposeQueue.Instance.Add(this);
42 if (swigCPtr.Handle != global::System.IntPtr.Zero)
47 NDalicPINVOKE.delete_PinchGesture(swigCPtr);
49 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
51 global::System.GC.SuppressFinalize(this);
57 internal static PinchGesture GetPinchGestureFromPtr(global::System.IntPtr cPtr)
59 PinchGesture ret = new PinchGesture(cPtr, false);
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 /// The scale factor from the start of the pinch gesture till the latest pinch gesture.<br>
66 /// If the user is moving their fingers away from each other, then
67 /// this value increases. Conversely, if the user is moving their
68 /// fingers towards each other, this value will decrease.<br>
79 /// The speed at which the user is moving their fingers.<br>
80 /// This is the pixel movement per second.<br>
91 /// The center point of the two points that caused the pinch gesture in screen coordinates.
93 public Vector2 ScreenCenterPoint
97 return screenCenterPoint;
102 /// The center point of the two points that caused the pinch gesture in local actor coordinates.
104 public Vector2 LocalCenterPoint
108 return localCenterPoint;
113 /// Default Constructor.
115 /// <param name="state">The state of the gesture</param>
116 public PinchGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PinchGesture__SWIG_0((int)state), true)
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122 /// Copy constructor.
124 /// <param name="rhs">A reference to the copied handle</param>
125 public PinchGesture(PinchGesture rhs) : this(NDalicPINVOKE.new_PinchGesture__SWIG_1(PinchGesture.getCPtr(rhs)), true)
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 /// Assignment operator.
133 /// <param name="rhs">A reference to the copied handle</param>
134 /// <returns>A reference to this</returns>
135 public PinchGesture Assign(PinchGesture rhs)
137 PinchGesture ret = new PinchGesture(NDalicPINVOKE.PinchGesture_Assign(swigCPtr, PinchGesture.getCPtr(rhs)), false);
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 NDalicPINVOKE.PinchGesture_scale_set(swigCPtr, value);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151 float ret = NDalicPINVOKE.PinchGesture_scale_get(swigCPtr);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 NDalicPINVOKE.PinchGesture_speed_set(swigCPtr, value);
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 float ret = NDalicPINVOKE.PinchGesture_speed_get(swigCPtr);
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 private Vector2 screenCenterPoint
176 NDalicPINVOKE.PinchGesture_screenCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 global::System.IntPtr cPtr = NDalicPINVOKE.PinchGesture_screenCenterPoint_get(swigCPtr);
182 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 private Vector2 localCenterPoint
192 NDalicPINVOKE.PinchGesture_localCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 global::System.IntPtr cPtr = NDalicPINVOKE.PinchGesture_localCenterPoint_get(swigCPtr);
198 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();