remove DOT_NET_CORE define, clean up debug log
[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         }
45
46         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FlexContainer obj)
47         {
48             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
49         }
50
51         protected override void Dispose(DisposeTypes type)
52         {
53             if(disposed)
54             {
55                 return;
56             }
57
58             if(type == DisposeTypes.Explicit)
59             {
60                 //Called by User
61                 //Release your own managed resources here.
62                 //You should release all of your own disposable objects here.
63             }
64
65             //Release your own unmanaged resources here.
66             //You should not access any managed member here except static instance.
67             //because the execution order of Finalizes is non-deterministic.
68
69             if (swigCPtr.Handle != global::System.IntPtr.Zero)
70             {
71                 if (swigCMemOwn)
72                 {
73                     swigCMemOwn = false;
74                     NDalicPINVOKE.delete_FlexContainer(swigCPtr);
75                 }
76                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
77             }
78
79             base.Dispose(type);
80         }
81
82
83         internal class Property
84         {
85             internal static readonly int CONTENT_DIRECTION = NDalicPINVOKE.FlexContainer_Property_CONTENT_DIRECTION_get();
86             internal static readonly int FLEX_DIRECTION = NDalicPINVOKE.FlexContainer_Property_FLEX_DIRECTION_get();
87             internal static readonly int FLEX_WRAP = NDalicPINVOKE.FlexContainer_Property_FLEX_WRAP_get();
88             internal static readonly int JUSTIFY_CONTENT = NDalicPINVOKE.FlexContainer_Property_JUSTIFY_CONTENT_get();
89             internal static readonly int ALIGN_ITEMS = NDalicPINVOKE.FlexContainer_Property_ALIGN_ITEMS_get();
90             internal static readonly int ALIGN_CONTENT = NDalicPINVOKE.FlexContainer_Property_ALIGN_CONTENT_get();
91
92         }
93
94         /// <summary>
95         /// Enumeration for the instance of child properties belonging to the FlexContainer class.
96         /// </summary>
97         public class ChildProperty
98         {
99             internal static readonly int FLEX = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_get();
100             internal static readonly int ALIGN_SELF = NDalicPINVOKE.FlexContainer_ChildProperty_ALIGN_SELF_get();
101             internal static readonly int FLEX_MARGIN = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_MARGIN_get();
102         }
103
104         /// <summary>
105         /// Creates a FlexContainer handle.
106         /// Calling member functions with an uninitialized handle is not allowed.
107         /// </summary>
108         public FlexContainer() : this(NDalicPINVOKE.FlexContainer_New(), true)
109         {
110             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111
112         }
113
114         /// <summary>
115         /// Enumeration for the direction of the main axis in the flex container. This determines
116         /// the direction that flex items are laid out in the flex container.
117         /// </summary>
118         public enum FlexDirectionType
119         {
120             Column,
121             ColumnReverse,
122             Row,
123             RowReverse
124         }
125
126         /// <summary>
127         /// Enumeration for the primary direction in which content is ordered in the flex container
128         /// and on which sides the ?�start??and ?�end??are.
129         /// </summary>
130         public enum ContentDirectionType
131         {
132             Inherit,
133             LTR,
134             RTL
135         }
136
137         /// <summary>
138         /// Enumeration for the alignment of the flex items when the items do not use all available
139         /// space on the main-axis.
140         /// </summary>
141         public enum Justification
142         {
143             JustifyFlexStart,
144             JustifyCenter,
145             JustifyFlexEnd,
146             JustifySpaceBetween,
147             JustifySpaceAround
148         }
149
150         /// <summary>
151         /// Enumeration for the alignment of the flex items or lines when the items or lines do not
152         /// use all the available space on the cross-axis.
153         /// </summary>
154         public enum Alignment
155         {
156             AlignAuto,
157             AlignFlexStart,
158             AlignCenter,
159             AlignFlexEnd,
160             AlignStretch
161         }
162
163         /// <summary>
164         /// Enumeration for the wrap type of the flex container when there is no enough room for
165         /// all the items on one flex line.
166         /// </summary>
167         public enum WrapType
168         {
169             NoWrap,
170             Wrap
171         }
172
173         /// <summary>
174         /// The primary direction in which content is ordered
175         /// </summary>
176         public ContentDirectionType ContentDirection
177         {
178             get
179             {
180                 int temp = 0;
181                 GetProperty(FlexContainer.Property.CONTENT_DIRECTION).Get(out temp);
182                 return (ContentDirectionType)temp;
183             }
184             set
185             {
186                 SetProperty(FlexContainer.Property.CONTENT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
187             }
188         }
189
190         /// <summary>
191         /// The direction of the main-axis which determines the direction that flex items are laid out
192         /// </summary>
193         public FlexDirectionType FlexDirection
194         {
195             get
196             {
197                 int temp = 0;
198                 GetProperty(FlexContainer.Property.FLEX_DIRECTION).Get(out temp);
199                 return (FlexDirectionType)temp;
200             }
201             set
202             {
203                 SetProperty(FlexContainer.Property.FLEX_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
204             }
205         }
206
207         /// <summary>
208         /// Whether the flex items should wrap or not if there is no enough room for them on one flex line
209         /// </summary>
210         public WrapType FlexWrap
211         {
212             get
213             {
214                 int temp = 0;
215                 GetProperty(FlexContainer.Property.FLEX_WRAP).Get(out temp);
216                 return (WrapType)temp;
217             }
218             set
219             {
220                 SetProperty(FlexContainer.Property.FLEX_WRAP, new Tizen.NUI.PropertyValue((int)value));
221             }
222         }
223
224         /// <summary>
225         /// The alignment of flex items when the items do not use all available space on the main-axis
226         /// </summary>
227         public Justification JustifyContent
228         {
229             get
230             {
231                 int temp = 0;
232                 GetProperty(FlexContainer.Property.JUSTIFY_CONTENT).Get(out temp);
233                 return (Justification)temp;
234             }
235             set
236             {
237                 SetProperty(FlexContainer.Property.JUSTIFY_CONTENT, new Tizen.NUI.PropertyValue((int)value));
238             }
239         }
240
241         /// <summary>
242         /// The alignment of flex items when the items do not use all available space on the cross-axis
243         /// </summary>
244         public Alignment AlignItems
245         {
246             get
247             {
248                 int temp = 0;
249                 GetProperty(FlexContainer.Property.ALIGN_ITEMS).Get(out temp);
250                 return (Alignment)temp;
251             }
252             set
253             {
254                 SetProperty(FlexContainer.Property.ALIGN_ITEMS, new Tizen.NUI.PropertyValue((int)value));
255             }
256         }
257
258         /// <summary>
259         /// Similar to "alignItems", but it aligns flex lines, so only works when there are multiple lines
260         /// </summary>
261         public Alignment AlignContent
262         {
263             get
264             {
265                 int temp = 0;
266                 GetProperty(FlexContainer.Property.ALIGN_CONTENT).Get(out temp);
267                 return (Alignment)temp;
268             }
269             set
270             {
271                 SetProperty(FlexContainer.Property.ALIGN_CONTENT, new Tizen.NUI.PropertyValue((int)value));
272             }
273         }
274
275     }
276
277 }