2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Collections.Generic;
23 /// It inherits System.EventArgs.
24 /// It contains the item which is the <see cref="GenGridItem"/> type.
25 /// All events of the GenGrid contain GenGridItemEventArgs as a parameter.
27 /// <since_tizen> preview </since_tizen>
28 [Obsolete("This has been deprecated in API12")]
29 public class GenGridItemEventArgs : EventArgs
32 /// Gets or sets the gengrid item. The return type is <see cref="GenGridItem"/>.
34 /// <since_tizen> preview </since_tizen>
35 [Obsolete("This has been deprecated in API12")]
36 public GenGridItem Item { get; set; }
38 internal static GenGridItemEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
40 GenGridItem item = ItemObject.GetItemByHandle(info) as GenGridItem;
41 return new GenGridItemEventArgs { Item = item };
46 /// It inherits <see cref="Layout"/>.
47 /// The GenGrid is a widget that aims to position objects in a grid layout, while actually creating and rendering only the visible ones.
48 /// It has two directions in which a given GenGrid widget expands while placing its items, horizontal and vertical.
49 /// The gengrid items are represented through the <see cref="GenItemClass"/> definition field details.
51 /// <since_tizen> preview </since_tizen>
52 [Obsolete("This has been deprecated in API12")]
53 public class GenGrid : Layout
55 HashSet<GenGridItem> _children = new HashSet<GenGridItem>();
57 SmartEvent<GenGridItemEventArgs> _selected;
58 SmartEvent<GenGridItemEventArgs> _unselected;
59 SmartEvent<GenGridItemEventArgs> _activated;
60 SmartEvent<GenGridItemEventArgs> _pressed;
61 SmartEvent<GenGridItemEventArgs> _released;
62 SmartEvent<GenGridItemEventArgs> _doubleClicked;
63 SmartEvent<GenGridItemEventArgs> _realized;
64 SmartEvent<GenGridItemEventArgs> _unrealized;
65 SmartEvent<GenGridItemEventArgs> _longpressed;
66 SmartEvent<GenGridItemEventArgs> _focused;
67 SmartEvent<GenGridItemEventArgs> _unfocused;
71 /// Creates and initializes a new instance of the GenGrid class.
73 /// <param name="parent">The parent is a given container which will be attached by GenGrid as a child. It's the <see cref="EvasObject"/> type.</param>
74 /// <since_tizen> preview </since_tizen>
75 [Obsolete("This has been deprecated in API12")]
76 public GenGrid(EvasObject parent) : base(parent)
78 InitializeSmartEvent();
82 /// ItemSelected is raised when a new GenGrid item is selected.
84 /// <since_tizen> preview </since_tizen>
85 [Obsolete("This has been deprecated in API12")]
86 public event EventHandler<GenGridItemEventArgs> ItemSelected;
89 /// ItemUnselected is raised when the gengrid item is unselected.
91 /// <since_tizen> preview </since_tizen>
92 [Obsolete("This has been deprecated in API12")]
93 public event EventHandler<GenGridItemEventArgs> ItemUnselected;
96 /// ItemPressed is raised when a new gengrid item is pressed.
98 /// <since_tizen> preview </since_tizen>
99 [Obsolete("This has been deprecated in API12")]
100 public event EventHandler<GenGridItemEventArgs> ItemPressed;
103 /// ItemReleased is raised when a new gengrid item is released.
105 /// <since_tizen> preview </since_tizen>
106 [Obsolete("This has been deprecated in API12")]
107 public event EventHandler<GenGridItemEventArgs> ItemReleased;
110 /// ItemActivated is raised when a new gengrid item is double-clicked or pressed (enter|return|spacebar).
112 /// <since_tizen> preview </since_tizen>
113 [Obsolete("This has been deprecated in API12")]
114 public event EventHandler<GenGridItemEventArgs> ItemActivated;
117 /// ItemDoubleClicked is raised when a new gengrid item is double-clicked.
119 /// <since_tizen> preview </since_tizen>
120 [Obsolete("This has been deprecated in API12")]
121 public event EventHandler<GenGridItemEventArgs> ItemDoubleClicked;
124 /// ItemRealized is raised when a gengrid item is implemented through <see cref="GenItemClass"/>.
126 /// <since_tizen> preview </since_tizen>
127 [Obsolete("This has been deprecated in API12")]
128 public event EventHandler<GenGridItemEventArgs> ItemRealized;
131 /// ItemUnrealized is raised when the gengrid item is deleted.
133 /// <since_tizen> preview </since_tizen>
134 [Obsolete("This has been deprecated in API12")]
135 public event EventHandler<GenGridItemEventArgs> ItemUnrealized;
138 /// ItemLongPressed is raised when a gengrid item is pressed for a certain amount of time. By default it's 1 second.
140 /// <since_tizen> preview </since_tizen>
141 [Obsolete("This has been deprecated in API12")]
142 public event EventHandler<GenGridItemEventArgs> ItemLongPressed;
145 /// ItemFocussed is raised when a gengrid item has received focus.
147 /// <since_tizen> preview </since_tizen>
148 [Obsolete("This has been deprecated in API12")]
149 public event EventHandler<GenGridItemEventArgs> ItemFocused;
152 /// ItemUnfocussed is raised when a gengrid item has lost focus.
154 /// <since_tizen> preview </since_tizen>
155 [Obsolete("This has been deprecated in API12")]
156 public event EventHandler<GenGridItemEventArgs> ItemUnfocused;
159 /// Changed is raised when an item is added, removed, resized or moved and when the gengrid is resized or gets "horizontal" property changes.
161 /// <since_tizen> preview </since_tizen>
162 [Obsolete("This has been deprecated in API12")]
163 public event EventHandler Changed;
166 /// Gets or sets the item's grid alignment along X-axis within a given GenGrid widget.
167 /// Accepted values are in the 0.0 to 1.0 range, with the special value -1.0 used to specify "justify" or "fill" by some users.
168 /// By default, value is 0.0, meaning that the gengrid has its items grid placed exactly in the left along X-axis.
170 /// <since_tizen> preview </since_tizen>
171 [Obsolete("This has been deprecated in API12")]
172 public double ItemAlignmentX
177 Interop.Elementary.elm_gengrid_align_get(RealHandle, out align, IntPtr.Zero);
182 double aligny = ItemAlignmentY;
183 Interop.Elementary.elm_gengrid_align_set(RealHandle, value, aligny);
188 /// Gets or sets the item's grid alignment on Y-axis within a given GenGrid widget.
189 /// Accepted values are in the 0.0 to 1.0 range, with the special value -1.0 used to specify "justify" or "fill" by some users.
190 /// By default, value is 0.0, meaning that the gengrid has its items grid placed exactly in the top along Y-axis.
192 /// <since_tizen> preview </since_tizen>
193 [Obsolete("This has been deprecated in API12")]
194 public double ItemAlignmentY
199 Interop.Elementary.elm_gengrid_align_get(RealHandle, IntPtr.Zero, out align);
204 double alignx = ItemAlignmentX;
205 Interop.Elementary.elm_gengrid_align_set(RealHandle, alignx, value);
210 /// Gets or sets the manner in which the items grid is filled within a given GenGrid widget.
211 /// It is filled if true, otherwise not filled if false.
213 /// <since_tizen> preview </since_tizen>
214 [Obsolete("This has been deprecated in API12")]
215 public bool FillItems
219 return Interop.Elementary.elm_gengrid_filled_get(RealHandle);
223 Interop.Elementary.elm_gengrid_filled_set(RealHandle, value);
228 /// Gets or sets whether multi-selection is enabled or disabled for a given GenGrid widget.
231 /// Multi-selection is the ability to have more than one item selected, on a given gengrid, simultaneously.
232 /// When it is enabled, a sequence of clicks on different items makes them all selected, progressively.
233 /// A click on an already selected item unselects it. If interacting via the keyboard, multi-selection is enabled while holding the "Shift" key.
234 /// By default, multi-selection is disabled.
236 /// <since_tizen> preview </since_tizen>
237 [Obsolete("This has been deprecated in API12")]
238 public bool MultipleSelection
242 return Interop.Elementary.elm_gengrid_multi_select_get(RealHandle);
246 Interop.Elementary.elm_gengrid_multi_select_set(RealHandle, value);
251 /// Gets or sets the width for the items of a given GenGrid widget.
254 /// A gengrid, after creation, still has no information on the size to give to each of its cells.
255 /// The default width and height just are one finger wide.
256 /// Use this property to force a custom width for your items, making them as big as you wish.
258 /// <since_tizen> preview </since_tizen>
259 [Obsolete("This has been deprecated in API12")]
265 Interop.Elementary.elm_gengrid_item_size_get(RealHandle, out width, IntPtr.Zero);
270 int height = ItemHeight;
271 Interop.Elementary.elm_gengrid_item_size_set(RealHandle, value, height);
276 /// Gets or sets the height for the items of a given GenGrid widget.
279 /// A gengrid, after creation, still has no information on the size to give to each of its cells.
280 /// The default width and height just are one finger wide.
281 /// Use this property to force a custom height for your items, making them as big as you wish.
283 /// <since_tizen> preview </since_tizen>
284 [Obsolete("This has been deprecated in API12")]
285 public int ItemHeight
290 Interop.Elementary.elm_gengrid_item_size_get(RealHandle, IntPtr.Zero, out height);
295 int width = ItemWidth;
296 Interop.Elementary.elm_gengrid_item_size_set(RealHandle, width, value);
301 /// Gets or sets the gengrid select mode by <see cref="GenItemSelectionMode"/>.
303 /// <since_tizen> preview </since_tizen>
304 [Obsolete("This has been deprecated in API12")]
305 public GenItemSelectionMode SelectionMode
309 return (GenItemSelectionMode)Interop.Elementary.elm_gengrid_select_mode_get(RealHandle);
313 Interop.Elementary.elm_gengrid_select_mode_set(RealHandle, (int)value);
318 /// Gets or sets the direction for which a given GenGrid widget expands while placing its items.
321 /// If true, items are placed in columns from top to bottom and when the space for a column is filled, another one is started on the right, thus expanding the grid horizontally.
322 /// If false, items are placed in rows from left to right, and when the space for a row is filled, another one is started below, thus expanding the grid vertically.
324 /// <since_tizen> preview </since_tizen>
325 [Obsolete("This has been deprecated in API12")]
326 public bool IsHorizontal
330 return Interop.Elementary.elm_gengrid_horizontal_get(RealHandle);
334 Interop.Elementary.elm_gengrid_horizontal_set(RealHandle, value);
339 /// Gets or sets whether the gengrid items should be highlighted when an item is selected.
341 /// <since_tizen> preview </since_tizen>
342 [Obsolete("This has been deprecated in API12")]
343 public bool IsHighlight
347 return Interop.Elementary.elm_gengrid_highlight_mode_get(RealHandle);
351 Interop.Elementary.elm_gengrid_highlight_mode_set(RealHandle, value);
356 /// Sets or gets the value of HorizontalScrollBarVisiblePolicy.
359 /// ScrollBarVisiblePolicy.Auto means the horizontal scrollbar is made visible if it is needed, and otherwise kept hidden.
360 /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
362 /// <since_tizen> preview </since_tizen>
363 [Obsolete("This has been deprecated in API12")]
364 public ScrollBarVisiblePolicy HorizontalScrollBarVisiblePolicy
369 Interop.Elementary.elm_scroller_policy_get(RealHandle, out policy, IntPtr.Zero);
370 return (ScrollBarVisiblePolicy)policy;
374 ScrollBarVisiblePolicy v = VerticalScrollBarVisiblePolicy;
375 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)value, (int)v);
380 /// Sets or gets the value of VerticalScrollBarVisiblePolicy.
383 /// ScrollBarVisiblePolicy.Auto means the vertical scrollbar is made visible if it is needed, and otherwise kept hidden.
384 /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
386 /// <since_tizen> preview </since_tizen>
387 [Obsolete("This has been deprecated in API12")]
388 public ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy
393 Interop.Elementary.elm_scroller_policy_get(RealHandle, IntPtr.Zero, out policy);
394 return (ScrollBarVisiblePolicy)policy;
398 ScrollBarVisiblePolicy h = HorizontalScrollBarVisiblePolicy;
399 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)h, (int)value);
404 /// Gets the first item in a given GenGrid widget.
406 /// <since_tizen> preview </since_tizen>
407 [Obsolete("This has been deprecated in API12")]
408 public GenGridItem FirstItem
412 IntPtr handle = Interop.Elementary.elm_gengrid_first_item_get(RealHandle);
413 return ItemObject.GetItemByHandle(handle) as GenGridItem;
418 /// Gets the last item in a given GenGrid widget.
420 /// <since_tizen> preview </since_tizen>
421 [Obsolete("This has been deprecated in API12")]
422 public GenGridItem LastItem
426 IntPtr handle = Interop.Elementary.elm_gengrid_last_item_get(RealHandle);
427 return ItemObject.GetItemByHandle(handle) as GenGridItem;
432 /// Gets the items count in a given GenGrid widget.
434 /// <since_tizen> preview </since_tizen>
435 [Obsolete("This has been deprecated in API12")]
436 public uint ItemCount
440 return Interop.Elementary.elm_gengrid_items_count(RealHandle);
445 /// Gets the selected item in a given GenGrid widget.
447 /// <since_tizen> preview </since_tizen>
448 [Obsolete("This has been deprecated in API12")]
449 public GenGridItem SelectedItem
453 IntPtr handle = Interop.Elementary.elm_gengrid_selected_item_get(RealHandle);
454 return ItemObject.GetItemByHandle(handle) as GenGridItem;
459 /// Gets or sets whether a given GenGrid widget is able to or not able to have items reordered.
461 /// <since_tizen> preview </since_tizen>
462 [Obsolete("This has been deprecated in API12")]
463 public bool ReorderMode
467 return Interop.Elementary.elm_gengrid_reorder_mode_get(RealHandle);
471 Interop.Elementary.elm_gengrid_reorder_mode_set(RealHandle, value);
476 /// Appends a new item to a given GenGrid widget. This adds an item to the end of the gengrid.
478 /// <param name="itemClass">The itemClass defines how to display the data.</param>
479 /// <param name="data">The item data.</param>
480 /// <returns>Return a gengrid item that contains the data and itemClass.</returns>
481 /// <seealso cref="GenItemClass"/>
482 /// <seealso cref="GenGridItem"/>
483 /// <since_tizen> preview </since_tizen>
484 [Obsolete("This has been deprecated in API12")]
485 public GenGridItem Append(GenItemClass itemClass, object data)
487 GenGridItem item = new GenGridItem(data, itemClass, this);
488 item.Handle = Interop.Elementary.elm_gengrid_item_append(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, null, (IntPtr)item.Id);
494 /// Prepends a new item to a given GenGrid widget. This adds an item to the beginning of the gengrid.
496 /// <param name="itemClass">The itemClass defines how to display the data.</param>
497 /// <param name="data">The item data.</param>
498 /// <returns>Return a gengrid item that contains the data and itemClass.</returns>
499 /// <seealso cref="GenItemClass"/>
500 /// <seealso cref="GenGridItem"/>
501 /// <since_tizen> preview </since_tizen>
502 [Obsolete("This has been deprecated in API12")]
503 public GenGridItem Prepend(GenItemClass itemClass, object data)
505 GenGridItem item = new GenGridItem(data, itemClass, this);
506 item.Handle = Interop.Elementary.elm_gengrid_item_prepend(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, null, (IntPtr)item.Id);
512 /// Inserts an item before another in a GenGrid widget. This inserts an item before another in the gengrid.
514 /// <param name="itemClass">The itemClass defines how to display the data.</param>
515 /// <param name="data">The item data.</param>
516 /// <param name="before">The item before which to place this new one.</param>
517 /// <returns>Return a gengrid item that contains the data and itemClass.</returns>
518 /// <seealso cref="GenItemClass"/>
519 /// <seealso cref="GenGridItem"/>
520 /// <since_tizen> preview </since_tizen>
521 [Obsolete("This has been deprecated in API12")]
522 public GenGridItem InsertBefore(GenItemClass itemClass, object data, GenGridItem before)
524 GenGridItem item = new GenGridItem(data, itemClass, this);
525 item.Handle = Interop.Elementary.elm_gengrid_item_insert_before(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, before, null, (IntPtr)item.Id);
531 /// Inserts an item after another in a GenGrid widget. This inserts an item after another in the gengrid.
533 /// <param name="itemClass">The itemClass defines how to display the data.</param>
534 /// <param name="data">The item data.</param>
535 /// <param name="after">The item after which to place this new one.</param>
536 /// <returns>Return a gengrid item that contains the data and itemClass.</returns>
537 /// <seealso cref="GenItemClass"/>
538 /// <seealso cref="GenGridItem"/>
539 /// <since_tizen> preview </since_tizen>
540 [Obsolete("This has been deprecated in API12")]
541 public GenGridItem InsertAfter(GenItemClass itemClass, object data, GenGridItem after)
543 GenGridItem item = new GenGridItem(data, itemClass, this);
544 item.Handle = Interop.Elementary.elm_gengrid_item_insert_after(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, after, null, (IntPtr)item.Id);
550 /// Inserts an item in a GenGrid widget using a user-defined sort function.
552 /// <param name="itemClass">The itemClass defines how to display the data.</param>
553 /// <param name="data">The item data.</param>
554 /// <param name="comparison">User defined comparison function that defines the sort order based on the gengrid item and its data.</param>
555 /// <returns>Return a gengrid item that contains the data and itemClass.</returns>
556 /// <since_tizen> preview </since_tizen>
557 [Obsolete("This has been deprecated in API12")]
558 public GenGridItem InsertSorted(GenItemClass itemClass, object data, Comparison<object> comparison)
560 GenGridItem item = new GenGridItem(data, itemClass, this);
562 Interop.Elementary.Eina_Compare_Cb compareCallback = (handle1, handle2) =>
564 GenGridItem first = (ItemObject.GetItemByHandle(handle1) as GenGridItem) ?? item;
565 GenGridItem second = (ItemObject.GetItemByHandle(handle2) as GenGridItem) ?? item;
566 return comparison(first.Data, second.Data);
569 item.Handle = Interop.Elementary.elm_gengrid_item_sorted_insert(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, compareCallback, null, (IntPtr)item.Id);
575 /// Shows a given item to the visible area of a gengrid.
577 /// <param name="item">The gengrid item to display.</param>
578 /// <param name="position">The position of the item in the viewport.</param>
579 /// <param name="animated">The type of how to show the item.</param>
581 /// If animated is true, the gengrid shows the item by scrolling if it's not fully visible.
582 /// If animated is false, the gengrid shows the item by jumping if it's not fully visible.
584 /// <seealso cref="ScrollToPosition"/>
585 /// <since_tizen> preview </since_tizen>
586 [Obsolete("This has been deprecated in API12")]
587 public void ScrollTo(GenGridItem item, ScrollToPosition position, bool animated)
591 Interop.Elementary.elm_gengrid_item_bring_in(item.Handle, (int)position);
595 Interop.Elementary.elm_gengrid_item_show(item.Handle, (int)position);
600 /// Updates the contents of all the realized items.
601 /// This updates all realized items by calling all the <see cref="GenItemClass"/> again to get the content, text, and states.
602 /// Use this when the original item data has changed and the changes are desired to reflect.
605 /// <see cref="GenItem.Update()"/> to update just one item.
607 /// <since_tizen> preview </since_tizen>
608 [Obsolete("This has been deprecated in API12")]
609 public void UpdateRealizedItems()
611 Interop.Elementary.elm_gengrid_realized_items_update(RealHandle);
615 /// Removes all the items from a given GenGrid widget.
616 /// This removes (and deletes) all the items in the object, making it empty.
619 /// <see cref="ItemObject.Delete()"/> to delete just one item.
621 /// <since_tizen> preview </since_tizen>
622 [Obsolete("This has been deprecated in API12")]
625 Interop.Elementary.elm_gengrid_clear(RealHandle);
629 /// Gets the item that is at the X, Y canvas coordinates.
631 /// <param name="x">The input X coordinate.</param>
632 /// <param name="y">The input Y coordinate.</param>
633 /// <param name="portionX">The position relative to the item returned here.
634 /// -1, 0, or 1, depending if the coordinate is on the left portion of that item(-1), on the middle section(0), or on the right part(1).
636 /// <param name="portionY">The position relative to the item returned here.
637 /// -1, 0, or 1, depending if the coordinate is on the upper portion of that item (-1), on the middle section (0), or on the lower part (1).
639 /// <returns></returns>
640 /// <since_tizen> preview </since_tizen>
641 [Obsolete("This has been deprecated in API12")]
642 public GenGridItem GetItemByPosition(int x, int y, out int portionX, out int portionY)
644 IntPtr handle = Interop.Elementary.elm_gengrid_at_xy_item_get(RealHandle, x, y, out portionX, out portionY);
645 return ItemObject.GetItemByHandle(handle) as GenGridItem;
649 /// Creates a widget handle.
651 /// <param name="parent">Parent EvasObject.</param>
652 /// <returns>Handle IntPtr.</returns>
653 /// <since_tizen> preview </since_tizen>
654 [Obsolete("This has been deprecated in API12")]
655 protected override IntPtr CreateHandle(EvasObject parent)
657 IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
658 Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
660 RealHandle = Interop.Elementary.elm_gengrid_add(handle);
661 Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
666 void InitializeSmartEvent()
668 _selected = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "selected", GenGridItemEventArgs.CreateFromSmartEvent);
669 _unselected = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "unselected", GenGridItemEventArgs.CreateFromSmartEvent);
670 _activated = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "activated", GenGridItemEventArgs.CreateFromSmartEvent);
671 _pressed = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "pressed", GenGridItemEventArgs.CreateFromSmartEvent);
672 _released = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "released", GenGridItemEventArgs.CreateFromSmartEvent);
673 _doubleClicked = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "clicked,double", GenGridItemEventArgs.CreateFromSmartEvent);
674 _realized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "realized", GenGridItemEventArgs.CreateFromSmartEvent);
675 _unrealized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "unrealized", GenGridItemEventArgs.CreateFromSmartEvent);
676 _longpressed = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "longpressed", GenGridItemEventArgs.CreateFromSmartEvent);
677 _focused = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "item,focused", GenGridItemEventArgs.CreateFromSmartEvent);
678 _unfocused = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "item,unfocused", GenGridItemEventArgs.CreateFromSmartEvent);
679 _changed = new SmartEvent(this, this.RealHandle, "changed");
681 _selected.On += (s, e) => { if (e.Item != null) ItemSelected?.Invoke(this, e); };
682 _unselected.On += (s, e) => { if (e.Item != null) ItemUnselected?.Invoke(this, e); };
683 _activated.On += (s, e) => { if (e.Item != null) ItemActivated?.Invoke(this, e); };
684 _pressed.On += (s, e) => { if (e.Item != null) ItemPressed?.Invoke(this, e); };
685 _released.On += (s, e) => { if (e.Item != null) ItemReleased?.Invoke(this, e); };
686 _doubleClicked.On += (s, e) => { if (e.Item != null) ItemDoubleClicked?.Invoke(this, e); };
687 _realized.On += (s, e) => { if (e.Item != null) ItemRealized?.Invoke(this, e); };
688 _unrealized.On += (s, e) => { if (e.Item != null) ItemUnrealized?.Invoke(this, e); };
689 _longpressed.On += (s, e) => { if (e.Item != null) ItemLongPressed?.Invoke(this, e); };
690 _focused.On += (s, e) => { if (e.Item != null) ItemFocused?.Invoke(this, e); };
691 _unfocused.On += (s, e) => { if (e.Item != null) ItemUnfocused?.Invoke(this, e); };
692 _changed.On += (s, e) => { Changed?.Invoke(this, e); };
695 void AddInternal(GenGridItem item)
698 item.Deleted += Item_Deleted;
701 void Item_Deleted(object sender, EventArgs e)
703 _children.Remove((GenGridItem)sender);