Class GenList

    Definition

    Namespace:
    ElmSharp
    Assembly:
    ElmSharp.dll

    It inherits Layout. The GenList is a widget that aims to have a more expansive list than the simple List in ElmSharp that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complex when it comes to usage. If all you want is a simple list with icons and a single text, use List widget.

    [Obsolete("This has been deprecated in API12")]
    public class GenList : Layout, IAccessibleObject
    Inheritance
    object
    EvasObject
    AccessibleObject
    Widget
    Container
    Layout
    GenList
    Derived
    CircleGenList
    CircleGenList
    Implements
    IAccessibleObject

    Constructors

    View Source

    GenList()

    Creates and initializes a new instance of the GenList class.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    protected GenList()
    View Source

    GenList(EvasObject)

    Creates and initializes a new instance of the GenList class.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenList(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    The parent is a given container, which will be attached by GenList as a child. It's EvasObject type.

    Properties

    View Source

    BlockCount

    Gets or sets the maximum number of items within an item block.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public int BlockCount { get; set; }
    Property Value
    Type Description
    int
    View Source

    Count

    Gets the count of items in a this genlist widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public int Count { get; }
    Property Value
    Type Description
    int
    View Source

    FirstItem

    Gets the first item in the genlist.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem FirstItem { get; }
    Property Value
    Type Description
    GenListItem
    View Source

    FocusOnSelection

    Gets or sets the focus upon the items selection mode.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool FocusOnSelection { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    When enabled, every selection of an item inside GenList will automatically set focus to its first focusable widget from the left. This is true of course, if the selection was made by clicking an unfocusable area in an item or selecting it with a key movement. Clicking on a focusable widget inside an item will couse this particular item to get focus as usual.

    View Source

    Homogeneous

    Gets or sets whether the homogeneous mode is enabled.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool Homogeneous { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    If true, the genlist items will have the same height and width.

    View Source

    HorizontalScrollBarVisiblePolicy

    Sets or gets the value of HorizontalScrollBarVisiblePolicy.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public ScrollBarVisiblePolicy HorizontalScrollBarVisiblePolicy { get; set; }
    Property Value
    Type Description
    ScrollBarVisiblePolicy
    Remarks

    ScrollBarVisiblePolicy.Auto means the horizontal scrollbar is made visible if it is needed, and otherwise kept hidden. ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.

    View Source

    IsHighlight

    Gets or sets whether the genlist items should be highlighted when an item is selected.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool IsHighlight { get; set; }
    Property Value
    Type Description
    bool
    View Source

    IsMultiSelection

    Gets or sets whether to enable multi-selection in the genlist.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool IsMultiSelection { get; set; }
    Property Value
    Type Description
    bool
    View Source

    LastItem

    Gets the last item in the genlist.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem LastItem { get; }
    Property Value
    Type Description
    GenListItem
    View Source

    ListMode

    Gets or sets the horizontal stretching mode. This mode used for sizing items horizontally. The default value is Scroll, which means that if the items are too wide to fit, the scroller scrolls horizontally. If set to Compress, means that the item width is fixed (restricted to a minimum) to the list width when calculating its size in order to allow the height to be calculated based on it. If set to Limit, means that items are expanded to the viewport width and limited to that size. If set to Expand, means that genlist try to reserve space to all its items to be visible at a time.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListMode ListMode { get; set; }
    Property Value
    Type Description
    GenListMode
    Remarks

    Compress makes the genlist resize slower, as it recalculates every item height again whenever the list width changes. The homogeneous mode is so that all items in the genlist are of the same width/height. With Compress, the genlist items are initialized fast. However, there are no subobjects in the genlist, which can be on the flying resizable (such as TEXTBLOCK). If so, then some dynamic resizable objects in the genlist would not be diplayed properly.

    View Source

    LongPressTimeout

    Gets or sets the timeout in seconds for the longpress event.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public double LongPressTimeout { get; set; }
    Property Value
    Type Description
    double
    View Source

    ReorderMode

    Gets or sets the reorder mode. After turning on the reorder mode, longpress on a normal item triggers reordering of the item. You can move the item up and down. However, reordering does not work with group items.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool ReorderMode { get; set; }
    Property Value
    Type Description
    bool
    View Source

    SelectedItem

    Gets the selected item in a given GenList widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem SelectedItem { get; }
    Property Value
    Type Description
    GenListItem
    View Source

    SelectionMode

    Gets or sets the genlist select mode by GenItemSelectionMode.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenItemSelectionMode SelectionMode { get; set; }
    Property Value
    Type Description
    GenItemSelectionMode
    View Source

    VerticalScrollBarVisiblePolicy

    Sets or gets the value of VerticalScrollBarVisiblePolicy.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy { get; set; }
    Property Value
    Type Description
    ScrollBarVisiblePolicy
    Remarks

    ScrollBarVisiblePolicy.Auto means the vertical scrollbar is made visible if it is needed, and otherwise kept hidden. ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.

    Methods

    View Source

    Append(GenItemClass, object, GenListItemType, GenListItem)

    Appends a new item with GenListItemType to the end of a given GenList widget or the end of the children list, if the parent is given.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem Append(GenItemClass itemClass, object data, GenListItemType type, GenListItem parent)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItemType type

    The genlist item type.

    GenListItem parent

    The parent item, otherwise null if there is no parent item.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains the data and itemClass.

    View Source

    Append(GenItemClass, object, GenListItemType)

    Appends a new item with GenListItemType to the end of a given GenList widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem Append(GenItemClass itemClass, object data, GenListItemType type)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItemType type

    The genlist item type.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains the data and itemClass.

    View Source

    Append(GenItemClass, object)

    Appends a new item to the end of a given GenList widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem Append(GenItemClass itemClass, object data)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains the data and itemClass.

    See Also
    GenItemClass
    GenListItem
    View Source

    Clear()

    Removes all the items from a given genlist widget. This removes (and deletes) all items in the object, making it empty. To delete just one item, use Delete().

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void Clear()
    See Also
    Delete()
    View Source

    CreateHandle(EvasObject)

    Creates a widget handle.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    protected override IntPtr CreateHandle(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    Parent EvasObject.

    Returns
    Type Description
    System.IntPtr

    Handle IntPtr.

    Overrides
    Layout.CreateHandle(EvasObject)
    View Source

    GetItemByIndex(int)

    Gets the nth item in a given genlist widget, placed at position nth, in its internal items list.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem GetItemByIndex(int index)
    Parameters
    Type Name Description
    int index

    The number of the item to grab (0 being the first).

    Returns
    Type Description
    GenListItem
    View Source

    GetItemByPosition(int, int, out int)

    Gets the item that is at the X, Y canvas coordinates.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem GetItemByPosition(int x, int y, out int pos)
    Parameters
    Type Name Description
    int x

    The input X-coordinate.

    int y

    The input Y-coordinate.

    int pos

    The position relative to the item returned here. -1, 0, or 1 depending on whether the coordinate is on the upper portion of that item (-1), in the middle section (0), or on the lower part (1).

    Returns
    Type Description
    GenListItem

    The item at the given coordinates.

    View Source

    InsertAfter(GenItemClass, object, GenListItem, GenListItemType, GenListItem)

    Inserts an item with GenListItemType after another item under a parent in a GenList widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem InsertAfter(GenItemClass itemClass, object data, GenListItem after, GenListItemType type, GenListItem parent)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItem after

    The item after which to place this new one.

    GenListItemType type

    The genlist item type.

    GenListItem parent

    The parent item, otherwise null if there is no parent item.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains data and itemClass.

    View Source

    InsertBefore(GenItemClass, object, GenListItem, GenListItemType, GenListItem)

    Inserts an item with GenListItemType before another item under a parent in a GenList widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem InsertBefore(GenItemClass itemClass, object data, GenListItem before, GenListItemType type, GenListItem parent)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItem before

    The item before which to place this new one.

    GenListItemType type

    The genlist item type.

    GenListItem parent

    The parent item, otherwise null if there is no parent item.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains data and itemClass.

    View Source

    InsertBefore(GenItemClass, object, GenListItem, GenListItemType)

    Inserts an item with GenListItemType before another item in a GenList widget. It is the same tree level or group as the item before which it is inserted.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem InsertBefore(GenItemClass itemClass, object data, GenListItem before, GenListItemType type)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItem before

    The item before which to place this new one.

    GenListItemType type

    The genlist item type.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains data and itemClass.

    View Source

    InsertBefore(GenItemClass, object, GenListItem)

    Inserts an item before another item in a genlist widget. It is the same tree level or group as the item before which it is inserted.????

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem InsertBefore(GenItemClass itemClass, object data, GenListItem before)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItem before

    The item before which to place this new one.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains data and itemClass.

    View Source

    InsertSorted(GenItemClass, object, Comparison<object>, GenListItemType, GenListItem)

    Inserts an item in a GenList widget using a user-defined sort function.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem InsertSorted(GenItemClass itemClass, object data, Comparison<object> comparison, GenListItemType type, GenListItem parent)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    System.Comparison<T><object> comparison

    User-defined comparison function that defines the sort order based on the genlist item and its data.

    GenListItemType type

    The genlist item type.

    GenListItem parent

    The parent item, otherwise null if there is no parent item.

    Returns
    Type Description
    GenListItem

    Return a genlist item that contains the data and itemClass.

    View Source

    OnRealized()

    The callback of the Unrealized event.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    protected override void OnRealized()
    Overrides
    Layout.OnRealized()
    View Source

    Prepend(GenItemClass, object, GenListItemType, GenListItem)

    Prepends a new item with GenListItemType to the beginning of a given GenList widget or the beginning of the children list, if the parent is given.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem Prepend(GenItemClass itemClass, object data, GenListItemType type, GenListItem parent)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItemType type

    The genlist item type.

    GenListItem parent

    The parent item, otherwise null if there is no parent item.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains the data and itemClass.

    View Source

    Prepend(GenItemClass, object, GenListItemType)

    Prepends a new item with GenListItemType to the beginning of a given genlist widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem Prepend(GenItemClass itemClass, object data, GenListItemType type)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    GenListItemType type

    The genlist item type.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains data and itemClass.

    View Source

    Prepend(GenItemClass, object)

    Prepends a new item to the beginning of a given GenList widget.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public GenListItem Prepend(GenItemClass itemClass, object data)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    object data

    The item data.

    Returns
    Type Description
    GenListItem

    Return a newly added genlist item that contains data and itemClass.

    View Source

    ScrollTo(GenListItem, ScrollToPosition, bool)

    Shows the given item with the position type in a genlist. When animated is true, the genlist will jump to the given item and display it (by animatedly scrolling), if it is not fully visible. This may use animation and take sometime. When animated is false, the genlist will jump to the given item and display it (by jumping to that position), if it is not fully visible.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void ScrollTo(GenListItem item, ScrollToPosition position, bool animated)
    Parameters
    Type Name Description
    GenListItem item

    The item to display.

    ScrollToPosition position

    The position to show the given item to ScrollToPosition.

    bool animated

    The animated indicates how to display the item, by scrolling or by jumping.

    View Source

    UpdateRealizedItems()

    Updates the content of all the realized items. This updates all the realized items by calling all GenItemClass again to get the content, text, and states. Use this when the original item data has changed and the changes are desired to reflect. To update just one item, use Update().

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void UpdateRealizedItems()
    See Also
    Update()

    Events

    View Source

    Changed

    Changed is raised when the genlist has changed.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler Changed
    Event Type
    Type Description
    System.EventHandler
    View Source

    ItemActivated

    ItemActivated is raised when a new genlist item is double-clicked or pressed (enter|return|spacebar).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemActivated
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemDoubleClicked

    ItemDoubleClicked is raised when a new genlist item is double-clicked.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemDoubleClicked
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemExpanded

    ItemExpanded is raised when a new genlist item is indicated to expand.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemExpanded
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemLongPressed

    ItemLongPressed is raised when a genlist item is pressed for a certain amount of time. By default, it's 1 second.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemLongPressed
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemMoved

    ItemMoved is raised when a genlist item is moved in the reorder mode.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemMoved
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemMovedAfter

    ItemMovedAfter is raised when a genlist item is moved after another item in the reorder mode. To get the relative previous item, use Previous.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemMovedAfter
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemMovedBefore

    ItemMovedBefore is raised when a genlist item is moved before another item in the reorder mode. To get the relative next item, use Next.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemMovedBefore
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemPressed

    ItemPressed is raised when a new genlist item is pressed.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemPressed
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemRealized

    ItemRealized is raised when a new genlist item is created as a real object.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemRealized
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemReleased

    ItemReleased is raised when a new genlist item is released.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemReleased
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemSelected

    ItemSelected is raised when a new genlist item is selected.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemSelected
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemUnrealized

    ItemUnrealized is raised when a new genlist item is unrealized. After calling unrealize, the item's content objects are deleted, and the item object itself is deleted or is put into a floating cache.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemUnrealized
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ItemUnselected

    ItemUnselected is raised when the genlist item is unselected.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler<GenListItemEventArgs> ItemUnselected
    Event Type
    Type Description
    System.EventHandler<TEventArgs><GenListItemEventArgs>
    View Source

    ScrollAnimationStarted

    ScrollAnimationStarted is raised when the scrolling animation has started.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler ScrollAnimationStarted
    Event Type
    Type Description
    System.EventHandler
    View Source

    ScrollAnimationStopped

    ScrollAnimationStopped is raised when the scrolling animation has stopped.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public event EventHandler ScrollAnimationStopped
    Event Type
    Type Description
    System.EventHandler

    Implements

    IAccessibleObject

    Extension Methods

    RotaryEventExtensions.Activate(EvasObject)
    RotaryEventExtensions.AddRotaryEventHandler(EvasObject, RotaryEventHandler)
    RotaryEventExtensions.Deactivate(EvasObject)
    RotaryEventExtensions.RemoveRotaryEventHandler(EvasObject, RotaryEventHandler)
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX