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.Upcast(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.DeleteAlignment(swigCPtr);
40 public new class Padding : Disposable
43 internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
47 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj)
49 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
52 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
54 Interop.Alignment.DeleteAlignmentPadding(swigCPtr);
57 public Padding() : this(Interop.Alignment.NewAlignmentPadding(), true)
59 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62 public Padding(float l, float r, float t, float b) : this(Interop.Alignment.NewAlignmentPadding(l, r, t, b), true)
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 Interop.Alignment.PaddingLeftSet(SwigCPtr, value);
72 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76 float ret = Interop.Alignment.PaddingLeftGet(SwigCPtr);
77 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 Interop.Alignment.PaddingRightSet(SwigCPtr, value);
87 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 float ret = Interop.Alignment.PaddingRightGet(SwigCPtr);
92 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 Interop.Alignment.PaddingTopSet(SwigCPtr, value);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 float ret = Interop.Alignment.PaddingTopGet(SwigCPtr);
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116 Interop.Alignment.PaddingBottomSet(SwigCPtr, value);
117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 float ret = Interop.Alignment.PaddingBottomGet(SwigCPtr);
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 public Alignment(Alignment.Type horizontal, Alignment.Type vertical) : this(Interop.Alignment.New((int)horizontal, (int)vertical), true)
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 public Alignment(Alignment.Type horizontal) : this(Interop.Alignment.New((int)horizontal), true)
135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 public Alignment() : this(Interop.Alignment.New(), true)
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 public Alignment(Alignment alignment) : this(Interop.Alignment.NewAlignment(Alignment.getCPtr(alignment)), true)
145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148 public static Alignment DownCast(BaseHandle handle)
150 Alignment ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Alignment;
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public void SetAlignmentType(Alignment.Type type)
157 Interop.Alignment.SetAlignmentType(SwigCPtr, (int)type);
158 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public Alignment.Type GetAlignmentType()
163 Alignment.Type ret = (Alignment.Type)Interop.Alignment.GetAlignmentType(SwigCPtr);
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168 public void SetScaling(Alignment.Scaling scaling)
170 Interop.Alignment.SetScaling(SwigCPtr, (int)scaling);
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 public Alignment.Scaling GetScaling()
176 Alignment.Scaling ret = (Alignment.Scaling)Interop.Alignment.GetScaling(SwigCPtr);
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 public void SetPadding(Alignment.Padding padding)
183 Interop.Alignment.SetPadding(SwigCPtr, Alignment.Padding.getCPtr(padding));
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public Alignment.Padding GetPadding()
189 Alignment.Padding ret = new Alignment.Padding(Interop.Alignment.GetPadding(SwigCPtr), false);
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public Alignment Assign(Alignment alignment)
196 Alignment ret = new Alignment(Interop.Alignment.Assign(SwigCPtr, Alignment.getCPtr(alignment)), false);
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 HorizontalCenter = 2,
215 ScaleToFitKeepAspect,
216 ScaleToFillKeepAspect,
218 ShrinkToFitKeepAspect