Tizen Native API
4.0
|
An index widget gives you an index for quick access to whichever group of other UI items one might have. It's a list of text items (usually letters, for alphabetically ordered access).
Index widgets are by default hidden and just appear when the user clicks over it's reserved area in the canvas. In its default theme, it's an area one finger wide on the right side of the index widget's container.
When items on the index are selected, smart callbacks get called, so that its user can make other container objects to show a given area or child object depending on the index item selected. You'd probably be using an index together with lists, generic lists or general grids.
This widget inherits from the Layout one, so that all the functions acting on it also work for index objects.
This widget emits the following signals, besides the ones sent from Elm_Layout:
"changed"
- When the selected index item changes. event_info
is the selected item's data pointer."delay,changed"
- When the selected index item changes, but after a small idling period. event_info
is the selected item's data pointer."selected"
- When the user releases a mouse button and selects an item. event_info
is the selected item's pointer."level,up"
- when the user moves a finger from the first level to the second level"level,down"
- when the user moves a finger from the second level to the first level"language,changed"
- the program's language changed"focused"
- When the index has received focus. (since 1.8)"unfocused"
- When the index has lost focus. (since 1.8)The "delay,changed"
event is so that it'll wait a small time before actually reporting those events and, moreover, just the last event happening on those time frames will actually be reported.
Supported elm_object_item common APIs
Functions | |
EINA_DEPRECATED void | elm_index_priority_set (Evas_Object *obj, int priority) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only. | |
EINA_DEPRECATED int | elm_index_priority_get (const Evas_Object *obj) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only. | |
void | elm_index_autohide_disabled_set (Elm_Index *obj, Eina_Bool disabled) |
Enable or disable auto hiding feature for a given index widget. | |
Eina_Bool | elm_index_autohide_disabled_get (const Elm_Index *obj) |
Enable or disable auto hiding feature for a given index widget. | |
void | elm_index_omit_enabled_set (Elm_Index *obj, Eina_Bool enabled) |
Enable or disable omit feature for a given index widget. | |
Eina_Bool | elm_index_omit_enabled_get (const Elm_Index *obj) |
Enable or disable omit feature for a given index widget. | |
void | elm_index_standard_priority_set (Elm_Index *obj, int priority) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only. | |
int | elm_index_standard_priority_get (const Elm_Index *obj) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only. | |
void | elm_index_horizontal_set (Elm_Index *obj, Eina_Bool horizontal) |
Enable or disable horizontal mode on the index object. | |
Eina_Bool | elm_index_horizontal_get (const Elm_Index *obj) |
Enable or disable horizontal mode on the index object. | |
void | elm_index_delay_change_time_set (Elm_Index *obj, double dtime) |
Set a delay change time for index object. | |
double | elm_index_delay_change_time_get (const Elm_Index *obj) |
Set a delay change time for index object. | |
void | elm_index_indicator_disabled_set (Elm_Index *obj, Eina_Bool disabled) |
Control the indicator as to be disabled. | |
Eina_Bool | elm_index_indicator_disabled_get (const Elm_Index *obj) |
Control the indicator as to be disabled. | |
void | elm_index_item_level_set (Elm_Index *obj, int level) |
Set the items level for a given index widget. | |
int | elm_index_item_level_get (const Elm_Index *obj) |
Set the items level for a given index widget. | |
void | elm_index_level_go (Elm_Index *obj, int level) |
Flush the changes made to the index items so they work correctly. | |
Elm_Widget_Item * | elm_index_item_prepend (Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data) |
Prepend a new item on a given index widget. | |
void | elm_index_item_clear (Elm_Index *obj) |
Removes all items from a given index widget. | |
Elm_Widget_Item * | elm_index_item_insert_after (Elm_Index *obj, Elm_Widget_Item *after, const char *letter, Evas_Smart_Cb func, const void *data) |
Insert a new item into the index object after item after . | |
Elm_Widget_Item * | elm_index_item_find (Elm_Index *obj, const void *data) |
Find a given index widget's item, using item data. | |
Elm_Widget_Item * | elm_index_item_insert_before (Elm_Index *obj, Elm_Widget_Item *before, const char *letter, Evas_Smart_Cb func, const void *data) |
Insert a new item into the index object before item before . | |
Elm_Widget_Item * | elm_index_item_append (Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data) |
Append a new item on a given index widget. | |
Elm_Widget_Item * | elm_index_selected_item_get (const Elm_Index *obj, int level) |
Returns the last selected item, for a given index widget. | |
Elm_Widget_Item * | elm_index_item_sorted_insert (Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func) |
Insert a new item into the given index widget, using cmp_func function to sort items (by item handles). | |
Evas_Object * | elm_index_add (Evas_Object *parent) |
Evas_Object* elm_index_add | ( | Evas_Object * | parent | ) |
Add a new index widget to the given parent Elementary (container) object
parent | The parent object |
NULL
, on errorsThis function inserts a new index widget on the canvas.
Eina_Bool elm_index_autohide_disabled_get | ( | const Elm_Index * | obj | ) |
Enable or disable auto hiding feature for a given index widget.
[in] | obj | The object. |
true
to disable auto hiding, false
to enable void elm_index_autohide_disabled_set | ( | Elm_Index * | obj, |
Eina_Bool | disabled | ||
) |
Enable or disable auto hiding feature for a given index widget.
[in] | obj | The object. |
[in] | disabled | true to disable auto hiding, false to enable |
double elm_index_delay_change_time_get | ( | const Elm_Index * | obj | ) |
Set a delay change time for index object.
[in] | obj | The object. |
void elm_index_delay_change_time_set | ( | Elm_Index * | obj, |
double | dtime | ||
) |
Set a delay change time for index object.
[in] | obj | The object. |
[in] | dtime | The delay change time to set. |
Eina_Bool elm_index_horizontal_get | ( | const Elm_Index * | obj | ) |
Enable or disable horizontal mode on the index object.
On horizontal mode items are displayed on index from left to right, instead of from top to bottom. Also, the index will scroll horizontally.
[in] | obj | The object. |
true
to enable horizontal or false
to disable it, i.e., to enable vertical mode. it's an area one Fingers "finger" wide on the bottom side of the index widget's container. void elm_index_horizontal_set | ( | Elm_Index * | obj, |
Eina_Bool | horizontal | ||
) |
Enable or disable horizontal mode on the index object.
On horizontal mode items are displayed on index from left to right, instead of from top to bottom. Also, the index will scroll horizontally.
[in] | obj | The object. |
[in] | horizontal | true to enable horizontal or false to disable it, i.e., to enable vertical mode. it's an area one Fingers "finger" wide on the bottom side of the index widget's container. |
Eina_Bool elm_index_indicator_disabled_get | ( | const Elm_Index * | obj | ) |
Control the indicator as to be disabled.
In Index widget, Indicator notes popup text, which shows a letter has been selecting.
[in] | obj | The object. |
true
to disable it, false
to enable it void elm_index_indicator_disabled_set | ( | Elm_Index * | obj, |
Eina_Bool | disabled | ||
) |
Control the indicator as to be disabled.
In Index widget, Indicator notes popup text, which shows a letter has been selecting.
[in] | obj | The object. |
[in] | disabled | true to disable it, false to enable it |
Elm_Widget_Item* elm_index_item_append | ( | Elm_Index * | obj, |
const char * | letter, | ||
Evas_Smart_Cb | func, | ||
const void * | data | ||
) |
Append a new item on a given index widget.
Despite the most common usage of the letter
argument is for single char strings, one could use arbitrary strings as index entries.
item
will be the pointer returned back on $"changed", "delay,changed" and $"selected" smart events.
[in] | obj | The object. |
[in] | letter | Letter under which the item should be indexed |
[in] | func | The function to call when the item is selected. |
[in] | data | The item data to set for the index's item |
NULL
, on errors void elm_index_item_clear | ( | Elm_Index * | obj | ) |
Removes all items from a given index widget.
If deletion callbacks are set, via elm_object_item_del_cb_set(), that callback function will be called for each item in obj
.
[in] | obj | The object. |
Elm_Widget_Item* elm_index_item_find | ( | Elm_Index * | obj, |
const void * | data | ||
) |
Find a given index widget's item, using item data.
[in] | obj | The object. |
[in] | data | The item data pointed to by the desired index item |
NULL
otherwise Elm_Widget_Item* elm_index_item_insert_after | ( | Elm_Index * | obj, |
Elm_Widget_Item * | after, | ||
const char * | letter, | ||
Evas_Smart_Cb | func, | ||
const void * | data | ||
) |
Insert a new item into the index object after item after
.
Despite the most common usage of the letter
argument is for single char strings, one could use arbitrary strings as index entries.
item
will be the pointer returned back on $"changed", "delay,changed" and $"selected" smart events.
relative
is NULL
this function will behave as elm_index_item_append().[in] | obj | The object. |
[in] | after | The index item to insert after. |
[in] | letter | Letter under which the item should be indexed |
[in] | func | The function to call when the item is clicked. |
[in] | data | The item data to set for the index's item |
NULL
, on errors Elm_Widget_Item* elm_index_item_insert_before | ( | Elm_Index * | obj, |
Elm_Widget_Item * | before, | ||
const char * | letter, | ||
Evas_Smart_Cb | func, | ||
const void * | data | ||
) |
Insert a new item into the index object before item before
.
Despite the most common usage of the letter
argument is for single char strings, one could use arbitrary strings as index entries.
item
will be the pointer returned back on $"changed", "delay,changed" and $"selected" smart events.
relative
is NULL
this function will behave as elm_index_item_prepend().[in] | obj | The object. |
[in] | before | The index item to insert after. |
[in] | letter | Letter under which the item should be indexed |
[in] | func | The function to call when the item is clicked. |
[in] | data | The item data to set for the index's item |
NULL
, on errors int elm_index_item_level_get | ( | const Elm_Index * | obj | ) |
Set the items level for a given index widget.
See: elm_index_item_level_get()
[in] | obj | The object. |
void elm_index_item_level_set | ( | Elm_Index * | obj, |
int | level | ||
) |
Set the items level for a given index widget.
See: elm_index_item_level_get()
[in] | obj | The object. |
[in] | level | $0 or $1, the currently implemented levels. |
Elm_Widget_Item* elm_index_item_prepend | ( | Elm_Index * | obj, |
const char * | letter, | ||
Evas_Smart_Cb | func, | ||
const void * | data | ||
) |
Prepend a new item on a given index widget.
Despite the most common usage of the letter
argument is for single char strings, one could use arbitrary strings as index entries.
item
will be the pointer returned back on $"changed", "delay,changed" and $"selected" smart events.
[in] | obj | The object. |
[in] | letter | Letter under which the item should be indexed |
[in] | func | The function to call when the item is selected. |
[in] | data | The item data to set for the index's item |
NULL
, on errors Elm_Widget_Item* elm_index_item_sorted_insert | ( | Elm_Index * | obj, |
const char * | letter, | ||
Evas_Smart_Cb | func, | ||
const void * | data, | ||
Eina_Compare_Cb | cmp_func, | ||
Eina_Compare_Cb | cmp_data_func | ||
) |
Insert a new item into the given index widget, using cmp_func
function to sort items (by item handles).
Despite the most common usage of the letter
argument is for single char strings, one could use arbitrary strings as index entries.
item
will be the pointer returned back on $"changed", "delay,changed" and $"selected" smart events.
[in] | obj | The object. |
[in] | letter | Letter under which the item should be indexed |
[in] | func | The function to call when the item is clicked. |
[in] | data | The item data to set for the index's item |
[in] | cmp_func | The comparing function to be used to sort index items by index item handles |
[in] | cmp_data_func | A fallback function to be called for the sorting of index items by item data). It will be used when cmp_func returns $0 (equality), which means an index item with provided item data already exists. To decide which data item should be pointed to by the index item in question, cmp_data_func will be used. If cmp_data_func returns a non-negative value, the previous index item data will be replaced by the given item pointer. If the previous data need to be freed, it should be done by the cmp_data_func function, because all references to it will be lost. If this function is not provided ($NULL is given), index items will be duplicated, if cmp_func returns $0. |
NULL
, on errors void elm_index_level_go | ( | Elm_Index * | obj, |
int | level | ||
) |
Flush the changes made to the index items so they work correctly.
This flushes any changes made to items indicating the object is ready to go. You should call this before any changes you expect to work. This is similar to elm_list_go().
[in] | obj | The object. |
[in] | level | The index level (one of $0 or $1) where changes were made |
Eina_Bool elm_index_omit_enabled_get | ( | const Elm_Index * | obj | ) |
Enable or disable omit feature for a given index widget.
[in] | obj | The object. |
true
to enable omit feature, false
to disablevoid elm_index_omit_enabled_set | ( | Elm_Index * | obj, |
Eina_Bool | enabled | ||
) |
Enable or disable omit feature for a given index widget.
[in] | obj | The object. |
[in] | enabled | true to enable omit feature, false to disable |
EINA_DEPRECATED int elm_index_priority_get | ( | const Evas_Object * | obj | ) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only.
priority
target priority value in indexEINA_DEPRECATED void elm_index_priority_set | ( | Evas_Object * | obj, |
int | priority | ||
) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only.
[in] | priority | priority target priority value in index |
Elm_Widget_Item* elm_index_selected_item_get | ( | const Elm_Index * | obj, |
int | level | ||
) |
Returns the last selected item, for a given index widget.
[in] | obj | The object. |
[in] | level | $0 or $1, the currently implemented levels. |
obj
(or NULL
, on errors). int elm_index_standard_priority_get | ( | const Elm_Index * | obj | ) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only.
[in] | obj | The object. |
priority
target priority value in indexvoid elm_index_standard_priority_set | ( | Elm_Index * | obj, |
int | priority | ||
) |
Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only.
[in] | obj | The object. |
[in] | priority | priority target priority value in index |