fa2aead42f5bb232fa09c88dc7770edcf61479a4
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / FlexContainer.cs
1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
2 // PROPRIETARY/CONFIDENTIAL \r
3 // This software is the confidential and proprietary\r
4 // information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall\r
5 // not disclose such Confidential Information and shall use it only in\r
6 // accordance with the terms of the license agreement you entered into with\r
7 // SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the\r
8 // suitability of the software, either express or implied, including but not\r
9 // limited to the implied warranties of merchantability, fitness for a\r
10 // particular purpose, or non-infringement. SAMSUNG shall not be liable for any\r
11 // damages suffered by licensee as a result of using, modifying or distributing\r
12 // this software or its derivatives.\r
13 \r
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
15 //\r
16 // Licensed under the Apache License, Version 2.0 (the "License");\r
17 // you may not use this file except in compliance with the License.\r
18 // You may obtain a copy of the License at\r
19 //\r
20 // http://www.apache.org/licenses/LICENSE-2.0\r
21 //\r
22 // Unless required by applicable law or agreed to in writing, software\r
23 // distributed under the License is distributed on an "AS IS" BASIS,\r
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
25 // See the License for the specific language governing permissions and\r
26 // limitations under the License.\r
27 //\r
28 \r
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts\r
30 // Some have been manually changed\r
31 \r
32 namespace Tizen.NUI\r
33 {\r
34 \r
35     public class FlexContainer : View\r
36     {\r
37         private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
38 \r
39         internal FlexContainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FlexContainer_SWIGUpcast(cPtr), cMemoryOwn)\r
40         {\r
41             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
42         }\r
43 \r
44         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FlexContainer obj)\r
45         {\r
46             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
47         }\r
48 \r
49         ~FlexContainer()\r
50         {\r
51             DisposeQueue.Instance.Add(this);\r
52         }\r
53 \r
54         public override void Dispose()\r
55         {\r
56             if (!Stage.IsInstalled())\r
57             {\r
58                 DisposeQueue.Instance.Add(this);\r
59                 return;\r
60             }\r
61 \r
62             lock (this)\r
63             {\r
64                 if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
65                 {\r
66                     if (swigCMemOwn)\r
67                     {\r
68                         swigCMemOwn = false;\r
69                         NDalicPINVOKE.delete_FlexContainer(swigCPtr);\r
70                     }\r
71                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
72                 }\r
73                 global::System.GC.SuppressFinalize(this);\r
74                 base.Dispose();\r
75             }\r
76         }\r
77 \r
78 \r
79         internal class Property : global::System.IDisposable\r
80         {\r
81             private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
82             protected bool swigCMemOwn;\r
83 \r
84             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)\r
85             {\r
86                 swigCMemOwn = cMemoryOwn;\r
87                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
88             }\r
89 \r
90             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)\r
91             {\r
92                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
93             }\r
94 \r
95             ~Property()\r
96             {\r
97                 Dispose();\r
98             }\r
99 \r
100             public virtual void Dispose()\r
101             {\r
102                 lock (this)\r
103                 {\r
104                     if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
105                     {\r
106                         if (swigCMemOwn)\r
107                         {\r
108                             swigCMemOwn = false;\r
109                             NDalicPINVOKE.delete_FlexContainer_Property(swigCPtr);\r
110                         }\r
111                         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
112                     }\r
113                     global::System.GC.SuppressFinalize(this);\r
114                 }\r
115             }\r
116 \r
117             internal Property() : this(NDalicPINVOKE.new_FlexContainer_Property(), true)\r
118             {\r
119                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
120             }\r
121 \r
122             internal static readonly int CONTENT_DIRECTION = NDalicPINVOKE.FlexContainer_Property_CONTENT_DIRECTION_get();\r
123             internal static readonly int FLEX_DIRECTION = NDalicPINVOKE.FlexContainer_Property_FLEX_DIRECTION_get();\r
124             internal static readonly int FLEX_WRAP = NDalicPINVOKE.FlexContainer_Property_FLEX_WRAP_get();\r
125             internal static readonly int JUSTIFY_CONTENT = NDalicPINVOKE.FlexContainer_Property_JUSTIFY_CONTENT_get();\r
126             internal static readonly int ALIGN_ITEMS = NDalicPINVOKE.FlexContainer_Property_ALIGN_ITEMS_get();\r
127             internal static readonly int ALIGN_CONTENT = NDalicPINVOKE.FlexContainer_Property_ALIGN_CONTENT_get();\r
128 \r
129         }\r
130 \r
131         public class ChildProperty : global::System.IDisposable\r
132         {\r
133             private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
134             protected bool swigCMemOwn;\r
135 \r
136             internal ChildProperty(global::System.IntPtr cPtr, bool cMemoryOwn)\r
137             {\r
138                 swigCMemOwn = cMemoryOwn;\r
139                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
140             }\r
141 \r
142             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ChildProperty obj)\r
143             {\r
144                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
145             }\r
146 \r
147             ~ChildProperty()\r
148             {\r
149                 Dispose();\r
150             }\r
151 \r
152             public virtual void Dispose()\r
153             {\r
154                 lock (this)\r
155                 {\r
156                     if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
157                     {\r
158                         if (swigCMemOwn)\r
159                         {\r
160                             swigCMemOwn = false;\r
161                             NDalicPINVOKE.delete_FlexContainer_ChildProperty(swigCPtr);\r
162                         }\r
163                         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
164                     }\r
165                     global::System.GC.SuppressFinalize(this);\r
166                 }\r
167             }\r
168 \r
169             internal ChildProperty() : this(NDalicPINVOKE.new_FlexContainer_ChildProperty(), true)\r
170             {\r
171                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
172             }\r
173 \r
174             internal static readonly int FLEX = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_get();\r
175             internal static readonly int ALIGN_SELF = NDalicPINVOKE.FlexContainer_ChildProperty_ALIGN_SELF_get();\r
176             internal static readonly int FLEX_MARGIN = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_MARGIN_get();\r
177 \r
178         }\r
179 \r
180         public FlexContainer() : this(NDalicPINVOKE.FlexContainer_New(), true)\r
181         {\r
182             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
183 \r
184         }\r
185         internal FlexContainer(FlexContainer handle) : this(NDalicPINVOKE.new_FlexContainer__SWIG_1(FlexContainer.getCPtr(handle)), true)\r
186         {\r
187             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
188         }\r
189 \r
190         internal FlexContainer Assign(FlexContainer handle)\r
191         {\r
192             FlexContainer ret = new FlexContainer(NDalicPINVOKE.FlexContainer_Assign(swigCPtr, FlexContainer.getCPtr(handle)), false);\r
193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
194             return ret;\r
195         }\r
196 \r
197         internal new static FlexContainer DownCast(BaseHandle handle)\r
198         {\r
199             FlexContainer ret = new FlexContainer(NDalicPINVOKE.FlexContainer_DownCast(BaseHandle.getCPtr(handle)), true);\r
200             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
201             return ret;\r
202         }\r
203 \r
204         public enum FlexDirectionType\r
205         {\r
206             Column,\r
207             ColumnReverse,\r
208             Row,\r
209             RowReverse\r
210         }\r
211 \r
212         public enum ContentDirectionType\r
213         {\r
214             Inherit,\r
215             LTR,\r
216             RTL\r
217         }\r
218 \r
219         public enum Justification\r
220         {\r
221             JustifyFlexStart,\r
222             JustifyCenter,\r
223             JustifyFlexEnd,\r
224             JustifySpaceBetween,\r
225             JustifySpaceAround\r
226         }\r
227 \r
228         public enum Alignment\r
229         {\r
230             AlignAuto,\r
231             AlignFlexStart,\r
232             AlignCenter,\r
233             AlignFlexEnd,\r
234             AlignStretch\r
235         }\r
236         public enum WrapType\r
237         {\r
238             NoWrap,\r
239             Wrap\r
240         }\r
241 \r
242         internal enum PropertyRange\r
243         {\r
244             PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,\r
245             PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000,\r
246             CHILD_PROPERTY_START_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX,\r
247             CHILD_PROPERTY_END_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX + 1000\r
248         }\r
249 \r
250         public int ContentDirection\r
251         {\r
252             get\r
253             {\r
254                 int temp = 0;\r
255                 GetProperty(FlexContainer.Property.CONTENT_DIRECTION).Get(ref temp);\r
256                 return temp;\r
257             }\r
258             set\r
259             {\r
260                 SetProperty(FlexContainer.Property.CONTENT_DIRECTION, new Tizen.NUI.PropertyValue(value));\r
261             }\r
262         }\r
263         public int FlexDirection\r
264         {\r
265             get\r
266             {\r
267                 int temp = 0;\r
268                 GetProperty(FlexContainer.Property.FLEX_DIRECTION).Get(ref temp);\r
269                 return temp;\r
270             }\r
271             set\r
272             {\r
273                 SetProperty(FlexContainer.Property.FLEX_DIRECTION, new Tizen.NUI.PropertyValue(value));\r
274             }\r
275         }\r
276         public int FlexWrap\r
277         {\r
278             get\r
279             {\r
280                 int temp = 0;\r
281                 GetProperty(FlexContainer.Property.FLEX_WRAP).Get(ref temp);\r
282                 return temp;\r
283             }\r
284             set\r
285             {\r
286                 SetProperty(FlexContainer.Property.FLEX_WRAP, new Tizen.NUI.PropertyValue(value));\r
287             }\r
288         }\r
289         public int JustifyContent\r
290         {\r
291             get\r
292             {\r
293                 int temp = 0;\r
294                 GetProperty(FlexContainer.Property.JUSTIFY_CONTENT).Get(ref temp);\r
295                 return temp;\r
296             }\r
297             set\r
298             {\r
299                 SetProperty(FlexContainer.Property.JUSTIFY_CONTENT, new Tizen.NUI.PropertyValue(value));\r
300             }\r
301         }\r
302         public int AlignItems\r
303         {\r
304             get\r
305             {\r
306                 int temp = 0;\r
307                 GetProperty(FlexContainer.Property.ALIGN_ITEMS).Get(ref temp);\r
308                 return temp;\r
309             }\r
310             set\r
311             {\r
312                 SetProperty(FlexContainer.Property.ALIGN_ITEMS, new Tizen.NUI.PropertyValue(value));\r
313             }\r
314         }\r
315         public int AlignContent\r
316         {\r
317             get\r
318             {\r
319                 int temp = 0;\r
320                 GetProperty(FlexContainer.Property.ALIGN_CONTENT).Get(ref temp);\r
321                 return temp;\r
322             }\r
323             set\r
324             {\r
325                 SetProperty(FlexContainer.Property.ALIGN_CONTENT, new Tizen.NUI.PropertyValue(value));\r
326             }\r
327         }\r
328 \r
329     }\r
330 \r
331 }\r