nui 0.2.32 manual merge, mapping to dali 1.2.32
[platform/core/csapi/tizenfx.git] / NUISamples / 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.
16     /// Visuals reuse geometry, shader etc. across controls. They ensure that the renderer and texture sets exist only when control is on-stage.
17     /// Each visual also responds to actor size and color change, and provides clipping at the renderer level.
18     /// Note: The visual responds to the the Actor::COLOR by blending it with the 'Multiply' operator.
19     /// </summary>
20     public class VisualBase : BaseHandle
21     {
22         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
23
24         internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualBase_SWIGUpcast(cPtr), cMemoryOwn)
25         {
26             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27         }
28
29         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualBase obj)
30         {
31             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
32         }
33
34         ~VisualBase()
35         {
36             Dispose();
37         }
38
39         public override void Dispose()
40         {
41             lock (this)
42             {
43                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
44                 {
45                     if (swigCMemOwn)
46                     {
47                         swigCMemOwn = false;
48                         NDalicPINVOKE.delete_VisualBase(swigCPtr);
49                     }
50                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
51                 }
52                 global::System.GC.SuppressFinalize(this);
53                 base.Dispose();
54             }
55         }
56
57         /// <summary>
58         /// Create an empty Visual Handle
59         /// </summary>
60         public VisualBase() : this(NDalicPINVOKE.new_VisualBase__SWIG_0(), true)
61         {
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63         }
64
65         internal VisualBase(VisualBase handle) : this(NDalicPINVOKE.new_VisualBase__SWIG_1(VisualBase.getCPtr(handle)), true)
66         {
67             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68         }
69
70         internal VisualBase Assign(VisualBase handle)
71         {
72             VisualBase ret = new VisualBase(NDalicPINVOKE.VisualBase_Assign(swigCPtr, VisualBase.getCPtr(handle)), false);
73             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74             return ret;
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.
142         /// Deriving classes stipulate the natural size and by default a visual has a ZERO natural size.
143         /// A visual may not actually have a natural size until it has been placed on stage and acquired all it's resources.
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 }