[Tizen] Merge packaging information to csproj
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / FlexContainer.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.9
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 using Tizen.NUI.BaseComponents;
28
29 namespace Tizen.NUI
30 {
31     /// <summary>
32     /// FlexContainer implements a subset of the flexbox spec (defined by W3C):https://www.w3.org/TR/css3-flexbox/<br>
33     /// It aims at providing a more efficient way to lay out, align and distribute space among items in the container, even when their size is unknown or dynamic.<br>
34     /// FlexContainer has the ability to alter the width and height of its children (i.e. flex items) to fill the available space in the best possible way on different screen sizes.<br>
35     /// FlexContainer can expand items to fill available free space, or shrink them to prevent overflow.<br>
36     /// </summary>
37     public class FlexContainer : View
38     {
39         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
40
41         internal FlexContainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FlexContainer_SWIGUpcast(cPtr), cMemoryOwn)
42         {
43             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
44             // By default, we do not want the position to use the anchor point
45             PositionUsesAnchorPoint = false;
46         }
47
48         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FlexContainer obj)
49         {
50             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
51         }
52
53         protected override void Dispose(DisposeTypes type)
54         {
55             if(disposed)
56             {
57                 return;
58             }
59
60             if(type == DisposeTypes.Explicit)
61             {
62                 //Called by User
63                 //Release your own managed resources here.
64                 //You should release all of your own disposable objects here.
65             }
66
67             //Release your own unmanaged resources here.
68             //You should not access any managed member here except static instance.
69             //because the execution order of Finalizes is non-deterministic.
70
71             if (swigCPtr.Handle != global::System.IntPtr.Zero)
72             {
73                 if (swigCMemOwn)
74                 {
75                     swigCMemOwn = false;
76                     NDalicPINVOKE.delete_FlexContainer(swigCPtr);
77                 }
78                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
79             }
80
81             base.Dispose(type);
82         }
83
84
85         internal class Property
86         {
87             internal static readonly int CONTENT_DIRECTION = NDalicPINVOKE.FlexContainer_Property_CONTENT_DIRECTION_get();
88             internal static readonly int FLEX_DIRECTION = NDalicPINVOKE.FlexContainer_Property_FLEX_DIRECTION_get();
89             internal static readonly int FLEX_WRAP = NDalicPINVOKE.FlexContainer_Property_FLEX_WRAP_get();
90             internal static readonly int JUSTIFY_CONTENT = NDalicPINVOKE.FlexContainer_Property_JUSTIFY_CONTENT_get();
91             internal static readonly int ALIGN_ITEMS = NDalicPINVOKE.FlexContainer_Property_ALIGN_ITEMS_get();
92             internal static readonly int ALIGN_CONTENT = NDalicPINVOKE.FlexContainer_Property_ALIGN_CONTENT_get();
93
94         }
95
96         /// <summary>
97         /// Enumeration for the instance of child properties belonging to the FlexContainer class.
98         /// </summary>
99         public class ChildProperty
100         {
101             internal static readonly int FLEX = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_get();
102             internal static readonly int ALIGN_SELF = NDalicPINVOKE.FlexContainer_ChildProperty_ALIGN_SELF_get();
103             internal static readonly int FLEX_MARGIN = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_MARGIN_get();
104         }
105
106         /// <summary>
107         /// Creates a FlexContainer handle.
108         /// Calling member functions with an uninitialized handle is not allowed.
109         /// </summary>
110         public FlexContainer() : this(NDalicPINVOKE.FlexContainer_New(), true)
111         {
112             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113
114         }
115
116         internal new static FlexContainer DownCast(BaseHandle handle)
117         {
118             FlexContainer ret = new FlexContainer(NDalicPINVOKE.FlexContainer_DownCast(BaseHandle.getCPtr(handle)), true);
119             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120             return ret;
121         }
122
123         /// <summary>
124         /// Enumeration for the direction of the main axis in the flex container. This determines
125         /// the direction that flex items are laid out in the flex container.
126         /// </summary>
127         public enum FlexDirectionType
128         {
129             Column,
130             ColumnReverse,
131             Row,
132             RowReverse
133         }
134
135         /// <summary>
136         /// Enumeration for the primary direction in which content is ordered in the flex container
137         /// and on which sides the ?�start??and ?�end??are.
138         /// </summary>
139         public enum ContentDirectionType
140         {
141             Inherit,
142             LTR,
143             RTL
144         }
145
146         /// <summary>
147         /// Enumeration for the alignment of the flex items when the items do not use all available
148         /// space on the main-axis.
149         /// </summary>
150         public enum Justification
151         {
152             JustifyFlexStart,
153             JustifyCenter,
154             JustifyFlexEnd,
155             JustifySpaceBetween,
156             JustifySpaceAround
157         }
158
159         /// <summary>
160         /// Enumeration for the alignment of the flex items or lines when the items or lines do not
161         /// use all the available space on the cross-axis.
162         /// </summary>
163         public enum Alignment
164         {
165             AlignAuto,
166             AlignFlexStart,
167             AlignCenter,
168             AlignFlexEnd,
169             AlignStretch
170         }
171
172         /// <summary>
173         /// Enumeration for the wrap type of the flex container when there is no enough room for
174         /// all the items on one flex line.
175         /// </summary>
176         public enum WrapType
177         {
178             NoWrap,
179             Wrap
180         }
181
182         /// <summary>
183         /// The primary direction in which content is ordered
184         /// </summary>
185         public ContentDirectionType ContentDirection
186         {
187             get
188             {
189                 int temp = 0;
190                 GetProperty(FlexContainer.Property.CONTENT_DIRECTION).Get(out temp);
191                 return (ContentDirectionType)temp;
192             }
193             set
194             {
195                 SetProperty(FlexContainer.Property.CONTENT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
196             }
197         }
198
199         /// <summary>
200         /// The direction of the main-axis which determines the direction that flex items are laid out
201         /// </summary>
202         public FlexDirectionType FlexDirection
203         {
204             get
205             {
206                 int temp = 0;
207                 GetProperty(FlexContainer.Property.FLEX_DIRECTION).Get(out temp);
208                 return (FlexDirectionType)temp;
209             }
210             set
211             {
212                 SetProperty(FlexContainer.Property.FLEX_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
213             }
214         }
215
216         /// <summary>
217         /// Whether the flex items should wrap or not if there is no enough room for them on one flex line
218         /// </summary>
219         public WrapType FlexWrap
220         {
221             get
222             {
223                 int temp = 0;
224                 GetProperty(FlexContainer.Property.FLEX_WRAP).Get(out temp);
225                 return (WrapType)temp;
226             }
227             set
228             {
229                 SetProperty(FlexContainer.Property.FLEX_WRAP, new Tizen.NUI.PropertyValue((int)value));
230             }
231         }
232
233         /// <summary>
234         /// The alignment of flex items when the items do not use all available space on the main-axis
235         /// </summary>
236         public Justification JustifyContent
237         {
238             get
239             {
240                 int temp = 0;
241                 GetProperty(FlexContainer.Property.JUSTIFY_CONTENT).Get(out temp);
242                 return (Justification)temp;
243             }
244             set
245             {
246                 SetProperty(FlexContainer.Property.JUSTIFY_CONTENT, new Tizen.NUI.PropertyValue((int)value));
247             }
248         }
249
250         /// <summary>
251         /// The alignment of flex items when the items do not use all available space on the cross-axis
252         /// </summary>
253         public Alignment AlignItems
254         {
255             get
256             {
257                 int temp = 0;
258                 GetProperty(FlexContainer.Property.ALIGN_ITEMS).Get(out temp);
259                 return (Alignment)temp;
260             }
261             set
262             {
263                 SetProperty(FlexContainer.Property.ALIGN_ITEMS, new Tizen.NUI.PropertyValue((int)value));
264             }
265         }
266
267         /// <summary>
268         /// Similar to "alignItems", but it aligns flex lines, so only works when there are multiple lines
269         /// </summary>
270         public Alignment AlignContent
271         {
272             get
273             {
274                 int temp = 0;
275                 GetProperty(FlexContainer.Property.ALIGN_CONTENT).Get(out temp);
276                 return (Alignment)temp;
277             }
278             set
279             {
280                 SetProperty(FlexContainer.Property.ALIGN_CONTENT, new Tizen.NUI.PropertyValue((int)value));
281             }
282         }
283
284     }
285
286 }