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