}
}
group { name:"elm/naviframe/item/basic/default";
+ images {
+ image: "flip_base.png" COMP;
+ image: "flip_shad.png" COMP;
+ }
parts {
part { name: "title_clip";
type: RECT;
rel2.relative: 2.0 1.0;
}
}
- part { name: "elm.swallow.title";
- type: SWALLOW;
+ part { name: "title_base";
+ type: IMAGE;
scale: 1;
repeat_events: 0;
clip_to: "title_clip";
fixed: 0 1;
rel1 { relative: 0.0 0.0; }
rel2 { relative: 1.0 0.0; }
- }
- }
- }
- programs {
- program { name: "show";
- signal: "elm,state,show";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.content";
- transition: DECELERATE 0.5;
- after: "show_finished";
- }
- program { name: "pushed";
- signal: "elm,state,pushed";
- source: "elm";
- action: STATE_SET "pushed" 0.0;
- target: "elm.swallow.content";
- transition: DECELERATE 0.5;
- after: "pushed_finished";
- }
- program { name: "popped";
- signal: "elm,state,popped";
- source: "elm";
- action: STATE_SET "popped" 0.0;
- target: "elm.swallow.content";
- transition: DECELERATE 0.5;
- after: "popped_finished";
- }
- program { name: "visible";
- signal: "elm,state,visible";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.content";
- }
- program { name: "title_show";
- signal: "elm,state,elm.text.title,show";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "title_clip";
- }
- program { name: "title_hide";
- signal: "elm,state,title,hide";
- source: "elm";
- action: STATE_SET "hide" 0.0;
- target: "title_clip";
- }
- program { name: "show_finished";
- action: SIGNAL_EMIT "elm,action,show,finished" "";
- }
- program { name: "pushed_finished";
- action: SIGNAL_EMIT "elm,action,pushed,finished" "";
- }
- program { name: "popped_finished";
- action: SIGNAL_EMIT "elm,action,popped,finished" "";
- }
- }
-}
-group { name:"elm/naviframe/item/instant/default";
- parts {
- part { name: "title_clip";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- min: 1 50;
- align: 0.0 0.0;
- fixed: 0 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 0.0; }
- }
- description { state: "hide" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- max: 0 0;
- fixed: 1 1;
- }
- }
- part { name: "content_clip";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to_y: "title_clip";
- rel1.relative: 0 1;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- repeat_events: 0;
- clip_to: "content_clip";
- description { state: "default" 0.0;
- align: 0.0 0.0;
- rel1.relative: 0.0 1.0;
- rel1.to_y: "title_clip";
- rel2.relative: 1.0 1.0;
- visible: 0;
- }
- description { state: "show" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "elm.swallow.title";
- type: SWALLOW;
- scale: 1;
- repeat_events: 0;
- clip_to: "title_clip";
- description { state: "default" 0.0;
- min: 1 50;
- align: 0.5 0.0;
- fixed: 0 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 0.0; }
- }
- }
- }
- programs {
- program { name: "show";
- signal: "elm,state,show";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.content";
- after: "show_finished";
- }
- program { name: "pushed";
- signal: "elm,state,pushed";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
- after: "pushed_finished";
- }
- program { name: "popped";
- signal: "elm,state,popped";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
- after: "popped_finished";
- }
- program { name: "visible";
- signal: "elm,state,visible";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.content";
- }
- program { name: "title_show";
- signal: "elm,state,title,show";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "title_clip";
- }
- program { name: "title_hide";
- signal: "elm,state,title,hide";
- source: "elm";
- action: STATE_SET "hide" 0.0;
- target: "title_clip";
- }
- program { name: "show_finished";
- action: SIGNAL_EMIT "elm,action,show,finished" "";
- }
- program { name: "pushed_finished";
- action: SIGNAL_EMIT "elm,action,pushed,finished" "";
- }
- program { name: "popped_finished";
- action: SIGNAL_EMIT "elm,action,popped,finished" "";
- }
- }
-}
-group { name:"elm/naviframe/title/default";
- images {
- image: "flip_base.png" COMP;
- image: "flip_shad.png" COMP;
- }
- parts {
- part { name: "base";
- type: IMAGE;
- description {
image.normal: "flip_base.png";
}
}
part { name: "elm.swallow.prev_btn";
type: SWALLOW;
scale: 1;
+ clip_to: "title_clip";
description { state: "default" 0.0;
min: 80 40;
max: 80 40;
align: 0 0;
fixed: 1 1;
rel1.offset: 5 5;
+ rel1.to: "title_base";
rel2.offset: -1 -6;
+ rel2.to: "title_base";
}
}
part { name: "elm.swallow.next_btn";
type: SWALLOW;
scale: 1;
+ clip_to: "title_clip";
description { state: "default" 0.0;
min: 80 40;
max: 80 40;
align: 1 0;
fixed: 1 1;
rel1.offset: 0 5;
+ rel1.to: "title_base";
rel2.offset: -6 -6;
+ rel2.to: "title_base";
}
}
part { name: "elm.swallow.icon";
type: SWALLOW;
scale: 1;
+ clip_to: "title_clip";
description { state: "default" 0.0;
min: 40 40;
max: 40 40;
align: 1 0.5;
rel1.to: "elm.text.title";
rel1.relative: 0 0;
+ rel1.to: "title_base";
rel2.to: "elm.text.title";
rel2.relative: 0 1;
+ rel2.to: "title_base";
}
}
part { name: "elm.text.title";
type: TEXT;
scale: 1;
repeat_events: 1;
+ clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "Sans,Edje-Vera";
size: 10;
}
color: 0 0 0 255;
align: 0.5 0.5;
+ rel1.to: "title_base";
+ rel2.to: "title_base";
}
}
part { name: "elm.text.subtitle";
type: TEXT;
scale: 1;
repeat_events: 1;
+ clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "Sans,Edje-Vera";
size: 8;
}
rel1.to_y: "elm.text.title";
rel1.relative: 0 1;
+ rel1.to: "title_base";
+ rel2.to: "title_base";
color: 50 50 50 255;
align: 0.5 0;
}
part { name: "shade";
type: IMAGE;
mouse_events: 0;
+ clip_to: "title_clip";
description {
align: 0.5 1;
rel1.to_y: "elm.text.title";
rel1.relative: 0 1;
rel1.offset: 0 0;
+ rel1.to: "title_base";
rel2.offset: -1 5;
+ rel2.to: "title_base";
image.normal: "flip_shad.png";
}
}
}
programs {
+ program { name: "show";
+ signal: "elm,state,show";
+ source: "elm";
+ action: STATE_SET "show" 0.0;
+ target: "elm.swallow.content";
+ transition: DECELERATE 0.5;
+ after: "show_finished";
+ }
+ program { name: "pushed";
+ signal: "elm,state,pushed";
+ source: "elm";
+ action: STATE_SET "pushed" 0.0;
+ target: "elm.swallow.content";
+ transition: DECELERATE 0.5;
+ after: "pushed_finished";
+ }
+ program { name: "popped";
+ signal: "elm,state,popped";
+ source: "elm";
+ action: STATE_SET "popped" 0.0;
+ target: "elm.swallow.content";
+ transition: DECELERATE 0.5;
+ after: "popped_finished";
+ }
+ program { name: "visible";
+ signal: "elm,state,visible";
+ source: "elm";
+ action: STATE_SET "show" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "title_show";
+ signal: "elm,state,title,show";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "title_clip";
+ }
+ program { name: "title_hide";
+ signal: "elm,state,title,hide";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "title_clip";
+ }
program {
name: "title_clicked";
signal: "mouse,clicked,1";
source: "base";
action: SIGNAL_EMIT "elm,action,clicked" "elm";
}
+ program { name: "show_finished";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program { name: "pushed_finished";
+ action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+ }
+ program { name: "popped_finished";
+ action: SIGNAL_EMIT "elm,action,popped,finished" "";
+ }
}
}
+
struct _Elm_Naviframe_Item
{
Elm_Widget_Item base;
- Evas_Object *title;
Eina_List *content_list;
Eina_List *text_list;
Evas_Object *content;
}
eina_stringshare_replace(&pair->text, label);
- edje_object_part_text_set(navi_it->title, part, label);
+ edje_object_part_text_set(navi_it->base.view, part, label);
snprintf(buf, sizeof(buf), "elm,state,%s,show", part);
if (label)
- edje_object_signal_emit(navi_it->title, buf, "elm");
+ edje_object_signal_emit(navi_it->base.view, buf, "elm");
else
- edje_object_signal_emit(navi_it->title, buf, "elm");
+ edje_object_signal_emit(navi_it->base.view, buf, "elm");
_item_sizing_eval(navi_it);
}
if (!content) return NULL;
elm_widget_sub_object_del(navi_it->base.widget, content);
- edje_object_part_unswallow(navi_it->title, content);
+ edje_object_part_unswallow(navi_it->base.view, content);
snprintf(buf, sizeof(buf), "elm,state,%s,hide", part);
- edje_object_signal_emit(navi_it->title, buf, "elm");
+ edje_object_signal_emit(navi_it->base.view, buf, "elm");
evas_object_event_callback_del(content,
EVAS_CALLBACK_DEL,
_title_content_del);
Elm_Naviframe_Content_Item_Pair *pair = data;
Elm_Naviframe_Item *it = pair->it;
snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
- edje_object_signal_emit(it->title, buf, "elm");
+ edje_object_signal_emit(it->base.view, buf, "elm");
it->content_list = eina_list_remove(it->content_list, pair);
eina_stringshare_del(pair->part);
free(pair);
if (!content)
{
snprintf(buf, sizeof(buf), "elm,state,%s,hide", part);
- edje_object_signal_emit(it->title, buf, "elm");
+ edje_object_signal_emit(it->base.view, buf, "elm");
return;
}
elm_widget_sub_object_add(it->base.widget, content);
- edje_object_part_swallow(it->title, part, content);
+ edje_object_part_swallow(it->base.view, part, content);
snprintf(buf, sizeof(buf), "elm,state,%s,show", part);
- edje_object_signal_emit(it->title, buf, "elm");
+ edje_object_signal_emit(it->base.view, buf, "elm");
evas_object_event_callback_add(content,
EVAS_CALLBACK_DEL,
_title_content_del,
EVAS_CALLBACK_DEL,
_title_prev_btn_del,
it);
- edje_object_part_swallow(it->title, "elm.swallow.prev_btn", btn);
+ edje_object_part_swallow(it->base.view, "elm.swallow.prev_btn", btn);
it->back_btn = back_btn;
_item_sizing_eval(it);
EVAS_CALLBACK_DEL,
_title_next_btn_del,
it);
- edje_object_part_swallow(it->title, "elm.swallow.next_btn", btn);
+ edje_object_part_swallow(it->base.view, "elm.swallow.next_btn", btn);
_item_sizing_eval(it);
}
eina_list_free(it->content_list);
eina_list_free(it->text_list);
- evas_object_del(it->title);
evas_object_del(it->base.view);
wd->stack = eina_list_remove(wd->stack, it);
elm_naviframe_item_style_set(ELM_CAST(it), item_style);
//title
- it->title = edje_object_add(evas_object_evas_get(obj));
- elm_widget_sub_object_add(obj, it->title);
- _elm_theme_object_set(obj,
- it->title, "naviframe",
- "title",
- elm_widget_style_get(obj));
- edje_object_signal_callback_add(it->title,
- "elm,action,clicked",
+ edje_object_signal_callback_add(it->base.view,
+ "elm,title,clicked",
"elm",
_title_clicked, it);
_title_prev_btn_set(it, prev_btn, EINA_FALSE);
_title_next_btn_set(it, next_btn);
- edje_object_part_swallow(it->base.view, "elm.swallow.title", it->title);
_item_content_set(it, content);