From e8c1359bdb9fb5013961640b4d1b81aedaba7bee Mon Sep 17 00:00:00 2001 From: "yan97.zhao" Date: Tue, 11 Apr 2017 11:20:50 +0800 Subject: [PATCH] add comments for HoverselItem/Hoversel Change-Id: If1e15d4b63a98cfd055831ee34e983a3c9e24a2b Signed-off-by: yan97.zhao --- src/ElmSharp/ElmSharp/Hoversel.cs | 46 +++++++++++++++++++++++++++++++++++ src/ElmSharp/ElmSharp/HoverselItem.cs | 9 +++++++ 2 files changed, 55 insertions(+) diff --git a/src/ElmSharp/ElmSharp/Hoversel.cs b/src/ElmSharp/ElmSharp/Hoversel.cs index 96d9c13..b3201ce 100755 --- a/src/ElmSharp/ElmSharp/Hoversel.cs +++ b/src/ElmSharp/ElmSharp/Hoversel.cs @@ -18,8 +18,14 @@ using System; namespace ElmSharp { + /// + /// The HoverselItemEventArgs is an HoverselItem's EventArgs + /// public class HoverselItemEventArgs : EventArgs { + /// + /// Hoversel's Item + /// public HoverselItem Item { get; set; } internal static HoverselItemEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info) @@ -29,12 +35,19 @@ namespace ElmSharp } } + /// + /// The hoversel is a button that pops up a list of items. + /// public class Hoversel : Layout { SmartEvent _dismissed; SmartEvent _selected; Interop.Evas.SmartCallback _onItemSelected; + /// + /// Creates and initializes a new instance of the Hoversel class. + /// + /// The parent is a given container which will be attached by Hoversel as a child. It's type. public Hoversel(EvasObject parent) : base(parent) { _dismissed = new SmartEvent(this, "dismissed"); @@ -54,10 +67,19 @@ namespace ElmSharp }; } + /// + /// Dismissed will be triggered when Hoversel Dismissed + /// public event EventHandler Dismissed; + /// + /// ItemSelected will be triggered when Hoversel's Item Selected + /// public event EventHandler ItemSelected; + /// + /// Gets or sets the status to control whether the hoversel should expand horizontally. + /// public bool IsHorizontal { get @@ -70,6 +92,9 @@ namespace ElmSharp } } + /// + /// Gets or sets the hover parent. + /// public IntPtr HoverParent { get @@ -82,6 +107,9 @@ namespace ElmSharp } } + /// + /// Gets the flag of whether the hoversel is expanded. + /// public bool IsExpanded { get @@ -90,6 +118,9 @@ namespace ElmSharp } } + /// + /// Gets or sets the status of whether update icon and text of hoversel same to those of selected item automatically. + /// public bool AutoUpdate { get @@ -102,21 +133,36 @@ namespace ElmSharp } } + /// + /// This triggers the hoversel popup from code, the same as if the user had clicked the button. + /// public void HoverBegin() { Interop.Elementary.elm_hoversel_hover_begin(RealHandle); } + /// + /// This dismisses the hoversel popup as if the user had clicked outside the hover. + /// public void HoverEnd() { Interop.Elementary.elm_hoversel_hover_end(RealHandle); } + /// + /// This will remove all the children items from the hoversel. + /// public void Clear() { Interop.Elementary.elm_hoversel_clear(RealHandle); } + /// + /// Add an item to the hoversel button. + /// This adds an item to the hoversel to show when it is clicked. + /// + /// Item's label + /// A handle to the added item. public HoverselItem AddItem(string label) { HoverselItem item = new HoverselItem(); diff --git a/src/ElmSharp/ElmSharp/HoverselItem.cs b/src/ElmSharp/ElmSharp/HoverselItem.cs index de88cbc..ebdaece 100755 --- a/src/ElmSharp/ElmSharp/HoverselItem.cs +++ b/src/ElmSharp/ElmSharp/HoverselItem.cs @@ -18,14 +18,23 @@ using System; namespace ElmSharp { + /// + /// The HoverselItem is the Item of Hoversel + /// public class HoverselItem : ItemObject { internal HoverselItem() : base(IntPtr.Zero) { } + /// + /// HoverselItem's label + /// public string Label { get; internal set; } + /// + /// ItemSelected will be triggered when HoverselItem Selected + /// public event EventHandler ItemSelected; internal void SendItemSelected() -- 2.7.4