Functions
List

Functions

EINA_DEPRECATED void elm_list_bounce_set (Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
 Set bouncing behaviour when the scrolled content reaches an edge. More...
 
EINA_DEPRECATED void elm_list_bounce_get (const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
 Get the bouncing behaviour of the internal scroller. More...
 
EINA_DEPRECATED void elm_list_scroller_policy_set (Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
 Set the scrollbar policy. More...
 
EINA_DEPRECATED void elm_list_scroller_policy_get (const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
 Get the scrollbar policy. More...
 
EOAPI void elm_obj_list_horizontal_set (Eina_Bool horizontal)
 Enable or disable horizontal mode on the list object. More...
 
EOAPI Eina_Bool elm_obj_list_horizontal_get (void)
 Get a value whether horizontal mode is enabled or not. More...
 
EOAPI void elm_obj_list_select_mode_set (Elm_Object_Select_Mode mode)
 Set the list select mode. More...
 
EOAPI Elm_Object_Select_Mode elm_obj_list_select_mode_get (void)
 Get the list select mode. More...
 
EOAPI void elm_obj_list_focus_on_selection_set (Eina_Bool enabled)
 Set focus upon items selection mode. More...
 
EOAPI Eina_Bool elm_obj_list_focus_on_selection_get (void)
 Get whether focus upon item's selection mode is enabled. More...
 
EOAPI void elm_obj_list_multi_select_set (Eina_Bool multi)
 Enable or disable multiple items selection on the list object. More...
 
EOAPI Eina_Bool elm_obj_list_multi_select_get (void)
 Get a value whether multiple items selection is enabled or not. More...
 
EOAPI void elm_obj_list_multi_select_mode_set (Elm_Object_Multi_Select_Mode mode)
 Set the list multi select mode. More...
 
EOAPI Elm_Object_Multi_Select_Mode elm_obj_list_multi_select_mode_get (void)
 Get the list multi select mode. More...
 
EOAPI void elm_obj_list_mode_set (Elm_List_Mode mode)
 Set which mode to use for the list object. More...
 
EOAPI Elm_List_Mode elm_obj_list_mode_get (void)
 Get the mode the list is at. More...
 
EOAPI Elm_Object_Itemelm_obj_list_selected_item_get (void)
 Get the selected item. More...
 
EOAPI const Eina_List * elm_obj_list_items_get (void)
 Get a list of all the list items. More...
 
EOAPI Elm_Object_Itemelm_obj_list_first_item_get (void)
 Get the first item in the list. More...
 
EOAPI const Eina_List * elm_obj_list_selected_items_get (void)
 Return a list of the currently selected list items. More...
 
EOAPI Elm_Object_Itemelm_obj_list_last_item_get (void)
 Get the last item in the list. More...
 
EOAPI Elm_Object_Itemelm_obj_list_item_insert_before (Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Insert a new item into the list object before item before. More...
 
EOAPI void elm_obj_list_go (void)
 Starts the list. More...
 
EOAPI Elm_Object_Itemelm_obj_list_item_insert_after (Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Insert a new item into the list object after item after. More...
 
EOAPI Elm_Object_Itemelm_obj_list_at_xy_item_get (Evas_Coord x, Evas_Coord y, int *posret)
 Get the item that is at the x, y canvas coords. More...
 
EOAPI Elm_Object_Itemelm_obj_list_item_append (const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Append a new item to the list object. More...
 
EOAPI Elm_Object_Itemelm_obj_list_item_prepend (const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Prepend a new item to the list object. More...
 
EOAPI void elm_obj_list_clear (void)
 Remove all list's items. More...
 
EOAPI Elm_Object_Itemelm_obj_list_item_sorted_insert (const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
 Insert a new item into the sorted list object. More...
 
Elm_Object_Itemelm_list::item_insert_before (Elm_Object_Item *before_, std::string label_, evas::object icon_, evas::object end_, Evas_Smart_Cb func_, const void *data_) const
 Insert a new item into the list object before item before. More...
 
void elm_list::go () const
 Starts the list. More...
 
Elm_Object_Itemelm_list::item_insert_after (Elm_Object_Item *after_, std::string label_, evas::object icon_, evas::object end_, Evas_Smart_Cb func_, const void *data_) const
 Insert a new item into the list object after item after. More...
 
Elm_Object_Itemelm_list::at_xy_item_get (Evas_Coord x_, Evas_Coord y_, int *posret_) const
 Get the item that is at the x, y canvas coords. More...
 
Elm_Object_Itemelm_list::item_append (std::string label_, evas::object icon_, evas::object end_, Evas_Smart_Cb func_, const void *data_) const
 Append a new item to the list object. More...
 
Elm_Object_Itemelm_list::item_prepend (std::string label_, evas::object icon_, evas::object end_, Evas_Smart_Cb func_, const void *data_) const
 Prepend a new item to the list object. More...
 
void elm_list::clear () const
 Remove all list's items. More...
 
Elm_Object_Itemelm_list::item_sorted_insert (std::string label_, evas::object icon_, evas::object end_, Evas_Smart_Cb func_, const void *data_, Eina_Compare_Cb cmp_func_) const
 Insert a new item into the sorted list object. More...
 
bool elm_list::horizontal_get () const
 Get a value whether horizontal mode is enabled or not. More...
 
void elm_list::horizontal_set (bool horizontal_) const
 Get a value whether horizontal mode is enabled or not. More...
 
Elm_Object_Select_Mode elm_list::select_mode_get () const
 Get the list select mode. More...
 
void elm_list::select_mode_set (Elm_Object_Select_Mode mode_) const
 Get the list select mode. More...
 
bool elm_list::focus_on_selection_get () const
 Get whether focus upon item's selection mode is enabled. More...
 
void elm_list::focus_on_selection_set (bool enabled_) const
 Get whether focus upon item's selection mode is enabled. More...
 
bool elm_list::multi_select_get () const
 Get a value whether multiple items selection is enabled or not. More...
 
void elm_list::multi_select_set (bool multi_) const
 Get a value whether multiple items selection is enabled or not. More...
 
Elm_Object_Multi_Select_Mode elm_list::multi_select_mode_get () const
 Get the list multi select mode. More...
 
void elm_list::multi_select_mode_set (Elm_Object_Multi_Select_Mode mode_) const
 Get the list multi select mode. More...
 
Elm_List_Mode elm_list::mode_get () const
 Get the mode the list is at. More...
 
void elm_list::mode_set (Elm_List_Mode mode_) const
 Get the mode the list is at. More...
 
Elm_Object_Itemelm_list::selected_item_get () const
 Get the selected item. More...
 
const Eina_List * elm_list::items_get () const
 Get a list of all the list items. More...
 
Elm_Object_Itemelm_list::first_item_get () const
 Get the first item in the list. More...
 
const Eina_List * elm_list::selected_items_get () const
 Return a list of the currently selected list items. More...
 
Elm_Object_Itemelm_list::last_item_get () const
 Get the last item in the list. More...
 
void elm_list_horizontal_set (Elm_List *obj, Eina_Bool horizontal)
 Enable or disable horizontal mode on the list object. More...
 
Eina_Bool elm_list_horizontal_get (const Elm_List *obj)
 Get a value whether horizontal mode is enabled or not. More...
 
void elm_list_select_mode_set (Elm_List *obj, Elm_Object_Select_Mode mode)
 Set the list select mode. More...
 
Elm_Object_Select_Mode elm_list_select_mode_get (const Elm_List *obj)
 Get the list select mode. More...
 
void elm_list_focus_on_selection_set (Elm_List *obj, Eina_Bool enabled)
 Set focus upon items selection mode. More...
 
Eina_Bool elm_list_focus_on_selection_get (const Elm_List *obj)
 Get whether focus upon item's selection mode is enabled. More...
 
void elm_list_multi_select_set (Elm_List *obj, Eina_Bool multi)
 Enable or disable multiple items selection on the list object. More...
 
Eina_Bool elm_list_multi_select_get (const Elm_List *obj)
 Get a value whether multiple items selection is enabled or not. More...
 
void elm_list_multi_select_mode_set (Elm_List *obj, Elm_Object_Multi_Select_Mode mode)
 Set the list multi select mode. More...
 
Elm_Object_Multi_Select_Mode elm_list_multi_select_mode_get (const Elm_List *obj)
 Get the list multi select mode. More...
 
void elm_list_mode_set (Elm_List *obj, Elm_List_Mode mode)
 Set which mode to use for the list object. More...
 
Elm_List_Mode elm_list_mode_get (const Elm_List *obj)
 Get the mode the list is at. More...
 
Elm_Object_Itemelm_list_selected_item_get (const Elm_List *obj)
 Get the selected item. More...
 
const Eina_List * elm_list_items_get (const Elm_List *obj)
 Get a list of all the list items. More...
 
Elm_Object_Itemelm_list_first_item_get (const Elm_List *obj)
 Get the first item in the list. More...
 
const Eina_List * elm_list_selected_items_get (const Elm_List *obj)
 Return a list of the currently selected list items. More...
 
Elm_Object_Itemelm_list_last_item_get (const Elm_List *obj)
 Get the last item in the list. More...
 
Elm_Object_Itemelm_list_item_insert_before (Elm_List *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Insert a new item into the list object before item before. More...
 
void elm_list_go (Elm_List *obj)
 Starts the list. More...
 
Elm_Object_Itemelm_list_item_insert_after (Elm_List *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Insert a new item into the list object after item after. More...
 
Elm_Object_Itemelm_list_at_xy_item_get (const Elm_List *obj, Evas_Coord x, Evas_Coord y, int *posret)
 Get the item that is at the x, y canvas coords. More...
 
Elm_Object_Itemelm_list_item_append (Elm_List *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Append a new item to the list object. More...
 
Elm_Object_Itemelm_list_item_prepend (Elm_List *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
 Prepend a new item to the list object. More...
 
void elm_list_clear (Elm_List *obj)
 Remove all list's items. More...
 
Elm_Object_Itemelm_list_item_sorted_insert (Elm_List *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
 Insert a new item into the sorted list object. More...
 
EOAPI void elm_obj_list_item_separator_set (Eina_Bool setting)
 Set or unset item as a separator. More...
 
EOAPI Eina_Bool elm_obj_list_item_separator_get (void)
 Get a value whether item is a separator or not. More...
 
EOAPI void elm_obj_list_item_selected_set (Eina_Bool selected)
 Set the selected state of an item. More...
 
EOAPI Eina_Bool elm_obj_list_item_selected_get (void)
 Get whether the item is selected or not. More...
 
EOAPI Evas_Object * elm_obj_list_item_object_get (void)
 Get the real Evas(Edje) object created to implement the view of a given list item. More...
 
EOAPI Elm_Object_Itemelm_obj_list_item_prev_get (void)
 Get the item before it in list. More...
 
EOAPI Elm_Object_Itemelm_obj_list_item_next_get (void)
 Get the item after it in list. More...
 
EOAPI void elm_obj_list_item_show (void)
 Show item in the list view. More...
 
EOAPI void elm_obj_list_item_bring_in (void)
 Bring in the given item to list view. More...
 
void elm_list_item_separator_set (Elm_List_Item *obj, Eina_Bool setting)
 Set or unset item as a separator. More...
 
Eina_Bool elm_list_item_separator_get (const Elm_List_Item *obj)
 Get a value whether item is a separator or not. More...
 
void elm_list_item_selected_set (Elm_List_Item *obj, Eina_Bool selected)
 Set the selected state of an item. More...
 
Eina_Bool elm_list_item_selected_get (const Elm_List_Item *obj)
 Get whether the item is selected or not. More...
 
Evas_Object * elm_list_item_object_get (const Elm_List_Item *obj)
 Get the real Evas(Edje) object created to implement the view of a given list item. More...
 
Elm_Object_Itemelm_list_item_prev (const Elm_List_Item *obj)
 Get the item before it in list. More...
 
Elm_Object_Itemelm_list_item_next (const Elm_List_Item *obj)
 Get the item after it in list. More...
 
void elm_list_item_show (Elm_List_Item *obj)
 Show item in the list view. More...
 
void elm_list_item_bring_in (Elm_List_Item *obj)
 Bring in the given item to list view. More...
 
Evas_Object * elm_list_add (Evas_Object *parent)
 Add a new list widget to the given parent Elementary (container) object. More...
 

Detailed Description

list_inheritance_tree.png
preview-00.png
list.png

A list widget is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying.

A list is a very simple type of list widget. For more robust lists, Genlist (Generic list) should probably be used.

This widget inherits from the Layout one, so that all the functions acting on it also work for list objects.

This widget emits the following signals, besides the ones sent from Layout:

Available styles for it are:

Default content parts of the list items that you can use are:

Default text parts of the list items that you can use are:

Supported elm_object_item common APIs.

This widget implements the elm-scrollable-interface interface, so that all (non-deprecated) functions for the base Scroller widget also work for lists.

Some calls on the list's API are marked as deprecated, as they just wrap the scrollable widgets counterpart functions. Use the ones we point you to, for each case of deprecation here, instead – eventually the deprecated ones will be discarded (next major release).

List of examples:

Function Documentation

Elm_Object_Item* elm_list::at_xy_item_get ( Evas_Coord  x_,
Evas_Coord  y_,
int *  posret_ 
) const
inline

Get the item that is at the x, y canvas coords.

Returns
The item at the coordinates or NULL if none

This returns the item at the given coordinates (which are canvas relative, not object-relative). If an item is at that coordinate, that item handle is returned, and if posret is not NULL, the integer pointed to is set to a value of -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). If NULL is returned as an item (no item found there), then posret may indicate -1 or 1 based if the coordinate is above or below all items respectively in the list.

Parameters
xThe input x coordinate
yThe input y coordinate
[out]posretThe position relative to the item returned here

References elm_obj_list_at_xy_item_get().

void elm_list::clear ( ) const
inline

Remove all list's items.

See also
elm_object_item_del()
elm_list_item_append()

References elm_obj_list_clear().

Evas_Object* elm_list_add ( Evas_Object *  parent)

Add a new list widget to the given parent Elementary (container) object.

Parameters
parentThe parent object.
Returns
a new list widget handle or NULL, on errors.

This function inserts a new list widget on the canvas.

Elm_Object_Item* elm_list_at_xy_item_get ( const Elm_List *  obj,
Evas_Coord  x,
Evas_Coord  y,
int *  posret 
)

Get the item that is at the x, y canvas coords.

Returns
The item at the coordinates or NULL if none

This returns the item at the given coordinates (which are canvas relative, not object-relative). If an item is at that coordinate, that item handle is returned, and if posret is not NULL, the integer pointed to is set to a value of -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). If NULL is returned as an item (no item found there), then posret may indicate -1 or 1 based if the coordinate is above or below all items respectively in the list.

Parameters
[in]xThe input x coordinate
[in]yThe input y coordinate
[out]posretThe position relative to the item returned here

References elm_obj_list_at_xy_item_get().

EINA_DEPRECATED void elm_list_bounce_get ( const Evas_Object *  obj,
Eina_Bool *  h_bounce,
Eina_Bool *  v_bounce 
)

Get the bouncing behaviour of the internal scroller.

Get whether the internal scroller should bounce when the edge of each axis is reached scrolling.

Parameters
objThe list object.
h_bouncePointer to store the bounce state of the horizontal axis.
v_bouncePointer to store the bounce state of the vertical axis.
Deprecated:
Use elm_scroller_bounce_get() instead.
See also
elm_scroller_bounce_get()
elm_list_bounce_set()

References elm_interface_scrollable_bounce_allow_get().

EINA_DEPRECATED void elm_list_bounce_set ( Evas_Object *  obj,
Eina_Bool  h_bounce,
Eina_Bool  v_bounce 
)

Set bouncing behaviour when the scrolled content reaches an edge.

Tell the internal scroller object whether it should bounce or not when it reaches the respective edges for each axis.

Parameters
objThe list object
h_bounceWhether to bounce or not in the horizontal axis.
v_bounceWhether to bounce or not in the vertical axis.
Deprecated:
Use elm_scroller_bounce_set() instead.
See also
elm_scroller_bounce_set()

References elm_interface_scrollable_bounce_allow_set().

void elm_list_clear ( Elm_List *  obj)

Remove all list's items.

See also
elm_object_item_del()
elm_list_item_append()

References elm_obj_list_clear().

Elm_Object_Item* elm_list_first_item_get ( const Elm_List *  obj)

Get the first item in the list.

This returns the first item in the list.

Returns
The first item, or NULL if none

References elm_obj_list_first_item_get().

Eina_Bool elm_list_focus_on_selection_get ( const Elm_List *  obj)

Get whether focus upon item's selection mode is enabled.

Returns
The tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

References elm_obj_list_focus_on_selection_get().

void elm_list_focus_on_selection_set ( Elm_List *  obj,
Eina_Bool  enabled 
)

Set focus upon items selection mode.

When enabled, every selection of an item inside the 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.

Parameters
[in]enabledThe tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

References elm_obj_list_focus_on_selection_set().

void elm_list_go ( Elm_List *  obj)

Starts the list.

Note
Call before running show() on the list object.
Warning
If not called, it won't display the list properly.
1 li = elm_list_add(win);
2 elm_list_item_append(li, "First", NULL, NULL, NULL, NULL);
3 elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL);
4 elm_list_go(li);
5 evas_object_show(li);

References elm_obj_list_go().

Eina_Bool elm_list_horizontal_get ( const Elm_List *  obj)

Get a value whether horizontal mode is enabled or not.

Returns
EINA_TRUE means horizontal mode selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.
See also
elm_list_horizontal_set() for details.

References elm_obj_list_horizontal_get().

void elm_list_horizontal_set ( Elm_List *  obj,
Eina_Bool  horizontal 
)

Enable or disable horizontal mode on the list object.

Note
Vertical mode is set by default.

On horizontal mode items are displayed on list from left to right, instead of from top to bottom. Also, the list will scroll horizontally. Each item will presents left icon on top and right icon, or end, at the bottom.

See also
elm_list_horizontal_get()
Parameters
[in]horizontalEINA_TRUE to enable horizontal or EINA_FALSE to disable it, i.e., to enable vertical mode.

References elm_obj_list_horizontal_set().

Elm_Object_Item* elm_list_item_append ( Elm_List *  obj,
const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Append a new item to the list object.

Returns
The created item or NULL upon failure.

A new item will be created and appended to the list, i.e., will be set as last item.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

Simple example (with no function callback or data associated):

1 li = elm_list_add(win);
2 ic = elm_icon_add(win);
3 elm_image_file_set(ic, "path/to/image", NULL);
4 elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
5 elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
6 elm_list_go(li);
7 evas_object_show(li);
See also
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_append().

void elm_list_item_bring_in ( Elm_List_Item *  obj)

Bring in the given item to list view.

This causes list to jump to the given item item and show it (by scrolling), if it is not fully visible.

This may use animation to do so and take a period of time.

If animation isn't wanted, elm_list_item_show() can be used.

References elm_obj_list_item_bring_in().

Elm_Object_Item* elm_list_item_insert_after ( Elm_List *  obj,
Elm_Object_Item after,
const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Insert a new item into the list object after item after.

Returns
The created item or NULL upon failure.

A new item will be created and added to the list. Its position in this list will be just after item after.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]afterThe list item to insert after.
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_insert_after().

Elm_Object_Item* elm_list_item_insert_before ( Elm_List *  obj,
Elm_Object_Item before,
const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Insert a new item into the list object before item before.

Returns
The created item or NULL upon failure.

A new item will be created and added to the list. Its position in this list will be just before item before.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]beforeThe list item to insert before.
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_insert_before().

Elm_Object_Item* elm_list_item_next ( const Elm_List_Item *  obj)

Get the item after it in list.

Note
If it is the last item, NULL will be returned.
See also
elm_list_item_append()
elm_list_items_get()

References elm_obj_list_item_next_get().

Evas_Object* elm_list_item_object_get ( const Elm_List_Item *  obj)

Get the real Evas(Edje) object created to implement the view of a given list item.

Base object is the Evas_Object that represents that item.

References elm_obj_list_item_object_get().

Elm_Object_Item* elm_list_item_prepend ( Elm_List *  obj,
const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Prepend a new item to the list object.

Returns
The created item or NULL upon failure.

A new item will be created and prepended to the list, i.e., will be set as first item.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_prepend().

Elm_Object_Item* elm_list_item_prev ( const Elm_List_Item *  obj)

Get the item before it in list.

Note
If it is the first item, NULL will be returned.
See also
elm_list_item_append()
elm_list_items_get()

References elm_obj_list_item_prev_get().

Eina_Bool elm_list_item_selected_get ( const Elm_List_Item *  obj)

Get whether the item is selected or not.

See also
elm_list_selected_item_set() for details.
elm_list_item_selected_get()

References elm_obj_list_item_selected_get().

void elm_list_item_selected_set ( Elm_List_Item *  obj,
Eina_Bool  selected 
)

Set the selected state of an item.

This sets the selected state of the given item it. EINA_TRUE for selected, EINA_FALSE for not selected.

If a new item is selected the previously selected will be unselected, unless multiple selection is enabled with elm_list_multi_select_set(). Previously selected item can be get with function elm_list_selected_item_get().

Selected items will be highlighted.

See also
elm_list_item_selected_get()
elm_list_selected_item_get()
elm_list_multi_select_set()
Parameters
[in]selectedthe selected state (EINA_TRUE selected, EINA_FALSE not selected)

References elm_obj_list_item_selected_set().

Eina_Bool elm_list_item_separator_get ( const Elm_List_Item *  obj)

Get a value whether item is a separator or not.

See also
elm_list_item_separator_set() for details.

References elm_obj_list_item_separator_get().

void elm_list_item_separator_set ( Elm_List_Item *  obj,
Eina_Bool  setting 
)

Set or unset item as a separator.

Items aren't set as separator by default.

If set as separator it will display separator theme, so won't display icons or label.

See also
elm_list_item_separator_get()
Parameters
[in]settingEINA_TRUE means item it is a separator. EINA_FALSE indicates it's not.

References elm_obj_list_item_separator_set().

void elm_list_item_show ( Elm_List_Item *  obj)

Show item in the list view.

It won't animate list until item is visible. If such behavior is wanted, use elm_list_bring_in() instead.

References elm_obj_list_item_show().

Elm_Object_Item* elm_list_item_sorted_insert ( Elm_List *  obj,
const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data,
Eina_Compare_Cb  cmp_func 
)

Insert a new item into the sorted list object.

Returns
The created item or NULL upon failure.
Note
This function inserts values into a list object assuming it was sorted and the result will be sorted.

A new item will be created and added to the list. Its position in this list will be found comparing the new item with previously inserted items using function cmp_func.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.
[in]cmp_funcThe comparing function to be used to sort list items by Elm_Object_Item item handles. This function will receive two items and compare them, returning a non-negative integer if the second item should be place after the first, or negative value if should be placed before.

References elm_obj_list_item_sorted_insert().

const Eina_List* elm_list_items_get ( const Elm_List *  obj)

Get a list of all the list items.

Returns
A list of list items, Elm_Object_Item, or NULL on failure.
See also
elm_list_item_append()
elm_object_item_del()
elm_list_clear()

References elm_obj_list_items_get().

Elm_Object_Item* elm_list_last_item_get ( const Elm_List *  obj)

Get the last item in the list.

This returns the last item in the list.

Returns
The last item, or NULL if none

References elm_obj_list_last_item_get().

Elm_List_Mode elm_list_mode_get ( const Elm_List *  obj)

Get the mode the list is at.

Returns
One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors.
Note
see elm_list_mode_set() for more information.

References elm_obj_list_mode_get().

void elm_list_mode_set ( Elm_List *  obj,
Elm_List_Mode  mode 
)

Set which mode to use for the list object.

Set list's resize behavior, transverse axis scroll and items cropping. See each mode's description for more details.

Note
Default value is #ELM_LIST_SCROLL.

Only one mode at a time can be set. If a previous one was set, it will be changed by the new mode after this call. Bitmasks won't work here as well.

Warning
This function's behavior will clash with those of elm_scroller_content_min_limit(), so use either one of them, but not both.
See also
elm_list_mode_get()
Parameters
[in]modeOne of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.

References elm_obj_list_mode_set().

Eina_Bool elm_list_multi_select_get ( const Elm_List *  obj)

Get a value whether multiple items selection is enabled or not.

See also
elm_list_multi_select_set() for details.
Returns
EINA_TRUE means multiple items selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.

References elm_obj_list_multi_select_get().

Elm_Object_Multi_Select_Mode elm_list_multi_select_mode_get ( const Elm_List *  obj)

Get the list multi select mode.

Returns
The multi select mode (If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX)
See also
elm_list_multi_select_set()
elm_list_multi_select_mode_set()
Since
1.8

References elm_obj_list_multi_select_mode_get().

void elm_list_multi_select_mode_set ( Elm_List *  obj,
Elm_Object_Multi_Select_Mode  mode 
)

Set the list multi select mode.

  • #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever each item is clicked.
  • #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only one item will be selected although multi-selection is enabled, if clicked without pressing control key. This mode is only available with multi-selection.
See also
elm_list_multi_select_set()
elm_list_multi_select_mode_get()
Since
1.8
Parameters
[in]modeThe multi select mode

References elm_obj_list_multi_select_mode_set().

void elm_list_multi_select_set ( Elm_List *  obj,
Eina_Bool  multi 
)

Enable or disable multiple items selection on the list object.

Disabled by default. If disabled, the user can select a single item of the list each time. Selected items are highlighted on list. If enabled, many items can be selected.

If a selected item is selected again, it will be unselected.

See also
elm_list_multi_select_get()
Parameters
[in]multiEINA_TRUE to enable multi selection or EINA_FALSE to disable it.

References elm_obj_list_multi_select_set().

EINA_DEPRECATED void elm_list_scroller_policy_get ( const Evas_Object *  obj,
Elm_Scroller_Policy *  policy_h,
Elm_Scroller_Policy *  policy_v 
)

Get the scrollbar policy.

See also
elm_list_scroller_policy_get() for details.
Parameters
objThe list object.
policy_hPointer to store horizontal scrollbar policy.
policy_vPointer to store vertical scrollbar policy.
Deprecated:
Use elm_scroller_policy_get() instead.

References elm_interface_scrollable_policy_get().

EINA_DEPRECATED void elm_list_scroller_policy_set ( Evas_Object *  obj,
Elm_Scroller_Policy  policy_h,
Elm_Scroller_Policy  policy_v 
)

Set the scrollbar policy.

Parameters
objThe list object
policy_hHorizontal scrollbar policy.
policy_vVertical scrollbar policy.

This sets the scrollbar visibility policy for the given scroller. #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns it on all the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off. This applies respectively for the horizontal and vertical scrollbars.

The both are disabled by default, i.e., are set to #ELM_SCROLLER_POLICY_OFF.

Deprecated:
Use elm_scroller_policy_set() instead.

References elm_interface_scrollable_policy_set().

Elm_Object_Select_Mode elm_list_select_mode_get ( const Elm_List *  obj)

Get the list select mode.

Returns
The select mode (If getting mode fails, it returns #ELM_OBJECT_SELECT_MODE_MAX)
See also
elm_list_select_mode_set()

References elm_obj_list_select_mode_get().

void elm_list_select_mode_set ( Elm_List *  obj,
Elm_Object_Select_Mode  mode 
)

Set the list select mode.

elm_list_select_mode_set() changes item select mode in the list widget.

  • #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode.
  • #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every click will make the selected callbacks be called.
  • #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions.
See also
elm_list_select_mode_get()
Parameters
[in]modeThe select mode

References elm_obj_list_select_mode_set().

Elm_Object_Item* elm_list_selected_item_get ( const Elm_List *  obj)

Get the selected item.

Returns
The selected list item.

The selected item can be unselected with function elm_list_item_selected_set().

The selected item always will be highlighted on list.

See also
elm_list_selected_items_get()

References elm_obj_list_selected_item_get().

const Eina_List* elm_list_selected_items_get ( const Elm_List *  obj)

Return a list of the currently selected list items.

Returns
An list of list items, Elm_Object_Item, or NULL on failure.

Multiple items can be selected if multi select is enabled. It can be done with elm_list_multi_select_set().

See also
elm_list_selected_item_get()
elm_list_multi_select_set()

References elm_obj_list_selected_items_get().

EOAPI Elm_Object_Item* elm_obj_list_at_xy_item_get ( Evas_Coord  x,
Evas_Coord  y,
int *  posret 
)

Get the item that is at the x, y canvas coords.

Returns
The item at the coordinates or NULL if none

This returns the item at the given coordinates (which are canvas relative, not object-relative). If an item is at that coordinate, that item handle is returned, and if posret is not NULL, the integer pointed to is set to a value of -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). If NULL is returned as an item (no item found there), then posret may indicate -1 or 1 based if the coordinate is above or below all items respectively in the list.

Parameters
[in]xThe input x coordinate
[in]yThe input y coordinate
[out]posretThe position relative to the item returned here

Referenced by elm_list::at_xy_item_get(), and elm_list_at_xy_item_get().

EOAPI void elm_obj_list_clear ( void  )

Remove all list's items.

See also
elm_object_item_del()
elm_list_item_append()

Referenced by elm_list::clear(), and elm_list_clear().

EOAPI Elm_Object_Item* elm_obj_list_first_item_get ( void  )

Get the first item in the list.

This returns the first item in the list.

Returns
The first item, or NULL if none

Referenced by elm_list_first_item_get(), and elm_list::first_item_get().

EOAPI Eina_Bool elm_obj_list_focus_on_selection_get ( void  )

Get whether focus upon item's selection mode is enabled.

Returns
The tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

Referenced by elm_list_focus_on_selection_get(), and elm_list::focus_on_selection_get().

EOAPI void elm_obj_list_focus_on_selection_set ( Eina_Bool  enabled)

Set focus upon items selection mode.

When enabled, every selection of an item inside the 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.

Parameters
[in]enabledThe tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

Referenced by elm_list_focus_on_selection_set(), and elm_list::focus_on_selection_set().

EOAPI void elm_obj_list_go ( void  )

Starts the list.

Note
Call before running show() on the list object.
Warning
If not called, it won't display the list properly.
1 li = elm_list_add(win);
2 elm_list_item_append(li, "First", NULL, NULL, NULL, NULL);
3 elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL);
4 elm_list_go(li);
5 evas_object_show(li);

Referenced by elm_list_go(), and elm_list::go().

EOAPI Eina_Bool elm_obj_list_horizontal_get ( void  )

Get a value whether horizontal mode is enabled or not.

Returns
EINA_TRUE means horizontal mode selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.
See also
elm_list_horizontal_set() for details.

Referenced by elm_list_horizontal_get(), and elm_list::horizontal_get().

EOAPI void elm_obj_list_horizontal_set ( Eina_Bool  horizontal)

Enable or disable horizontal mode on the list object.

Note
Vertical mode is set by default.

On horizontal mode items are displayed on list from left to right, instead of from top to bottom. Also, the list will scroll horizontally. Each item will presents left icon on top and right icon, or end, at the bottom.

See also
elm_list_horizontal_get()
Parameters
[in]horizontalEINA_TRUE to enable horizontal or EINA_FALSE to disable it, i.e., to enable vertical mode.

Referenced by elm_list_horizontal_set(), and elm_list::horizontal_set().

EOAPI Elm_Object_Item* elm_obj_list_item_append ( const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Append a new item to the list object.

Returns
The created item or NULL upon failure.

A new item will be created and appended to the list, i.e., will be set as last item.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

Simple example (with no function callback or data associated):

1 li = elm_list_add(win);
2 ic = elm_icon_add(win);
3 elm_image_file_set(ic, "path/to/image", NULL);
4 elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
5 elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
6 elm_list_go(li);
7 evas_object_show(li);
See also
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

Referenced by elm_list_item_append(), and elm_list::item_append().

EOAPI void elm_obj_list_item_bring_in ( void  )

Bring in the given item to list view.

This causes list to jump to the given item item and show it (by scrolling), if it is not fully visible.

This may use animation to do so and take a period of time.

If animation isn't wanted, elm_list_item_show() can be used.

Referenced by elm_list_item_bring_in().

EOAPI Elm_Object_Item* elm_obj_list_item_insert_after ( Elm_Object_Item after,
const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Insert a new item into the list object after item after.

Returns
The created item or NULL upon failure.

A new item will be created and added to the list. Its position in this list will be just after item after.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]afterThe list item to insert after.
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

Referenced by elm_list_item_insert_after(), and elm_list::item_insert_after().

EOAPI Elm_Object_Item* elm_obj_list_item_insert_before ( Elm_Object_Item before,
const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Insert a new item into the list object before item before.

Returns
The created item or NULL upon failure.

A new item will be created and added to the list. Its position in this list will be just before item before.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]beforeThe list item to insert before.
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

Referenced by elm_list_item_insert_before(), and elm_list::item_insert_before().

EOAPI Elm_Object_Item* elm_obj_list_item_next_get ( void  )

Get the item after it in list.

Note
If it is the last item, NULL will be returned.
See also
elm_list_item_append()
elm_list_items_get()

Referenced by elm_list_item_next().

EOAPI Evas_Object* elm_obj_list_item_object_get ( void  )

Get the real Evas(Edje) object created to implement the view of a given list item.

Base object is the Evas_Object that represents that item.

Referenced by elm_list_item_object_get().

EOAPI Elm_Object_Item* elm_obj_list_item_prepend ( const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data 
)

Prepend a new item to the list object.

Returns
The created item or NULL upon failure.

A new item will be created and prepended to the list, i.e., will be set as first item.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.

Referenced by elm_list_item_prepend(), and elm_list::item_prepend().

EOAPI Elm_Object_Item* elm_obj_list_item_prev_get ( void  )

Get the item before it in list.

Note
If it is the first item, NULL will be returned.
See also
elm_list_item_append()
elm_list_items_get()

Referenced by elm_list_item_prev().

EOAPI Eina_Bool elm_obj_list_item_selected_get ( void  )

Get whether the item is selected or not.

See also
elm_list_selected_item_set() for details.
elm_list_item_selected_get()

Referenced by elm_list_item_selected_get().

EOAPI void elm_obj_list_item_selected_set ( Eina_Bool  selected)

Set the selected state of an item.

This sets the selected state of the given item it. EINA_TRUE for selected, EINA_FALSE for not selected.

If a new item is selected the previously selected will be unselected, unless multiple selection is enabled with elm_list_multi_select_set(). Previously selected item can be get with function elm_list_selected_item_get().

Selected items will be highlighted.

See also
elm_list_item_selected_get()
elm_list_selected_item_get()
elm_list_multi_select_set()
Parameters
[in]selectedthe selected state (EINA_TRUE selected, EINA_FALSE not selected)

Referenced by elm_list_item_selected_set().

EOAPI Eina_Bool elm_obj_list_item_separator_get ( void  )

Get a value whether item is a separator or not.

See also
elm_list_item_separator_set() for details.

Referenced by elm_list_item_separator_get().

EOAPI void elm_obj_list_item_separator_set ( Eina_Bool  setting)

Set or unset item as a separator.

Items aren't set as separator by default.

If set as separator it will display separator theme, so won't display icons or label.

See also
elm_list_item_separator_get()
Parameters
[in]settingEINA_TRUE means item it is a separator. EINA_FALSE indicates it's not.

Referenced by elm_list_item_separator_set().

EOAPI void elm_obj_list_item_show ( void  )

Show item in the list view.

It won't animate list until item is visible. If such behavior is wanted, use elm_list_bring_in() instead.

Referenced by elm_list_item_show().

EOAPI Elm_Object_Item* elm_obj_list_item_sorted_insert ( const char *  label,
Evas_Object *  icon,
Evas_Object *  end,
Evas_Smart_Cb  func,
const void *  data,
Eina_Compare_Cb  cmp_func 
)

Insert a new item into the sorted list object.

Returns
The created item or NULL upon failure.
Note
This function inserts values into a list object assuming it was sorted and the result will be sorted.

A new item will be created and added to the list. Its position in this list will be found comparing the new item with previously inserted items using function cmp_func.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
[in]labelThe label of the list item.
[in]iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
[in]endThe icon object to use for the right side of the item. An icon can be any Evas object.
[in]funcThe function to call when the item is clicked.
[in]dataThe data to associate with the item for related callbacks.
[in]cmp_funcThe comparing function to be used to sort list items by Elm_Object_Item item handles. This function will receive two items and compare them, returning a non-negative integer if the second item should be place after the first, or negative value if should be placed before.

Referenced by elm_list_item_sorted_insert(), and elm_list::item_sorted_insert().

EOAPI const Eina_List* elm_obj_list_items_get ( void  )

Get a list of all the list items.

Returns
A list of list items, Elm_Object_Item, or NULL on failure.
See also
elm_list_item_append()
elm_object_item_del()
elm_list_clear()

Referenced by elm_list_items_get(), and elm_list::items_get().

EOAPI Elm_Object_Item* elm_obj_list_last_item_get ( void  )

Get the last item in the list.

This returns the last item in the list.

Returns
The last item, or NULL if none

Referenced by elm_list_last_item_get(), and elm_list::last_item_get().

EOAPI Elm_List_Mode elm_obj_list_mode_get ( void  )

Get the mode the list is at.

Returns
One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors.
Note
see elm_list_mode_set() for more information.

Referenced by elm_list_mode_get(), and elm_list::mode_get().

EOAPI void elm_obj_list_mode_set ( Elm_List_Mode  mode)

Set which mode to use for the list object.

Set list's resize behavior, transverse axis scroll and items cropping. See each mode's description for more details.

Note
Default value is #ELM_LIST_SCROLL.

Only one mode at a time can be set. If a previous one was set, it will be changed by the new mode after this call. Bitmasks won't work here as well.

Warning
This function's behavior will clash with those of elm_scroller_content_min_limit(), so use either one of them, but not both.
See also
elm_list_mode_get()
Parameters
[in]modeOne of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.

Referenced by elm_list_mode_set(), and elm_list::mode_set().

EOAPI Eina_Bool elm_obj_list_multi_select_get ( void  )

Get a value whether multiple items selection is enabled or not.

See also
elm_list_multi_select_set() for details.
Returns
EINA_TRUE means multiple items selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.

Referenced by elm_list_multi_select_get(), and elm_list::multi_select_get().

EOAPI Elm_Object_Multi_Select_Mode elm_obj_list_multi_select_mode_get ( void  )

Get the list multi select mode.

Returns
The multi select mode (If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX)
See also
elm_list_multi_select_set()
elm_list_multi_select_mode_set()
Since
1.8

Referenced by elm_list_multi_select_mode_get(), and elm_list::multi_select_mode_get().

EOAPI void elm_obj_list_multi_select_mode_set ( Elm_Object_Multi_Select_Mode  mode)

Set the list multi select mode.

  • #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever each item is clicked.
  • #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only one item will be selected although multi-selection is enabled, if clicked without pressing control key. This mode is only available with multi-selection.
See also
elm_list_multi_select_set()
elm_list_multi_select_mode_get()
Since
1.8
Parameters
[in]modeThe multi select mode

Referenced by elm_list_multi_select_mode_set(), and elm_list::multi_select_mode_set().

EOAPI void elm_obj_list_multi_select_set ( Eina_Bool  multi)

Enable or disable multiple items selection on the list object.

Disabled by default. If disabled, the user can select a single item of the list each time. Selected items are highlighted on list. If enabled, many items can be selected.

If a selected item is selected again, it will be unselected.

See also
elm_list_multi_select_get()
Parameters
[in]multiEINA_TRUE to enable multi selection or EINA_FALSE to disable it.

Referenced by elm_list_multi_select_set(), and elm_list::multi_select_set().

EOAPI Elm_Object_Select_Mode elm_obj_list_select_mode_get ( void  )

Get the list select mode.

Returns
The select mode (If getting mode fails, it returns #ELM_OBJECT_SELECT_MODE_MAX)
See also
elm_list_select_mode_set()

Referenced by elm_list_select_mode_get(), and elm_list::select_mode_get().

EOAPI void elm_obj_list_select_mode_set ( Elm_Object_Select_Mode  mode)

Set the list select mode.

elm_list_select_mode_set() changes item select mode in the list widget.

  • #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode.
  • #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every click will make the selected callbacks be called.
  • #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions.
See also
elm_list_select_mode_get()
Parameters
[in]modeThe select mode

Referenced by elm_list_select_mode_set(), and elm_list::select_mode_set().

EOAPI Elm_Object_Item* elm_obj_list_selected_item_get ( void  )

Get the selected item.

Returns
The selected list item.

The selected item can be unselected with function elm_list_item_selected_set().

The selected item always will be highlighted on list.

See also
elm_list_selected_items_get()

Referenced by elm_list_selected_item_get(), and elm_list::selected_item_get().

EOAPI const Eina_List* elm_obj_list_selected_items_get ( void  )

Return a list of the currently selected list items.

Returns
An list of list items, Elm_Object_Item, or NULL on failure.

Multiple items can be selected if multi select is enabled. It can be done with elm_list_multi_select_set().

See also
elm_list_selected_item_get()
elm_list_multi_select_set()

Referenced by elm_list_selected_items_get(), and elm_list::selected_items_get().

Elm_Object_Item* elm_list::first_item_get ( ) const
inline

Get the first item in the list.

This returns the first item in the list.

Returns
The first item, or NULL if none

References elm_obj_list_first_item_get().

bool elm_list::focus_on_selection_get ( ) const
inline

Get whether focus upon item's selection mode is enabled.

Returns
The tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)
Parameters
enabledThe tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

References elm_obj_list_focus_on_selection_get().

void elm_list::focus_on_selection_set ( bool  enabled_) const
inline

Get whether focus upon item's selection mode is enabled.

Returns
The tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)
Parameters
enabledThe tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

References elm_obj_list_focus_on_selection_set().

void elm_list::go ( ) const
inline

Starts the list.

Note
Call before running show() on the list object.
Warning
If not called, it won't display the list properly.
li = elm_list_add(win);
elm_list_item_append(li, "First", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL);
evas_object_show(li);

References elm_obj_list_go().

bool elm_list::horizontal_get ( ) const
inline

Get a value whether horizontal mode is enabled or not.

Returns
EINA_TRUE means horizontal mode selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.
See also
elm_list_horizontal_set() for details.
Parameters
horizontalEINA_TRUE to enable horizontal or EINA_FALSE to disable it, i.e., to enable vertical mode.

References elm_obj_list_horizontal_get().

void elm_list::horizontal_set ( bool  horizontal_) const
inline

Get a value whether horizontal mode is enabled or not.

Returns
EINA_TRUE means horizontal mode selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.
See also
elm_list_horizontal_set() for details.
Parameters
horizontalEINA_TRUE to enable horizontal or EINA_FALSE to disable it, i.e., to enable vertical mode.

References elm_obj_list_horizontal_set().

Elm_Object_Item* elm_list::item_append ( std::string  label_,
evas::object  icon_,
evas::object  end_,
Evas_Smart_Cb  func_,
const void *  data_ 
) const
inline

Append a new item to the list object.

Returns
The created item or NULL upon failure.

A new item will be created and appended to the list, i.e., will be set as last item.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

Simple example (with no function callback or data associated):

li = elm_list_add(win);
ic = elm_icon_add(win);
elm_image_file_set(ic, "path/to/image", NULL);
elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
evas_object_show(li);
See also
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
labelThe label of the list item.
iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
endThe icon object to use for the right side of the item. An icon can be any Evas object.
funcThe function to call when the item is clicked.
dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_append().

Elm_Object_Item* elm_list::item_insert_after ( Elm_Object_Item after_,
std::string  label_,
evas::object  icon_,
evas::object  end_,
Evas_Smart_Cb  func_,
const void *  data_ 
) const
inline

Insert a new item into the list object after item after.

Returns
The created item or NULL upon failure.

A new item will be created and added to the list. Its position in this list will be just after item after.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
afterThe list item to insert after.
labelThe label of the list item.
iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
endThe icon object to use for the right side of the item. An icon can be any Evas object.
funcThe function to call when the item is clicked.
dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_insert_after().

Elm_Object_Item* elm_list::item_insert_before ( Elm_Object_Item before_,
std::string  label_,
evas::object  icon_,
evas::object  end_,
Evas_Smart_Cb  func_,
const void *  data_ 
) const
inline

Insert a new item into the list object before item before.

Returns
The created item or NULL upon failure.

A new item will be created and added to the list. Its position in this list will be just before item before.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
beforeThe list item to insert before.
labelThe label of the list item.
iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
endThe icon object to use for the right side of the item. An icon can be any Evas object.
funcThe function to call when the item is clicked.
dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_insert_before().

Elm_Object_Item* elm_list::item_prepend ( std::string  label_,
evas::object  icon_,
evas::object  end_,
Evas_Smart_Cb  func_,
const void *  data_ 
) const
inline

Prepend a new item to the list object.

Returns
The created item or NULL upon failure.

A new item will be created and prepended to the list, i.e., will be set as first item.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
labelThe label of the list item.
iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
endThe icon object to use for the right side of the item. An icon can be any Evas object.
funcThe function to call when the item is clicked.
dataThe data to associate with the item for related callbacks.

References elm_obj_list_item_prepend().

Elm_Object_Item* elm_list::item_sorted_insert ( std::string  label_,
evas::object  icon_,
evas::object  end_,
Evas_Smart_Cb  func_,
const void *  data_,
Eina_Compare_Cb  cmp_func_ 
) const
inline

Insert a new item into the sorted list object.

Returns
The created item or NULL upon failure.
Note
This function inserts values into a list object assuming it was sorted and the result will be sorted.

A new item will be created and added to the list. Its position in this list will be found comparing the new item with previously inserted items using function cmp_func.

Items created with this method can be deleted with elm_object_item_del().

Associated data can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing NULL as func is enough. The same should be done for data.

Note
Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.
See also
elm_list_item_append() for a simple code example.
elm_list_select_mode_set()
elm_object_item_del()
elm_object_item_del_cb_set()
elm_list_clear()
elm_icon_add()
Parameters
labelThe label of the list item.
iconThe icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
endThe icon object to use for the right side of the item. An icon can be any Evas object.
funcThe function to call when the item is clicked.
dataThe data to associate with the item for related callbacks.
cmp_funcThe comparing function to be used to sort list items by Elm_Object_Item item handles. This function will receive two items and compare them, returning a non-negative integer if the second item should be place after the first, or negative value if should be placed before.

References elm_obj_list_item_sorted_insert().

const Eina_List* elm_list::items_get ( ) const
inline

Get a list of all the list items.

Returns
An Eina_List of list items, Elm_Object_Item, or NULL on failure.
See also
elm_list_item_append()
elm_object_item_del()
elm_list_clear()

References elm_obj_list_items_get().

Elm_Object_Item* elm_list::last_item_get ( ) const
inline

Get the last item in the list.

This returns the last item in the list.

Returns
The last item, or NULL if none

References elm_obj_list_last_item_get().

Elm_List_Mode elm_list::mode_get ( ) const
inline

Get the mode the list is at.

Returns
One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors.
Note
see elm_list_mode_set() for more information.
Parameters
modeOne of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.

References elm_obj_list_mode_get().

void elm_list::mode_set ( Elm_List_Mode  mode_) const
inline

Get the mode the list is at.

Returns
One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors.
Note
see elm_list_mode_set() for more information.
Parameters
modeOne of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.

References elm_obj_list_mode_set().

bool elm_list::multi_select_get ( ) const
inline

Get a value whether multiple items selection is enabled or not.

See also
elm_list_multi_select_set() for details.
Returns
EINA_TRUE means multiple items selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.
Parameters
multiEINA_TRUE to enable multi selection or EINA_FALSE to disable it.

References elm_obj_list_multi_select_get().

Elm_Object_Multi_Select_Mode elm_list::multi_select_mode_get ( ) const
inline

Get the list multi select mode.

Returns
The multi select mode (If getting mode is failed, it returns ELM_OBJECT_MULTI_SELECT_MODE_MAX)
See also
elm_list_multi_select_set()
elm_list_multi_select_mode_set()
Since
1.8
Parameters
modeThe multi select mode

References elm_obj_list_multi_select_mode_get().

void elm_list::multi_select_mode_set ( Elm_Object_Multi_Select_Mode  mode_) const
inline

Get the list multi select mode.

Returns
The multi select mode (If getting mode is failed, it returns ELM_OBJECT_MULTI_SELECT_MODE_MAX)
See also
elm_list_multi_select_set()
elm_list_multi_select_mode_set()
Since
1.8
Parameters
modeThe multi select mode

References elm_obj_list_multi_select_mode_set().

void elm_list::multi_select_set ( bool  multi_) const
inline

Get a value whether multiple items selection is enabled or not.

See also
elm_list_multi_select_set() for details.
Returns
EINA_TRUE means multiple items selection is enabled. EINA_FALSE indicates it's disabled. If obj is NULL, EINA_FALSE is returned.
Parameters
multiEINA_TRUE to enable multi selection or EINA_FALSE to disable it.

References elm_obj_list_multi_select_set().

Elm_Object_Select_Mode elm_list::select_mode_get ( ) const
inline

Get the list select mode.

Returns
The select mode (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
See also
elm_list_select_mode_set()
Parameters
modeThe select mode

References elm_obj_list_select_mode_get().

void elm_list::select_mode_set ( Elm_Object_Select_Mode  mode_) const
inline

Get the list select mode.

Returns
The select mode (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
See also
elm_list_select_mode_set()
Parameters
modeThe select mode

References elm_obj_list_select_mode_set().

Elm_Object_Item* elm_list::selected_item_get ( ) const
inline

Get the selected item.

Returns
The selected list item.

The selected item can be unselected with function elm_list_item_selected_set().

The selected item always will be highlighted on list.

See also
elm_list_selected_items_get()

References elm_obj_list_selected_item_get().

const Eina_List* elm_list::selected_items_get ( ) const
inline

Return a list of the currently selected list items.

Returns
An Eina_List of list items, Elm_Object_Item, or NULL on failure.

Multiple items can be selected if multi select is enabled. It can be done with elm_list_multi_select_set().

See also
elm_list_selected_item_get()
elm_list_multi_select_set()

References elm_obj_list_selected_items_get().