using System.Runtime.InteropServices;
using Tizen.NUI.BaseComponents;
using System.ComponentModel;
+using System.Collections.Generic;
namespace Tizen.NUI
{
private Layer _rootLayer;
private string _windowTitle;
+ private List<Layer> _childLayers = new List<Layer>();
+ private List<Layer> LayersChildren
+ {
+ get
+ {
+ return _childLayers;
+ }
+ }
+
internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
{
NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ LayersChildren.Add(layer);
}
internal void Remove(Layer layer)
{
NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ LayersChildren.Remove(layer);
}
/// <summary>
/// <remarks>Note that a default layer is always provided (count >= 1).</remarks>
internal uint GetLayerCount()
{
- uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ if (LayersChildren == null || LayersChildren.Count < 0)
+ return 0;
+
+ return (uint) LayersChildren.Count;
}
/// <summary>
{
_rootLayer = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ LayersChildren.Add(_rootLayer);
}
return _rootLayer;
}
{
NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ LayersChildren.Add(layer);
}
/// <summary>
{
NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ LayersChildren.Remove(layer);
}
/// <summary>