namespace ElmSharp
{
/// <summary>
- /// The Button is a widget works as a clickable input element to trigger events.
+ /// The Button is a widget that works as a clickable input element to trigger events.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public class Button : Layout
{
private SmartEvent _clicked;
/// <param name="parent">
/// The EvasObject to which the new Button will be attached as a child.
/// </param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public Button(EvasObject parent) : base(parent)
{
_clicked = new SmartEvent(this, this.RealHandle, "clicked");
}
/// <summary>
- /// Clicked will be triggered when Button is clicked.
+ /// Clicked will be triggered when the button is clicked.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler Clicked;
/// <summary>
- /// Repeated will be triggered when Button is pressed without releasing it.
+ /// Repeated will be triggered when the button is pressed without releasing it.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler Repeated;
/// <summary>
- /// Pressed will be triggered when the Button is pressed.
+ /// Pressed will be triggered when the button is pressed.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler Pressed;
/// <summary>
- /// Released will be triggered when the Button is released after being pressed.
+ /// Released will be triggered when the button is released after being pressed.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler Released;
/// <summary>
- /// Sets or gets the autorepeat feature of a given Button.
+ /// Sets or gets the autorepeat feature of a given Bbutton.
/// </summary>
/// <remarks>
- /// Autorepeat feature means autorepeat event generated when the button is kept pressed.
- /// When set AutoRepeat to false, no autorepeat is performed and buttons will trigger Clicked event when they are clicked.
- /// When set to true, keeping a button pressed continuously trigger Repeated event until the button is released.
- /// The time it takes until it starts triggering Repeated is given by AutoRepeatInitialTime,
+ /// Autorepeat feature means the autorepeat event is generated when the button is kept pressed.
+ /// When set to false, no autorepeat is performed and the buttons will trigger the Clicked event when they are clicked.
+ /// When set to true, keeping a button pressed continuously will trigger the Repeated event until the button is released.
+ /// The time it takes until it starts triggering, repeated is given by AutoRepeatInitialTime,
/// and the time between each new emission is given by AutoRepeatGapTimeout.
/// </remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public bool AutoRepeat
{
get
{
- return !Interop.Elementary.elm_button_autorepeat_get(RealHandle);
+ return Interop.Elementary.elm_button_autorepeat_get(RealHandle);
}
set
{
/// <summary>
/// Sets or gets the initial timeout before the Repeat event is generated.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public double AutoRepeatInitialTime
{
get
/// <summary>
/// Sets or gets the interval between each generated Repeat event.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public double AutoRepeatGapTimeout
{
get
}
}
+ /// <summary>
+ /// Deletes the object Color class.
+ /// </summary>
+ /// <param name="part">The Color class to be deleted.</param>
+ /// <since_tizen> preview </since_tizen>
[Obsolete("DeleteColorClass is obsolete, please use EdjeObject.DeleteColorClass(string)")]
public void DeleteColorClass(string part)
{
}
/// <summary>
- /// Sets or gets the BackgroundColor of a given Button in normal and pressed status.
+ /// Sets or gets the BackgroundColor of a given button in the normal and pressed status.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public override Color BackgroundColor
{
set
{
EdjeObject.DeleteColorClass("button/bg");
EdjeObject.DeleteColorClass("button/bg_pressed");
+ EdjeObject.DeleteColorClass("button/bg_disabled");
}
else
{
SetPartColor("bg", value);
SetPartColor("bg_pressed", value);
+ SetPartColor("bg_disabled", value);
}
_backgroundColor = value;
}
}
+ /// <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);
- Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
-
- RealHandle = Interop.Elementary.elm_button_add(handle);
- Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
-
- return handle;
+ return Interop.Elementary.elm_button_add(parent.Handle);
}
}
}