[NUI] Revert "Sync with dalihub & API5 branch (#631)" (#635)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / RelayoutContainer.cs
index af788c0..ecdd30b 100755 (executable)
@@ -25,30 +25,39 @@ namespace Tizen.NUI
     /// <since_tizen> 3 </since_tizen>
     public class RelayoutContainer : global::System.IDisposable
     {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         /// <summary>
         /// swigCMemOwn
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         protected bool swigCMemOwn;
 
+        internal RelayoutContainer(global::System.IntPtr cPtr, bool cMemoryOwn)
+        {
+            swigCMemOwn = cMemoryOwn;
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelayoutContainer obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        //A Flag to check who called Dispose(). (By User or DisposeQueue)
+        private bool isDisposeQueued = false;
         /// <summary>
         /// A Flat to check if it is already disposed.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         protected bool disposed = false;
 
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-
-        //A Flag to check who called Dispose(). (By User or DisposeQueue)
-        private bool isDisposeQueued = false;
-
         /// <summary>
         /// Dispose.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         ~RelayoutContainer()
         {
-            if (!isDisposeQueued)
+            if(!isDisposeQueued)
             {
                 isDisposeQueued = true;
                 DisposeQueue.Instance.Add(this);
@@ -79,29 +88,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Adds relayout information to the container if it doesn't already exist.
-        /// </summary>
-        /// <param name="view">The view to relayout.</param>
-        /// <param name="size">The size to relayout.</param>
-        /// <since_tizen> 3 </since_tizen>
-        public virtual void Add(View view, Size2D size)
-        {
-            NDalicPINVOKE.RelayoutContainer_Add(swigCPtr, View.getCPtr(view), Size2D.getCPtr(size));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelayoutContainer obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        internal RelayoutContainer(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        /// <summary>
         /// Dispose.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
@@ -134,5 +120,19 @@ namespace Tizen.NUI
             }
             disposed = true;
         }
+
+        /// <summary>
+        /// Adds relayout information to the container if it doesn't already exist.
+        /// </summary>
+        /// <param name="view">The view to relayout.</param>
+        /// <param name="size">The size to relayout.</param>
+        /// <since_tizen> 3 </since_tizen>
+        public virtual void Add(View view, Size2D size)
+        {
+            NDalicPINVOKE.RelayoutContainer_Add(swigCPtr, View.getCPtr(view), Size2D.getCPtr(size));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
     }
+
 }
\ No newline at end of file