1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
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>
19 public class VisualBase : BaseHandle
21 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
23 internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualBase_SWIGUpcast(cPtr), cMemoryOwn)
25 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
28 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualBase obj)
30 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
33 protected override void Dispose(DisposeTypes type)
40 if(type == DisposeTypes.Explicit)
43 //Release your own managed resources here.
44 //You should release all of your own disposable objects here.
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.
51 if (swigCPtr.Handle != global::System.IntPtr.Zero)
56 NDalicPINVOKE.delete_VisualBase(swigCPtr);
58 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
65 /// Create an empty Visual Handle
67 public VisualBase() : this(NDalicPINVOKE.new_VisualBase__SWIG_0(), true)
69 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72 internal VisualBase(VisualBase handle) : this(NDalicPINVOKE.new_VisualBase__SWIG_1(VisualBase.getCPtr(handle)), true)
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 /// name of the visual
92 internal void SetName(string name)
94 NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 internal string GetName()
100 string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 /// Sets the transform and the control size
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)
112 NDalicPINVOKE.VisualBase_SetTransformAndSize(swigCPtr, PropertyMap.getCPtr(transform), Vector2.getCPtr(controlSize));
113 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 /// Returns the height for a given width.
119 /// <param name="width">Width to use.</param>
120 /// <returns>The height based on the width.</returns>
121 public float GetHeightForWidth(float width)
123 float ret = NDalicPINVOKE.VisualBase_GetHeightForWidth(swigCPtr, width);
124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 /// Returns the width for a given height.
131 /// <param name="height">Height to use.</param>
132 /// <returns>The width based on the height.</returns>
133 public float GetWidthForHeight(float height)
135 float ret = NDalicPINVOKE.VisualBase_GetWidthForHeight(swigCPtr, height);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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>
145 /// <param name="naturalSize">The visual's natural size</param>
146 public void GetNaturalSize(Size2D naturalSize)
148 NDalicPINVOKE.VisualBase_GetNaturalSize(swigCPtr, Size2D.getCPtr(naturalSize));
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153 /// the depth index of this visual.
155 public float DepthIndex
159 SetDepthIndex(value);
163 return GetDepthIndex();
166 internal void SetDepthIndex(float index)
168 NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 internal float GetDepthIndex()
174 float ret = NDalicPINVOKE.VisualBase_GetDepthIndex(swigCPtr);
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 /// Create the property map representing this visual.
182 public PropertyMap Creation
186 CreatePropertyMap(value);
189 internal void CreatePropertyMap(PropertyMap map)
191 NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();