From aa91e76e0915c129d0797545ba4fb741f1722260 Mon Sep 17 00:00:00 2001 From: Umar Date: Fri, 9 Jun 2017 18:16:48 +0100 Subject: [PATCH] Added ChildCount property into Layer and View Change-Id: I053e86dc8fed2d1111b5b1c68d2af42500d4b956 --- .../NUISamples/NUISamples.TizenTV/examples/dali-test.cs | 2 +- Tizen.NUI/src/public/BaseComponents/View.cs | 13 ++++++++++++- Tizen.NUI/src/public/Layer.cs | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs index 2171d74..c5c42fa 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs @@ -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(child); diff --git a/Tizen.NUI/src/public/BaseComponents/View.cs b/Tizen.NUI/src/public/BaseComponents/View.cs index 54183e7..f9f63d6 100755 --- a/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/Tizen.NUI/src/public/BaseComponents/View.cs @@ -1955,7 +1955,7 @@ namespace Tizen.NUI.BaseComponents /// ///
The View has been initialized.
/// The number of children - public uint GetChildCount() + internal uint GetChildCount() { uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) @@ -3122,6 +3122,17 @@ namespace Tizen.NUI.BaseComponents } /// + /// Get the number of children held by the view. + /// + public uint ChildCount + { + get + { + return GetChildCount(); + } + } + + /// /// Gets/Sets the status of whether an view should emit touch or hover signals. /// public bool Sensitive diff --git a/Tizen.NUI/src/public/Layer.cs b/Tizen.NUI/src/public/Layer.cs index c8a1bd5..4c48ab6 100755 --- a/Tizen.NUI/src/public/Layer.cs +++ b/Tizen.NUI/src/public/Layer.cs @@ -354,5 +354,19 @@ namespace Tizen.NUI SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value)); } } + + /// + /// Get the number of children held by the layer. + /// + public uint ChildCount + { + get + { + uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } } } -- 2.7.4