2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using Tizen.NUI.BaseComponents;
23 internal class Alignment : View
26 internal Alignment(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Alignment.Alignment_SWIGUpcast(cPtr), cMemoryOwn)
30 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Alignment obj)
32 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
37 Interop.Alignment.delete_Alignment(swigCPtr);
40 /// <since_tizen> 3 </since_tizen>
41 public new class Padding : Disposable
44 internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
48 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj)
50 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
53 /// <since_tizen> 3 </since_tizen>
54 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
56 Interop.Alignment.delete_Alignment_Padding(swigCPtr);
59 /// <since_tizen> 3 </since_tizen>
60 public Padding() : this(Interop.Alignment.new_Alignment_Padding__SWIG_0(), true)
62 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 /// <since_tizen> 3 </since_tizen>
66 public Padding(float l, float r, float t, float b) : this(Interop.Alignment.new_Alignment_Padding__SWIG_1(l, r, t, b), true)
68 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 /// <since_tizen> 3 </since_tizen>
76 Interop.Alignment.Alignment_Padding_left_set(swigCPtr, value);
77 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81 float ret = Interop.Alignment.Alignment_Padding_left_get(swigCPtr);
82 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87 /// <since_tizen> 3 </since_tizen>
92 Interop.Alignment.Alignment_Padding_right_set(swigCPtr, value);
93 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 float ret = Interop.Alignment.Alignment_Padding_right_get(swigCPtr);
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103 /// <since_tizen> 3 </since_tizen>
108 Interop.Alignment.Alignment_Padding_top_set(swigCPtr, value);
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 float ret = Interop.Alignment.Alignment_Padding_top_get(swigCPtr);
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 /// <since_tizen> 3 </since_tizen>
124 Interop.Alignment.Alignment_Padding_bottom_set(swigCPtr, value);
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 float ret = Interop.Alignment.Alignment_Padding_bottom_get(swigCPtr);
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 public Alignment(Alignment.Type horizontal, Alignment.Type vertical) : this(Interop.Alignment.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true)
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141 public Alignment(Alignment.Type horizontal) : this(Interop.Alignment.Alignment_New__SWIG_1((int)horizontal), true)
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 public Alignment() : this(Interop.Alignment.Alignment_New__SWIG_2(), true)
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151 public Alignment(Alignment alignment) : this(Interop.Alignment.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true)
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 public static Alignment DownCast(BaseHandle handle)
158 Alignment ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Alignment;
159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 public void SetAlignmentType(Alignment.Type type)
165 Interop.Alignment.Alignment_SetAlignmentType(swigCPtr, (int)type);
166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 public Alignment.Type GetAlignmentType()
171 Alignment.Type ret = (Alignment.Type)Interop.Alignment.Alignment_GetAlignmentType(swigCPtr);
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 public void SetScaling(Alignment.Scaling scaling)
178 Interop.Alignment.Alignment_SetScaling(swigCPtr, (int)scaling);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 public Alignment.Scaling GetScaling()
184 Alignment.Scaling ret = (Alignment.Scaling)Interop.Alignment.Alignment_GetScaling(swigCPtr);
185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189 public void SetPadding(Alignment.Padding padding)
191 Interop.Alignment.Alignment_SetPadding(swigCPtr, Alignment.Padding.getCPtr(padding));
192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195 public Alignment.Padding GetPadding()
197 Alignment.Padding ret = new Alignment.Padding(Interop.Alignment.Alignment_GetPadding(swigCPtr), false);
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202 public Alignment Assign(Alignment alignment)
204 Alignment ret = new Alignment(Interop.Alignment.Alignment_Assign(swigCPtr, Alignment.getCPtr(alignment)), false);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209 /// <since_tizen> 3 </since_tizen>
213 HorizontalCenter = 2,
220 /// <since_tizen> 3 </since_tizen>
225 ScaleToFitKeepAspect,
226 ScaleToFillKeepAspect,
228 ShrinkToFitKeepAspect