[Tizen] some APIs are changed for preview#4 46/133846/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 13 Jun 2017 14:06:59 +0000 (23:06 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 13 Jun 2017 14:06:59 +0000 (23:06 +0900)
Change-Id: I4e7479cce87fc576796b49eaa9c0b7fbeb65315c
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
Tizen.NUI/src/public/BaseComponents/View.cs
Tizen.NUI/src/public/Property.cs
Tizen.NUI/src/public/UIComponents/ProgressBar.cs [moved from Tizen.NUI/src/public/ProgressBar.cs with 100% similarity]
Tizen.NUI/src/public/UIComponents/PushButton.cs
Tizen.NUI/src/public/Window.cs

index 3e1ea1a..3875e18 100755 (executable)
@@ -1772,7 +1772,7 @@ namespace Tizen.NUI.BaseComponents
         /// <remarks>
         /// Readonly.
         /// </remarks>
-        internal Vector3 NaturalSize
+        public Vector3 NaturalSize
         {
             get
             {
@@ -3589,7 +3589,7 @@ namespace Tizen.NUI.BaseComponents
 
             }
         }
-        public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelRolled
+        public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelMoved
         {
             add
             {
index 7f61663..9abbc3e 100755 (executable)
@@ -904,6 +904,18 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Retrieves the key at the specified position.
+        /// </summary>
+        /// <param name="position">The specified position</param>
+        /// <returns>A reference to the key at the specified position</returns>
+        public string GetKey(uint position)
+        {
+            string ret = NDalicPINVOKE.Property_Map_GetKey(swigCPtr, position);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
         /// Retrieve the key at the specified position.
         /// </summary>
         /// <param name="position">The specified position</param>
@@ -920,7 +932,20 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="key">The key to find</param>
         /// <returns>The value if it exists, an empty object otherwise</returns>
-        internal PropertyValue Find(int key)
+        public PropertyValue Find(string key)
+        {
+            global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_0(swigCPtr, key);
+            PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Finds the value for the specified key if it exists.
+        /// </summary>
+        /// <param name="key">The key to find</param>
+        /// <returns>The value if it exists, an empty object otherwise</returns>
+        public PropertyValue Find(int key)
         {
             global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_2(swigCPtr, key);
             PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
@@ -943,6 +968,34 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Finds the value for the specified key if it exists and its type is type.
+        /// </summary>
+        /// <param name="key">The key to find</param>
+        /// <param name="type">The type to check</param>
+        /// <returns>The value if it exists, an empty value otherwise</returns>
+        public PropertyValue Find(string key, PropertyType type)
+        {
+            global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_4(swigCPtr, key, (int)type);
+            PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Finds the value for the specified key if it exists and its type is type.
+        /// </summary>
+        /// <param name="key">The key to find</param>
+        /// <param name="type">The type to check</param>
+        /// <returns>The value if it exists, an empty value otherwise</returns>
+        public PropertyValue Find(int key, PropertyType type)
+        {
+            global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_5(swigCPtr, key, (int)type);
+            PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
         /// Clears the map.
         /// </summary>
         public void Clear()
index c6ec224..db79869 100755 (executable)
@@ -56,7 +56,7 @@ namespace Tizen.NUI.UIComponents
                 return;
             }
 
-            if(type == DisposeTypes.Explicit)
+            if (type == DisposeTypes.Explicit)
             {
                 //Called by User
                 //Release your own managed resources here.
@@ -99,18 +99,234 @@ namespace Tizen.NUI.UIComponents
 
         }
 
-        /// <summary>
-        /// Downcasts a handle to PushButton handle.<br>
-        /// If handle points to a PushButton, the downcast produces valid handle.<br>
-        /// If not the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>handle to a PushButton or an uninitialized handle</returns>
-        internal new static PushButton DownCast(BaseHandle handle)
-        {
-            PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-    }
+        internal PushButton(PushButton pushButton) : this(NDalicPINVOKE.new_PushButton__SWIG_1(PushButton.getCPtr(pushButton)), true)\r
+        {\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal PushButton Assign(PushButton pushButton)\r
+        {\r
+            PushButton ret = new PushButton(NDalicPINVOKE.PushButton_Assign(swigCPtr, PushButton.getCPtr(pushButton)), false);\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+            return ret;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Downcasts a handle to PushButton handle.<br>\r
+        /// If handle points to a PushButton, the downcast produces valid handle.<br>\r
+        /// If not the returned handle is left uninitialized.<br>\r
+        /// </summary>\r
+        /// <param name="handle">Handle to an object</param>\r
+        /// <returns>handle to a PushButton or an uninitialized handle</returns>\r
+        internal new static PushButton DownCast(BaseHandle handle)\r
+        {\r
+            PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true);\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+            return ret;\r
+        }\r
+\r
+        internal new void SetButtonImage(Image image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetButtonImage__SWIG_0_0(swigCPtr, Image.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal void SetButtonImage(View image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetButtonImage__SWIG_1(swigCPtr, View.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal void SetBackgroundImage(View image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetBackgroundImage(swigCPtr, View.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal new void SetSelectedImage(Image image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetSelectedImage__SWIG_0_0(swigCPtr, Image.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal void SetSelectedImage(View image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetSelectedImage__SWIG_1(swigCPtr, View.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal void SetSelectedBackgroundImage(View image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetSelectedBackgroundImage(swigCPtr, View.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal void SetDisabledBackgroundImage(View image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetDisabledBackgroundImage(swigCPtr, View.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal void SetDisabledImage(View image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetDisabledImage(swigCPtr, View.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal void SetDisabledSelectedImage(View image)\r
+        {\r
+            NDalicPINVOKE.PushButton_SetDisabledSelectedImage(swigCPtr, View.getCPtr(image));\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        internal enum PropertyRange\r
+        {\r
+            PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,\r
+            PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000\r
+        }\r
+\r
+        /// <summary>\r
+        /// Sets the unselected button image.\r
+        /// </summary>\r
+        public string UnselectedIcon\r
+        {\r
+            set\r
+            {\r
+                SetProperty(PushButton.Property.UNSELECTED_ICON, new Tizen.NUI.PropertyValue(value));\r
+            }\r
+        }\r
+        /// <summary>\r
+        /// Sets the selected button image.\r
+        /// </summary>\r
+        public string SelectedIcon\r
+        {\r
+            set\r
+            {\r
+                SetProperty(PushButton.Property.SELECTED_ICON, new Tizen.NUI.PropertyValue(value));\r
+            }\r
+        }\r
+        /// <summary>\r
+        /// Sets the icon alignment.\r
+        /// </summary>\r
+        public IconAlignmentType IconAlignment\r
+        {\r
+            get\r
+            {\r
+                string temp;\r
+                if (GetProperty(PushButton.Property.ICON_ALIGNMENT).Get(out temp) == false)\r
+                {\r
+#if DEBUG_ON\r
+                    Tizen.Log.Error("NUI", "IconAlignment get error!");\r
+#endif\r
+                }\r
+                switch (temp)\r
+                {\r
+                    case "LEFT":\r
+                        return IconAlignmentType.Left;\r
+                    case "RIGHT":\r
+                        return IconAlignmentType.Right;\r
+                    case "TOP":\r
+                        return IconAlignmentType.Top;\r
+                    case "BOTTOM":\r
+                        return IconAlignmentType.Bottom;\r
+                    default:\r
+                        return IconAlignmentType.Default;\r
+                }\r
+            }\r
+            set\r
+            {\r
+                string valueToString = "";\r
+                switch (value)\r
+                {\r
+                    case IconAlignmentType.Left:\r
+                        {\r
+                            valueToString = "LEFT";\r
+                            break;\r
+                        }\r
+                    case IconAlignmentType.Right:\r
+                        {\r
+                            valueToString = "RIGHT";\r
+                            break;\r
+                        }\r
+                    case IconAlignmentType.Top:\r
+                        {\r
+                            valueToString = "TOP";\r
+                            break;\r
+                        }\r
+                    case IconAlignmentType.Bottom:\r
+                        {\r
+                            valueToString = "BOTTOM";\r
+                            break;\r
+                        }\r
+                    default:\r
+                        {\r
+                            valueToString = "DEFAULT";\r
+                            break;\r
+                        }\r
+                }\r
+                SetProperty(PushButton.Property.ICON_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));\r
+            }\r
+        }\r
+        /// <summary>\r
+        /// Sets the label padding value.\r
+        /// </summary>\r
+        public Vector4 LabelPadding\r
+        {\r
+            get\r
+            {\r
+                Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);\r
+                GetProperty(PushButton.Property.LABEL_PADDING).Get(temp);\r
+                return temp;\r
+            }\r
+            set\r
+            {\r
+                SetProperty(PushButton.Property.LABEL_PADDING, new Tizen.NUI.PropertyValue(value));\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Sets the icon padding value.\r
+        /// </summary>\r
+        public Vector4 IconPadding\r
+        {\r
+            get\r
+            {\r
+                Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);\r
+                GetProperty(PushButton.Property.ICON_PADDING).Get(temp);\r
+                return temp;\r
+            }\r
+            set\r
+            {\r
+                SetProperty(PushButton.Property.ICON_PADDING, new Tizen.NUI.PropertyValue(value));\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Enumeration for the alignment modes of the icon.\r
+        /// </summary>\r
+        public enum IconAlignmentType\r
+        {\r
+            /// <summary>\r
+            /// Icon located to the left of text.\r
+            /// </summary>\r
+            Left,\r
+            /// <summary>\r
+            /// Icon located to the right of text.\r
+            /// </summary>\r
+            Right,\r
+            /// <summary>\r
+            /// Icon located to the top of text.\r
+            /// </summary>\r
+            Top,\r
+            /// <summary>\r
+            /// Icon located to the bottom of text.\r
+            /// </summary>\r
+            Bottom,\r
+            /// <summary>\r
+            /// Icon located to the right of text by default.\r
+            /// </summary>\r
+            Default = Right\r
+        }\r
+\r
+    }\r
 }
index 866720e..f9490ef 100755 (executable)
@@ -863,7 +863,7 @@ namespace Tizen.NUI
         /// then when the last finger is lifted.<br>
         /// An interrupted event will also be emitted (if it occurs).<br>
         /// </summary>
-        public event EventHandler<TouchEventArgs> Touched
+        public event EventHandler<TouchEventArgs> Touch
         {
             add
             {
@@ -931,7 +931,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Event emitted when wheel event is received.
         /// </summary>
-        public event EventHandler<WheelEventArgs> WheelRolled
+        public event EventHandler<WheelEventArgs> WheelRoll
         {
             add
             {
@@ -996,7 +996,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Event emitted when key event is received.
         /// </summary>
-        public event EventHandler<KeyEventArgs> KeyEvent
+        public event EventHandler<KeyEventArgs> Key
         {
             add
             {