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();
77 internal VisualBase Assign(VisualBase handle)
79 VisualBase ret = new VisualBase(NDalicPINVOKE.VisualBase_Assign(swigCPtr, VisualBase.getCPtr(handle)), false);
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85 /// name of the visual
99 internal void SetName(string name)
101 NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 internal string GetName()
107 string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 /// Sets the transform and the control size
115 /// <param name="transform">A property map describing the transform</param>
116 /// <param name="controlSize">The size of the parent control for visuals that need to scale internally.</param>
117 public void SetTransformAndSize(PropertyMap transform, Vector2 controlSize)
119 NDalicPINVOKE.VisualBase_SetTransformAndSize(swigCPtr, PropertyMap.getCPtr(transform), Vector2.getCPtr(controlSize));
120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 /// Returns the height for a given width.
126 /// <param name="width">Width to use.</param>
127 /// <returns>The height based on the width.</returns>
128 public float GetHeightForWidth(float width)
130 float ret = NDalicPINVOKE.VisualBase_GetHeightForWidth(swigCPtr, width);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 /// Returns the width for a given height.
138 /// <param name="height">Height to use.</param>
139 /// <returns>The width based on the height.</returns>
140 public float GetWidthForHeight(float height)
142 float ret = NDalicPINVOKE.VisualBase_GetWidthForHeight(swigCPtr, height);
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148 /// Return the natural size of the visual.<br>
149 /// Deriving classes stipulate the natural size and by default a visual has a ZERO natural size.<br>
150 /// A visual may not actually have a natural size until it has been placed on window and acquired all it's resources.<br>
152 /// <param name="naturalSize">The visual's natural size</param>
153 public void GetNaturalSize(Size2D naturalSize)
155 NDalicPINVOKE.VisualBase_GetNaturalSize(swigCPtr, Size2D.getCPtr(naturalSize));
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 /// the depth index of this visual.
162 public float DepthIndex
166 SetDepthIndex(value);
170 return GetDepthIndex();
173 internal void SetDepthIndex(float index)
175 NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);
176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 internal float GetDepthIndex()
181 float ret = NDalicPINVOKE.VisualBase_GetDepthIndex(swigCPtr);
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 /// Create the property map representing this visual.
189 public PropertyMap Creation
193 CreatePropertyMap(value);
196 internal void CreatePropertyMap(PropertyMap map)
198 NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202 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)
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();