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-stage.<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;
35 DisposeQueue.Instance.Add(this);
38 public override void Dispose()
40 if (!Stage.IsInstalled())
42 DisposeQueue.Instance.Add(this);
47 if (swigCPtr.Handle != global::System.IntPtr.Zero)
52 NDalicPINVOKE.delete_VisualBase(swigCPtr);
54 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56 global::System.GC.SuppressFinalize(this);
62 /// Create an empty Visual Handle
64 public VisualBase() : this(NDalicPINVOKE.new_VisualBase__SWIG_0(), true)
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 internal VisualBase(VisualBase handle) : this(NDalicPINVOKE.new_VisualBase__SWIG_1(VisualBase.getCPtr(handle)), true)
71 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74 internal VisualBase Assign(VisualBase handle)
76 VisualBase ret = new VisualBase(NDalicPINVOKE.VisualBase_Assign(swigCPtr, VisualBase.getCPtr(handle)), false);
77 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82 /// name of the visual
96 internal void SetName(string name)
98 NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
99 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102 internal string GetName()
104 string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 /// Sets the transform and the control size
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)
116 NDalicPINVOKE.VisualBase_SetTransformAndSize(swigCPtr, PropertyMap.getCPtr(transform), Vector2.getCPtr(controlSize));
117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 /// Returns the height for a given width.
123 /// <param name="width">Width to use.</param>
124 /// <returns>The height based on the width.</returns>
125 public float GetHeightForWidth(float width)
127 float ret = NDalicPINVOKE.VisualBase_GetHeightForWidth(swigCPtr, width);
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 /// Returns the width for a given height.
135 /// <param name="height">Height to use.</param>
136 /// <returns>The width based on the height.</returns>
137 public float GetWidthForHeight(float height)
139 float ret = NDalicPINVOKE.VisualBase_GetWidthForHeight(swigCPtr, height);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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>
149 /// <param name="naturalSize">The visual's natural size</param>
150 public void GetNaturalSize(Size2D naturalSize)
152 NDalicPINVOKE.VisualBase_GetNaturalSize(swigCPtr, Size2D.getCPtr(naturalSize));
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 /// the depth index of this visual.
159 public float DepthIndex
163 SetDepthIndex(value);
167 return GetDepthIndex();
170 internal void SetDepthIndex(float index)
172 NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 internal float GetDepthIndex()
178 float ret = NDalicPINVOKE.VisualBase_GetDepthIndex(swigCPtr);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184 /// Create the property map representing this visual.
186 public PropertyMap Creation
190 CreatePropertyMap(value);
193 internal void CreatePropertyMap(PropertyMap map)
195 NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();