Syncing dali_sharp with NUI
[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-window.<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         protected override void Dispose(DisposeTypes type)
34         {
35             if(disposed)
36             {
37                 return;
38             }
39
40             if(type == DisposeTypes.Explicit)
41             {
42                 //Called by User
43                 //Release your own managed resources here.
44                 //You should release all of your own disposable objects here.
45             }
46
47             //Release your own unmanaged resources here.
48             //You should not access any managed member here except static instance.
49             //because the execution order of Finalizes is non-deterministic.
50
51             if (swigCPtr.Handle != global::System.IntPtr.Zero)
52             {
53                 if (swigCMemOwn)
54                 {
55                     swigCMemOwn = false;
56                     NDalicPINVOKE.delete_VisualBase(swigCPtr);
57                 }
58                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
59             }
60
61             base.Dispose(type);
62         }
63
64         /// <summary>
65         /// Create an empty Visual Handle
66         /// </summary>
67         public VisualBase() : this(NDalicPINVOKE.new_VisualBase__SWIG_0(), true)
68         {
69             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70         }
71
72         internal VisualBase(VisualBase handle) : this(NDalicPINVOKE.new_VisualBase__SWIG_1(VisualBase.getCPtr(handle)), true)
73         {
74             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75         }
76
77         /// <summary>
78         /// name of the visual
79         /// </summary>
80         public string Name
81         {
82             set
83             {
84                 SetName(value);
85             }
86             get
87             {
88                 return GetName();
89             }
90         }
91
92         internal void SetName(string name)
93         {
94             NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
95             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96         }
97
98         internal string GetName()
99         {
100             string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
101             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102             return ret;
103         }
104
105         /// <summary>
106         /// Sets the transform and the control size
107         /// </summary>
108         /// <param name="transform">A property map describing the transform</param>
109         /// <param name="controlSize">The size of the parent control for visuals that need to scale internally.</param>
110         public void SetTransformAndSize(PropertyMap transform, Vector2 controlSize)
111         {
112             NDalicPINVOKE.VisualBase_SetTransformAndSize(swigCPtr, PropertyMap.getCPtr(transform), Vector2.getCPtr(controlSize));
113             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114         }
115
116         /// <summary>
117         /// Returns the height for a given width.
118         /// </summary>
119         /// <param name="width">Width to use.</param>
120         /// <returns>The height based on the width.</returns>
121         public float GetHeightForWidth(float width)
122         {
123             float ret = NDalicPINVOKE.VisualBase_GetHeightForWidth(swigCPtr, width);
124             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125             return ret;
126         }
127
128         /// <summary>
129         /// Returns the width for a given height.
130         /// </summary>
131         /// <param name="height">Height to use.</param>
132         /// <returns>The width based on the height.</returns>
133         public float GetWidthForHeight(float height)
134         {
135             float ret = NDalicPINVOKE.VisualBase_GetWidthForHeight(swigCPtr, height);
136             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137             return ret;
138         }
139
140         /// <summary>
141         /// Return the natural size of the visual.<br>
142         /// Deriving classes stipulate the natural size and by default a visual has a ZERO natural size.<br>
143         /// A visual may not actually have a natural size until it has been placed on window and acquired all it's resources.<br>
144         /// </summary>
145         /// <param name="naturalSize">The visual's natural size</param>
146         public void GetNaturalSize(Size2D naturalSize)
147         {
148             NDalicPINVOKE.VisualBase_GetNaturalSize(swigCPtr, Size2D.getCPtr(naturalSize));
149             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150         }
151
152         /// <summary>
153         /// the depth index of this visual.
154         /// </summary>
155         public float DepthIndex
156         {
157             set
158             {
159                 SetDepthIndex(value);
160             }
161             get
162             {
163                 return GetDepthIndex();
164             }
165         }
166         internal void SetDepthIndex(float index)
167         {
168             NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);
169             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170         }
171
172         internal float GetDepthIndex()
173         {
174             float ret = NDalicPINVOKE.VisualBase_GetDepthIndex(swigCPtr);
175             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176             return ret;
177         }
178
179         /// <summary>
180         /// Create the property map representing this visual.
181         /// </summary>
182         public PropertyMap Creation
183         {
184             set
185             {
186                 CreatePropertyMap(value);
187             }
188         }
189         internal void CreatePropertyMap(PropertyMap map)
190         {
191             NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
192             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193         }
194
195         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)
196         {
197             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198         }
199
200     }
201
202 }