Release 4.0.0-preview1-00301
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Layer.cs
index f111f9d..e4a03ef 100755 (executable)
@@ -1,18 +1,19 @@
-/** 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.
+ *
+ */
 
 namespace Tizen.NUI
 {
@@ -43,6 +44,7 @@ namespace Tizen.NUI
         /// </summary>
         /// <seealso cref="Container.Add">
         /// </seealso>
+        /// <since_tizen> 4 </since_tizen>
         public override void Add(View child)
         {
             NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
@@ -55,6 +57,7 @@ namespace Tizen.NUI
         /// </summary>
         /// <seealso cref="Container.Remove">
         /// </seealso>
+        /// <since_tizen> 4 </since_tizen>
         public override void Remove(View child)
         {
             NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
@@ -68,6 +71,7 @@ namespace Tizen.NUI
         /// <pre>The view has been initialized.</pre>
         /// <param name="index">The index of the child to retrieve.</param>
         /// <returns>The view for the given index or empty handle if children not initialized.</returns>
+        /// <since_tizen> 4 </since_tizen>
         public override View GetChildAt(uint index)
         {
             System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
@@ -80,12 +84,21 @@ namespace Tizen.NUI
             return ret ?? null;
         }
 
-
+        /// <summary>
+        /// Get parent of the layer.
+        /// </summary>
+        /// <returns>The view's container</returns>
+        /// <since_tizen> 3 </since_tizen>
         protected override Container GetParent()
         {
             return null;
         }
 
+        /// <summary>
+        /// Get the child count of the layer.
+        /// </summary>
+        /// <returns>The child count of the layer.</returns>
+        /// <since_tizen> 3 </since_tizen>
         protected override uint GetChildCount()
         {
             uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
@@ -94,6 +107,10 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
             if(disposed)
@@ -134,6 +151,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Creates a Layer object.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Layer() : this(NDalicPINVOKE.Layer_New(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -157,7 +175,10 @@ namespace Tizen.NUI
         }
 
 
-
+        /// <summary>
+        /// [Obsolete("Please do not use! this will be deprecated")]
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         [Obsolete("Please do not use! this will be deprecated")]
         public static Layer DownCast(BaseHandle handle)
         {
@@ -173,6 +194,7 @@ namespace Tizen.NUI
         /// <remarks>The actor itself is also considered in the search.</remarks>
         /// <param name="id">The id of the child to find</param>
         /// <returns> A handle to the view if found, or an empty handle if not. </returns>
+        /// <since_tizen> 3 </since_tizen>
         public View FindChildById(uint id)
         {
             IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
@@ -184,9 +206,10 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Queries the depth of the layer.<br>
-        /// 0 is the bottommost layer, higher number is on the top.<br>
+        /// Queries the depth of the layer.<br />
+        /// 0 is the bottommost layer, higher number is on the top.<br />
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public uint Depth
         {
             get
@@ -205,6 +228,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Increments the depth of the layer.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Raise()
         {
             NDalicPINVOKE.Layer_Raise(swigCPtr);
@@ -214,6 +238,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Decrements the depth of the layer.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Lower()
         {
             NDalicPINVOKE.Layer_Lower(swigCPtr);
@@ -235,6 +260,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Raises the layer to the top.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void RaiseToTop()
         {
             NDalicPINVOKE.Layer_RaiseToTop(swigCPtr);
@@ -244,6 +270,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Lowers the layer to the bottom.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void LowerToBottom()
         {
             NDalicPINVOKE.Layer_LowerToBottom(swigCPtr);
@@ -251,10 +278,11 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Moves the layer directly above the given layer.<br>
-        /// After the call, this layer's depth will be immediately above target.<br>
+        /// Moves the layer directly above the given layer.<br />
+        /// After the call, this layer's depth will be immediately above target.<br />
         /// </summary>
         /// <param name="target">The layer to get on top of.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void MoveAbove(Layer target)
         {
             NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target));
@@ -262,10 +290,11 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Moves the layer directly below the given layer.<br>
-        /// After the call, this layer's depth will be immediately below target.<br>
+        /// Moves the layer directly below the given layer.<br />
+        /// After the call, this layer's depth will be immediately below target.<br />
         /// </summary>
         /// <param name="target">The layer to get below of.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void MoveBelow(Layer target)
         {
             NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target));
@@ -320,10 +349,46 @@ namespace Tizen.NUI
         /// <summary>
         /// Enumeration for the behavior of the layer.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public enum LayerBehavior
         {
+            /// <summary>
+            /// UI control rendering mode.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Layer2D,
+            /// <summary>
+            /// UI control rendering mode (default mode).
+            /// This mode is designed for UI controls that can overlap. In this
+            /// mode renderer order will be respective to the tree hierarchy of
+            /// Actors.<br />
+            /// The rendering order is depth first, so for the following actor tree,
+            /// A will be drawn first, then B, D, E, then C, F.  This ensures that
+            /// overlapping actors are drawn as expected (whereas, with breadth first
+            /// traversal, the actors would interleave).<br />
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             LayerUI = Layer2D,
+            /// <summary>
+            /// Layer will use depth test.
+            /// This mode is designed for a 3 dimensional scene where actors in front
+            /// of other actors will obscure them, i.e. the actors are sorted by the
+            /// distance from the camera.<br />
+            /// When using this mode, a depth test will be used. A depth clear will
+            /// happen for each layer, which means actors in a layer "above" other
+            /// layers will be rendered in front of actors in those layers regardless
+            /// of their Z positions (see Layer::Raise() and Layer::Lower()).<br />
+            /// Opaque renderers are drawn first and write to the depth buffer.  Then
+            /// transparent renderers are drawn with depth test enabled but depth
+            /// write switched off.  Transparent renderers are drawn based on their
+            /// distance from the camera.  A renderer's DEPTH_INDEX property is used to
+            /// offset the distance to the camera when ordering transparent renderers.
+            /// This is useful if you want to define the draw order of two or more
+            /// transparent renderers that are equal distance from the camera.  Unlike
+            /// LAYER_UI, parent-child relationship does not affect rendering order at
+            /// all.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Layer3D
         }
 
@@ -335,6 +400,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Layer behavior, type String (Layer.LayerBehavior).
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Layer.LayerBehavior Behavior
         {
             get
@@ -370,6 +436,7 @@ namespace Tizen.NUI
         /// Sets the viewport (in window coordinates), type rectangle.
         /// The contents of the layer will not be visible outside this box, when ViewportEnabled is true.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public Rectangle Viewport
         {
             get
@@ -397,8 +464,9 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Retrieves and sets the layer's opacity.<br>
+        /// Retrieves and sets the layer's opacity.<br />
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public float Opacity
         {
             get
@@ -416,6 +484,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Retrieves and sets the layer's visibility.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public bool Visibility
         {
             get
@@ -433,6 +502,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Get the number of children held by the layer.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public new uint ChildCount
         {
             get
@@ -447,6 +517,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets or sets the layer's name.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public string Name
         {
             get
@@ -475,4 +546,4 @@ namespace Tizen.NUI
         }
 
     }
-}
+}
\ No newline at end of file