1 /** Copyright (c) 2018 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 using System.ComponentModel;
21 /// [Draft] This class implements a linear box layout, automatically handling right to left or left to right direction change.
23 internal class LinearLayout : LayoutGroupWrapper
25 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27 internal LinearLayout(global::System.IntPtr cPtr, bool cMemoryOwn) : base(LayoutPINVOKE.LinearLayout_SWIGUpcast(cPtr), cMemoryOwn)
29 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
32 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LinearLayout obj)
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
37 protected override void Dispose(DisposeTypes type)
44 if (type == DisposeTypes.Explicit)
47 //Release your own managed resources here.
48 //You should release all of your own disposable objects here.
52 //Release your own unmanaged resources here.
53 //You should not access any managed member here except static instance.
54 //because the execution order of Finalizes is non-deterministic.
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 LayoutPINVOKE.delete_LinearLayout(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
67 public LinearLayout() : this(LayoutPINVOKE.LinearLayout_New(), true)
69 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72 public new static LinearLayout DownCast(BaseHandle handle)
74 LinearLayout ret = new LinearLayout(LayoutPINVOKE.LinearLayout_DownCast(BaseHandle.getCPtr(handle)), true);
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79 internal LinearLayout(LinearLayout other) : this(LayoutPINVOKE.new_LinearLayout__SWIG_1(LinearLayout.getCPtr(other)), true)
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 internal LinearLayout Assign(LinearLayout other)
86 LinearLayout ret = new LinearLayout(LayoutPINVOKE.LinearLayout_Assign(swigCPtr, LinearLayout.getCPtr(other)), false);
87 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 internal void SetCellPadding(LayoutSize size)
93 LayoutPINVOKE.LinearLayout_SetCellPadding(swigCPtr, LayoutSize.getCPtr(size));
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 internal LayoutSize GetCellPadding()
99 LayoutSize ret = new LayoutSize(LayoutPINVOKE.LinearLayout_GetCellPadding(swigCPtr), true);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 internal void SetOrientation(LinearLayout.Orientation orientation)
107 LayoutPINVOKE.LinearLayout_SetOrientation(swigCPtr, (int)orientation);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 internal LinearLayout.Orientation GetOrientation()
113 LinearLayout.Orientation ret = (LinearLayout.Orientation)LayoutPINVOKE.LinearLayout_GetOrientation(swigCPtr);
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118 internal enum PropertyRange
120 CHILD_PROPERTY_START_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX,
121 CHILD_PROPERTY_END_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX + 1000
125 /// [Draft] Get/Set the orientation in the layout
127 public LinearLayout.Orientation LinearOrientation
131 return GetOrientation();
135 SetOrientation(value);
140 /// [Draft] Get/Set the padding between cells in the layout
142 public LayoutSize CellPadding
146 return GetCellPadding();
150 SetCellPadding(value);
155 /// [Draft] Enumeration for the direction in which the content is laid out */
157 public enum Orientation
164 /// Vertical (column)