}
}
programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "base";
+ target: "clip";
+ after: "show_start2";
+ }
program { name: "show_start";
signal: "elm,action,show";
source: "elm";
program { name: "show_end";
action: SIGNAL_EMIT "elm,action,show,finished" "";
}
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "base";
+ target: "clip";
+ after: "hide_start2";
+ }
program { name: "hide_start";
signal: "elm,action,hide";
source: "elm";
}
}
+ group { name: "elm/pager/base/slide";
+ images {
+ image: "frame_1.png" COMP;
+ image: "frame_2.png" COMP;
+ image: "dia_grad.png" COMP;
+ }
+ parts {
+ part { name: "clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: -9999 -9999;
+ }
+ rel2 {
+ to: "base";
+ offset: 9999 9999;
+ }
+ color: 255 255 255 255;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ description { state: "hidden2" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+ part { name: "base0";
+ mouse_events: 0;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ image.normal: "dia_grad.png";
+ rel1.to: "over";
+ rel2.to: "over";
+ fill {
+ smooth: 0;
+ size {
+ relative: 0.0 1.0;
+ offset: 64 0;
+ }
+ }
+ }
+ }
+ part { name: "base";
+ mouse_events: 0;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ image {
+ normal: "frame_2.png";
+ border: 5 5 32 26;
+ middle: 0;
+ }
+ fill.smooth : 0;
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "hidden2" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ part { name: "over";
+ mouse_events: 0;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: 4 4;
+ }
+ rel2 {
+ to: "base";
+ offset: -5 -5;
+ }
+ image {
+ normal: "frame_1.png";
+ border: 2 2 28 22;
+ middle: 0;
+ }
+ fill.smooth : 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: 8 8;
+ }
+ rel2 {
+ to: "base";
+ offset: -9 -9;
+ }
+ }
+ }
+ }
+ programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ action: STATE_SET "hidden2" 0.0;
+ target: "base";
+ target: "clip";
+ after: "show_start2";
+ }
+ program { name: "show_start";
+ signal: "elm,action,show";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "base";
+ target: "clip";
+ after: "show_start2";
+ }
+ program { name: "show_start2";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.5;
+ target: "base";
+ target: "clip";
+ after: "show_end";
+ }
+ program { name: "show_end";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "base";
+ target: "clip";
+ after: "pop_start2";
+ }
+ program { name: "pop_start2";
+ action: STATE_SET "hidden2" 0.0;
+ transition: DECELERATE 0.5;
+ target: "base";
+ target: "clip";
+ after: "hide_end";
+ }
+ program { name: "hide_start";
+ signal: "elm,action,hide";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "base";
+ target: "clip";
+ after: "hide_start2";
+ }
+ program { name: "hide_start2";
+ action: STATE_SET "hidden" 0.0;
+ transition: DECELERATE 0.5;
+ target: "base";
+ target: "clip";
+ after: "hide_end";
+ }
+ program { name: "hide_end";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "";
+ }
+ program { name: "reset";
+ signal: "elm,action,reset";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ target: "clip";
+ }
+ }
+ }
+ group { name: "elm/pager/base/slide_invisible";
+ parts {
+ part { name: "clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: -9999 -9999;
+ }
+ rel2 {
+ to: "base";
+ offset: 9999 9999;
+ }
+ color: 255 255 255 255;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ description { state: "hidden2" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "hidden" 0.0;
+ color: 0 0 0 0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "hidden2" 0.0;
+ color: 0 0 0 0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ description { state: "visible" 0.0;
+ color: 0 0 0 0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ rel1.to: "base";
+ rel2.to: "base";
+ }
+ }
+ }
+ programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ action: STATE_SET "hidden2" 0.0;
+ target: "base";
+ target: "clip";
+ after: "show_start2";
+ }
+ program { name: "show_start";
+ signal: "elm,action,show";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "base";
+ target: "clip";
+ after: "show_start2";
+ }
+ program { name: "show_start2";
+ action: STATE_SET "visible" 0.0;
+ transition: DECELERATE 0.5;
+ target: "base";
+ target: "clip";
+ after: "show_end";
+ }
+ program { name: "show_end";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "base";
+ target: "clip";
+ after: "pop_start2";
+ }
+ program { name: "pop_start2";
+ action: STATE_SET "hidden2" 0.0;
+ transition: DECELERATE 0.5;
+ target: "base";
+ target: "clip";
+ after: "hide_end";
+ }
+ program { name: "hide_start";
+ signal: "elm,action,hide";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "base";
+ target: "clip";
+ after: "hide_start2";
+ }
+ program { name: "hide_start2";
+ action: STATE_SET "hidden" 0.0;
+ transition: DECELERATE 0.5;
+ target: "base";
+ target: "clip";
+ after: "hide_end";
+ }
+ program { name: "hide_end";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "";
+ }
+ program { name: "reset";
+ signal: "elm,action,reset";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ target: "clip";
+ }
+ }
+ }
+
group { name: "elm/pager/base/fade";
data.item: "onshow" "raise";
// other options
}
}
programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "clip";
+ target: "clip_base";
+ after: "show_start2";
+ }
program { name: "show_start";
signal: "elm,action,show";
source: "elm";
program { name: "show_end";
action: SIGNAL_EMIT "elm,action,show,finished" "";
}
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "clip";
+ target: "clip_base";
+ after: "hide_start2";
+ }
program { name: "hide_start";
signal: "elm,action,hide";
source: "elm";
}
}
programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "clip";
+ target: "clip_base";
+ after: "show_start2";
+ }
program { name: "show_start";
signal: "elm,action,show";
source: "elm";
program { name: "show_end";
action: SIGNAL_EMIT "elm,action,show,finished" "";
}
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "clip";
+ target: "clip_base";
+ after: "hide_start2";
+ }
program { name: "hide_start";
signal: "elm,action,hide";
source: "elm";
}
}
programs {
+ program { name: "push_start";
+ signal: "elm,action,push";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "clip";
+ after: "show_start2";
+ }
program { name: "show_start";
signal: "elm,action,show";
source: "elm";
program { name: "show_end";
action: SIGNAL_EMIT "elm,action,show,finished" "";
}
+ program { name: "pop_start";
+ signal: "elm,action,pop";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "clip";
+ after: "hide_start2";
+ }
program { name: "hide_start";
signal: "elm,action,hide";
source: "elm";
struct _Pginfo
{
- Evas_Object *pager, *pg1, *pg2, *pg3;
+ Evas_Object *win, *pager, *pg1, *pg2, *pg3;
};
static void
win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
elm_win_title_set(win, "Pager");
elm_win_autodel_set(win, 1);
+ info.win = win;
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_show(win);
}
+
+static void
+my_pager_push(void *data, Evas_Object *obj, void *event_info)
+{
+ Pginfo *info = data;
+ Evas_Object *bx, *bt, *lb;
+ static int count = 2;
+ char *buf[32];
+
+ bx = elm_box_add(info->win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bx);
+
+ lb = elm_label_add(info->win);
+ snprintf(buf, sizeof(buf), "This is page %d in the slide pager<br><br>", count++);
+ elm_label_label_set(lb, buf);
+ elm_box_pack_end(bx, lb);
+ evas_object_show(lb);
+
+ bt = elm_button_add(info->win);
+ elm_button_label_set(bt, "Push a new page");
+ evas_object_smart_callback_add(bt, "clicked", my_pager_push, info);
+ elm_box_pack_end(bx, bt);
+ evas_object_show(bt);
+
+ bt = elm_button_add(info->win);
+ elm_button_label_set(bt, "Go back (pop)");
+ evas_object_smart_callback_add(bt, "clicked", my_pager_pop, info);
+ elm_box_pack_end(bx, bt);
+ evas_object_show(bt);
+ elm_pager_content_push(info->pager, bx);
+}
+
+void
+test_pager_slide(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win, *bg, *pg, *bx, *lb, *bt;
+ static Pginfo info;
+
+ win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Pager Slide");
+ elm_win_autodel_set(win, 1);
+ info.win = win;
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bg);
+
+ pg = elm_pager_add(win);
+ elm_win_resize_object_add(win, pg);
+ elm_object_style_set(pg, "slide");
+ evas_object_show(pg);
+ info.pager = pg;
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bx);
+
+ lb = elm_label_add(win);
+ elm_label_label_set(lb,
+ "This is page 1 in a slide pager.<br>"
+ "<br>"
+ "The slide pager style is usefull for browsing<br>"
+ "a hierarchy of objects, as it makes clear<br>"
+ "the direction of the browse.<br>"
+ "This is the 'slide' style, also available<br>"
+ "a fully transparent style named 'slide_invisble'.<br>"
+ "<br>");
+ elm_box_pack_end(bx, lb);
+ evas_object_show(lb);
+
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Push a new page");
+ evas_object_smart_callback_add(bt, "clicked", my_pager_push, &info);
+ elm_box_pack_end(bx, bt);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Go back (pop)");
+ evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
+ elm_box_pack_end(bx, bt);
+ evas_object_show(bt);
+ elm_pager_content_push(pg, bx);
+
+ evas_object_show(win);
+}
#endif
if (wd->top)
{
o = wd->top->base;
- edje_object_signal_emit(o, "elm,action,hide", "elm");
+ if (wd->top->popme)
+ edje_object_signal_emit(o, "elm,action,pop", "elm");
+ else
+ edje_object_signal_emit(o, "elm,action,hide", "elm");
onhide = edje_object_data_get(o, "onhide");
if (onhide)
{
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
}
}
+ wd->oldtop = wd->top;
wd->top = ittop;
o = wd->top->base;
evas_object_show(o);
- edje_object_signal_emit(o, "elm,action,show", "elm");
+ if (wd->oldtop && wd->oldtop->popme)
+ edje_object_signal_emit(o, "elm,action,show", "elm");
+ else
+ edje_object_signal_emit(o, "elm,action,push", "elm");
onshow = edje_object_data_get(o, "onshow");
if (onshow)
{
_signal_hide_finished, it);
evas_object_event_callback_add(it->content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, it);
+ _changed_size_hints, it);
edje_object_part_swallow(it->base, "elm.swallow.content", it->content);
edje_object_size_min_calc(it->base, &it->minw, &it->minh);
evas_object_show(it->content);
wd->top = it;
o = wd->top->base;
- edje_object_signal_emit(o, "elm,action,hide", "elm");
+ edje_object_signal_emit(o, "elm,action,pop", "elm");
onhide = edje_object_data_get(o, "onhide");
if (onhide)
{