X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FLayer.cs;h=f4aaa35abc5822d90cfa915b731ac258fad6ecbd;hb=bf0dc32c2ce4f0169fae2157907a81cb253c5a71;hp=17179f892dc358e224063e0c3464e3fcf5b8a0f3;hpb=c1a588b427c8a10fab90ae86ba4715e6d16d14ef;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
diff --git a/src/Tizen.NUI/src/public/Layer.cs b/src/Tizen.NUI/src/public/Layer.cs
index 17179f8..f4aaa35 100755
--- a/src/Tizen.NUI/src/public/Layer.cs
+++ b/src/Tizen.NUI/src/public/Layer.cs
@@ -22,7 +22,7 @@ namespace Tizen.NUI
///
/// Layers provide a mechanism for overlaying groups of actors on top of each other.
///
- public class Layer : Animatable
+ public class Layer : Container
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
@@ -36,6 +36,64 @@ namespace Tizen.NUI
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
+ /// from Container base class
+
+ ///
+ /// Adds a child view to this layer.
+ ///
+ ///
+ ///
+ public override void Add(View child)
+ {
+ NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ ///
+ /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op.
+ ///
+ ///
+ ///
+ public override void Remove(View child)
+ {
+ NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ ///
+ /// Retrieves child view by index.
+ ///
+ ///
The View has been initialized.
+ /// The index of the child to retrieve
+ /// The view for the given index or empty handle if children not initialized
+ public override View GetChildAt(uint index)
+ {
+ System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
+
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ return ret ?? null;
+ }
+
+
+ protected override Container GetParent()
+ {
+ return null;
+ }
+
+ protected override uint GetChildCount()
+ {
+ uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
protected override void Dispose(DisposeTypes type)
{
if(disposed)
@@ -126,32 +184,6 @@ namespace Tizen.NUI
}
///
- /// Adds a child view to this layer.
- ///
- /// This layer(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent layer.
- /// The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed.
- /// If the child already has a parent, it will be removed from old parent and reparented to this layer. This may change child's position, color, scale etc as it now inherits them from this layer.
- /// The child
- public void Add(View child)
- {
- NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- ///
- /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op.
- ///
- /// This layer(the parent) has been initialized. The child view is not the same as the parent view.
- /// The child
- public void Remove(View child)
- {
- NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- ///
/// Queries the depth of the layer.
/// 0 is the bottom most layer, higher number is on top.
///
@@ -286,24 +318,6 @@ namespace Tizen.NUI
}
///
- /// Retrieves child view by index.
- ///
- /// The View has been initialized.
- /// The index of the child to retrieve
- /// The view for the given index or empty handle if children not initialized
- public View GetChildAt(uint index)
- {
- System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
-
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
- return ret ?? null;
- }
-
- ///
/// Enumeration for the behavior of the layer.
///
public enum LayerBehavior
@@ -459,5 +473,6 @@ namespace Tizen.NUI
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+
}
}