/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
/// <summary>
/// Enumeration for the focus direction.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public enum FocusDirection
{
/// <summary>
- /// Previous direction
+ /// Previous direction.
/// </summary>
Previous,
/// <summary>
- /// Next direction
+ /// Next direction.
/// </summary>
Next,
/// <summary>
- /// Up direction
+ /// Up direction.
/// </summary>
Up,
/// <summary>
- /// Down direction
+ /// Down direction.
/// </summary>
Down,
/// <summary>
- /// Right direction
+ /// Right direction.
/// </summary>
Right,
/// <summary>
- /// Left direction
+ /// Left direction.
/// </summary>
Left
}
/// <summary>
- /// The Widget is abstract class, it is the parent of other widgets.
+ /// The Widget is an abstract class and the parent of other widgets.
/// Inherits from <see cref="EvasObject"/>.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public abstract class Widget : AccessibleObject
{
Dictionary<string, EvasObject> _partContents = new Dictionary<string, EvasObject>();
internal Color _backgroundColor = Color.Default;
internal int _opacity = Color.Default.A;
+ /// <summary>
+ /// Creates and initializes a new instance of the Widget class.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
protected Widget()
{
}
/// <summary>
/// Creates and initializes a new instance of the Widget class.
/// </summary>
- /// <param name="parent">The parent of new Widget instance</param>
+ /// <param name="parent">The parent of the new Widget instance.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
protected Widget(EvasObject parent) : base(parent)
{
- _focused = new SmartEvent(this, "focused");
- _focused.On += (s, e) => Focused?.Invoke(this, EventArgs.Empty);
-
- _unfocused = new SmartEvent(this, "unfocused");
- _unfocused.On += (s, e) => Unfocused?.Invoke(this, EventArgs.Empty);
}
/// <summary>
- /// Update the part contents
+ /// Updates the part contents.
/// </summary>
- /// <param name="content">The content which put to the part</param>
- /// <param name="part">The updated part</param>
+ /// <param name="content">The content which is put into the part.</param>
+ /// <param name="part">The updated part.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
protected void UpdatePartContents(EvasObject content, string part = "__default__")
{
_partContents[part] = content;
/// <summary>
/// Focused will be triggered when the widget is focused.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler Focused;
/// <summary>
/// Unfocused will be triggered when the widget is unfocused.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler Unfocused;
/// <summary>
/// Sets or gets the state of the widget, which might be enabled or disabled.
/// </summary>
- public bool IsEnabled
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
+ public virtual bool IsEnabled
{
get
{
/// <summary>
/// Sets or gets the style of the widget.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public string Style
{
get
/// <summary>
/// Gets whether this widget is focused.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public bool IsFocused
{
get
/// <summary>
/// Gets whether a widget is focusable or not.
/// </summary>
- /// <remarks>Widgets which are meant to be interacted with by input events are created able to be focused, by default</remarks>
+ /// <remarks>Widgets which are meant to be interacted with by input events, are created able to be focused by default.</remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public bool IsFocusAllowed
{
get
/// <summary>
/// Sets or gets the text of the widget.
/// </summary>
- /// <remarks>It could be override by special child class</remarks>
+ /// <remarks>It could be overridden by special child class.</remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual string Text
{
get
/// <summary>
/// Sets or gets the background color of the widget.
/// </summary>
- /// <remarks>It could be override by special child class</remarks>
+ /// <remarks>It could be overridden by special child class.</remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual Color BackgroundColor
{
get
/// <summary>
/// Sets or gets the opacity of the widget.
/// </summary>
- /// <remarks>It could be override by special child class</remarks>
+ /// <remarks>It could be overridden by special child class.</remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual int Opacity
{
get
/// <summary>
/// Sets or gets whether a widget and its children are focusable or not.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public bool AllowTreeFocus
{
get
/// <summary>
/// Sets or gets the widget's mirrored mode.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public bool IsMirroredMode
{
get
/// <summary>
/// Sets or gets the widget's mirrored mode setting.
- /// When widget set automatic mode(true), it follows the system mirrored mode.
+ /// When widget is set to automatic mode(true), it follows the system mirrored mode.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public bool IsAutoMirroredMode
{
get
/// <summary>
/// Sets the widget to be focused or not.
/// </summary>
- /// <param name="isFocus">Weather be focused</param>
+ /// <param name="isFocus">Whether be focused.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void SetFocus(bool isFocus)
{
- Interop.Elementary.elm_object_focus_set(RealHandle, isFocus);
+ if (isFocus)
+ {
+ Interop.Elementary.elm_object_focus_set(RealHandle, isFocus);
+ }
+ else
+ {
+ Interop.Elementary.elm_object_focused_clear(RealHandle);
+ }
}
/// <summary>
/// Sets the ability for a widget to be focused.
/// </summary>
- /// <param name="isAllowFocus">True if the object can be focused, false if not(and on errors)</param>
+ /// <param name="isAllowFocus">true if the object can be focused, false if not(and on errors).</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void AllowFocus(bool isAllowFocus)
{
Interop.Elementary.elm_object_focus_allow_set(RealHandle, isAllowFocus);
}
/// <summary>
- /// Gives focus to next widget in widget tree.
+ /// Gives focus to the next widget in the widget tree.
/// </summary>
- /// <param name="direction">Direction to move the focus</param>
+ /// <param name="direction">Direction to move the focus.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void FocusNext(FocusDirection direction)
{
Interop.Elementary.elm_object_focus_next(RealHandle, (int)direction);
}
/// <summary>
- /// Set next widget with specific focus direction.
+ /// Sets the next widget with specific focus direction.
/// </summary>
- /// <param name="next">Focus next widget</param>
- /// <param name="direction">Focus direction</param>
+ /// <param name="next">Focus next widget.</param>
+ /// <param name="direction">Focus direction.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void SetNextFocusObject(EvasObject next, FocusDirection direction)
{
- Interop.Elementary.elm_object_focus_next_object_set(RealHandle, next.RealHandle, (int)direction);
+ Interop.Elementary.elm_object_focus_next_object_set(RealHandle, next?.RealHandle ?? IntPtr.Zero, (int)direction);
}
/// <summary>
- /// Sets content to particular part of the widget, and the preserve old content will not be unset.
+ /// Sets content to the particular part of the widget, and the preserve old content will be deleted.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <param name="content">The content</param>
+ /// <param name="part">The name of the particular part.</param>
+ /// <param name="content">The content.</param>
/// <seealso cref="SetPartContent(string, EvasObject, bool)"/>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual bool SetPartContent(string part, EvasObject content)
{
return SetPartContent(part, content, false);
}
/// <summary>
- /// Sets content to particular part of the widget.
+ /// Sets content to the particular part of the widget.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <param name="content">The content</param>
- /// <param name="preserveOldContent">true, preserve old content will be unset. false, preserve old content will not be unset.</param>
+ /// <param name="part">The name of the particular part.</param>
+ /// <param name="content">The content.</param>
+ /// <param name="preserveOldContent">true, preserve old content will be unset and not be deleted. false, preserve old content will be deleted.</param>
/// <seealso cref="SetPartContent(string, EvasObject)"/>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual bool SetPartContent(string part, EvasObject content, bool preserveOldContent)
{
if (preserveOldContent)
}
/// <summary>
- /// Sets content to the widget, and the preserve old content will not be unset.
+ /// Sets content to the widget, and the preserve old content will be deleted.
/// </summary>
- /// <param name="content">The content</param>
+ /// <param name="content">The content.</param>
/// <seealso cref="SetContent(EvasObject, bool)"/>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void SetContent(EvasObject content)
{
SetContent(content, false);
}
/// <summary>
- /// Sets content the widget.
+ /// Sets content to the widget.
/// </summary>
- /// <param name="content">The content</param>
- /// <param name="preserveOldContent">true, preserve old content will be unset. false, preserve old content will not be unset.</param>
+ /// <param name="content">The content.</param>
+ /// <param name="preserveOldContent">true, preserve old content will be unset and not be deleted. false, preserve old content will be deleted.</param>
/// <seealso cref="SetContent(EvasObject)"/>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void SetContent(EvasObject content, bool preserveOldContent)
{
if (preserveOldContent)
}
/// <summary>
- /// Sets text to particular part of the widget.
+ /// Sets text to the particular part of the widget.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <param name="text">The text</param>
+ /// <param name="part">The name of the particular part.</param>
+ /// <param name="text">The text.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual bool SetPartText(string part, string text)
{
Interop.Elementary.elm_object_part_text_set(RealHandle, part, text);
/// <summary>
/// Gets text of a particular part of the widget.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <returns>Text of the particular part of the widget</returns>
+ /// <param name="part">The name of the particular part.</param>
+ /// <returns>Text of the particular part of the widget.</returns>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual string GetPartText(string part)
{
return Interop.Elementary.elm_object_part_text_get(RealHandle, part);
/// <summary>
/// Sets color of a particular part of the widget.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <param name="color">The color be set to widget</param>
- /// <remarks>This method is a virtual method, it could be override by special child class</remarks>
+ /// <param name="part">The name of the particular part.</param>
+ /// <param name="color">The color to be set to the widget.</param>
+ /// <remarks>This method is a virtual method, it could be overridden by special child class.</remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual void SetPartColor(string part, Color color)
{
Interop.Elementary.elm_object_color_class_color_set(RealHandle, part, color.R * color.A / 255,
/// <summary>
/// Gets color of the particular part of the widget.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <returns>The color of the particular part</returns>
- /// <remarks>This method is a virtual method, it could be override by special child class</remarks>
+ /// <param name="part">The name of the particular part.</param>
+ /// <returns>The color of the particular part.</returns>
+ /// <remarks>This method is a virtual method, it could be overridden by special child class.</remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public virtual Color GetPartColor(string part)
{
int r, g, b, a;
/// <summary>
/// Sets opacity of the particular part of the widget.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <param name="opacity">The opacity of the particular part</param>
+ /// <param name="part">The name of the particular part.</param>
+ /// <param name="opacity">The opacity of the particular part.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void SetPartOpacity(string part, int opacity)
{
Interop.Elementary.elm_object_color_class_color_set(Handle, part, 255, 255, 255, opacity);
/// <summary>
/// Gets opacity of the particular part of the widget.
/// </summary>
- /// <param name="part">The name of particular part</param>
- /// <returns>Opacity value of the particular part</returns>
+ /// <param name="part">The name of the particular part.</param>
+ /// <returns>Opacity value of the particular part.</returns>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public int GetPartOpacity(string part)
{
int r, g, b, a;
return a;
}
+ /// <summary>
+ /// Sends a signal to the edje object of the widget.
+ /// </summary>
+ /// <param name="emission">The signal's name.</param>
+ /// <param name="source">The signal's source.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
+ public void SignalEmit(string emission, string source)
+ {
+ Interop.Elementary.elm_object_signal_emit(Handle, emission, source);
+ }
+
+ /// <summary>
+ /// The callback of the Realized event.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
+ protected override void OnRealized()
+ {
+ base.OnRealized();
+ _focused = new SmartEvent(this, "focused");
+ _focused.On += (s, e) => Focused?.Invoke(this, EventArgs.Empty);
+
+ _unfocused = new SmartEvent(this, "unfocused");
+ _unfocused.On += (s, e) => Unfocused?.Invoke(this, EventArgs.Empty);
+ }
+
internal IntPtr GetPartContent(string part)
{
return Interop.Elementary.elm_object_part_content_get(RealHandle, part);
}
}
-}
\ No newline at end of file
+}