Merge "[NUI-252] change string type of property to enum type of property" into tizen
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / VisualBase.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Tizen.NUI
12 {
13
14     /// <summary>
15     /// Sets whether the actor should be focusable by keyboard navigation.<br>
16     /// Visuals reuse geometry, shader etc. across controls. They ensure that the renderer and texture sets exist only when control is on-stage.<br>
17     /// Each visual also responds to actor size and color change, and provides clipping at the renderer level.<br>
18     /// </summary>
19     public class VisualBase : BaseHandle
20     {
21         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22
23         internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualBase_SWIGUpcast(cPtr), cMemoryOwn)
24         {
25             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26         }
27
28         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualBase obj)
29         {
30             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31         }
32
33         ~VisualBase()
34         {
35             DisposeQueue.Instance.Add(this);
36         }
37
38         public override void Dispose()
39         {
40             if (!Stage.IsInstalled())
41             {
42                 DisposeQueue.Instance.Add(this);
43                 return;
44             }
45             lock (this)
46             {
47                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
48                 {
49                     if (swigCMemOwn)
50                     {
51                         swigCMemOwn = false;
52                         NDalicPINVOKE.delete_VisualBase(swigCPtr);
53                     }
54                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55                 }
56                 global::System.GC.SuppressFinalize(this);
57                 base.Dispose();
58             }
59         }
60
61         /// <summary>
62         /// Create an empty Visual Handle
63         /// </summary>
64         public VisualBase() : this(NDalicPINVOKE.new_VisualBase__SWIG_0(), true)
65         {
66             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67         }
68
69         internal VisualBase(VisualBase handle) : this(NDalicPINVOKE.new_VisualBase__SWIG_1(VisualBase.getCPtr(handle)), true)
70         {
71             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72         }
73
74         internal VisualBase Assign(VisualBase handle)
75         {
76             VisualBase ret = new VisualBase(NDalicPINVOKE.VisualBase_Assign(swigCPtr, VisualBase.getCPtr(handle)), false);
77             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78             return ret;
79         }
80
81         /// <summary>
82         /// name of the visual
83         /// </summary>
84         public string Name
85         {
86             set
87             {
88                 SetName(value);
89             }
90             get
91             {
92                 return GetName();
93             }
94         }
95
96         internal void SetName(string name)
97         {
98             NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100         }
101
102         internal string GetName()
103         {
104             string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
105             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106             return ret;
107         }
108
109         /// <summary>
110         /// Sets the transform and the control size
111         /// </summary>
112         /// <param name="transform">A property map describing the transform</param>
113         /// <param name="controlSize">The size of the parent control for visuals that need to scale internally.</param>
114         public void SetTransformAndSize(PropertyMap transform, Vector2 controlSize)
115         {
116             NDalicPINVOKE.VisualBase_SetTransformAndSize(swigCPtr, PropertyMap.getCPtr(transform), Vector2.getCPtr(controlSize));
117             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118         }
119
120         /// <summary>
121         /// Returns the height for a given width.
122         /// </summary>
123         /// <param name="width">Width to use.</param>
124         /// <returns>The height based on the width.</returns>
125         public float GetHeightForWidth(float width)
126         {
127             float ret = NDalicPINVOKE.VisualBase_GetHeightForWidth(swigCPtr, width);
128             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129             return ret;
130         }
131
132         /// <summary>
133         /// Returns the width for a given height.
134         /// </summary>
135         /// <param name="height">Height to use.</param>
136         /// <returns>The width based on the height.</returns>
137         public float GetWidthForHeight(float height)
138         {
139             float ret = NDalicPINVOKE.VisualBase_GetWidthForHeight(swigCPtr, height);
140             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141             return ret;
142         }
143
144         /// <summary>
145         /// Return the natural size of the visual.<br>
146         /// Deriving classes stipulate the natural size and by default a visual has a ZERO natural size.<br>
147         /// A visual may not actually have a natural size until it has been placed on stage and acquired all it's resources.<br>
148         /// </summary>
149         /// <param name="naturalSize">The visual's natural size</param>
150         public void GetNaturalSize(Size2D naturalSize)
151         {
152             NDalicPINVOKE.VisualBase_GetNaturalSize(swigCPtr, Size2D.getCPtr(naturalSize));
153             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154         }
155
156         /// <summary>
157         /// the depth index of this visual.
158         /// </summary>
159         public float DepthIndex
160         {
161             set
162             {
163                 SetDepthIndex(value);
164             }
165             get
166             {
167                 return GetDepthIndex();
168             }
169         }
170         internal void SetDepthIndex(float index)
171         {
172             NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);
173             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174         }
175
176         internal float GetDepthIndex()
177         {
178             float ret = NDalicPINVOKE.VisualBase_GetDepthIndex(swigCPtr);
179             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180             return ret;
181         }
182
183         /// <summary>
184         /// Create the property map representing this visual.
185         /// </summary>
186         public PropertyMap Creation
187         {
188             set
189             {
190                 CreatePropertyMap(value);
191             }
192         }
193         internal void CreatePropertyMap(PropertyMap map)
194         {
195             NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
196             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197         }
198
199         internal VisualBase(SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base impl) : this(NDalicPINVOKE.new_VisualBase__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.getCPtr(impl)), true)
200         {
201             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202         }
203
204     }
205
206 }