Merge "[Multimedia] Updated the doc-comments to fix the grammar errors."
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Layer.cs
index 4fbf526..f4aaa35 100755 (executable)
-/** Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the "License");\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an "AS IS" BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*\r
-*/\r
-\r
-namespace Tizen.NUI\r
-{\r
-    using Tizen.NUI.BaseComponents;\r
-\r
-    /// <summary>\r
-    /// Layers provide a mechanism for overlaying groups of actors on top of each other.\r
-    /// </summary>\r
-    public class Layer : Animatable\r
-    {\r
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
-\r
-        internal Layer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Layer_SWIGUpcast(cPtr), cMemoryOwn)\r
-        {\r
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
-        }\r
-\r
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Layer obj)\r
-        {\r
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
-        }\r
-\r
-        protected override void Dispose(DisposeTypes type)\r
-        {\r
-            if (disposed)\r
-            {\r
-                return;\r
-            }\r
-\r
-            if (type == DisposeTypes.Explicit)\r
-            {\r
-                //Called by User\r
-                //Release your own managed resources here.\r
-                //You should release all of your own disposable objects here.\r
-            }\r
-\r
-            //Release your own unmanaged resources here.\r
-            //You should not access any managed member here except static instance.\r
-            //because the execution order of Finalizes is non-deterministic.\r
-\r
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
-            {\r
-                if (swigCMemOwn)\r
-                {\r
-                    swigCMemOwn = false;\r
-                    NDalicPINVOKE.delete_Layer(swigCPtr);\r
-                }\r
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
-            }\r
-\r
-            base.Dispose(type);\r
-        }\r
-\r
-\r
-        internal class Property\r
-        {\r
-            internal static readonly int BEHAVIOR = NDalicPINVOKE.Layer_Property_BEHAVIOR_get();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Creates a Layer object.\r
-        /// </summary>\r
-        public Layer() : this(NDalicPINVOKE.Layer_New(), true)\r
-        {\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-\r
-        }\r
+/** Copyright (c) 2017 Samsung Electronics Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+namespace Tizen.NUI
+{
+    using System;
+    using Tizen.NUI.BaseComponents;
+
+    /// <summary>
+    /// Layers provide a mechanism for overlaying groups of actors on top of each other.
+    /// </summary>
+    public class Layer : Container
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal Layer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Layer_SWIGUpcast(cPtr), cMemoryOwn)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Layer obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        /// from Container base class
+
         /// <summary>
-        /// this method will be changed as internal method on later release
+        /// Adds a child view to this layer.
         /// </summary>
-        public new static Layer DownCast(BaseHandle handle)\r
-        {\r
-            Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Search through this layer's hierarchy for an view with the given unique ID.\r
-        /// </summary>\r
-        /// <pre>This layer(the parent) has been initialized.</pre>\r
-        /// <remarks>The actor itself is also considered in the search.</remarks>\r
-        /// <param name="child">The id of the child to find</param>\r
-        /// <returns> A handle to the view if found, or an empty handle if not. </returns>\r
-        public View FindChildById(uint id)\r
-        {\r
-            View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending)\r
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Adds a child view to this layer.\r
-        /// </summary>\r
-        /// <pre>This layer(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent layer.</pre>\r
-        /// <post>The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed.</post>\r
-        /// <remarks>If the child already has a parent, it will be removed from old parent and reparented to this layer. This may change child's position, color, scale etc as it now inherits them from this layer.</remarks>\r
-        /// <param name="child">The child</param>\r
-        public void Add(View child)\r
-        {\r
-            NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending)\r
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op.\r
-        /// </summary>\r
-        /// <pre>This layer(the parent) has been initialized. The child view is not the same as the parent view.</pre>\r
-        /// <param name="child">The child</param>\r
-        public void Remove(View child)\r
-        {\r
-            NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending)\r
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Queries the depth of the layer.<br>\r
-        /// 0 is the bottom most layer, higher number is on top.<br>\r
-        /// </summary>\r
-        public uint Depth\r
-        {\r
-            get\r
-            {\r
-                return GetDepth();\r
-            }\r
-        }\r
-\r
-        internal uint GetDepth()\r
-        {\r
-            uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Increments the depth of the layer.\r
-        /// </summary>\r
-        public void Raise()\r
-        {\r
-            NDalicPINVOKE.Layer_Raise(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Decrements the depth of the layer.\r
-        /// </summary>\r
-        public void Lower()\r
-        {\r
-            NDalicPINVOKE.Layer_Lower(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        internal void RaiseAbove(Layer target)\r
-        {\r
-            NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        internal void LowerBelow(Layer target)\r
-        {\r
-            NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Raises the layer to the top.\r
-        /// </summary>\r
-        public void RaiseToTop()\r
-        {\r
-            NDalicPINVOKE.Layer_RaiseToTop(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Lowers the layer to the bottom.\r
-        /// </summary>\r
-        public void LowerToBottom()\r
-        {\r
-            NDalicPINVOKE.Layer_LowerToBottom(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Moves the layer directly above the given layer.<br>\r
-        /// After the call, this layers depth will be immediately above target.<br>\r
-        /// </summary>\r
-        /// <param name="target">Layer to get on top of</param>\r
-        public void MoveAbove(Layer target)\r
-        {\r
-            NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Moves the layer directly below the given layer.<br>\r
-        /// After the call, this layers depth will be immediately below target.<br>\r
-        /// </summary>\r
-        /// <param name="target">Layer to get below of</param>\r
-        public void MoveBelow(Layer target)\r
-        {\r
-            NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        private void SetBehavior(LayerBehavior behavior)\r
-        {\r
-            NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        private LayerBehavior GetBehavior()\r
-        {\r
-            Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        internal void SetSortFunction(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float function)\r
-        {\r
-            NDalicPINVOKE.Layer_SetSortFunction(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.getCPtr(function));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        internal void SetTouchConsumed(bool consume)\r
-        {\r
-            NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        internal bool IsTouchConsumed()\r
-        {\r
-            bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        internal void SetHoverConsumed(bool consume)\r
-        {\r
-            NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        internal bool IsHoverConsumed()\r
-        {\r
-            bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Retrieves child view by index.\r
-        /// </summary>\r
-        /// <pre>The View has been initialized.</pre>\r
-        /// <param name="index">The index of the child to retrieve</param>\r
-        /// <returns>The view for the given index or empty handle if children not initialized</returns>\r
-        public View GetChildAt(uint index)\r
-        {\r
-            System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);\r
-            cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr);\r
-            cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr);\r
-\r
-            BaseHandle ret = new BaseHandle(cPtr, false);\r
-\r
-            View temp = ViewRegistry.GetViewFromBaseHandle(ret);\r
-\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending)\r
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-\r
-            return temp ?? null;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Enumeration for the behavior of the layer.\r
-        /// </summary>\r
-        public enum LayerBehavior\r
-        {\r
-            Layer2D,\r
-            LayerUI = Layer2D,\r
-            Layer3D\r
-        }\r
-\r
-        internal enum TreeDepthMultiplier\r
-        {\r
-            TREE_DEPTH_MULTIPLIER = 10000\r
-        }\r
-\r
-        /// <summary>\r
-        /// Layer Behavior, type String(Layer.LayerBehavior)\r
-        /// </summary>\r
-        public Layer.LayerBehavior Behavior\r
-        {\r
-            get\r
-            {\r
-                return GetBehavior();\r
-            }\r
-            set\r
-            {\r
-                SetBehavior(value);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Retrieves and sets the Layer's opacity.<br>\r
-        /// </summary>\r
-        public float Opacity\r
-        {\r
-            get\r
-            {\r
-                float temp = 0.0f;\r
-                GetProperty(View.Property.OPACITY).Get(out temp);\r
-                return temp;\r
-            }\r
-            set\r
-            {\r
-                SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Retrieves and sets the Layer's visibility.\r
-        /// </summary>\r
-        public bool Visibility\r
-        {\r
-            get\r
-            {\r
-                bool temp = false;\r
-                GetProperty(View.Property.VISIBLE).Get(out temp);\r
-                return temp;\r
-            }\r
-            set\r
-            {\r
-                SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Get the number of children held by the layer.\r
-        /// </summary>\r
-        public uint ChildCount\r
-        {\r
-            get\r
-            {\r
-                uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);\r
-                if (NDalicPINVOKE.SWIGPendingException.Pending)\r
-                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-                return ret;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets/Sets the Layer's name.\r
-        /// </summary>\r
-        public string Name\r
-        {\r
-            get\r
-            {\r
-                return GetName();\r
-            }\r
-            set\r
-            {\r
-                SetName(value);\r
-            }\r
-        }\r
-\r
-        internal string GetName()\r
-        {\r
-            string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending)\r
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        internal void SetName(string name)\r
-        {\r
-            NDalicPINVOKE.Actor_SetName(swigCPtr, name);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending)\r
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-    }\r
-}\r
+        /// <seealso cref="Container::Add()">
+        /// </seealso>
+        public override void Add(View child)
+        {
+            NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op.
+        /// </summary>
+        /// <seealso cref="Container::Add()">
+        /// </seealso>
+        public override void Remove(View child)
+        {
+            NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Retrieves child view by index.
+        /// </summary>
+        /// <pre>The View has been initialized.</pre>
+        /// <param name="index">The index of the child to retrieve</param>
+        /// <returns>The view for the given index or empty handle if children not initialized</returns>
+        public override View GetChildAt(uint index)
+        {
+            System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+            return ret ?? null;
+        }
+
+
+        protected override Container GetParent()
+        {
+            return null;
+        }
+
+        protected override uint GetChildCount()
+        {
+            uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        protected override void Dispose(DisposeTypes type)
+        {
+            if(disposed)
+            {
+                return;
+            }
+
+            if(type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                if (swigCMemOwn)
+                {
+                    swigCMemOwn = false;
+                    NDalicPINVOKE.delete_Layer(swigCPtr);
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+
+            base.Dispose(type);
+        }
+
+
+        internal class Property
+        {
+            internal static readonly int BEHAVIOR = NDalicPINVOKE.Layer_Property_BEHAVIOR_get();
+        }
+
+        /// <summary>
+        /// Creates a Layer object.
+        /// </summary>
+        public Layer() : this(NDalicPINVOKE.Layer_New(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            if(Window.Instance != null)
+            {
+                this.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft);
+                this.SetResizePolicy(ResizePolicyType.FillToParent, DimensionType.AllDimensions);
+            }
+        }
+        internal void SetAnchorPoint(Vector3 anchorPoint)
+        {
+            NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+        internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
+        {
+            NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public new static Layer DownCast(BaseHandle handle)
+        {
+            Layer ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as Layer;
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Search through this layer's hierarchy for an view with the given unique ID.
+        /// </summary>
+        /// <pre>This layer(the parent) has been initialized.</pre>
+        /// <remarks>The actor itself is also considered in the search.</remarks>
+        /// <param name="child">The id of the child to find</param>
+        /// <returns> A handle to the view if found, or an empty handle if not. </returns>
+        public View FindChildById(uint id)
+        {
+            IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Queries the depth of the layer.<br>
+        /// 0 is the bottom most layer, higher number is on top.<br>
+        /// </summary>
+        public uint Depth
+        {
+            get
+            {
+                return GetDepth();
+            }
+        }
+
+        internal uint GetDepth()
+        {
+            uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Increments the depth of the layer.
+        /// </summary>
+        public void Raise()
+        {
+            NDalicPINVOKE.Layer_Raise(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Decrements the depth of the layer.
+        /// </summary>
+        public void Lower()
+        {
+            NDalicPINVOKE.Layer_Lower(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal void RaiseAbove(Layer target)
+        {
+            NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal void LowerBelow(Layer target)
+        {
+            NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Raises the layer to the top.
+        /// </summary>
+        public void RaiseToTop()
+        {
+            NDalicPINVOKE.Layer_RaiseToTop(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Lowers the layer to the bottom.
+        /// </summary>
+        public void LowerToBottom()
+        {
+            NDalicPINVOKE.Layer_LowerToBottom(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Moves the layer directly above the given layer.<br>
+        /// After the call, this layers depth will be immediately above target.<br>
+        /// </summary>
+        /// <param name="target">Layer to get on top of</param>
+        public void MoveAbove(Layer target)
+        {
+            NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Moves the layer directly below the given layer.<br>
+        /// After the call, this layers depth will be immediately below target.<br>
+        /// </summary>
+        /// <param name="target">Layer to get below of</param>
+        public void MoveBelow(Layer target)
+        {
+            NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        private void SetBehavior(LayerBehavior behavior)
+        {
+            NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        private LayerBehavior GetBehavior()
+        {
+            Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal void SetSortFunction(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float function)
+        {
+            NDalicPINVOKE.Layer_SetSortFunction(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.getCPtr(function));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal void SetTouchConsumed(bool consume)
+        {
+            NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal bool IsTouchConsumed()
+        {
+            bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal void SetHoverConsumed(bool consume)
+        {
+            NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal bool IsHoverConsumed()
+        {
+            bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Enumeration for the behavior of the layer.
+        /// </summary>
+        public enum LayerBehavior
+        {
+            Layer2D,
+            LayerUI = Layer2D,
+            Layer3D
+        }
+
+        internal enum TreeDepthMultiplier
+        {
+            TREE_DEPTH_MULTIPLIER = 10000
+        }
+
+        /// <summary>
+        /// Layer Behavior, type String(Layer.LayerBehavior)
+        /// </summary>
+        public Layer.LayerBehavior Behavior
+        {
+            get
+            {
+                return GetBehavior();
+            }
+            set
+            {
+                SetBehavior(value);
+            }
+        }
+
+        /// <summary>
+        /// Internal only property to Enable/Disable Clipping, type Boolean.
+        /// By default this is false, i.e. the viewport of the Layer is the entire window.
+        /// </summary>
+        internal bool ClippingEnabled
+        {
+            get
+            {
+                bool ret = NDalicPINVOKE.Layer_IsClipping(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+            set
+            {
+                NDalicPINVOKE.Layer_SetClipping(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        /// <summary>
+        /// Sets the Viewport (in window coordinates), type Rectangle.
+        /// The contents of the layer will not be visible outside this box, when ViewportEnabled is true.
+        /// </summary>
+        public Rectangle Viewport
+        {
+            get
+            {
+                if( ClippingEnabled )
+                {
+                  Rectangle ret = new Rectangle(NDalicPINVOKE.Layer_GetClippingBox(swigCPtr), true);
+                  if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                  return ret;
+                }
+                else
+                {
+                  // Clipping not enabled so return the window size
+                  Size2D windowSize = Window.Instance.Size;
+                  Rectangle ret = new Rectangle(0, 0, windowSize.Width, windowSize.Height);
+                  return ret;
+                }
+            }
+            set
+            {
+                NDalicPINVOKE.Layer_SetClippingBox__SWIG_1(swigCPtr, Rectangle.getCPtr(value));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                ClippingEnabled = true;
+            }
+        }
+
+        /// <summary>
+        /// Retrieves and sets the Layer's opacity.<br>
+        /// </summary>
+        public float Opacity
+        {
+            get
+            {
+                float temp = 0.0f;
+                GetProperty(View.Property.OPACITY).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
+            }
+        }
+
+        /// <summary>
+        /// Retrieves and sets the Layer's visibility.
+        /// </summary>
+        public bool Visibility
+        {
+            get
+            {
+                bool temp = false;
+                GetProperty(View.Property.VISIBLE).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
+            }
+        }
+
+        /// <summary>
+        /// Get the number of children held by the layer.
+        /// </summary>
+        public uint ChildCount
+        {
+            get
+            {
+                uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// Gets/Sets the Layer's name.
+        /// </summary>
+        public string Name
+        {
+            get
+            {
+                return GetName();
+            }
+            set
+            {
+                SetName(value);
+            }
+        }
+
+        internal string GetName()
+        {
+            string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal void SetName(string name)
+        {
+            NDalicPINVOKE.Actor_SetName(swigCPtr, name);
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+    }
+}