Merge "[ElmSharp] Remove layout for Button"
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / ImageView.cs
index 95a31ca..025818c 100755 (executable)
 * limitations under the License.
 *
 */
-// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
-//------------------------------------------------------------------------------
-// <auto-generated />
-//
-// This file was automatically generated by SWIG (http://www.swig.org).
-// Version 3.0.9
-//
-// Do not make changes to this file unless you know what you are doing--modify
-// the SWIG interface file instead.
-//------------------------------------------------------------------------------
 
 namespace Tizen.NUI.BaseComponents
 {
@@ -40,8 +30,6 @@ namespace Tizen.NUI.BaseComponents
         internal ImageView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ImageView_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            // By default, we do not want the position to use the anchor point
-            PositionUsesAnchorPoint = false;
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImageView obj)
@@ -113,7 +101,7 @@ namespace Tizen.NUI.BaseComponents
             ResourceReadyEventArgs e = new ResourceReadyEventArgs();
             if(data != null)
             {
-                e.View = View.GetViewFromPtr(data);
+                e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
             }
 
             if (_resourceReadyEventHandler != null)
@@ -125,7 +113,7 @@ namespace Tizen.NUI.BaseComponents
         //you can override it to clean-up your own resources.
         protected override void Dispose(DisposeTypes type)
         {
-            if (!disposed)
+            if (disposed)
             {
                 return;
             }
@@ -158,7 +146,7 @@ namespace Tizen.NUI.BaseComponents
             base.Dispose(type);
         }
 
-        internal class Property
+        internal new class Property
         {
             internal static readonly int RESOURCE_URL = NDalicPINVOKE.ImageView_Property_RESOURCE_URL_get();
             internal static readonly int IMAGE = NDalicPINVOKE.ImageView_Property_IMAGE_get();
@@ -181,25 +169,21 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="url">The url of the image resource to display</param>
         public ImageView(string url) : this(NDalicPINVOKE.ImageView_New__SWIG_2(url), true)
         {
+            _url = url;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
         internal ImageView(string url, Uint16Pair size) : this(NDalicPINVOKE.ImageView_New__SWIG_3(url, Uint16Pair.getCPtr(size)), true)
         {
+            _url = url;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
 
-        /// <summary>
-        /// Downcasts a handle to ImageView handle.<br>
-        /// If handle points to a ImageView, the downcast produces valid handle.<br>
-        /// If not, the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a ImageView or an uninitialized handle</returns>
-        internal new static ImageView DownCast(BaseHandle handle)
+        [Obsolete("Please do not use! this will be deprecated")]
+        public new static ImageView DownCast(BaseHandle handle)
         {
-            ImageView ret = new ImageView(NDalicPINVOKE.ImageView_DownCast(BaseHandle.getCPtr(handle)), true);
+            ImageView ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as ImageView;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -210,11 +194,13 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="url">The URL to the image resource to display</param>
         public void SetImage(string url)
         {
+            _url = url;
             NDalicPINVOKE.ImageView_SetImage__SWIG_1(swigCPtr, url);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
         internal void SetImage(string url, Uint16Pair size)
         {
+            _url = url;
             NDalicPINVOKE.ImageView_SetImage__SWIG_2(swigCPtr, url, Uint16Pair.getCPtr(size));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
@@ -230,7 +216,7 @@ namespace Tizen.NUI.BaseComponents
         /// Most resources are only loaded when the control is placed on stage.<br>
         /// true if the resources are loaded and ready, false otherwise.<br>
         /// </summary>
-        public bool IsResourceReady()
+        public new  bool IsResourceReady()
         {
             bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending)
@@ -245,6 +231,7 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                GetProperty(ImageView.Property.RESOURCE_URL).Get(out _url);
                 return _url;
             }
             set