[NUI] Refactoring Theme and StyleManager (#1981)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Extents.cs
index d2d6d72..2652b30 100755 (executable)
@@ -14,6 +14,7 @@
 * limitations under the License.
 *
 */
+using System;
 using System.ComponentModel;
 using Tizen.NUI.Binding;
 
@@ -24,7 +25,7 @@ namespace Tizen.NUI
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
     [Binding.TypeConverter(typeof(ExtentsTypeConverter))]
-    public class Extents : Disposable
+    public class Extents : Disposable, ICloneable
     {
 
 
@@ -48,6 +49,17 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// The type cast operator, ushort to Extents.
+        /// </summary>
+        /// <param name="value">A value of ushort type.</param>
+        /// <returns>return a Extents instance</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static implicit operator Extents(ushort value)
+        {
+            return new Extents(value, value, value, value);
+        }
+
+        /// <summary>
         /// Constructor.
         /// <param name="start">Start extent.</param>
         /// <param name="end">End extent.</param>
@@ -91,7 +103,7 @@ namespace Tizen.NUI
             Interop.Extents.Extents_start_set(swigCPtr, that.Start);
             Interop.Extents.Extents_end_set(swigCPtr, that.End);
             Interop.Extents.Extents_top_set(swigCPtr, that.Top);
-            Interop.Extents.Extents_bottom_set(swigCPtr, that.End);
+            Interop.Extents.Extents_bottom_set(swigCPtr, that.Bottom);
         }
 
         /// <summary>
@@ -216,6 +228,10 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <inheritdoc/>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public object Clone() => new Extents(this);
+
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Extents obj)
         {
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;