X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FElmSharp%2FElmSharp%2FContextPopup.cs;h=51c61f570ac7dcde1c1420dfaa04f1c5ba4d3742;hb=58283d6a09a7f531af61ae7b27b574603ef244df;hp=cb1fe2f330b9574690a531bd63353f2a822e8809;hpb=221f9623b7aa581a6547692983c62aa81b328de2;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
diff --git a/src/ElmSharp/ElmSharp/ContextPopup.cs b/src/ElmSharp/ElmSharp/ContextPopup.cs
index cb1fe2f..51c61f5 100644
--- a/src/ElmSharp/ElmSharp/ContextPopup.cs
+++ b/src/ElmSharp/ElmSharp/ContextPopup.cs
@@ -19,24 +19,57 @@ using System.Collections.Generic;
namespace ElmSharp
{
+ ///
+ /// Enumeration for the ContextPopup direction types.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public enum ContextPopupDirection
{
+ ///
+ /// The ContextPopup appears below the clicked area.
+ /// ///
Down,
+ ///
+ /// The ContextPopup appears to the right of the clicked area.
+ ///
Right,
+ ///
+ /// The ContextPopup appears to the left of the clicked area.
+ ///
Left,
+ ///
+ /// The ContextPopup appears above the clicked area.
+ ///
Up,
+ ///
+ /// The ContextPopup does not determine it's direction yet.
+ ///
Unknown
}
+ ///
+ /// It inherits .
+ /// The ContextPopup is a widget that when shown, pops up a list of items.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public class ContextPopup : Layout
{
HashSet _children = new HashSet();
SmartEvent _dismissed;
Interop.Evas.SmartCallback _onSelected;
+ ///
+ /// Creates and initializes a new instance of the ContextPopup class.
+ ///
+ /// The parent is a given container, which will be attached by ContextPopup
+ /// as a child. It's type.
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public ContextPopup(EvasObject parent) : base(parent)
{
- _dismissed = new SmartEvent(this, "dismissed");
+ _dismissed = new SmartEvent(this, this.RealHandle, "dismissed");
_dismissed.On += (sender, e) =>
{
Dismissed?.Invoke(this, EventArgs.Empty);
@@ -48,68 +81,195 @@ namespace ElmSharp
};
}
+ ///
+ /// Dismissed is raised when the ContextPopup item is dismissed.
+ ///
+ ///
+ /// Outside of ContextPopup is clicked or it's parent area is changed or the language is changed, and then ContextPopup is dismissed.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler Dismissed;
+ ///
+ /// Gets the current direction of a ContextPopup.
+ ///
+ ///
+ /// Once the ContextPopup shows up, the direction would be determined.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public ContextPopupDirection Direction
{
get
{
- return (ContextPopupDirection)Interop.Elementary.elm_ctxpopup_direction_get(Handle);
+ return (ContextPopupDirection)Interop.Elementary.elm_ctxpopup_direction_get(RealHandle);
}
}
+ ///
+ /// Gets or sets the value of the current ContextPopup object's orientation.
+ /// True for horizontal mode, False for vertical mode (or errors).
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public bool IsHorizontal
{
get
{
- return Interop.Elementary.elm_ctxpopup_horizontal_get(Handle);
+ return Interop.Elementary.elm_ctxpopup_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_ctxpopup_horizontal_set(Handle, value);
+ Interop.Elementary.elm_ctxpopup_horizontal_set(RealHandle, value);
}
}
+ ///
+ /// Gets or sets whether the ContextPopup hides automatically
+ /// or not when the parent of the ContextPopup is resized.
+ ///
+ ///
+ /// Default value of AutoHide is False.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public bool AutoHide
{
get
{
- return !Interop.Elementary.elm_ctxpopup_auto_hide_disabled_get(Handle);
+ return !Interop.Elementary.elm_ctxpopup_auto_hide_disabled_get(RealHandle);
}
set
{
- Interop.Elementary.elm_ctxpopup_auto_hide_disabled_set(Handle, !value);
+ Interop.Elementary.elm_ctxpopup_auto_hide_disabled_set(RealHandle, !value);
}
}
+ ///
+ /// Clears all the items in a given ContextPopup object.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
+ public void Clear()
+ {
+ Interop.Elementary.elm_ctxpopup_clear(Handle);
+ }
+
+ ///
+ /// Sets the direction priority of a ContextPopup.
+ ///
+ /// 1st priority of the direction.
+ /// 2nd priority of the direction.
+ /// 3th priority of the direction.
+ /// 4th priority of the direction.
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public void SetDirectionPriorty(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth)
{
- Interop.Elementary.elm_ctxpopup_direction_priority_set(Handle, (int)first, (int)second, (int)third, (int)fourth);
+ Interop.Elementary.elm_ctxpopup_direction_priority_set(RealHandle, (int)first, (int)second, (int)third, (int)fourth);
+ }
+
+ ///
+ /// Gets the direction priority of a ContextPopup.
+ ///
+ /// 1st priority of the direction to be returned.
+ /// 2nd priority of the direction to be returned.
+ /// 2nd priority of the direction to be returned.
+ /// 4th priority of the direction to be returned.
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
+ public void GetDirectionPriority(out ContextPopupDirection first, out ContextPopupDirection second, out ContextPopupDirection third, out ContextPopupDirection fourth)
+ {
+ int firstOut, secondOut, thirdOut, fourthOut;
+ Interop.Elementary.elm_ctxpopup_direction_priority_get(Handle, out firstOut, out secondOut, out thirdOut, out fourthOut);
+ first = (ContextPopupDirection)firstOut;
+ second = (ContextPopupDirection)secondOut;
+ third = (ContextPopupDirection)thirdOut;
+ fourth = (ContextPopupDirection)fourthOut;
}
+ ///
+ /// Adds a new item to a ContextPopup object with the label.
+ ///
+ /// Label of the new item.
+ ///
+ /// A ContextPopupItem added, or null on errors.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public ContextPopupItem Append(string label)
{
return Append(label, null);
}
+ ///
+ /// Adds a new item to a ContextPopup object with the label and icon.
+ ///
+ /// Label of the new item.
+ /// Icon to be set on the new item.
+ /// A ContextPopupItem added, or null on errors.
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public ContextPopupItem Append(string label, EvasObject icon)
{
- ContextPopupItem item = new ContextPopupItem(label, icon);
- item.Handle = Interop.Elementary.elm_ctxpopup_item_append(Handle, label, icon, _onSelected, (IntPtr)item.Id);
+ ContextPopupItem item = new ContextPopupItem(label, icon, this);
+ item.Handle = Interop.Elementary.elm_ctxpopup_item_append(RealHandle, label, icon, _onSelected, (IntPtr)item.Id);
AddInternal(item);
return item;
}
+ ///
+ /// Dismisses a ContextPopup object. The ContextPopup will be hidden and the "clicked" signal will be emitted.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
public void Dismiss()
{
- Interop.Elementary.elm_ctxpopup_dismiss(Handle);
+ Interop.Elementary.elm_ctxpopup_dismiss(RealHandle);
}
+ ///
+ /// Gets the possibility that the direction would be available.
+ ///
+ /// A direction that the user wants to check.
+ ///
+ /// Get false if you cannot put it in the direction. Get true if it's possible.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
+ /// [Obsolete("IsAvailableDirection is obsolete as of API6 and is no longer supported.")]
public bool IsAvailableDirection(ContextPopupDirection direction)
{
- return Interop.Elementary.elm_ctxpopup_direction_available_get(Handle, (int)direction);
+ Console.WriteLine("ContextPopup.IsAvailableDirection is obsolete as of API6 and is no longer supported.");
+ return false;
+ }
+
+ ///
+ /// Gets the Alpha of a default Color class.
+ ///
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
+ public override int Opacity
+ {
+ get
+ {
+ return Color.Default.A;
+ }
+
+ set
+ {
+ Console.WriteLine("ContextPopup instance doesn't support to set Opacity.");
+ }
}
+ ///
+ /// Creates a widget handle.
+ ///
+ /// Parent EvasObject.
+ /// Handle IntPtr.
+ /// preview
+ [Obsolete("This has been deprecated in API12")]
protected override IntPtr CreateHandle(EvasObject parent)
{
return Interop.Elementary.elm_ctxpopup_add(parent.Handle);