[Tizen] Remove Visible propert in View.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
index 08deb3d..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 view registry.
-            ViewRegistry.RegisterView(this);
+            PositionUsesPivotPoint = false;
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
@@ -40,7 +38,90 @@ namespace Tizen.NUI.BaseComponents
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //you can override it to clean-up your own resources.
+        // 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)
         {
             if(disposed)
@@ -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.
-            ViewRegistry.UnregisterView(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
             {
@@ -311,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, TouchEventArgs, bool> Touched
+        public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
         {
             add
             {
@@ -383,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, HoverEventArgs, bool> Hovered
+        public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
         {
             add
             {
@@ -455,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, WheelEventArgs, bool> WheelRolled
+        public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
         {
             add
             {
@@ -674,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;
@@ -685,11 +843,47 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        internal static View GetViewFromPtr(global::System.IntPtr cPtr)
+        // Resource Ready Signal
+
+        private EventHandler _resourcesLoadedEventHandler;
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void ResourcesLoadedCallbackType(IntPtr control);
+        private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
+
+        /// <summary>
+        /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
+        /// This signal is emitted after all resources required by a View are loaded and ready.<br>
+        /// </summary>
+        public event EventHandler ResourcesLoaded
         {
-            View ret = new View(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            add
+            {
+                if (_resourcesLoadedEventHandler == null)
+                {
+                    _ResourcesLoadedCallback = OnResourcesLoaded;
+                    this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
+                }
+
+                _resourcesLoadedEventHandler += value;
+            }
+
+            remove
+            {
+                _resourcesLoadedEventHandler -= value;
+
+                if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
+                {
+                    this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
+                }
+            }
+        }
+
+        private void OnResourcesLoaded(IntPtr view)
+        {
+            if (_resourcesLoadedEventHandler != null)
+            {
+                _resourcesLoadedEventHandler(this, null);
+            }
         }
 
         internal IntPtr GetPtrfromView()
@@ -761,7 +955,6 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
         }
 
-
         /// <summary>
         /// Describes the direction to move the focus towards.
         /// </summary>
@@ -780,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();
 
         }
@@ -796,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 = ViewRegistry.GetViewFromBaseHandle(view);
+            T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
             if (ret != null)
             {
-                return (T)ret;
+                return ret;
             }
             return null;
         }
@@ -823,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)
@@ -1012,6 +1201,68 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Create an Animation to animate the background color visual. If there is no
+        /// background visual, creates one with transparent black as it's mixColor.
+        /// </summary>
+        public Animation AnimateBackgroundColor( object destinationValue,
+                                                 int startTime,
+                                                 int endTime,
+                                                 AlphaFunction.BuiltinFunctions? alphaFunction = null,
+                                                 object initialValue = null)
+        {
+            Tizen.NUI.PropertyMap background = Background;
+
+            if( background.Empty() )
+            {
+                // If there is no background yet, ensure there is a transparent
+                // color visual
+                BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+                background = Background;
+            }
+            return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
+        }
+
+        /// <summary>
+        /// Create an Animation to animate the mixColor of the named visual.
+        /// </summary>
+        public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
+        {
+            Animation animation = null;
+            {
+                PropertyMap _animator = new PropertyMap();
+                if( alphaFunction != null )
+                {
+                    _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
+                }
+
+                PropertyMap _timePeriod = new PropertyMap();
+                _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
+                _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
+                _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
+
+                PropertyMap _transition = new PropertyMap();
+                _transition.Add( "animator", new PropertyValue( _animator ) );
+                _transition.Add( "target", new PropertyValue( targetVisual ) );
+                _transition.Add( "property", new PropertyValue( "mixColor" ) );
+
+                if( initialColor != null )
+                {
+                    PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
+                    _transition.Add( "initialValue", initValue );
+                }
+
+                PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
+                _transition.Add( "targetValue", destValue );
+                TransitionData _transitionData = new TransitionData( _transition );
+
+                animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            return animation;
+        }
+
+        /// <summary>
         /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND,  type Map.
         /// </summary>
         public string BackgroundImage
@@ -1036,15 +1287,12 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        /// <summary>
-        /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map or string for URL.
-        /// </summary>
         public Tizen.NUI.PropertyMap Background
         {
             get
             {
                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
-                GetProperty(View.Property.BACKGROUND).Get(temp);
+                GetProperty( View.Property.BACKGROUND ).Get(temp);
                 return temp;
             }
             set
@@ -1053,6 +1301,7 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+
         /// <summary>
         /// The current state of the view.
         /// </summary>
@@ -1063,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)
                 {
@@ -1103,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)
                 {
@@ -1349,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)
@@ -1406,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)
@@ -1631,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
             {
@@ -1658,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
@@ -1689,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
@@ -1767,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
             {
@@ -1784,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>
@@ -1850,6 +2126,18 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Query if all resources required by a View are loaded and ready.
+        /// </summary>
+        /// <remarks>Most resources are only loaded when the control is placed on stage
+        /// </remarks>
+        public bool IsResourceReady()
+        {
+            bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
         /// Raise the view to above the target view.
         /// </summary>
         /// <remarks>Sibling order of views within the parent will be updated automatically.
@@ -1920,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)
@@ -1960,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 = ViewRegistry.GetViewFromBaseHandle(ret);
+            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;
@@ -2572,7 +2844,7 @@ namespace Tizen.NUI.BaseComponents
             return ret;
         }
 
-        internal uint AddRenderer(Renderer renderer)
+        public uint AddRenderer(Renderer renderer)
         {
             uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
             if (NDalicPINVOKE.SWIGPendingException.Pending)
@@ -2588,22 +2860,24 @@ namespace Tizen.NUI.BaseComponents
             return ret;
         }
 
-        internal Renderer GetRendererAt(uint index)
+        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;
         }
 
-        internal void RemoveRenderer(Renderer renderer)
+        public void RemoveRenderer(Renderer renderer)
         {
             NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal void RemoveRenderer(uint index)
+        public void RemoveRenderer(uint index)
         {
             NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
             if (NDalicPINVOKE.SWIGPendingException.Pending)
@@ -2664,6 +2938,13 @@ namespace Tizen.NUI.BaseComponents
             return ret;
         }
 
+        internal ViewSignal ResourcesLoadedSignal()
+        {
+            ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         /// <summary>
         /// Gets/Sets the origin of an view, within its parent's area.<br>
         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and(1.0, 1.0, 0.5) is the bottom-right corner.<br>
@@ -2730,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>
@@ -2827,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
@@ -3058,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>
@@ -3113,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>
@@ -3218,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)
                 {
@@ -3269,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)
                 {
@@ -3311,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)
                 {
@@ -3354,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)
                 {
@@ -3488,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
         {
@@ -3514,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)
                 {
@@ -3533,6 +3789,207 @@ namespace Tizen.NUI.BaseComponents
                 SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value));
             }
         }
-    }
 
+        /// <summary>
+        /// Get the number of renderers held by the view.
+        /// </summary>
+        public uint RendererCount
+        {
+            get
+            {
+                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);
+                }
+
+            }
+        }
+
+
+
+
+    }
 }