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 public override void Dispose()
35 if (!Window.IsInstalled())
37 DisposeQueue.Instance.Add(this);
42 if (swigCPtr.Handle != global::System.IntPtr.Zero)
47 NDalicPINVOKE.delete_VisualBase(swigCPtr);
49 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
51 global::System.GC.SuppressFinalize(this);
57 /// Create an empty Visual Handle
59 public VisualBase() : this(NDalicPINVOKE.new_VisualBase__SWIG_0(), true)
61 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64 internal VisualBase(VisualBase handle) : this(NDalicPINVOKE.new_VisualBase__SWIG_1(VisualBase.getCPtr(handle)), true)
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 internal VisualBase Assign(VisualBase handle)
71 VisualBase ret = new VisualBase(NDalicPINVOKE.VisualBase_Assign(swigCPtr, VisualBase.getCPtr(handle)), false);
72 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 /// name of the visual
91 internal void SetName(string name)
93 NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 internal string GetName()
99 string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 /// Sets the transform and the control size
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)
111 NDalicPINVOKE.VisualBase_SetTransformAndSize(swigCPtr, PropertyMap.getCPtr(transform), Vector2.getCPtr(controlSize));
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116 /// Returns the height for a given width.
118 /// <param name="width">Width to use.</param>
119 /// <returns>The height based on the width.</returns>
120 public float GetHeightForWidth(float width)
122 float ret = NDalicPINVOKE.VisualBase_GetHeightForWidth(swigCPtr, width);
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 /// Returns the width for a given height.
130 /// <param name="height">Height to use.</param>
131 /// <returns>The width based on the height.</returns>
132 public float GetWidthForHeight(float height)
134 float ret = NDalicPINVOKE.VisualBase_GetWidthForHeight(swigCPtr, height);
135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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>
144 /// <param name="naturalSize">The visual's natural size</param>
145 public void GetNaturalSize(Size2D naturalSize)
147 NDalicPINVOKE.VisualBase_GetNaturalSize(swigCPtr, Size2D.getCPtr(naturalSize));
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 /// the depth index of this visual.
154 public float DepthIndex
158 SetDepthIndex(value);
162 return GetDepthIndex();
165 internal void SetDepthIndex(float index)
167 NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 internal float GetDepthIndex()
173 float ret = NDalicPINVOKE.VisualBase_GetDepthIndex(swigCPtr);
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 /// Create the property map representing this visual.
181 public PropertyMap Creation
185 CreatePropertyMap(value);
188 internal void CreatePropertyMap(PropertyMap map)
190 NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();