/* * Copyright(c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using System.Collections.Generic; using Tizen.NUI.BaseComponents; namespace Tizen.NUI { /// /// The Container is an abstract class to be inherited from by classes that desire to have views /// added to them. /// /// 4 public abstract class Container : Animatable { internal BaseHandle InternalParent; private List _childViews = new List(); internal Container(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) { // No un-managed data hence no need to store a native ptr } /// /// List of children of Container. /// /// 4 public List Children { get { return _childViews; } } /// /// Gets the parent container. /// Read only /// ///
The child container has been initialized.
/// The parent container. /// 4 public Container Parent { get { return GetParent(); } } /// /// Gets the number of children for this container. /// Read only /// ///
The container has been initialized.
/// The number of children. /// 4 public uint ChildCount { get { return GetChildCount(); } } /// /// Adds a child view to this Container. /// ///
This Container (the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent view.
/// 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 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. /// The child view to add. /// 4 public abstract void Add(View view); /// /// Removes a child view from this view. If the view was not a child of this view, this is a no-op. /// ///
This View(the parent) has been initialized. The child view is not the same as the parent view.
/// The view to remove /// 4 public abstract void Remove(View view); /// /// Retrieves the child view by the index. /// ///
The view has been initialized.
/// The index of the child to retrieve. /// The view for the given index or empty handle if children are not initialized. /// 4 public abstract View GetChildAt(uint index); /// /// Gets the parent of this container. /// ///
The child container has been initialized.
/// The parent container. /// 4 public abstract Container GetParent(); /// /// Gets the number of children for this container. /// ///
The container has been initialized.
/// The number of children. /// 4 public abstract UInt32 GetChildCount(); /// /// Dispose. /// /// 4 protected override void Dispose(DisposeTypes type) { if (disposed) { return; } base.Dispose(type); } } } // namespace Tizen.NUI