1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
30 public class FlexContainer : View
32 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34 internal FlexContainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FlexContainer_SWIGUpcast(cPtr), cMemoryOwn)
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
39 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FlexContainer obj)
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 DisposeQueue.Instance.Add(this);
49 public override void Dispose()
51 if (!Stage.IsInstalled())
53 DisposeQueue.Instance.Add(this);
59 if (swigCPtr.Handle != global::System.IntPtr.Zero)
64 NDalicPINVOKE.delete_FlexContainer(swigCPtr);
66 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
68 global::System.GC.SuppressFinalize(this);
74 internal class Property : global::System.IDisposable
76 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
77 protected bool swigCMemOwn;
79 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
81 swigCMemOwn = cMemoryOwn;
82 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
85 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
87 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
95 public virtual void Dispose()
99 if (swigCPtr.Handle != global::System.IntPtr.Zero)
104 NDalicPINVOKE.delete_FlexContainer_Property(swigCPtr);
106 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
108 global::System.GC.SuppressFinalize(this);
112 internal Property() : this(NDalicPINVOKE.new_FlexContainer_Property(), true)
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 internal static readonly int CONTENT_DIRECTION = NDalicPINVOKE.FlexContainer_Property_CONTENT_DIRECTION_get();
118 internal static readonly int FLEX_DIRECTION = NDalicPINVOKE.FlexContainer_Property_FLEX_DIRECTION_get();
119 internal static readonly int FLEX_WRAP = NDalicPINVOKE.FlexContainer_Property_FLEX_WRAP_get();
120 internal static readonly int JUSTIFY_CONTENT = NDalicPINVOKE.FlexContainer_Property_JUSTIFY_CONTENT_get();
121 internal static readonly int ALIGN_ITEMS = NDalicPINVOKE.FlexContainer_Property_ALIGN_ITEMS_get();
122 internal static readonly int ALIGN_CONTENT = NDalicPINVOKE.FlexContainer_Property_ALIGN_CONTENT_get();
127 /// Enumeration for the instance of child properties belonging to the FlexContainer class.
129 public class ChildProperty : global::System.IDisposable
131 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
132 protected bool swigCMemOwn;
134 internal ChildProperty(global::System.IntPtr cPtr, bool cMemoryOwn)
136 swigCMemOwn = cMemoryOwn;
137 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
140 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ChildProperty obj)
142 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
150 public virtual void Dispose()
154 if (swigCPtr.Handle != global::System.IntPtr.Zero)
159 NDalicPINVOKE.delete_FlexContainer_ChildProperty(swigCPtr);
161 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
163 global::System.GC.SuppressFinalize(this);
167 internal ChildProperty() : this(NDalicPINVOKE.new_FlexContainer_ChildProperty(), true)
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 internal static readonly int FLEX = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_get();
173 internal static readonly int ALIGN_SELF = NDalicPINVOKE.FlexContainer_ChildProperty_ALIGN_SELF_get();
174 internal static readonly int FLEX_MARGIN = NDalicPINVOKE.FlexContainer_ChildProperty_FLEX_MARGIN_get();
179 /// Creates a FlexContainer handle.
180 /// Calling member functions with an uninitialized handle is not allowed.
182 public FlexContainer() : this(NDalicPINVOKE.FlexContainer_New(), true)
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 internal FlexContainer(FlexContainer handle) : this(NDalicPINVOKE.new_FlexContainer__SWIG_1(FlexContainer.getCPtr(handle)), true)
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192 internal FlexContainer Assign(FlexContainer handle)
194 FlexContainer ret = new FlexContainer(NDalicPINVOKE.FlexContainer_Assign(swigCPtr, FlexContainer.getCPtr(handle)), false);
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 internal new static FlexContainer DownCast(BaseHandle handle)
201 FlexContainer ret = new FlexContainer(NDalicPINVOKE.FlexContainer_DownCast(BaseHandle.getCPtr(handle)), true);
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 /// Enumeration for the direction of the main axis in the flex container. This determines
208 /// the direction that flex items are laid out in the flex container.
210 public enum FlexDirectionType
219 /// Enumeration for the primary direction in which content is ordered in the flex container
220 /// and on which sides the ?
\9cstart??and ?
\9cend??are.
222 public enum ContentDirectionType
230 /// Enumeration for the alignment of the flex items when the items do not use all available
231 /// space on the main-axis.
233 public enum Justification
243 /// Enumeration for the alignment of the flex items or lines when the items or lines do not
244 /// use all the available space on the cross-axis.
246 public enum Alignment
256 /// Enumeration for the wrap type of the flex container when there is no enough room for
257 /// all the items on one flex line.
265 internal enum PropertyRange
267 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
268 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000,
269 CHILD_PROPERTY_START_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX,
270 CHILD_PROPERTY_END_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX + 1000
274 /// The primary direction in which content is ordered
276 public ContentDirectionType ContentDirection
281 GetProperty(FlexContainer.Property.CONTENT_DIRECTION).Get(ref temp);
282 return (ContentDirectionType)temp;
286 SetProperty(FlexContainer.Property.CONTENT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
291 /// The direction of the main-axis which determines the direction that flex items are laid out
293 public FlexDirectionType FlexDirection
298 GetProperty(FlexContainer.Property.FLEX_DIRECTION).Get(ref temp);
299 return (FlexDirectionType)temp;
303 SetProperty(FlexContainer.Property.FLEX_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
308 /// Whether the flex items should wrap or not if there is no enough room for them on one flex line
310 public WrapType FlexWrap
315 GetProperty(FlexContainer.Property.FLEX_WRAP).Get(ref temp);
316 return (WrapType)temp;
320 SetProperty(FlexContainer.Property.FLEX_WRAP, new Tizen.NUI.PropertyValue((int)value));
325 /// The alignment of flex items when the items do not use all available space on the main-axis
327 public Justification JustifyContent
332 GetProperty(FlexContainer.Property.JUSTIFY_CONTENT).Get(ref temp);
333 return (Justification)temp;
337 SetProperty(FlexContainer.Property.JUSTIFY_CONTENT, new Tizen.NUI.PropertyValue((int)value));
342 /// The alignment of flex items when the items do not use all available space on the cross-axis
344 public Alignment AlignItems
349 GetProperty(FlexContainer.Property.ALIGN_ITEMS).Get(ref temp);
350 return (Alignment)temp;
354 SetProperty(FlexContainer.Property.ALIGN_ITEMS, new Tizen.NUI.PropertyValue((int)value));
359 /// Similar to "alignItems", but it aligns flex lines, so only works when there are multiple lines
361 public Alignment AlignContent
366 GetProperty(FlexContainer.Property.ALIGN_CONTENT).Get(ref temp);
367 return (Alignment)temp;
371 SetProperty(FlexContainer.Property.ALIGN_CONTENT, new Tizen.NUI.PropertyValue((int)value));