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