[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Toolbar.cs
index 0370594..2a12385 100644 (file)
@@ -20,8 +20,10 @@ using System.ComponentModel;
 namespace ElmSharp
 {
     /// <summary>
-    /// Enumeration for the selection mode of Toolbar.
+    /// Enumeration for the selection mode of the toolbar.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public enum ToolbarSelectionMode
     {
         /// <summary>
@@ -46,12 +48,14 @@ namespace ElmSharp
     }
 
     /// <summary>
-    /// Enumeration that sets the toolbar items display behavior, it can be scrollable, can show a menu with exceeding items, or simply hide them.
+    /// Enumeration for setting the toolbar items display behavior, it can be scrollable, can show a menu with exceeding items, or simply hide them.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public enum ToolbarShrinkMode
     {
         /// <summary>
-        /// Sets minimum toolbar size to fit all the items.
+        /// Sets the minimum toolbar size to fit all the items.
         /// </summary>
         None = 0,
 
@@ -66,7 +70,7 @@ namespace ElmSharp
         Scroll,
 
         /// <summary>
-        /// Inserts a button to pop up a menu with exceeding items.
+        /// Inserts a button to popup a menu with exceeding items.
         /// </summary>
         Menu,
 
@@ -77,27 +81,29 @@ namespace ElmSharp
     }
 
     /// <summary>
-    /// Enumeration for the icon lookup order of Toolbar.
+    /// Enumeration for the icon lookup order of the toolbar.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public enum ToolbarIconLookupOrder
     {
         /// <summary>
-        /// Icon look up order: freedesktop, theme.
+        /// Icon lookup order: freedesktop, theme.
         /// </summary>
         FreedesktopTheme,
 
         /// <summary>
-        /// Icon look up order: theme, freedesktop.
+        /// Icon lookup order: theme, freedesktop.
         /// </summary>
         ThemeFreedesktop,
 
         /// <summary>
-        /// Icon look up order: freedesktop.
+        /// Icon lookup order: freedesktop.
         /// </summary>
         Freedesktop,
 
         /// <summary>
-        /// Icon look up order: theme.
+        /// Icon lookup order: theme.
         /// </summary>
         Theme,
     }
@@ -108,23 +114,29 @@ namespace ElmSharp
     /// <remarks>
     /// Inherits EventArgs.
     /// </remarks>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class ToolbarItemEventArgs : EventArgs
     {
         /// <summary>
         /// Gets the ToolbarItem.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem Item { get; private set; }
 
         internal static ToolbarItemEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
         {
             ToolbarItem item = ItemObject.GetItemByHandle(info) as ToolbarItem;
-            return new ToolbarItemEventArgs() { Item = item };
+            return new ToolbarItemEventArgs { Item = item };
         }
     }
 
     /// <summary>
     /// The Toolbar is a widget that displays a list of items inside a box.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class Toolbar : Widget
     {
         SmartEvent<ToolbarItemEventArgs> _clicked;
@@ -137,6 +149,8 @@ namespace ElmSharp
         /// <param name="parent">
         /// A EvasObject to which the new Table instance will be attached.
         /// </param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Toolbar(EvasObject parent) : base(parent)
         {
             _selected = new SmartEvent<ToolbarItemEventArgs>(this, this.RealHandle, "selected", ToolbarItemEventArgs.CreateFromSmartEvent);
@@ -161,14 +175,18 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Selected will be triggered when toolbar have been selected.
+        /// Selected will be triggered when toolbar has been selected.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler<ToolbarItemEventArgs> Selected;
 
         /// <summary>
         /// Sets or gets whether the layout of this toolbar is homogeneous.
         /// </summary>
-        /// <remarks>True for homogeneous, False for no homogeneous</remarks>
+        /// <remarks>True for homogeneous, False for no homogeneous.</remarks>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool Homogeneous
         {
             get
@@ -184,6 +202,8 @@ namespace ElmSharp
         /// <summary>
         /// Sets or gets the slection mode of a given Toolbar widget.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarSelectionMode SelectionMode
         {
             get
@@ -199,6 +219,8 @@ namespace ElmSharp
         /// <summary>
         /// Sets or gets the shrink mode of a given Toolbar widget.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarShrinkMode ShrinkMode
         {
             get
@@ -211,6 +233,11 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Sets or gets the toolbar's current orientation.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool IsHorizontal
         {
@@ -229,6 +256,8 @@ namespace ElmSharp
         /// The default lookup order is ToolbarIocnLookupOrder.ThemeFreedesktop.
         /// Icons added before calling this function will not be affected.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarIconLookupOrder IconLookupOrder
         {
             get
@@ -245,6 +274,8 @@ namespace ElmSharp
         /// Sets or gets the icon size of a given toolbar widget.
         /// Default value is 32 pixels, to be used by toolbar items.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int IconSize
         {
             get
@@ -258,8 +289,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets the number of items in a toolbar widget.
+        /// Gets the number of items in a Toolbar widget.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int ItemsCount
         {
             get
@@ -271,7 +304,9 @@ namespace ElmSharp
         /// <summary>
         /// Sets or gets the alignment of the items.
         /// </summary>
-        /// <remarks>The toolbar items alignment, a float between 0.0 and 1.0</remarks>
+        /// <remarks>The toolbar items alignment, a float between 0.0 and 1.0.</remarks>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public double ItemAlignment
         {
             get
@@ -285,12 +320,14 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Sets or gets the item's transverse expansion of a given toolbar widget.
+        /// Sets or gets the item's transverse expansion of a given Toolbar widget.
         /// </summary>
         /// <remarks>
         /// The transverse expansion of the item, true for on and false for off.
         /// By default it's false.
         /// </remarks>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool TransverseExpansion
         {
             get
@@ -304,58 +341,66 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Appends ToolbarItem which just contains label to the toolbar.
+        /// Appends the ToolbarItem, which just contains label to the toolbar.
         /// </summary>
-        /// <param name="label">The label of the item</param>
-        /// <returns>The new ToolbarItem which appended to the toolbar</returns>
+        /// <param name="label">The label of the item.</param>
+        /// <returns>The new ToolbarItem which is appended to the toolbar.</returns>
         /// <seealso cref="Append(string, string)"/>
         /// <seealso cref="Prepend(string)"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem Append(string label)
         {
             return Append(label, null);
         }
 
         /// <summary>
-        /// Appends ToolbarItem which contains label and icon to the toolbar.
+        /// Appends the ToolbarItem, which contains label and icon to the toolbar.
         /// </summary>
-        /// <param name="label">The label of the item</param>
-        /// <param name="icon">A string with the icon name or the absolute path of an image file</param>
-        /// <returns>The new ToolbarItem which appended to the toolbar</returns>
+        /// <param name="label">The label of the item.</param>
+        /// <param name="icon">A string with the icon name or the absolute path of an image file.</param>
+        /// <returns>The new ToolbarItem which is appended to the toolbar.</returns>
         /// <seealso cref="Append(string)"/>
         /// <seealso cref="Prepend(string)"/>
         /// <seealso cref="Prepend(string, string)"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem Append(string label, string icon)
         {
-            ToolbarItem item = new ToolbarItem(label, icon);
+            ToolbarItem item = new ToolbarItem(label, icon, this);
             item.Handle = Interop.Elementary.elm_toolbar_item_append(RealHandle, icon, label, null, (IntPtr)item.Id);
             return item;
         }
 
         /// <summary>
-        /// Prepends ToolbarItem which just contains label to the toolbar.
+        /// Prepends the ToolbarItem, which just contains label to the toolbar.
         /// </summary>
-        /// <param name="label">The label of the item</param>
-        /// <returns>The new ToolbarItem which prepended to the toolbar</returns>
+        /// <param name="label">The label of the item.</param>
+        /// <returns>The new ToolbarItem which is prepended to the toolbar.</returns>
         /// <seealso cref="Append(string)"/>
         /// <seealso cref="Append(string, string)"/>
         /// <seealso cref="Prepend(string, string)"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem Prepend(string label)
         {
             return Prepend(label, null);
         }
 
         /// <summary>
-        /// Prepends ToolbarItem which contains label and icon to the toolbar.
+        /// Prepends the ToolbarItem, which contains label and icon to the toolbar.
         /// </summary>
-        /// <param name="label">The label of the item</param>
-        /// <param name="icon">A string with the icon name or the absolute path of an image file</param>
-        /// <returns>The new <see cref="ToolbarItem"/> which prepended to the toolbar</returns>
+        /// <param name="label">The label of the item.</param>
+        /// <param name="icon">A string with the icon name or the absolute path of an image file.</param>
+        /// <returns>The new <see cref="ToolbarItem"/> which is prepended to the toolbar.</returns>
         /// <seealso cref="Append(string)"/>
         /// <seealso cref="Append(string, string)"/>
         /// <seealso cref="Prepend(string)"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem Prepend(string label, string icon)
         {
-            ToolbarItem item = new ToolbarItem(label, icon);
+            ToolbarItem item = new ToolbarItem(label, icon, this);
             item.Handle = Interop.Elementary.elm_toolbar_item_prepend(RealHandle, icon, label, null, (IntPtr)item.Id);
             return item;
         }
@@ -363,10 +408,12 @@ namespace ElmSharp
         /// <summary>
         /// Inserts a new item which just contains label into the toolbar object before item <paramref name="before"/>.
         /// </summary>
-        /// <param name="before">The toolbar item to insert before</param>
-        /// <param name="label">The label of the item</param>
-        /// <returns>The new <see cref="ToolbarItem"/> which insert into the toolbar</returns>
+        /// <param name="before">The toolbar item to insert before.</param>
+        /// <param name="label">The label of the item.</param>
+        /// <returns>The new <see cref="ToolbarItem"/> which is inserted into the toolbar.</returns>
         /// <seealso cref="InsertBefore(ToolbarItem, string, string)"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem InsertBefore(ToolbarItem before, string label)
         {
             return InsertBefore(before, label, string.Empty);
@@ -375,14 +422,16 @@ namespace ElmSharp
         /// <summary>
         /// Inserts a new item which contains label and icon into the toolbar object before item <paramref name="before"/>.
         /// </summary>
-        /// <param name="before">The toolbar item to insert before</param>
-        /// <param name="label">The label of the item</param>
-        /// <param name="icon">A string with the icon name or the absolute path of an image file</param>
-        /// <returns>The new <see cref="ToolbarItem"/> which insert into the toolbar</returns>
+        /// <param name="before">The toolbar item to insert before.</param>
+        /// <param name="label">The label of the item.</param>
+        /// <param name="icon">A string with the icon name or the absolute path of an image file.</param>
+        /// <returns>The new <see cref="ToolbarItem"/> which is inserted into the toolbar.</returns>
         /// <seealso cref="InsertBefore(ToolbarItem, string)"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem InsertBefore(ToolbarItem before, string label, string icon)
         {
-            ToolbarItem item = new ToolbarItem(label, icon);
+            ToolbarItem item = new ToolbarItem(label, icon, this);
             item.Handle = Interop.Elementary.elm_toolbar_item_insert_before(RealHandle, before, icon, label, null, (IntPtr)item.Id);
             return item;
         }
@@ -390,23 +439,26 @@ namespace ElmSharp
         /// <summary>
         /// Inserts a new item which contains label and icon into the toolbar object after item <paramref name="after"/>.
         /// </summary>
-        /// <param name="after">The toolbar item to insert after</param>
-        /// <param name="label">The label of the item</param>
-        /// <param name="icon">A string with the icon name or the absolute path of an image file</param>
-        /// <returns>The new <see cref="ToolbarItem"/> which insert into the toolbar</returns>
-        /// <seealso cref="InsertAfter(ToolbarItem, string)"/>
+        /// <param name="after">The toolbar item to insert after.</param>
+        /// <param name="label">The label of the item.</param>
+        /// <param name="icon">A string with the icon name or the absolute path of an image file.</param>
+        /// <returns>The new <see cref="ToolbarItem"/> which is inserted into the toolbar.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem InsertAfter(ToolbarItem after, string label, string icon)
         {
-            ToolbarItem item = new ToolbarItem(label, icon);
+            ToolbarItem item = new ToolbarItem(label, icon, this);
             item.Handle = Interop.Elementary.elm_toolbar_item_insert_after(RealHandle, after, icon, label, null, (IntPtr)item.Id);
             return item;
         }
 
         /// <summary>
-        /// Find the item with that label in the toolbar.
+        /// Finds the item with that label in the toolbar.
         /// </summary>
-        /// <param name="label">The label of the item</param>
-        /// <returns>The <see cref="ToolbarItem"/> into the toolbar</returns>
+        /// <param name="label">The label of the item.</param>
+        /// <returns>The <see cref="ToolbarItem"/> into the toolbar.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem FindItemByLabel(string label)
         {
             IntPtr handle = Interop.Elementary.elm_toolbar_item_find_by_label(RealHandle, label);
@@ -416,6 +468,8 @@ namespace ElmSharp
         /// <summary>
         /// Gets the selected ToolbarItemItem of the toolbar.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem SelectedItem
         {
             get
@@ -428,6 +482,8 @@ namespace ElmSharp
         /// <summary>
         /// Gets the first ToolbarItemItem of the toolbar.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem FirstItem
         {
             get
@@ -440,6 +496,8 @@ namespace ElmSharp
         /// <summary>
         /// Gets the last ToolbarItemItem of the toolbar.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ToolbarItem LastItem
         {
             get
@@ -449,6 +507,13 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Creates a widget handle.
+        /// </summary>
+        /// <param name="parent">Parent EvasObject.</param>
+        /// <returns>Handle IntPtr.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         protected override IntPtr CreateHandle(EvasObject parent)
         {
             IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);