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 //------------------------------------------------------------------------------
14 public class PaddingType : global::System.IDisposable
16 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17 protected bool swigCMemOwn;
19 internal PaddingType(global::System.IntPtr cPtr, bool cMemoryOwn)
21 swigCMemOwn = cMemoryOwn;
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PaddingType obj)
27 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
30 //A Flag to check who called Dispose(). (By User or DisposeQueue)
31 private bool isDisposeQueued = false;
32 //A Flat to check if it is already disposed.
33 protected bool disposed = false;
40 isDisposeQueued = true;
41 DisposeQueue.Instance.Add(this);
47 //Throw excpetion if Dispose() is called in separate thread.
48 if (!Window.IsInstalled())
50 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
55 Dispose(DisposeTypes.Implicit);
59 Dispose(DisposeTypes.Explicit);
60 System.GC.SuppressFinalize(this);
64 protected virtual void Dispose(DisposeTypes type)
71 if (type == DisposeTypes.Explicit)
74 //Release your own managed resources here.
75 //You should release all of your own disposable objects here.
79 //Release your own unmanaged resources here.
80 //You should not access any managed member here except static instance.
81 //because the execution order of Finalizes is non-deterministic.
83 if (swigCPtr.Handle != global::System.IntPtr.Zero)
88 NDalicPINVOKE.delete_PaddingType(swigCPtr);
90 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
96 public static bool operator ==(PaddingType a, PaddingType b)
98 // If both are null, or both are same instance, return true.
99 if (System.Object.ReferenceEquals(a, b))
104 // If one is null, but not both, return false.
105 if (((object)a == null) || ((object)b == null))
110 // Return true if the fields match:
111 return (System.Math.Abs(a.Left - b.Left) < NDalic.GetRangedEpsilon(a.Left, b.Left)) &&
112 (System.Math.Abs(a.Right - b.Right) < NDalic.GetRangedEpsilon(a.Right, b.Right)) &&
113 (System.Math.Abs(a.Bottom - b.Bottom) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom)) &&
114 (System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top));
117 public static bool operator !=(PaddingType a, PaddingType b)
148 ///< The Bottom value
175 public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true)
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true)
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 public PaddingType(PaddingType rhs) : this(NDalicPINVOKE.new_PaddingType__SWIG_2(PaddingType.getCPtr(rhs)), true)
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 public PaddingType Assign(PaddingType rhs)
192 PaddingType ret = new PaddingType(NDalicPINVOKE.PaddingType_Assign(swigCPtr, PaddingType.getCPtr(rhs)), false);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 public void Set(float newX, float newY, float newWidth, float newHeight)
199 NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight);
200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 NDalicPINVOKE.PaddingType_x_set(swigCPtr, value);
208 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 float ret = NDalicPINVOKE.PaddingType_x_get(swigCPtr);
213 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222 NDalicPINVOKE.PaddingType_left_set(swigCPtr, value);
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 float ret = NDalicPINVOKE.PaddingType_left_get(swigCPtr);
228 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 NDalicPINVOKE.PaddingType_y_set(swigCPtr, value);
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr);
243 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252 NDalicPINVOKE.PaddingType_right_set(swigCPtr, value);
253 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257 float ret = NDalicPINVOKE.PaddingType_right_get(swigCPtr);
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267 NDalicPINVOKE.PaddingType_width_set(swigCPtr, value);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 float ret = NDalicPINVOKE.PaddingType_width_get(swigCPtr);
273 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282 NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value);
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287 float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr);
288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 NDalicPINVOKE.PaddingType_height_set(swigCPtr, value);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr);
303 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 NDalicPINVOKE.PaddingType_top_set(swigCPtr, value);
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr);
318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();