source: "elm";
action: STATE_SET "visible" 0.0;
target: "ctxpopup_bg";
+ transition: LINEAR 0.25;
}
program { name: "hide";
signal: "elm,state,hide";
part { name: "arrow_area_left";
type: RECT;
mouse_events: 0;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
visible: 0;
min: 20 0;
part { name: "arrow_area_right";
type: RECT;
mouse_events: 0;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
visible: 0;
min: 20 0;
part { name: "arrow_area_up";
type: RECT;
mouse_events: 0;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
visible: 0;
min: 0 20;
part { name: "arrow_area_down";
type: RECT;
mouse_events: 0;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
visible: 0;
min: 0 20;
type: SWALLOW;
mouse_events: 0;
scale: 1;
+ clip_to: "ctxpopup_clip";
dragable {
x: 1 1 0;
y: 1 1 0;
type: SWALLOW;
mouse_events: 0;
scale: 1;
+ clip_to: "ctxpopup_clip";
dragable {
x: 1 1 0;
y: 1 1 0;
type: SWALLOW;
mouse_events: 0;
scale: 1;
+ clip_to: "ctxpopup_clip";
dragable {
x: 1 1 0;
y: 1 1 0;
type: SWALLOW;
mouse_events: 0;
scale: 1;
+ clip_to: "ctxpopup_clip";
dragable {
x: 1 1 0;
y: 1 1 0;
}
part { name: "base";
scale: 1;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
rel1.offset: -3 -3;
rel2.offset: 3 3;
}
part { name: "over1";
scale: 1;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
rel1.to: "base";
rel2.to: "base";
}
part { name: "over2";
scale: 1;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
rel1.to: "base";
rel2.to: "base";
}
part { name: "elm.swallow.content";
type: SWALLOW;
+ clip_to: "ctxpopup_clip";
description { state: "default" 0.0;
rel1 { to:"base"; offset: 4 4; }
rel2 { to:"base"; offset: -5 -5; }
}
}
+ part { name: "ctxpopup_clip";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"base"; relative: 0 0; }
+ rel2 { to:"base"; relative: 0 1; }
+ }
+ description { state: "up" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_down"; relative: 0 1; }
+ rel2 { to:"arrow_area_down"; relative: 1 1; }
+ }
+ description { state: "left" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_right"; relative: 1 0; }
+ rel2 { to:"arrow_area_right"; relative: 1 1; }
+ }
+ description { state: "right" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_left"; relative: 0 0; }
+ rel2 { to:"arrow_area_left"; relative: 0 1; }
+ }
+ description { state: "down" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_up"; relative: 0 0; }
+ rel2 { to:"arrow_area_up"; relative: 1 0; }
+ }
+ description { state: "visible" 0.0;
+ color: 255 255 255 255;
+ rel1 { to_x:"arrow_area_left"; to_y:"arrow_area_up"; }
+ rel2 { to_x:"arrow_area_right"; to_y:"arrow_area_down"; }
+ }
+ }
+ }
+ programs {
+ program { name: "show";
+ signal: "elm,state,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "up";
+ signal: "elm,state,show,up";
+ source: "elm";
+ action: STATE_SET "up" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "left";
+ signal: "elm,state,show,left";
+ source: "elm";
+ action: STATE_SET "left" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "right";
+ signal: "elm,state,show,right";
+ source: "elm";
+ action: STATE_SET "right" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "down";
+ signal: "elm,state,show,down";
+ source: "elm";
+ action: STATE_SET "down" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
}
}
///////////////////////////////////////////////////////////////////////////////
}
static void
+_show_signal_emit(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
+{
+ Widget_Data *wd;
+
+ wd = elm_widget_data_get(obj);
+ if (!wd || wd->visible) return;
+
+ switch (dir)
+ {
+ case ELM_CTXPOPUP_DIRECTION_UP:
+ edje_object_signal_emit(wd->base, "elm,state,show,up", "elm");
+ break;
+ case ELM_CTXPOPUP_DIRECTION_LEFT:
+ edje_object_signal_emit(wd->base, "elm,state,show,left", "elm");
+ break;
+ case ELM_CTXPOPUP_DIRECTION_RIGHT:
+ edje_object_signal_emit(wd->base, "elm,state,show,right", "elm");
+ break;
+ case ELM_CTXPOPUP_DIRECTION_DOWN:
+ edje_object_signal_emit(wd->base, "elm,state,show,down", "elm");
+ break;
+ default:
+ break;
+ }
+}
+
+static void
_sizing_eval(Evas_Object *obj)
{
Widget_Data *wd;
//Base
wd->dir = _calc_base_geometry(obj, &rect);
+ _show_signal_emit(obj, wd->dir);
_update_arrow(obj, wd->dir);
_shift_base_by_arrow(wd->arrow, wd->dir, &rect);
evas_object_show(wd->arrow);
edje_object_signal_emit(wd->bg, "elm,state,show", "elm");
+ edje_object_signal_emit(wd->base, "elm,state,show", "elm");
_sizing_eval(obj);
}