diff options
author | jh5.cho <jh5.cho@samsung.com> | 2017-03-16 20:46:21 +0900 |
---|---|---|
committer | jh5.cho <jh5.cho@samsung.com> | 2017-03-16 20:47:40 +0900 |
commit | e38d7a8e78cdaf2e512f046c89e87721d7b0b150 (patch) | |
tree | dfa492bb186f2735670cb8f041c9c3752146349f | |
parent | d96a53cb50bc42209078f839772da00f93e50666 (diff) | |
download | elm-sharp-e38d7a8e78cdaf2e512f046c89e87721d7b0b150.tar.gz elm-sharp-e38d7a8e78cdaf2e512f046c89e87721d7b0b150.tar.bz2 elm-sharp-e38d7a8e78cdaf2e512f046c89e87721d7b0b150.zip |
Update Hoversel to support Dismissed event
- Dismissed SmartEvent is added
- TC code for dismissed event is added
Change-Id: I17f953f149227fa28ff4e356efce10c5004ac2ea
-rwxr-xr-x | ElmSharp.Test/TC/HoverselTest1.cs | 4 | ||||
-rwxr-xr-x | ElmSharp/ElmSharp/Hoversel.cs | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/ElmSharp.Test/TC/HoverselTest1.cs b/ElmSharp.Test/TC/HoverselTest1.cs index 01dd1ef..4c94557 100755 --- a/ElmSharp.Test/TC/HoverselTest1.cs +++ b/ElmSharp.Test/TC/HoverselTest1.cs @@ -48,6 +48,10 @@ namespace ElmSharp.Test { Console.WriteLine("ItemSelected : " + e.Item.Label); }; + hoversel.Dismissed += (s, e) => + { + Console.WriteLine("Hoversel is dismissed"); + }; HoverselItem item1 = hoversel.AddItem("item1"); HoverselItem item2 = hoversel.AddItem("item2"); diff --git a/ElmSharp/ElmSharp/Hoversel.cs b/ElmSharp/ElmSharp/Hoversel.cs index cf214e9..96d9c13 100755 --- a/ElmSharp/ElmSharp/Hoversel.cs +++ b/ElmSharp/ElmSharp/Hoversel.cs @@ -31,11 +31,17 @@ namespace ElmSharp public class Hoversel : Layout { + SmartEvent _dismissed; SmartEvent<HoverselItemEventArgs> _selected; Interop.Evas.SmartCallback _onItemSelected; public Hoversel(EvasObject parent) : base(parent) { + _dismissed = new SmartEvent(this, "dismissed"); + _dismissed.On += (sender, e) => + { + Dismissed?.Invoke(this, EventArgs.Empty); + }; _selected = new SmartEvent<HoverselItemEventArgs>(this, RealHandle, "selected", HoverselItemEventArgs.CreateFromSmartEvent); _selected.On += (s, e) => { @@ -48,6 +54,8 @@ namespace ElmSharp }; } + public event EventHandler Dismissed; + public event EventHandler<HoverselItemEventArgs> ItemSelected; public bool IsHorizontal |