Added scrollMode property to ScrollView to simplify Rulers
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / Rectangle.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.10
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Dali {
12
13 public class Rectangle : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal Rectangle(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21
22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Rectangle obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~Rectangle() {
27     DisposeQueue.Instance.Add(this);
28   }
29
30   public virtual void Dispose() {
31     if (!Window.IsInstalled()) {
32       DisposeQueue.Instance.Add(this);
33       return;
34     }
35
36     lock(this) {
37       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
38         if (swigCMemOwn) {
39           swigCMemOwn = false;
40           NDalicPINVOKE.delete_Rectangle(swigCPtr);
41         }
42         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
43       }
44       global::System.GC.SuppressFinalize(this);
45     }
46   }
47
48
49     public Rectangle(float x, float y, float width, float height) : this( (int)x, (int)y, (int)width, (int)height )
50     {
51     }
52
53     public static bool operator ==(Rectangle a, Rectangle b)
54     {
55         // If both are null, or both are same instance, return true.
56         if (System.Object.ReferenceEquals(a, b))
57         {
58             return true;
59         }
60
61         // If one is null, but not both, return false.
62         if (((object)a == null) || ((object)b == null))
63         {
64             return false;
65         }
66
67         // Return true if the fields match:
68         return a.X == b.X && a.Y == b.Y && a.Width == b.Width && a.Height == b.Height;
69     }
70
71     public static bool operator !=(Rectangle a, Rectangle b)
72     {
73         return !(a == b);
74     }
75
76     ///< X position of the rectangle, values after the decimal point are ignored, float type provided for convenience.
77     public float X
78     {
79         set
80         {
81             x = (int)( value );
82         }
83         get
84         {
85             return x;
86         }
87     }
88
89     ///< Y position of the rectangle, values after the decimal point are ignored, float type provided for convenience.
90     public float Y
91     {
92         set
93         {
94             y = (int)( value );
95         }
96         get
97         {
98             return y;
99         }
100     }
101
102     ///< Width of the rectangle, values after the decimal point are ignored, float type provided for convenience.
103     public float Width
104     {
105         set
106         {
107             width = (int)( value );
108         }
109         get
110         {
111             return width;
112         }
113     }
114
115     ///< Height of the rectangle, values after the decimal point are ignored, float type provided for convenience.
116     public float Height
117     {
118         set
119         {
120             height = (int)( value );
121         }
122         get
123         {
124             return height;
125         }
126     }
127
128   public Rectangle() : this(NDalicPINVOKE.new_Rectangle__SWIG_0(), true) {
129     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130   }
131
132   public Rectangle(int x, int y, int width, int height) : this(NDalicPINVOKE.new_Rectangle__SWIG_1(x, y, width, height), true) {
133     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134   }
135
136   public Rectangle(Rectangle rhs) : this(NDalicPINVOKE.new_Rectangle__SWIG_2(Rectangle.getCPtr(rhs)), true) {
137     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138   }
139
140   public Rectangle Assign(Rectangle rhs) {
141     Rectangle ret = new Rectangle(NDalicPINVOKE.Rectangle_Assign(swigCPtr, Rectangle.getCPtr(rhs)), false);
142     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143     return ret;
144   }
145
146   public void Set(int newX, int newY, int newWidth, int newHeight) {
147     NDalicPINVOKE.Rectangle_Set(swigCPtr, newX, newY, newWidth, newHeight);
148     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149   }
150
151   public bool IsEmpty() {
152     bool ret = NDalicPINVOKE.Rectangle_IsEmpty(swigCPtr);
153     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154     return ret;
155   }
156
157   public int Left() {
158     int ret = NDalicPINVOKE.Rectangle_Left(swigCPtr);
159     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160     return ret;
161   }
162
163   public int Right() {
164     int ret = NDalicPINVOKE.Rectangle_Right(swigCPtr);
165     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166     return ret;
167   }
168
169   public int Top() {
170     int ret = NDalicPINVOKE.Rectangle_Top(swigCPtr);
171     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172     return ret;
173   }
174
175   public int Bottom() {
176     int ret = NDalicPINVOKE.Rectangle_Bottom(swigCPtr);
177     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178     return ret;
179   }
180
181   public int Area() {
182     int ret = NDalicPINVOKE.Rectangle_Area(swigCPtr);
183     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184     return ret;
185   }
186
187   public bool Intersects(Rectangle other) {
188     bool ret = NDalicPINVOKE.Rectangle_Intersects(swigCPtr, Rectangle.getCPtr(other));
189     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190     return ret;
191   }
192
193   public bool Contains(Rectangle other) {
194     bool ret = NDalicPINVOKE.Rectangle_Contains(swigCPtr, Rectangle.getCPtr(other));
195     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196     return ret;
197   }
198
199   private int x {
200     set {
201       NDalicPINVOKE.Rectangle_x_set(swigCPtr, value);
202       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203     } 
204     get {
205       int ret = NDalicPINVOKE.Rectangle_x_get(swigCPtr);
206       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207       return ret;
208     } 
209   }
210
211   private int left {
212     set {
213       NDalicPINVOKE.Rectangle_left_set(swigCPtr, value);
214       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215     } 
216     get {
217       int ret = NDalicPINVOKE.Rectangle_left_get(swigCPtr);
218       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219       return ret;
220     } 
221   }
222
223   private int y {
224     set {
225       NDalicPINVOKE.Rectangle_y_set(swigCPtr, value);
226       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227     } 
228     get {
229       int ret = NDalicPINVOKE.Rectangle_y_get(swigCPtr);
230       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231       return ret;
232     } 
233   }
234
235   private int right {
236     set {
237       NDalicPINVOKE.Rectangle_right_set(swigCPtr, value);
238       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239     } 
240     get {
241       int ret = NDalicPINVOKE.Rectangle_right_get(swigCPtr);
242       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243       return ret;
244     } 
245   }
246
247   private int width {
248     set {
249       NDalicPINVOKE.Rectangle_width_set(swigCPtr, value);
250       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251     } 
252     get {
253       int ret = NDalicPINVOKE.Rectangle_width_get(swigCPtr);
254       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
255       return ret;
256     } 
257   }
258
259   private int bottom {
260     set {
261       NDalicPINVOKE.Rectangle_bottom_set(swigCPtr, value);
262       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263     } 
264     get {
265       int ret = NDalicPINVOKE.Rectangle_bottom_get(swigCPtr);
266       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267       return ret;
268     } 
269   }
270
271   private int height {
272     set {
273       NDalicPINVOKE.Rectangle_height_set(swigCPtr, value);
274       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275     } 
276     get {
277       int ret = NDalicPINVOKE.Rectangle_height_get(swigCPtr);
278       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279       return ret;
280     } 
281   }
282
283   private int top {
284     set {
285       NDalicPINVOKE.Rectangle_top_set(swigCPtr, value);
286       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287     } 
288     get {
289       int ret = NDalicPINVOKE.Rectangle_top_get(swigCPtr);
290       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
291       return ret;
292     } 
293   }
294
295 }
296
297 }