static void _item_rearrange(Eext_Rotary_Selector_Data *rsd, int selected_index);
static void _item_select(Eext_Rotary_Selector_Data *rsd, int index);
static void _item_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static Eext_Rotary_Selector_Item *_item_create(Eext_Rotary_Selector_Data *rsd, Eina_Bool is_add_item);
+static Eext_Rotary_Selector_Item *_item_create(Eext_Rotary_Selector_Data *rsd, Eext_Rotary_Selector_Item_Type item_type);
static void _item_selected_signal_send(Eext_Rotary_Selector_Data *rsd, int previous_item_index, int current_item_index);
static void _item_touched_signal_send(Eext_Rotary_Selector_Data *rsd, int index, Eina_Bool pressed, Eina_Bool sound);
if (yoff) *yoff = rsd->item_height / 2;
- tmp_item = _item_create(rsd, EINA_FALSE);
+ tmp_item = _item_create(rsd, EEXT_ROTARY_SELECTOR_EMPTY_ITEM);
if (!tmp_item)
return NULL;
evas_object_show(tmp_item->base.obj);
ERR("Cannot get image file path. Item icon only supports elm image");
}
elm_object_part_content_set(icon, "item,icon", clone_img);
-
+ elm_object_signal_emit(icon, "elm,action,button,longpressed", "");
evas_object_hide(item->base.obj);
_item_rearrange(rsd, rsd->selected_index);
{
if (rsd->add_item) return;
- Eext_Rotary_Selector_Item *add_item = _item_create(rsd, EINA_TRUE);
+ Eext_Rotary_Selector_Item *add_item = _item_create(rsd, EEXT_ROTARY_SELECTOR_ADD_ITEM);
if (!add_item)
return;
}
static Eext_Rotary_Selector_Item *
-_item_create(Eext_Rotary_Selector_Data *rsd, Eina_Bool is_add_item)
+_item_create(Eext_Rotary_Selector_Data *rsd, Eext_Rotary_Selector_Item_Type item_type)
{
Eext_Rotary_Selector_Item *item = NULL;
Evas_Object *button = NULL;
evas_object_size_hint_weight_set(button,EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
- if (!is_add_item)
+ if (item_type == EEXT_ROTARY_SELECTOR_NORMAL_ITEM)
elm_object_style_set(button, "rotary_selector_item");
- else
+ else if (item_type == EEXT_ROTARY_SELECTOR_ADD_ITEM)
elm_object_style_set(button, "rotary_selector_add_item");
+ else
+ elm_object_style_set(button, "rotary_selector_empty_item");
+
evas_object_move(button, -_ROTARY_SELECTOR_SCREEN_WIDTH, -_ROTARY_SELECTOR_SCREEN_HEIGHT);
evas_object_resize(button, rsd->item_width, rsd->item_height);
evas_object_smart_member_add(button, rotary_selector);
_eext_rotary_selector_color_class_parent_set(button, rotary_selector);
- if (!is_add_item)
+ if (item_type == EEXT_ROTARY_SELECTOR_NORMAL_ITEM)
{
Evas_Object *action_bg = elm_layout_add(button);
elm_layout_theme_set(action_bg, "rotary_selector", "item", "bg_image");
return NULL;
}
- item = _item_create(rsd, EINA_FALSE);
+ item = _item_create(rsd, EEXT_ROTARY_SELECTOR_NORMAL_ITEM);
if (!item)
{
ERR("item is NULL!!");
return NULL;
}
- item = _item_create(rsd, EINA_FALSE);
+ item = _item_create(rsd, EEXT_ROTARY_SELECTOR_NORMAL_ITEM);
if (!item)
{
ERR("item is NULL!!");
return NULL;
}
- item = _item_create(rsd, EINA_FALSE);
+ item = _item_create(rsd, EEXT_ROTARY_SELECTOR_NORMAL_ITEM);
if (!item)
{
ERR("item is NULL!!");
return NULL;
}
- item = _item_create(rsd, EINA_FALSE);
+ item = _item_create(rsd, EEXT_ROTARY_SELECTOR_NORMAL_ITEM);
if (!item)
{
ERR("item is NULL!!");