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 //------------------------------------------------------------------------------
27 using Tizen.NUI.BaseComponents;
31 internal class Alignment : View {
32 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34 internal Alignment(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Alignment_SWIGUpcast(cPtr), cMemoryOwn) {
35 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Alignment obj) {
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 public override void Dispose() {
43 if (!Window.IsInstalled()) {
44 DisposeQueue.Instance.Add(this);
49 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52 NDalicPINVOKE.delete_Alignment(swigCPtr);
54 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56 global::System.GC.SuppressFinalize(this);
62 public class Padding : global::System.IDisposable {
63 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
64 protected bool swigCMemOwn;
66 internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn) {
67 swigCMemOwn = cMemoryOwn;
68 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
71 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj) {
72 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
76 DisposeQueue.Instance.Add(this);
79 public virtual void Dispose() {
80 if (!Window.IsInstalled()) {
81 DisposeQueue.Instance.Add(this);
86 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
89 NDalicPINVOKE.delete_Alignment_Padding(swigCPtr);
91 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
93 global::System.GC.SuppressFinalize(this);
97 public Padding() : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_0(), true) {
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 public Padding(float l, float r, float t, float b) : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_1(l, r, t, b), true) {
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 NDalicPINVOKE.Alignment_Padding_left_set(swigCPtr, value);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 float ret = NDalicPINVOKE.Alignment_Padding_left_get(swigCPtr);
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 NDalicPINVOKE.Alignment_Padding_right_set(swigCPtr, value);
120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 float ret = NDalicPINVOKE.Alignment_Padding_right_get(swigCPtr);
124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 NDalicPINVOKE.Alignment_Padding_top_set(swigCPtr, value);
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 float ret = NDalicPINVOKE.Alignment_Padding_top_get(swigCPtr);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141 public float bottom {
143 NDalicPINVOKE.Alignment_Padding_bottom_set(swigCPtr, value);
144 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 float ret = NDalicPINVOKE.Alignment_Padding_bottom_get(swigCPtr);
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public Alignment (Alignment.Type horizontal, Alignment.Type vertical) : this (NDalicPINVOKE.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true) {
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 public Alignment (Alignment.Type horizontal) : this (NDalicPINVOKE.Alignment_New__SWIG_1((int)horizontal), true) {
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 public Alignment () : this (NDalicPINVOKE.Alignment_New__SWIG_2(), true) {
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 public Alignment(Alignment alignment) : this(NDalicPINVOKE.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true) {
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 public new static Alignment DownCast(BaseHandle handle) {
172 Alignment ret = new Alignment(NDalicPINVOKE.Alignment_DownCast(BaseHandle.getCPtr(handle)), true);
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 public void SetAlignmentType(Alignment.Type type) {
178 NDalicPINVOKE.Alignment_SetAlignmentType(swigCPtr, (int)type);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 public Alignment.Type GetAlignmentType() {
183 Alignment.Type ret = (Alignment.Type)NDalicPINVOKE.Alignment_GetAlignmentType(swigCPtr);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 public void SetScaling(Alignment.Scaling scaling) {
189 NDalicPINVOKE.Alignment_SetScaling(swigCPtr, (int)scaling);
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 public Alignment.Scaling GetScaling() {
194 Alignment.Scaling ret = (Alignment.Scaling)NDalicPINVOKE.Alignment_GetScaling(swigCPtr);
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 public void SetPadding(Alignment.Padding padding) {
200 NDalicPINVOKE.Alignment_SetPadding(swigCPtr, Alignment.Padding.getCPtr(padding));
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 public Alignment.Padding GetPadding() {
205 Alignment.Padding ret = new Alignment.Padding(NDalicPINVOKE.Alignment_GetPadding(swigCPtr), false);
206 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210 public Alignment Assign(Alignment alignment) {
211 Alignment ret = new Alignment(NDalicPINVOKE.Alignment_Assign(swigCPtr, Alignment.getCPtr(alignment)), false);
212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 HorizontalCenter = 2,
225 public enum Scaling {
228 ScaleToFitKeepAspect,
229 ScaleToFillKeepAspect,
231 ShrinkToFitKeepAspect