Add Changed event in GenGrid 77/131577/2
authorSungHyun Min <shyun.min@samsung.com>
Tue, 30 May 2017 05:41:50 +0000 (14:41 +0900)
committerSunghyun Min <shyun.min@samsung.com>
Tue, 30 May 2017 05:43:00 +0000 (05:43 +0000)
Change-Id: Ia7d397445d989696e90bd7fae6fc03591f923125
Signed-off-by: SungHyun Min <shyun.min@samsung.com>
ElmSharp/ElmSharp/GenGrid.cs

index c1aeeed..4566fb4 100644 (file)
@@ -87,6 +87,7 @@ namespace ElmSharp
         SmartEvent<GenGridItemEventArgs> _realized;
         SmartEvent<GenGridItemEventArgs> _unrealized;
         SmartEvent<GenGridItemEventArgs> _longpressed;
+        SmartEvent _changed;
 
         /// <summary>
         /// Creates and initializes a new instance of the GenGrid class.
@@ -143,6 +144,11 @@ namespace ElmSharp
         public event EventHandler<GenGridItemEventArgs> ItemLongPressed;
 
         /// <summary>
+        ///  Changed is raised when an item is added, removed, resized or moved and when the gengrid is resized or gets "horizontal" property changes.
+        /// </summary>
+        public event EventHandler Changed;
+
+        /// <summary>
         /// Gets or sets the item's grid alignment along x-axis within a given gengrid widget.
         /// The range is less than or equal to 1,and greater than or equal to 0.
         /// By default, value is 0.5, meaning that the gengrid has its items grid placed exactly in the middle along x-axis.
@@ -480,6 +486,7 @@ namespace ElmSharp
             _realized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "realized", GenGridItemEventArgs.CreateFromSmartEvent);
             _unrealized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "unrealized", GenGridItemEventArgs.CreateFromSmartEvent);
             _longpressed = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "longpressed", GenGridItemEventArgs.CreateFromSmartEvent);
+            _changed = new SmartEvent(this, this.RealHandle, "changed");
 
             _selected.On += (s, e) => { if (e.Item != null) ItemSelected?.Invoke(this, e); };
             _unselected.On += (s, e) => { if (e.Item != null) ItemUnselected?.Invoke(this, e); };
@@ -490,6 +497,7 @@ namespace ElmSharp
             _realized.On += (s, e) => { if (e.Item != null) ItemRealized?.Invoke(this, e); };
             _unrealized.On += (s, e) => { if (e.Item != null) ItemUnrealized?.Invoke(this, e); };
             _longpressed.On += (s, e) => { if (e.Item != null) ItemLongPressed?.Invoke(this, e); };
+            _changed.On += (s, e) => { Changed?.Invoke(this, e); };
         }
 
         void AddInternal(GenGridItem item)