Evas_Object *bg;
Evas_Object *btn_layout;
Eina_List *items;
- int wipe_dir;
+ Elm_Ctxpopup_Arrow arrow_dir;
int btn_cnt;
Elm_Ctxpopup_Arrow arrow_priority[4];
Eina_Bool scroller_disabled:1;
if ((!wd) || (!rect))
{
- wd->wipe_dir = ELM_FX_WIPE_DIR_UP;
return ELM_CTXPOPUP_ARROW_DOWN;
}
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
rect->y = y;
rect->w = base_w;
rect->h = base_h;
- wd->wipe_dir = ELM_FX_WIPE_DIR_UP;
return ELM_CTXPOPUP_ARROW_DOWN;
}
ADJUST_POS_X(x);
y -= (base_h + finger_size);
arrow = ELM_CTXPOPUP_ARROW_DOWN;
- wd->wipe_dir = ELM_FX_WIPE_DIR_UP;
break;
case ELM_CTXPOPUP_ARROW_RIGHT:
ADJUST_POS_Y(y);
x -= (base_w + finger_size);
arrow = ELM_CTXPOPUP_ARROW_RIGHT;
- wd->wipe_dir = ELM_FX_WIPE_DIR_LEFT;
break;
case ELM_CTXPOPUP_ARROW_LEFT:
ADJUST_POS_Y(y);
x += finger_size;
arrow = ELM_CTXPOPUP_ARROW_LEFT;
- wd->wipe_dir = ELM_FX_WIPE_DIR_RIGHT;
break;
case ELM_CTXPOPUP_ARROW_UP:
ADJUST_POS_X(x);
y += finger_size;
arrow = ELM_CTXPOPUP_ARROW_UP;
- wd->wipe_dir = ELM_FX_WIPE_DIR_DOWN;
break;
default:
break;
ADJUST_POS_X(x);
y -= (base_h + finger_size);
arrow = ELM_CTXPOPUP_ARROW_DOWN;
- wd->wipe_dir = ELM_FX_WIPE_DIR_UP;
}
rect->x = x;
}
//base
- arrow = _calc_base_geometry(obj, &rect);
+ wd->arrow_dir = _calc_base_geometry(obj, &rect);
if (!wd->position_forced)
{
- _update_arrow_obj(obj, arrow);
- _shift_base_by_arrow(wd->arrow, arrow, &rect);
+ _update_arrow_obj(obj, wd->arrow_dir);
+ _shift_base_by_arrow(wd->arrow, wd->arrow_dir, &rect);
}
evas_object_move(wd->base, rect.x, rect.y);
transit = elm_transit_add(wd->base);
elm_transit_fx_insert(transit, elm_fx_color_add( wd->base, 0, 0, 0, 0, 255, 255, 255, 255 ) );
- elm_transit_fx_insert(transit, elm_fx_wipe_add( wd->base, ELM_FX_WIPE_TYPE_SHOW, wd->wipe_dir) );
+ elm_transit_fx_insert(transit, elm_fx_wipe_add( wd->base, ELM_FX_WIPE_TYPE_SHOW, wd->arrow_dir) );
elm_transit_curve_style_set( transit, ELM_ANIMATOR_CURVE_OUT);
elm_transit_completion_callback_set( transit, _show_effect_done, wd);
elm_transit_run(transit, 0.5 );
switch (dir)
{
+ case ELM_FX_WIPE_DIR_UP:
+ w2 = (x + w);
+ h2 = h - (h * frame);
+ evas_map_point_image_uv_set(map, 0, 0, 0);
+ evas_map_point_image_uv_set(map, 1, w, 0);
+ evas_map_point_image_uv_set(map, 2, w, h2);
+ evas_map_point_image_uv_set(map, 3, 0, h2);
+ evas_map_point_coord_set(map, 0, x, y, 0);
+ evas_map_point_coord_set(map, 1, w2, y, 0);
+ evas_map_point_coord_set(map, 2, w2, h2, 0);
+ evas_map_point_coord_set(map, 3, x, h2, 0);
+ break;
case ELM_FX_WIPE_DIR_LEFT:
w2 = w - (w * frame);
h2 = (y + h);
evas_map_point_coord_set(map, 2, x + w, h2, 0);
evas_map_point_coord_set(map, 3, x + w2, h2, 0);
break;
- case ELM_FX_WIPE_DIR_UP:
- w2 = (x + w);
- h2 = h - (h * frame);
- evas_map_point_image_uv_set(map, 0, 0, 0);
- evas_map_point_image_uv_set(map, 1, w, 0);
- evas_map_point_image_uv_set(map, 2, w, h2);
- evas_map_point_image_uv_set(map, 3, 0, h2);
- evas_map_point_coord_set(map, 0, x, y, 0);
- evas_map_point_coord_set(map, 1, w2, y, 0);
- evas_map_point_coord_set(map, 2, w2, h2, 0);
- evas_map_point_coord_set(map, 3, x, h2, 0);
- break;
case ELM_FX_WIPE_DIR_DOWN:
w2 = (x + w);
h2 = (h * frame);
switch (dir)
{
+ case ELM_FX_WIPE_DIR_UP:
+ w2 = (x + w);
+ h2 = (h - (h * frame));
+ evas_map_point_image_uv_set(map, 0, 0, h2);
+ evas_map_point_image_uv_set(map, 1, w, h2);
+ evas_map_point_image_uv_set(map, 2, w, h);
+ evas_map_point_image_uv_set(map, 3, 0, h);
+ evas_map_point_coord_set(map, 0, x, y + h2, 0);
+ evas_map_point_coord_set(map, 1, w2, y + h2, 0);
+ evas_map_point_coord_set(map, 2, w2, y + h, 0);
+ evas_map_point_coord_set(map, 3, x, y + h, 0);
+ break;
case ELM_FX_WIPE_DIR_LEFT:
w2 = (w - (w * frame));
h2 = (y + h);
evas_map_point_coord_set(map, 2, x + w2, h2, 0);
evas_map_point_coord_set(map, 3, x, h2, 0);
break;
- case ELM_FX_WIPE_DIR_UP:
- w2 = (x + w);
- h2 = (h - (h * frame));
- evas_map_point_image_uv_set(map, 0, 0, h2);
- evas_map_point_image_uv_set(map, 1, w, h2);
- evas_map_point_image_uv_set(map, 2, w, h);
- evas_map_point_image_uv_set(map, 3, 0, h);
- evas_map_point_coord_set(map, 0, x, y + h2, 0);
- evas_map_point_coord_set(map, 1, w2, y + h2, 0);
- evas_map_point_coord_set(map, 2, w2, y + h, 0);
- evas_map_point_coord_set(map, 3, x, y + h, 0);
- break;
case ELM_FX_WIPE_DIR_DOWN:
w2 = (x + w);
h2 = (h * frame);