[Tizen] Remove Visible propert in View.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
index 80b3a38..acb9cd9 100755 (executable)
@@ -23,16 +23,14 @@ namespace Tizen.NUI.BaseComponents
     /// <summary>
     /// View is the base class for all views.
     /// </summary>
-    public class View : Animatable //CustomActor => Animatable
+    public class View : Container
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
         internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-
-            // Register this instance of view in the registry.
-            Registry.Register(this);
+            PositionUsesPivotPoint = false;
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
@@ -40,6 +38,89 @@ namespace Tizen.NUI.BaseComponents
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
+        // From Container Base class
+
+        /// <summary>
+        /// Adds a child view to this View.
+        /// </summary>
+        /// <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 View. If the view was not a child of this view, this is a no-op.
+        /// </summary>
+        /// <seealso cref="Container::Remove()">
+        /// </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>
+        /// <seealso cref="Container::GetChildAt()">
+        /// </seealso>
+        public override View GetChildAt(uint index)
+        {
+            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;
+        }
+
+        /// <summary>
+        /// Retrieves the number of children held by the view.
+        /// </summary>
+        /// <seealso cref="Container::GetChildCount()">
+        /// </seealso>
+        protected override uint GetChildCount()
+        {
+            uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Get the Views parent
+        /// </summary>
+        /// <seealso cref="Container::GetParent()">
+
+        protected override Container GetParent()
+        {
+            Container ret;
+            IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
+
+            BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+
+            if(basehandle is Layer)
+            {
+                ret = basehandle as Layer;
+            }
+            else
+            {
+                ret = basehandle as View;
+            }
+
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        ///
+
         // you can override it to clean-up your own resources.
         protected override void Dispose(DisposeTypes type)
         {
@@ -59,8 +140,85 @@ namespace Tizen.NUI.BaseComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
+            if (_onRelayoutEventCallback != null)
+            {
+                this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
+            }
+
+            if (_offWindowEventCallback != null)
+            {
+                this.OffWindowSignal().Disconnect(_offWindowEventCallback);
+            }
+
+            if (_onWindowEventCallback != null)
+            {
+                this.OnWindowSignal().Disconnect(_onWindowEventCallback);
+            }
+
+            if (_wheelEventCallback != null)
+            {
+                this.WheelEventSignal().Disconnect(_wheelEventCallback);
+            }
+
+            if (_hoverEventCallback != null)
+            {
+                this.HoveredSignal().Disconnect(_hoverEventCallback);
+            }
+
+            if (_touchDataCallback != null)
+            {
+                this.TouchSignal().Disconnect(_touchDataCallback);
+            }
+
+            if (_ResourcesLoadedCallback != null)
+            {
+                this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
+            }
+
+            if (_offWindowEventCallback != null)
+            {
+                this.OffWindowSignal().Disconnect(_offWindowEventCallback);
+            }
+
+            if (_onWindowEventCallback != null)
+            {
+                this.OnWindowSignal().Disconnect(_onWindowEventCallback);
+            }
+
+            if (_wheelEventCallback != null)
+            {
+                this.WheelEventSignal().Disconnect(_wheelEventCallback);
+            }
+
+            if (_hoverEventCallback != null)
+            {
+                this.HoveredSignal().Disconnect(_hoverEventCallback);
+            }
+
+            if (_touchDataCallback != null)
+            {
+                this.TouchSignal().Disconnect(_touchDataCallback);
+            }
+
+            if (_onRelayoutEventCallback != null)
+            {
+                this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
+            }
+
+            if (_keyCallback != null)
+            {
+                this.KeyEventSignal().Disconnect(_keyCallback);
+            }
+
+            if (_keyInputFocusLostCallback != null)
+            {
+                this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
+            }
+
+            if (_keyInputFocusGainedCallback != null)
+            {
+                this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
+            }
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
@@ -190,7 +348,7 @@ namespace Tizen.NUI.BaseComponents
         /// Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
         /// KeyPressed signal is emitted when key event is received.<br>
         /// </summary>
-        public event EventHandlerWithReturnType<object, KeyEventArgs, bool> Key
+        public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
         {
             add
             {
@@ -218,15 +376,23 @@ namespace Tizen.NUI.BaseComponents
         {
             KeyEventArgs e = new KeyEventArgs();
 
+            bool result = false;
+
             e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
 
             if (_keyEventHandler != null)
             {
-                return _keyEventHandler(this, e);
+                Delegate[] delegateList = _keyEventHandler.GetInvocationList();
+
+                // Oring the result of each callback.
+                foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
+                {
+                    result |= del( this, e );
+                }
             }
-            return false;
-        }
 
+            return result;
+        }
 
         private EventHandler _onRelayoutEventHandler;
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
@@ -274,7 +440,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Event arguments that passed via Touch signal.
         /// </summary>
-        public class TouchedEventArgs : EventArgs
+        public class TouchEventArgs : EventArgs
         {
             private Touch _touch;
 
@@ -294,7 +460,7 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        private EventHandlerWithReturnType<object, TouchedEventArgs, bool> _touchDataEventHandler;
+        private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
         private TouchDataCallbackType _touchDataCallback;
@@ -303,7 +469,7 @@ namespace Tizen.NUI.BaseComponents
         /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
         /// Touched signal is emitted when touch input is received.<br>
         /// </summary>
-        public event EventHandlerWithReturnType<object, TouchedEventArgs, bool> Touched
+        public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
         {
             add
             {
@@ -331,7 +497,7 @@ namespace Tizen.NUI.BaseComponents
         // Callback for View TouchSignal
         private bool OnTouch(IntPtr view, IntPtr touchData)
         {
-            TouchedEventArgs e = new TouchedEventArgs();
+            TouchEventArgs e = new TouchEventArgs();
 
             e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
 
@@ -346,7 +512,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Event arguments that passed via Hover signal.
         /// </summary>
-        public class HoveredEventArgs : EventArgs
+        public class HoverEventArgs : EventArgs
         {
             private Hover _hover;
 
@@ -366,7 +532,7 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        private EventHandlerWithReturnType<object, HoveredEventArgs, bool> _hoverEventHandler;
+        private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
         private HoverEventCallbackType _hoverEventCallback;
@@ -375,7 +541,7 @@ namespace Tizen.NUI.BaseComponents
         /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
         /// Hovered signal is emitted when hover input is received.<br>
         /// </summary>
-        public event EventHandlerWithReturnType<object, HoveredEventArgs, bool> Hovered
+        public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
         {
             add
             {
@@ -403,7 +569,7 @@ namespace Tizen.NUI.BaseComponents
         // Callback for View Hover signal
         private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
         {
-            HoveredEventArgs e = new HoveredEventArgs();
+            HoverEventArgs e = new HoverEventArgs();
 
             e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
 
@@ -418,7 +584,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Event arguments that passed via Wheel signal.
         /// </summary>
-        public class WheelRolledEventArgs : EventArgs
+        public class WheelEventArgs : EventArgs
         {
             private Wheel _wheel;
 
@@ -438,7 +604,7 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        private EventHandlerWithReturnType<object, WheelRolledEventArgs, bool> _wheelEventHandler;
+        private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
         private WheelEventCallbackType _wheelEventCallback;
@@ -447,7 +613,7 @@ namespace Tizen.NUI.BaseComponents
         /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
         /// WheelMoved signal is emitted when wheel event is received.<br>
         /// </summary>
-        public event EventHandlerWithReturnType<object, WheelRolledEventArgs, bool> WheelRolled
+        public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
         {
             add
             {
@@ -475,7 +641,7 @@ namespace Tizen.NUI.BaseComponents
         // Callback for View Wheel signal
         private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
         {
-            WheelRolledEventArgs e = new WheelRolledEventArgs();
+            WheelEventArgs e = new WheelEventArgs();
 
             e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
 
@@ -666,7 +832,7 @@ namespace Tizen.NUI.BaseComponents
             VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
             if (data != null)
             {
-                e.View = View.GetViewFromPtr(data);
+                e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
             }
             e.Visibility = visibility;
             e.Type = type;
@@ -720,14 +886,6 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-
-        internal static View GetViewFromPtr(global::System.IntPtr cPtr)
-        {
-            View ret = new View(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         internal IntPtr GetPtrfromView()
         {
             return (IntPtr)swigCPtr;
@@ -815,7 +973,6 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         public View() : this(NDalicPINVOKE.View_New(), true)
         {
-            PositionUsesAnchorPoint = false;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
@@ -831,25 +988,21 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         /// <param name="handle">Handle to an object</param>
         /// <returns>A handle to a View or an uninitialized handle</returns>
+        [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
         public new static View DownCast(BaseHandle handle)
         {
-            View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
+            View ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        /// <summary>
-        /// Downcasts a handle to class which inherit View handle.
-        /// </summary>
-        /// <typeparam name="T">Class which inherit View</typeparam>
-        /// <param name="view">View to an object</param>
-        /// <returns>A object which inherit View</returns>
+        [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")]
         public static T DownCast<T>(View view) where T : View
         {
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
+            T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
             if (ret != null)
             {
-                return (T)ret;
+                return ret;
             }
             return null;
         }
@@ -858,9 +1011,10 @@ namespace Tizen.NUI.BaseComponents
         {
             View view = null;
 
-            if (Parent)
+            if (Parent is View)
             {
-                view = Parent.FindChildById(id);
+                View parentView = Parent as View;
+                view = parentView.FindChildById(id);
             }
 
             if (!view)
@@ -1158,9 +1312,7 @@ namespace Tizen.NUI.BaseComponents
                 int temp = 0;
                 if (GetProperty(View.Property.STATE).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "State get error!");
-#endif
+                    NUILog.Error("State get error!");
                 }
                 switch (temp)
                 {
@@ -1198,9 +1350,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "subState get error!");
-#endif
+                    NUILog.Error("subState get error!");
                 }
                 switch (temp)
                 {
@@ -1444,9 +1594,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
-#endif
+                    NUILog.Error("CellHorizontalAlignment get error!");
                 }
 
                 switch (temp)
@@ -1501,9 +1649,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
-#endif
+                    NUILog.Error("CellVerticalAlignment get error!");
                 }
 
                 switch (temp)
@@ -1726,7 +1872,8 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        public bool Visibility
+        [Obsolete("Please do not use! this will be deprecated. Please use Visibility instead.")]
+        public bool Visible
         {
             get
             {
@@ -1753,7 +1900,7 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Sets the position of the View for X and Y.<br>
-        /// By default, sets the position vector between the parent origin and anchor point(default).<br>
+        /// By default, sets the position vector between the parent origin and pivot point(default).<br>
         /// If Position inheritance if disabled, sets the world position.<br>
         /// </summary>
         public Position2D Position2D
@@ -1784,12 +1931,27 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Determines whether the anchor point should be used to determine the position of the view.
+        /// Determines whether the pivot point should be used to determine the position of the view.
         /// This is true by default.
         /// </summary>
         /// <remarks>If false, then the top-left of the view is used for the position.
         /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
         /// </remarks>
+        public bool PositionUsesPivotPoint
+        {
+            get
+            {
+                bool temp = false;
+                GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
         public bool PositionUsesAnchorPoint
         {
             get
@@ -1862,12 +2024,13 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Gets the natural size of the view.<br>
+        /// Returns the natural size of the view.
         /// </summary>
         /// <remarks>
-        /// Readonly.
+        /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
         /// </remarks>
-        internal Vector3 NaturalSize
+        [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
+        public Vector3 NaturalSize
         {
             get
             {
@@ -1879,6 +2042,24 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Returns the natural size (Size2D) of the view.
+        /// </summary>
+        /// <remarks>
+        /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
+        /// </remarks>
+        public Size2D NaturalSize2D
+        {
+            get
+            {
+                Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+                return new Size2D((int)temp.Width, (int)temp.Height);
+            }
+        }
+
+        /// <summary>
         /// Shows the View.
         /// </summary>
         /// <remarks>
@@ -2027,39 +2208,19 @@ namespace Tizen.NUI.BaseComponents
 
         internal Layer GetLayer()
         {
-            Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
+            IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
+            Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
 
-        /// <summary>
-        /// Adds a child view to this View.
-        /// </summary>
-        /// <pre>This View(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent view.</pre>
-        /// <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>
-        /// <remarks>If the child already has a parent, it will be removed from old parent and reparented to this view. This may change child's position, color, scale etc as it now inherits them from this view.</remarks>
-        /// <param name="child">The child</param>
-        public void Add(View child)
-        {
-            NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
         }
 
         /// <summary>
-        /// Removes a child View from this View. If the view was not a child of this view, this is a no-op.
+        /// Removes a View from its Parent View / Layer. If the View has no parent, this method does nothing.
         /// </summary>
-        /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
-        /// <param name="child">The child</param>
-        public void Remove(View child)
-        {
-            NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        internal void Unparent()
+        /// <pre>The (child) View has been initialized. </pre>
+        public void Unparent()
         {
             NDalicPINVOKE.Actor_Unparent(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending)
@@ -2067,66 +2228,70 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Retrieves the number of children held by the view.
+        /// Search through this view's hierarchy for an view with the given name.
+        /// The view itself is also considered in the search.
         /// </summary>
         /// <pre>The View has been initialized.</pre>
-        /// <returns>The number of children</returns>
-        internal uint GetChildCount()
+        /// <param name="viewName">The name of the view to find</param>
+        /// <returns>A handle to the view if found, or an empty handle if not</returns>
+        public View FindChildByName(string viewName)
         {
-            uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+            IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        /// <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 View GetChildAt(uint index)
+        internal View FindChildById(uint id)
         {
-            IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
-            cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr);
-            cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr);
-
-            BaseHandle ret = new BaseHandle(cPtr, false);
+            IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
 
-            View temp = Registry.GetManagedBaseHandleFromNativePtr(ret) as View;
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
-            return temp ?? null;
-        }
-
-        /// <summary>
-        /// Search through this view's hierarchy for an view with the given name.
-        /// The view itself is also considered in the search.
-        /// </summary>
-        /// <pre>The View has been initialized.</pre>
-        /// <param name="viewName">The name of the view to find</param>
-        /// <returns>A handle to the view if found, or an empty handle if not</returns>
-        public View FindChildByName(string viewName)
-        {
-            View ret = new View(NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        internal View FindChildById(uint id)
+        /*internal View GetParent()
         {
-            View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);
+            View ret;
+            IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
+
+            BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+
+            if(basehandle is Layer)
+            {
+                ret = new View(cPtr,false);
+            }
+            else
+            {
+                ret = basehandle as View;
+            }
+
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
-        }
+        }*/
 
         internal View GetParent()
         {
-            View ret = new View(NDalicPINVOKE.Actor_GetParent(swigCPtr), true);
+            View ret;
+            IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
+
+            BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+
+            if(basehandle is Layer)
+            {
+                View ret2 = new View(cPtr,false);
+                return ret2;
+            }
+
+            ret = basehandle as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -2697,7 +2862,9 @@ namespace Tizen.NUI.BaseComponents
 
         public Renderer GetRendererAt(uint index)
         {
-            Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
+            IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
+            Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -2844,7 +3011,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Gets/Sets the anchor-point of an view.<br>
         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.<br>
-        /// The default anchor point is AnchorPoint.Center (0.5, 0.5, 0.5).<br>
+        /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br>
         /// An view position is the distance between its parent-origin and this anchor-point.<br>
         /// An view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br>
         /// <pre>The View has been initialized.</pre>
@@ -2941,7 +3108,7 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Gets/Sets the position of the View.<br>
-        /// By default, sets the position vector between the parent origin and anchor point(default).<br>
+        /// By default, sets the position vector between the parent origin and pivot point(default).<br>
         /// If Position inheritance if disabled, sets the world position.<br>
         /// </summary>
         public Position Position
@@ -3172,18 +3339,14 @@ namespace Tizen.NUI.BaseComponents
         /// If an view is not visible, then the view and its children will not be rendered.
         /// This is regardless of the individual visibility values of the children i.e.an view will only be rendered if all of its parents have visibility set to true.
         /// </remarks>
-        public bool Visible
+        public bool Visibility
         {
             get
             {
                 bool temp = false;
                 GetProperty(View.Property.VISIBLE).Get(out temp);
                 return temp;
-            }/* only get is required : removed
-            set
-            {
-                SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
-            }*/
+            }
         }
 
         /// <summary>
@@ -3227,17 +3390,6 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Get the number of children held by the view.
-        /// </summary>
-        public uint ChildCount
-        {
-            get
-            {
-                return GetChildCount();
-            }
-        }
-
-        /// <summary>
         /// Gets the View's ID.
         /// Readonly
         /// </summary>
@@ -3332,9 +3484,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 if (GetProperty(View.Property.DRAW_MODE).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "DrawMode get error!");
-#endif
+                    NUILog.Error("DrawMode get error!");
                 }
                 switch (temp)
                 {
@@ -3383,9 +3533,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 if (GetProperty(View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
-#endif
+                    NUILog.Error("WidthResizePolicy get error!");
                 }
                 switch (temp)
                 {
@@ -3425,9 +3573,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 if (GetProperty(View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
-#endif
+                    NUILog.Error("HeightResizePolicy get error!");
                 }
                 switch (temp)
                 {
@@ -3468,9 +3614,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 if (GetProperty(View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
-#endif
+                    NUILog.Error("SizeScalePolicy get error!");
                 }
                 switch (temp)
                 {
@@ -3602,7 +3746,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Gets/Sets whether a child view inherits it's parent's position.<br>
         /// Default is to inherit.<br>
-        /// Switching this off means that using Position sets the view's world position, i.e. translates from the world origin(0,0,0) to the anchor point of the view.<br>
+        /// Switching this off means that using Position sets the view's world position, i.e. translates from the world origin(0,0,0) to the pivot point of the view.<br>
         /// </summary>
         public bool InheritPosition
         {
@@ -3628,9 +3772,7 @@ namespace Tizen.NUI.BaseComponents
                 string temp;
                 if (GetProperty(View.Property.CLIPPING_MODE).Get(out temp) == false)
                 {
-#if DEBUG_ON
-                    Tizen.Log.Error("NUI", "ClippingMode get error!");
-#endif
+                    NUILog.Error("ClippingMode get error!");
                 }
                 switch (temp)
                 {
@@ -3658,5 +3800,196 @@ namespace Tizen.NUI.BaseComponents
                 return GetRendererCount();
             }
         }
+
+
+
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandlerWithReturnType<object, TouchEventArgs, bool> Touched
+        {
+            add
+            {
+                if (_touchDataEventHandler == null)
+                {
+                    _touchDataCallback = OnTouch;
+                    this.TouchSignal().Connect(_touchDataCallback);
+                }
+
+                _touchDataEventHandler += value;
+            }
+
+            remove
+            {
+                _touchDataEventHandler -= value;
+
+                if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
+                {
+                    this.TouchSignal().Disconnect(_touchDataCallback);
+                }
+
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandlerWithReturnType<object, HoverEventArgs, bool> Hovered
+        {
+            add
+            {
+                if (_hoverEventHandler == null)
+                {
+                    _hoverEventCallback = OnHoverEvent;
+                    this.HoveredSignal().Connect(_hoverEventCallback);
+                }
+
+                _hoverEventHandler += value;
+            }
+
+            remove
+            {
+                _hoverEventHandler -= value;
+
+                if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
+                {
+                    this.HoveredSignal().Disconnect(_hoverEventCallback);
+                }
+
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
+        {
+            add
+            {
+                if (_wheelEventHandler == null)
+                {
+                    _wheelEventCallback = OnWheelEvent;
+                    this.WheelEventSignal().Connect(_wheelEventCallback);
+                }
+
+                _wheelEventHandler += value;
+            }
+
+            remove
+            {
+                _wheelEventHandler -= value;
+
+                if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
+                {
+                    this.WheelEventSignal().Disconnect(_wheelEventCallback);
+                }
+
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public Position AnchorPoint
+        {
+            get
+            {
+                Position temp = new Position(0.0f, 0.0f, 0.0f);
+                GetProperty(View.Property.ANCHOR_POINT).Get(temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
+        public Size Size
+        {
+            get
+            {
+                Size temp = new Size(0.0f, 0.0f, 0.0f);
+                GetProperty(View.Property.SIZE).Get(temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandler OnWindowEvent
+        {
+            add
+            {
+                if (_onWindowEventHandler == null)
+                {
+                    _onWindowEventCallback = OnWindow;
+                    this.OnWindowSignal().Connect(_onWindowEventCallback);
+                }
+
+                _onWindowEventHandler += value;
+            }
+
+            remove
+            {
+                _onWindowEventHandler -= value;
+
+                if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
+                {
+                    this.OnWindowSignal().Disconnect(_onWindowEventCallback);
+                }
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandler OffWindowEvent
+        {
+            add
+            {
+                if (_offWindowEventHandler == null)
+                {
+                    _offWindowEventCallback = OffWindow;
+                    this.OffWindowSignal().Connect(_offWindowEventCallback);
+                }
+
+                _offWindowEventHandler += value;
+            }
+
+            remove
+            {
+                _offWindowEventHandler -= value;
+
+                if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
+                {
+                    this.OffWindowSignal().Disconnect(_offWindowEventCallback);
+                }
+            }
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandler OnRelayoutEvent
+        {
+            add
+            {
+                if (_onRelayoutEventHandler == null)
+                {
+                    _onRelayoutEventCallback = OnRelayout;
+                    this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
+                }
+
+                _onRelayoutEventHandler += value;
+            }
+
+            remove
+            {
+                _onRelayoutEventHandler -= value;
+
+                if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
+                {
+                    this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
+                }
+
+            }
+        }
+
+
+
+
     }
 }