Added ChildCount property into Layer and View 17/133317/3
authorUmar <m.umar@partner.samsung.com>
Fri, 9 Jun 2017 17:16:48 +0000 (18:16 +0100)
committerUmar <m.umar@partner.samsung.com>
Fri, 9 Jun 2017 17:37:42 +0000 (18:37 +0100)
Change-Id: I053e86dc8fed2d1111b5b1c68d2af42500d4b956

NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs
Tizen.NUI/src/public/BaseComponents/View.cs
Tizen.NUI/src/public/Layer.cs

index 2171d74..c5c42fa 100755 (executable)
@@ -830,7 +830,7 @@ namespace DaliTest
                 parent.Add(childs[i]);
             }
 
-            for (uint i = 0; i < parent.GetChildCount(); i++)
+            for (uint i = 0; i < parent.ChildCount; i++)
             {
                 View child = parent.GetChildAt(i);
                 View childView = View.DownCast<View>(child);
index 54183e7..f9f63d6 100755 (executable)
@@ -1955,7 +1955,7 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         /// <pre>The View has been initialized.</pre>
         /// <returns>The number of children</returns>
-        public uint GetChildCount()
+        internal uint GetChildCount()
         {
             uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending)
@@ -3122,6 +3122,17 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Get the number of children held by the view.
+        /// </summary>
+        public uint ChildCount
+        {
+            get
+            {
+                return GetChildCount();
+            }
+        }
+
+        /// <summary>
         /// Gets/Sets the status of whether an view should emit touch or hover signals.
         /// </summary>
         public bool Sensitive
index c8a1bd5..4c48ab6 100755 (executable)
@@ -354,5 +354,19 @@ namespace Tizen.NUI
                 SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
             }
         }
+
+        /// <summary>
+        /// Get the number of children held by the layer.
+        /// </summary>
+        public uint ChildCount
+        {
+            get
+            {
+                uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
     }
 }