#define STATE_NORMAL 0 #define STATE_HIGHLIGHT 1 group { name: "elm/button/base/fbr_hover_entry"; data.item: "focus_highlight" "on"; images { image: FBR_IMAGE_TICK COMP; } script { public cur_state; public hide_line; } parts { part { name: "bg"; type: RECT; scale: 1; description { state: "default" 0.0; min: 290 72; color: 255 255 255 255; } description { state: "selected" 0.0; inherit: "default" 0.0; color: 126 128 255 255; } description { state: "highlight" 0.0; inherit: "default" 0.0; color: 255 255 255 255; } } part { name: "division_line"; type: RECT; scale: 1; description { state: "default" 0.0; min: 290 2; color: 89 89 89 51; rel1 { to: "bg"; relative: 1.0 1.0; } rel2 { to: "bg"; } align: 1.0 1.0; fixed: 1 1; } description { state: "selected" 0.0; inherit: "default" 0.0; visible: 0; } description { state: "highlight" 0.0; inherit: "default" 0.0; } } part { name: "padding_text"; type: RECT; scale: 1; description { state: "default" 0.0; min: 40 0; rel1 { to: "bg"; } rel2 { to: "bg"; relative: 0.0 1.0; } fixed: 1 0; visible: 0; align: 0.0 0.0; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 170 80; rel1 { to: "padding_text"; relative: 1.0 0.0; } rel2 { to: "padding_text"; } text { font: FONT_STYLE_REGULAR; size: 30; align: 0.0 0.5; } color: 89 89 89 255; fixed: 1 1; align: 0.0 0.0; } description { state: "selected" 0.0; inherit: "default" 0.0; color: 255 255 255 255; } description { state: "highlight" 0.0; inherit: "default" 0.0; color: 126 128 255 255; } } part { name: "padding_icon"; type: RECT; scale: 1; description { state: "default" 0.0; min: 20 30; rel1 { to: "elm.text"; relative: 1.0 0.0; } rel2 { to: "elm.text"; relative: 1.0 0.0; } fixed: 1 1; visible: 0; align: 0.0 0.0; } } part { name: "image_part"; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 20 20; rel1 { to: "padding_icon"; relative: 1.0 1.0; } rel2 { to: "padding_icon"; } image.normal: FBR_IMAGE_TICK; fixed: 1 1; align: 0.0 0.0; visible: 0; } description { state: "selected" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "highlight" 0.0; inherit: "default" 0.0; color: 126 128 255 255; visible: 1; } } } programs { program { name: "load"; signal: "load"; source: ""; script { set_int(cur_state, STATE_NORMAL); set_int(hide_line, 0); } } program { name: "button_down"; signal: "mouse,down,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,press" ""; } program { name: "button_mouseup"; signal: "mouse,up,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_clicked"; signal: "mouse,clicked,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "focused"; signal: "elm,action,focus"; source: "elm"; script { new state; state = get_int(cur_state); if (state == STATE_HIGHLIGHT) set_state(PART:"image_part", "selected", 0.0); set_state(PART:"bg", "selected", 0.0); set_state(PART:"division_line", "selected", 0.0); set_state(PART:"elm.text", "selected", 0.0); } } program { name: "unfocused"; signal: "elm,action,unfocus"; source: "elm"; script { new state; new var; new buf[100]; state = get_int(cur_state); if (state == STATE_HIGHLIGHT) snprintf(buf, sizeof(buf), "highlight"); else snprintf(buf, sizeof(buf), "default"); var = get_int(hide_line); set_state(PART:"bg", buf, 0.0); if (!var) set_state(PART:"division_line", buf, 0.0); set_state(PART:"elm.text", buf, 0.0); set_state(PART:"image_part", buf, 0.0); } } program { name: "highlight"; signal: "elm,action,highlight"; source: "elm"; script { set_int(cur_state, STATE_HIGHLIGHT); } after: "highlight1"; } program { name: "highlight1"; action: STATE_SET "highlight" 0.0; target: "bg"; target: "elm.text"; target: "image_part"; target: "division_line"; } program { name: "hide_line"; signal: "elm,action,hideline"; source: "elm"; script { set_int(hide_line, 1); set_state(PART:"division_line", "selected", 0.0); } } } } group { name: "elm/button/base/fbr_sourcebtn"; data.item: "focus_highlight" "on"; images { image: FBR_IMAGE_PULLDOWN_ARROW COMP; image: FBR_IMAGE_ROUND_ICON COMP; } script { public cur_state; } parts { part { name: "bg"; scale: 1; description { state: "default" 0.0; min: 290 72; rel2.relative: 0.0 0.0; image { normal: FBR_IMAGE_ROUND_ICON; border: 4 4 4 4; border_scale: 1; } color: 255 255 255 12; align: 0.0 0.0; fixed: 1 1; } description { state: "selected" 0.0; inherit: "default" 0.0; color: 126 128 255 255; } description { state: "selected_0" 0.0; inherit: "selected" 0.0; color: 126 128 255 0; } description { state: "highlight" 0.0; inherit: "default" 0.0; color: 255 255 255 255; } } part { name: "padding_txt"; type: RECT; scale: 1; description { state: "default" 0.0; min: 32 0; rel2.relative: 0.0 0.0; align: 0.0 0.5; fixed: 1 1; visible: 0; } } part { name: "elm.text"; type: TEXT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: 0 72; rel1 { relative: 1.0 0.0; to: "padding_txt"; } rel2 { relative: 1.0 0.0; to: "padding_txt"; } text { font: FONT_STYLE_REGULAR; size: 30; align: 0.0 0.5; min: 1 0; ellipsis: -1; } align: 0.0 0.0; color: 175 175 175 255; fixed: 1 1; } description { state: "selected" 0.0; inherit: "default" 0.0; color: 255 255 255 255; } description { state: "highlight" 0.0; inherit: "default" 0.0; color: 126 128 255 255; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 175 175 175 25; } } part { name: "padding_updown"; type: RECT; scale: 1; description { state: "default" 0.0; min: 10 0; rel1 { to: "elm.text"; relative: 1.0 0.0; } rel2 { to: "elm.text"; } align: 0.0 0.5; fixed: 1 1; visible: 0; } } part { name: FBR_PART_ELM_SWALLOWICON; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: 24 24; max: 24 24; rel1 { relative: 1.0 0.0; to: "padding_updown"; } rel2 { to: "padding_updown"; } align: 0.0 0.5; fixed: 1 1; color: 193 193 193 255; } description { state: "focused" 0.0; inherit: "default" 0.0; color: 255 255 255 255; } description { state: "highlight" 0.0; inherit: "focused" 0.0; } description { state: "mouse_over" 0.0; inherit: "focused" 0.0; } } part { name: "padding_arrow"; type: RECT; scale: 1; description { state: "default" 0.0; min: 24 0; rel1 { relative: 1.0 0.0; to: "bg"; } rel2 { to: "bg"; } align: 1.0 0.5; fixed: 1 1; visible: 0; } } part { name: "arrow_img"; type: IMAGE; scale: 1; description { state: "default" 0.0; min: 24 24; max: 24 24; rel1 { relative: 0.0 0.0; to: "padding_arrow"; } rel2 { relative: 0.0 1.0; to: "padding_arrow"; } image.normal: FBR_IMAGE_PULLDOWN_ARROW; align: 1.0 0.5; fixed: 1 1; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 175 175 175 25; } } } programs { program { name: "load"; signal: "load"; source: ""; script { set_int(cur_state, STATE_NORMAL); } } program { name: "button_down"; signal: "mouse,down,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,press" ""; } program { name: "button_mouseup"; signal: "mouse,up,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_clicked"; signal: "mouse,clicked,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "focused"; signal: "elm,action,focus"; source: "elm"; script { set_int(cur_state, STATE_NORMAL); set_state(PART:"bg", "selected", 0.0); set_state(PART:"elm.text", "selected", 0.0); } } program { name: "focus,anim"; action: STATE_SET "selected" 0.0; target: "bg"; target: "elm.text"; target: FBR_PART_ELM_SWALLOWICON; transition: LINEAR 0.17; } program { name: "unfocused"; signal: "elm,action,unfocus"; source: "elm"; script { new state; state = get_int(cur_state); if (state == STATE_HIGHLIGHT) { set_state(PART:"bg", "highlight_0", 0.0); set_state(PART:"elm.text", "highlight", 0.0); set_state(PART:FBR_PART_ELM_SWALLOWICON, "highlight", 0.0); run_program(PROGRAM:"unfocus,high,anim"); } else { set_state(PART:"bg","default", 0.0); set_state(PART:"elm.text","default", 0.0); } } } program { name: "unfocus,high,anim"; action: STATE_SET "highlight" 0.0; target: "bg"; transition: LINEAR 0.17; } program { name: "unfocus,default,anim"; action: STATE_SET "default" 0.0; target: "bg"; target: "elm.text"; target: FBR_PART_ELM_SWALLOWICON; transition: LINEAR 0.17; } program { name: "unfocus"; signal: "unfocused"; source: ""; action: STATE_SET "default" 0.0; target: "bg"; target: "elm.text"; target: FBR_PART_ELM_SWALLOWICON; } program { name: "highlight"; signal: "highlight"; source: ""; script { set_int(cur_state, STATE_HIGHLIGHT); set_state(PART:"bg", "highlight", 0.0); set_state(PART:"elm.text", "highlight", 0.0); set_state(PART:FBR_PART_ELM_SWALLOWICON, "highlight", 0.0); } } program { name: "unhighlight"; signal: "unhighlight"; source: ""; script { set_int(cur_state, STATE_NORMAL); set_state(PART:"bg", "default", 0.0); set_state(PART:"elm.text", "default", 0.0); set_state(PART:FBR_PART_ELM_SWALLOWICON, "default", 0.0); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; script { set_state(PART:"bg", "default", 0.0); set_state(PART:"elm.text", "default", 0.0); set_state(PART:"arrow_img", "default", 0.0); } } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; script{ set_state(PART:"bg", "disabled", 0.0); set_state(PART:"elm.text", "disabled", 0.0); set_state(PART:"arrow_img", "disabled", 0.0); } } } } group { name: "elm/button/base/fbr_sortbtn"; inherit: "elm/button/base/fbr_sourcebtn"; parts { part { name: "bg"; scale: 1; description { state: "default" 0.0; color: 0 0 0 76; } } } } group { name: "elm/button/base/fbr_menubtn"; data.item: "focus_highlight" "on"; images { image: FBR_GROUPBTN_BG COMP; } parts { part { name: "bg"; scale: 1; description { state: "default" 0.0; min: 406 87; image.normal: FBR_GROUPBTN_BG; color: 0 0 0 0; } description { state: "focused" 0.0; inherit: "default" 0.0; color: 126 128 255 255; } description { state: "highlight" 0.0; inherit: "default" 0.0; color: 126 128 255 51; } } part { name: "padding_icon"; type: RECT; scale: 1; description { state: "default" 0.0; min: 85 0; rel1 { to: "bg"; } rel2 { to: "bg"; relative: 0.0 1.0; } fixed: 1 0; visible: 0; align: 0.0 0.5; } } part { name: FBR_PART_ELM_SWALLOWICON; type: SWALLOW; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 40 40; rel1 { to: "padding_icon"; relative: 1.0 0.0; } rel2 { to: "padding_icon"; } fixed: 1 0; align: 0.0 0.5; } } part { name: "padding_text"; type: RECT; scale: 1; description { state: "default" 0.0; min: 37 0; rel1 { to: FBR_PART_ELM_SWALLOWICON; relative: 1.0 0.0; } rel2 { to: FBR_PART_ELM_SWALLOWICON; relative: 1.0 0.0; } fixed: 1 1; visible: 0; align: 0.0 0.0; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 219 87; rel1 { to_x: "padding_text"; relative: 1.0 0.0; } rel2 { to_x: "padding_text"; relative: 1.0 1.0; } text { font: FONT_STYLE_REGULAR; size: 30; align: 0.0 0.5; } color: 255 255 255 153; fixed: 1 1; align: 0.0 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; text { font: FONT_STYLE_BOLD; } color: 255 255 255 255; } description { state: "highlight" 0.0; inherit: "default" 0.0; text { font: FONT_STYLE_MEDIUM; } color: 255 255 255 255; } } } script { public select_status = 0; } programs { program { name: "button_down"; signal: "mouse,down,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,press" ""; } program { name: "button_mouseup"; signal: "mouse,up,1"; source: "bg"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "focused"; signal: "elm,action,focus"; source: "elm"; action: STATE_SET "focused" 0.0; script { if (get_int(select_status) != 1) { emit("elm,action,click", ""); } set_state(PART:"bg", "focused", 0.0); set_state(PART:"elm.text", "focused", 0.0); } } program { name: "unfocused"; signal: "elm,action,unfocus"; source: "elm"; script { if (get_int(select_status) == 1) { set_state(PART:"bg", "highlight", 0.0); set_state(PART:"elm.text", "highlight", 0.0); } else { set_state(PART:"bg", "default", 0.0); set_state(PART:"elm.text", "default", 0.0); } } } program { name: "select"; signal: FBR_SIGNAL_GROUP_SELECTED; source: ""; script { set_int(select_status, 1); } } program { name: "unselect"; signal: FBR_SIGNAL_GROUP_UNSELECTED; source: ""; script { set_int(select_status, 0); set_state(PART:"bg", "default", 0.0); set_state(PART:"elm.text", "default", 0.0); } } } }