/// The Container is an abstract class to be inherited from by classes that desire to have views
/// added to them.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public abstract class Container : Animatable
{
-
+ internal BaseHandle InternalParent;
private List<View> _childViews = new List<View>();
+ internal Container(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ // No un-managed data hence no need to store a native ptr
+ }
+
/// <summary>
/// List of children of Container.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public List<View> Children
{
get
}
}
- internal Container(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ /// <summary>
+ /// Gets the parent container.
+ /// Read only
+ /// </summary>
+ /// <pre>The child container has been initialized.</pre>
+ /// <returns>The parent container.</returns>
+ /// <since_tizen> 4 </since_tizen>
+ public Container Parent
{
- // No un-managed data hence no need to store a native ptr
+ get
+ {
+ return GetParent();
+ }
}
/// <summary>
- /// Dispose.
+ /// Gets the number of children for this container.
+ /// Read only
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- protected override void Dispose(DisposeTypes type)
+ /// <pre>The container has been initialized.</pre>
+ /// <returns>The number of children.</returns>
+ /// <since_tizen> 4 </since_tizen>
+ public uint ChildCount
{
- if (disposed)
+ get
{
- return;
+ return GetChildCount();
}
-
- base.Dispose(type);
}
-
/// <summary>
/// Adds a child view to this Container.
/// </summary>
/// <remarks>If the child already has a parent, it will be removed from the old parent and reparented to this view. This may change child's position, color, scale, etc. as it now inherits them from this view.</remarks>
/// <param name="view">The child view to add.</param>
/// <since_tizen> 4 </since_tizen>
- public abstract void Add( View view );
+ public abstract void Add(View view);
/// <summary>
/// Removes a child view from this view. If the view was not a child of this view, this is a no-op.
/// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
/// <param name="view">The view to remove</param>
/// <since_tizen> 4 </since_tizen>
- public abstract void Remove( View view );
+ public abstract void Remove(View view);
/// <summary>
/// Retrieves the child view by the index.
/// <param name="index">The index of the child to retrieve.</param>
/// <returns>The view for the given index or empty handle if children are not initialized.</returns>
/// <since_tizen> 4 </since_tizen>
- public abstract View GetChildAt( uint index );
+ public abstract View GetChildAt(uint index);
/// <summary>
/// Gets the parent of this container.
/// </summary>
/// <pre>The child container has been initialized.</pre>
/// <returns>The parent container.</returns>
- protected abstract Container GetParent();
+ /// <since_tizen> 4 </since_tizen>
+ public abstract Container GetParent();
/// <summary>
/// Gets the number of children for this container.
/// </summary>
/// <pre>The container has been initialized.</pre>
/// <returns>The number of children.</returns>
- protected abstract UInt32 GetChildCount();
-
- /// <summary>
- /// Gets the parent container.
- /// Read only
- /// </summary>
- /// <pre>The child container has been initialized.</pre>
- /// <returns>The parent container.</returns>
/// <since_tizen> 4 </since_tizen>
- public Container Parent
- {
- get
- {
- return GetParent();
- }
- }
+ public abstract UInt32 GetChildCount();
/// <summary>
- /// Gets the number of children for this container.
- /// Read only
+ /// Dispose.
/// </summary>
- /// <pre>The container has been initialized.</pre>
- /// <returns>The number of children.</returns>
/// <since_tizen> 4 </since_tizen>
- public uint ChildCount
+ protected override void Dispose(DisposeTypes type)
{
- get
+ if (disposed)
{
- return GetChildCount();
+ return;
}
+
+ base.Dispose(type);
}
+
}
} // namespace Tizen.NUI