elementary/index - + 1 api elm_index_item_selected_set

need compensation



SVN revision: 68867
This commit is contained in:
ChunEon Park 2012-03-07 04:39:06 +00:00
parent 9832fdca93
commit b70396c859
2 changed files with 44 additions and 0 deletions

View File

@ -669,6 +669,8 @@ elm_index_autohide_disabled_set(Evas_Object *obj, Eina_Bool disabled)
}
else
edje_object_signal_emit(wd->base, "elm,state,inactive", "elm");
//FIXME: Should be update indicator based on the indicator visiblility
}
EAPI Eina_Bool
@ -699,6 +701,26 @@ elm_index_item_level_get(const Evas_Object *obj)
return wd->level;
}
EAPI void
elm_index_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Evas_Coord x, y, w, h;
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
if (!wd) return;
//FIXME: Should be update indicator based on the autohidden status & indicator visiblility
if (selected)
{
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
_sel_eval(WIDGET(it), x + (w/2), y + (h/2));
}
else
_sel_eval(WIDGET(it), -99999, -9999);
}
EINA_DEPRECATED EAPI Elm_Object_Item *
elm_index_item_selected_get(const Evas_Object *obj, int level)
{

View File

@ -110,6 +110,28 @@ EAPI void elm_index_item_level_set(Evas_Object *obj, int level)
*/
EAPI int elm_index_item_level_get(const Evas_Object *obj);
/**
* Set the selected state of an item.
*
* @param it The index item
* @param selected The selected state
*
* This sets the selected state of the given item @p it.
* @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
*
* If a new item is selected the previously selected will be unselected.
* Previously selected item can be get with function
* elm_index_selected_item_get().
*
* Selected items will be highlighted.
*
* @see elm_index_item_selected_get()
* @see elm_index_selected_item_get()
*
* @ingroup Index
*/
EAPI void elm_index_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
/**
* Returns the last selected item, for a given index widget.
*