Revert "[NUI] Fix RaiseToTop error (#413)" (#419)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Container.cs
index 6a8f5d8..20f6e89 100755 (executable)
@@ -1,38 +1,57 @@
-/** 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.
-*
-*/
+/*
+ * 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
 {
     /// <summary>
-    ///
     /// 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
     {
 
+        private List<View> _childViews = new List<View>();
+
+        /// <summary>
+        /// List of children of Container.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        public List<View> Children
+        {
+            get
+            {
+                return _childViews;
+            }
+        }
+
         internal Container(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
             // No un-managed data hence no need to store a native ptr
         }
 
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
             if (disposed)
@@ -43,7 +62,6 @@ namespace Tizen.NUI
             base.Dispose(type);
         }
 
-
         /// <summary>
         /// Adds a child view to this Container.
         /// </summary>
@@ -76,14 +94,16 @@ namespace Tizen.NUI
         /// </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();
+        /// <since_tizen> 4 </since_tizen>
+        public abstract UInt32 GetChildCount();
 
         /// <summary>
         /// Gets the parent container.
@@ -92,7 +112,7 @@ namespace Tizen.NUI
         /// <pre>The child container has been initialized.</pre>
         /// <returns>The parent container.</returns>
         /// <since_tizen> 4 </since_tizen>
-        public Container Parent
+        public new Container Parent
         {
             get
             {
@@ -115,4 +135,4 @@ namespace Tizen.NUI
             }
         }
     }
-} // namespace Tizen.NUI
\ No newline at end of file
+} // namespace Tizen.NUI