/* * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved * * PROPRIETARY/CONFIDENTIAL * * This software is the confidential and proprietary information of SAMSUNG * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this * software is owned by Samsung and you shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the license * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no * representations or warranties about the suitability of the software, either * express or implied, including but not limited to the implied warranties of * merchantability, fitness for a particular purpose, or non-infringement. * SAMSUNG shall not be liable for any damages suffered by licensee arising out * of or releated to this software. * */ #define BUTTON_STATE_ENABLED 0 #define BUTTON_STATE_DISABLED 1 sounds { sample { name: "touch_sound" AS_IS; source: "S_Touch_30ms.wav"; } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/style1"; alias: "elm/button/base/text_only/style1"; alias: "elm/button/base/center"; alias: "elm/button/base/icon_and_text/center"; alias: "elm/button/base/nocontents/search_button"; images { image: "00_button_01_normal.png" COMP; image: "00_button_01_normal_press.png" COMP; image: "00_button_01_normal_dim.png" COMP; image: "00_button_01_normal_Focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; image { normal: "00_button_01_normal.png"; border: BUTTON_TEXT_STYLE1_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_Focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_TEXT_STYLE1_BG_MIN_INC; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_TEXT_STYLE1_FONT_SIZE_INC; min: 0 0; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; target: "bg"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } ////////////////////////////////////////////////////////////// group { name: "elm/button/base/style1/auto_expand"; alias: "elm/button/base/datetime_ampm/default"; images { image: "00_button_01_normal.png" COMP; image: "00_button_01_normal_press.png" COMP; image: "00_button_01_normal_dim.png" COMP; image: "00_button_01_normal_Focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; image { normal: "00_button_01_normal.png"; border: BUTTON_TEXT_STYLE1_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_Focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_TEXT_STYLE1_BG_MIN_INC; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_TEXT_STYLE1_FONT_SIZE_INC; min: 1 0; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; target: "bg"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } ////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/style1/multiline"; images { image: "00_button_01_normal.png" COMP; image: "00_button_01_normal_press.png" COMP; image: "00_button_01_normal_dim.png" COMP; image: "00_button_01_normal_Focus.png" COMP; } styles{ style { name: "btn_style1_multiline"; base: "font=SLP:style=Roman font_size="BUTTON_TEXT_STYLE1_MULTILINE_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed ellipise=1.0 text_class=slp_roman"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; image { normal: "00_button_01_normal.png"; border: BUTTON_TEXT_STYLE1_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_Focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_TEXT_STYLE1_BG_MIN_INC; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 5 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { style: "btn_style1_multiline"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; target: "bg"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/style2"; alias: "elm/button/base/text_only/style2"; images { image: "00_button_04_normal.png" COMP; image: "00_button_04_press.png" COMP; image: "00_button_04_dim.png" COMP; image: "00_button_04_normal_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; image { normal: "00_button_04_normal.png"; border: BUTTON_TEXT_STYLE2_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_TEXT_STYLE2_BG_MIN_INC; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE2_VISIBLE_BG_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE2_ICONONLY_BG_MIN_INC; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_TEXT_STYLE2_FONT_SIZE_INC; min: 0 0; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; target: "bg"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/style2/multiline"; images { image: "00_button_04_normal.png" COMP; image: "00_button_04_press.png" COMP; image: "00_button_04_dim.png" COMP; image: "00_button_04_normal_focus.png" COMP; } styles{ style { name: "btn_style2_multiline"; base: "font=SLP:style=Roman font_size="BUTTON_TEXT_STYLE2_MULTILINE_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed ellipise=1.0 text_class=slp_roman"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; image { normal: "00_button_04_normal.png"; border: BUTTON_TEXT_STYLE2_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_TEXT_STYLE2_BG_MIN_INC; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE2_VISIBLE_BG_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; min: BUTTON_TEXT_STYLE2_ICONONLY_BG_MIN_INC; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { style: "btn_style2_multiline"; min: 0 0; max: 1 0; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; target: "bg"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/sweep"; alias: "elm/button/base/text_only/sweep"; images { image: "00_button_sweep.png" COMP; image: "00_button_sweep_press.png" COMP; image: "00_button_sweep_dim.png" COMP; image: "00_button_sweep_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_SWEEP_BG_NORMAL_MIN_INC; image { normal: "00_button_sweep.png"; border: BUTTON_SWEEP_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_SWEEP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_SWEEP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_SWEEP_ICON_RECT_MIN_INC; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_SWEEP_PADDING_ICON_TEXT_VISIBLE_MIN_INC; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_SWEEP_ICONONLY_ICON_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_SWEEP_BUTTON_TEXT_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_SWEEP_FONT_SIZE_INC; min: 0 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_SWEEP_TEXT_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_SWEEP_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_SWEEP_BUTTON_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_SWEEP_TEXT_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_SWEEP_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/sweep/multiline"; images { image: "00_button_sweep.png" COMP; image: "00_button_sweep_press.png" COMP; image: "00_button_sweep_dim.png" COMP; image: "00_button_sweep_focus.png" COMP; } styles{ style { name: "btn_sweep_multiline"; base: "font=SLP:style=Roman font_size="BUTTON_SWEEP_MULTILINE_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed ellipise=1.0 text_class=slp_roman"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_SWEEP_BG_NORMAL_MIN_INC; image { normal: "00_button_sweep.png"; border: BUTTON_SWEEP_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_SWEEP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_SWEEP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_SWEEP_ICON_RECT_MIN_INC; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_SWEEP_PADDING_ICON_TEXT_VISIBLE_MIN_INC; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_SWEEP_ICONONLY_ICON_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } } } part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_SWEEP_BUTTON_TEXT_NORMAL_COLOR_INC; text { style: "btn_sweep_multiline"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_SWEEP_TEXT_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_SWEEP_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_SWEEP_BUTTON_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_SWEEP_TEXT_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_SWEEP_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/sweep/delete"; images { image: "00_button_sweep_dim.png" COMP; image: "00_button_sweep_delete.png" COMP; image: "00_button_sweep_delete_press.png" COMP; image: "00_button_sweep_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_SWEEP_BG_NORMAL_MIN_INC; image { normal: "00_button_sweep_delete.png"; border: BUTTON_SWEEP_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_delete_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_SWEEP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_SWEEP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_SWEEP_ICON_RECT_MIN_INC; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_SWEEP_PADDING_ICON_TEXT_VISIBLE_MIN_INC; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_SWEEP_ICONONLY_ICON_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_SWEEP_BUTTON_TEXT_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_SWEEP_FONT_SIZE_INC; min: 1 0; text: "Delete"; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; } description { state: "clicked" 0.0; inherit: "default" 0.0; color: BUTTON_SWEEP_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_SWEEP_BUTTON_TEXT_DISABLED_COLOR_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_SWEEP_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/popup_button/default"; alias: "elm/button/base/popup_button/menustyle"; alias: "elm/button/base/popup_button/liststyle"; alias: "elm/button/base/popup_button/volumebarstyle"; alias: "elm/button/base/popup_button/customstyle"; alias: "elm/button/base/popup_button/verticalbuttonstyle"; images { image: "00_button_popup_normal.png" COMP; image: "00_button_popup_press.png" COMP; image: "00_button_popup_normal_focus.png" COMP; image: "00_button_popup_dim.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_POPUP_BG_NORMAL_MIN_INC; image { normal: "00_button_popup_normal.png"; border: BUTTON_POPUP_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_popup_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_popup_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_popup_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_POPUP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; description { state: "default" 0.0; align: 1.0 0.0; rel1.relative: 1.0 1.0; min: BUTTON_POPUP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; } rel2.to: "elm.swallow.content"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible inherit: "default" 0.0; min: BUTTON_POPUP_PADDING_ICON_TEXT_VISIBLE_MIN_INC; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; inherit: "default" 0.0; fixed: 1 0; visible: 1; aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_POPUP_ICON_ICONONLY_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_POPUP_BUTTON_TEXT_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_POPUP_TEXT_FONT_SIZE_INC; min: 0 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_POPUP_TEXT_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_POPUP_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_POPUP_BUTTON_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_POPUP_TEXT_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_POPUP_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/popup_button/default/multiline"; images { image: "00_button_popup_normal.png" COMP; image: "00_button_popup_press.png" COMP; image: "00_button_popup_normal_focus.png" COMP; image: "00_button_popup_dim.png" COMP; } styles{ style { name: "btn_popup_multiline_style"; base: "font=SLP:style=Roman font_size="BUTTON_POPUP_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed text_class=slp_roman"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_POPUP_BG_NORMAL_MIN_INC; image { normal: "00_button_popup_normal.png"; border: BUTTON_POPUP_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_popup_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_popup_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_popup_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_POPUP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; description { state: "default" 0.0; align: 1.0 0.0; rel1.relative: 1.0 1.0; min: BUTTON_POPUP_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; } rel2.to: "elm.swallow.content"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible inherit: "default" 0.0; min: BUTTON_POPUP_PADDING_ICON_TEXT_VISIBLE_MIN_INC; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; inherit: "default" 0.0; fixed: 1 0; visible: 1; aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_POPUP_ICON_ICONONLY_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } } } part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_POPUP_BUTTON_TEXT_NORMAL_COLOR_INC; text { style: "btn_popup_multiline_style"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_POPUP_TEXT_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_POPUP_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_POPUP_BUTTON_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_POPUP_TEXT_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_POPUP_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// #define BUTTON_CIRCLE_STYLES(style_name, circle_normal, circle_press, image_normal, image_press, min_width, min_height) \ group { name: "elm/button/base/"style_name; \ images { \ image: circle_normal COMP; \ image: circle_press COMP; \ image: image_normal COMP; \ image: image_press COMP; \ } \ parts { \ part { name: "button_image"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; \ max: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; \ image.normal: circle_normal; \ color: 255 255 255 255; \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: circle_press; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ color: 255 255 255 128; \ } \ } \ part { name: "button_center_part"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_CIRCLE_STYLE_IMAGE_MIN_MAX_INC; \ max: BUTTON_CIRCLE_STYLE_IMAGE_MIN_MAX_INC; \ image.normal: image_normal; \ color: 255 255 255 255; \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: image_press; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ color: 255 255 255 128; \ } \ } \ part { name: "over1"; \ type: RECT; \ ignore_flags: ON_HOLD; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ min: min_width min_height; \ } \ } \ part { name: "over2"; \ repeat_events: 1; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "disabler"; \ type: RECT; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ visible: 0; \ } \ description { state: "disabled" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ } \ } \ } \ programs { \ program { name: "button_click"; \ signal: "mouse,down,1"; \ source: "over1"; \ action: SIGNAL_EMIT "elm,action,press" ""; \ after: "button_click_anim"; \ } \ program { name: "button_click_anim"; \ action: STATE_SET "clicked" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "button_unclick"; \ signal: "mouse,up,1"; \ source: "over2"; \ action: SIGNAL_EMIT "elm,action,unpress" ""; \ after: "button_unclick_anim"; \ } \ program { name: "button_unclick_anim"; \ action: STATE_SET "default" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "touch_snd"; \ signal: "mouse,clicked,1"; \ source: "over1"; \ action: PLAY_SAMPLE "touch_sound" 1.0; \ after: button_unclick3; \ } \ program { name: "button_unclick3"; \ action: SIGNAL_EMIT "elm,action,click" ""; \ } \ program { name: "disable"; \ signal: "elm,state,disabled"; \ source: "elm"; \ action: STATE_SET "disabled" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "enable"; \ signal: "elm,state,enabled"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "button_center_part"; \ } \ } \ } /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("reveal", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_reveal.png", "00_button_reveal_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("reveal/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_reveal.png", "00_button_reveal_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("expand/closed", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_expand_closed.png", "00_button_expand_closed_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("expand/closed/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_expand_closed.png", "00_button_expand_closed_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("expand/opened", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_expand_opened.png", "00_button_expand_opened_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("expand/opened/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_expand_opened.png", "00_button_expand_opened_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("info", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_info.png", "00_button_info_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("info/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_info.png", "00_button_info_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("rename", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_rename.png", "00_button_rename_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("rename/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_rename.png", "00_button_rename_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("call", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_call.png", "00_button_call_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("call/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_call.png", "00_button_call_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("warning", "00_btn_circle_bg_normal_01.png", "00_btn_circle_bg_press_01.png", "00_button_warning.png", "00_button_warning_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("warning/extended", "00_btn_circle_bg_normal_01.png", "00_btn_circle_bg_press_01.png", "00_button_warning.png", "00_button_warning_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("plus", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_plus.png", "00_button_plus_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("plus/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_plus.png", "00_button_plus_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("minus", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_minus.png", "00_button_minus_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("minus/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_minus.png", "00_button_minus_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("cancel", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_cancel.png", "00_button_cancel_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("cancel/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_cancel.png", "00_button_cancel_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("send", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_send.png", "00_button_send_press.png", BUTTON_CIRCLE_NORMAL_MIN_WIDTH_INC, BUTTON_CIRCLE_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CIRCLE_STYLES("send/extended", "00_btn_circle_bg_normal.png", "00_btn_circle_bg_press.png", "00_button_send.png", "00_button_send_press.png", BUTTON_CIRCLE_EXTENEDED_MIN_WIDTH_INC, BUTTON_CIRCLE_EXTENEDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/circle/empty"; images { image: "00_btn_circle_bg_normal.png" COMP; image: "00_btn_circle_bg_press.png" COMP; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; max: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; fixed: 1 1; image.normal: "00_btn_circle_bg_normal.png"; color: 255 255 255 255; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_btn_circle_bg_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 255 255 255 128; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: BUTTON_CIRCLE_STYLE_CONTENT_MIN_MAX_INC; max: BUTTON_CIRCLE_STYLE_CONTENT_MIN_MAX_INC; fixed: 1 1; color: 255 255 255 255; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 255 255 255 128; } } part { name: "over1"; type: RECT; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over2"; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over1"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over1"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick2; } program { name: "button_unclick2"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "button_unclick"; signal: "mouse,up,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,unpress" ""; after: "button_unclick_anim"; } program { name: "button_unclick_anim"; action: STATE_SET "default" 0.0; target: "button_image"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "disabler"; target: "button_image"; } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "disabler"; target: "button_image"; } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; action: STATE_SET "visible" 0.0; target: "elm.swallow.content"; } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; } } } /////////////////////////////////////////////////////////////////////////////////////// #define BUTTON_EDIT_STYLES(style_name, edit_normal, edit_press, image_normal, image_press, min_width, min_height) \ group { name: "elm/button/base/contacts/"style_name; \ alias: "elm/button/base/"style_name; \ images { \ image: image_normal COMP; \ image: image_press COMP; \ image: edit_normal COMP; \ image: edit_press COMP; \ image: "00_button_edit_dim.png" COMP; \ image: "00_button_edit_focus.png" COMP; \ } \ parts { \ part { name: "button_image"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_EDIT_STYLE_BG_NORMAL_MIN_MAX_INC; \ max: BUTTON_EDIT_STYLE_BG_NORMAL_MIN_MAX_INC; \ image { \ normal: edit_normal; \ border: BUTTON_EDIT_STYLE_BORDER_INC; \ border_scale: 1; \ } \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: edit_press; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ image.normal: "00_button_edit_dim.png"; \ } \ description { \ state: "focused" 0.0; \ inherit: "default" 0.0; \ image.normal: "00_button_edit_focus.png"; \ } \ } \ part { name: "button_center_part"; \ mouse_events: 0; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_EDIT_STYLE_IMAGE_NORMAL_MIN_MAX_INC; \ max: BUTTON_EDIT_STYLE_IMAGE_NORMAL_MIN_MAX_INC; \ image { \ normal: image_normal; \ border: BUTTON_EDIT_STYLE_BORDER_INC; \ border_scale: 1; \ } \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: image_press; \ } \ } \ part { name: "over1"; \ type: RECT; \ repeat_events: 1; \ ignore_flags: ON_HOLD; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ min: min_width min_height; \ } \ } \ part { name: "over2"; \ repeat_events: 1; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "disabler"; \ type: RECT; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ visible: 0; \ } \ description { state: "disabled" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ } \ } \ } \ programs { \ program { name: "button_click"; \ signal: "mouse,down,1"; \ source: "over1"; \ action: SIGNAL_EMIT "elm,action,press" ""; \ after: "button_click_anim"; \ } \ program { name: "button_click_anim"; \ action: STATE_SET "clicked" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "button_unclick"; \ signal: "mouse,up,1"; \ source: "over2"; \ action: SIGNAL_EMIT "elm,action,unpress" ""; \ after: "button_unclick_anim"; \ } \ program { name: "button_unclick_anim"; \ action: STATE_SET "default" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "touch_snd"; \ signal: "mouse,clicked,1"; \ source: "over1"; \ action: PLAY_SAMPLE "touch_sound" 1.0; \ after: button_unclick3; \ } \ program { name: "button_unclick3"; \ action: SIGNAL_EMIT "elm,action,click" ""; \ } \ program { name: "disable"; \ signal: "elm,state,disabled"; \ source: "elm"; \ action: STATE_SET "disabled" 0.0; \ target: "disabler"; \ target: "button_image"; \ } \ program { name: "enable"; \ signal: "elm,state,enabled"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "disabler"; \ target: "button_image"; \ } \ } \ } /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_plus", "00_button_edit.png", "00_button_edit_press.png", "00_button_icon_plus.png", "00_button_icon_plus_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_plus/extended", "00_button_edit.png", "00_button_edit_press.png", "00_button_icon_plus.png", "00_button_icon_plus_press.png", BUTTON_EDIT_EXTENDED_MIN_WIDTH_INC, BUTTON_EDIT_EXTENDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_minus", "00_button_edit_Delete.png", "00_button_edit_Delete_press.png", "00_button_icon_minus.png", "00_button_icon_minus_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_minus/extended", "00_button_edit_Delete.png", "00_button_edit_Delete_press.png", "00_button_icon_minus.png", "00_button_icon_minus_press.png", BUTTON_EDIT_EXTENDED_MIN_WIDTH_INC, BUTTON_EDIT_EXTENDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_expand", "00_button_edit.png", "00_button_edit_press.png", "00_button_icon_expand.png", "00_button_icon_expand_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_edit.png", "00_button_edit_press.png", "00_button_icon_expand.png", "00_button_icon_expand_press.png", BUTTON_EDIT_EXTENDED_MIN_WIDTH_INC, BUTTON_EDIT_EXTENDED_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_expand_closed", "00_button_edit.png", "00_button_edit_press.png", "00_button_icon_expand_closed.png", "00_button_icon_expand_closed_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// BUTTON_EDIT_STYLES("icon_expand_opened", "00_button_edit.png", "00_button_edit_press.png", "00_button_icon_expand_opened.png", "00_button_icon_expand_opened_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC) /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/contacts/delete"; images { image: "00_button_edit_Delete.png" COMP; image: "00_button_edit_Delete_press.png" COMP; image: "00_button_edit_dim.png" COMP; image: "00_button_edit_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_CONTACT_DELETE_BG_NORMAL_MIN_INC; image { normal: "00_button_edit_Delete.png"; border: BUTTON_CONTACT_DELETE_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_edit_Delete_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_edit_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_edit_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_CONTACT_DELETE_PADDING_LEFT_TOP_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_CONTACT_DELETE_PADDING_RIGHT_BOTTOM_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; } rel2.to: "elm.swallow.content"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible inherit: "default" 0.0; min: BUTTON_CONTACT_DELETE_PADDING_ICON_TEXT_VISIBLE_MIN_INC; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_CONTACT_DELETE_ICON_ICONONLY_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TEXT_CONTACTS_DELETE_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_CONTACT_DELETE_FONT_SIZE_INC; min: 1 0; text: "Delete"; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; } description { state: "clicked" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_CONTACTS_DELETE_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_CONTACTS_DELETE_DISABLED_COLOR_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; min: 0 0; color: BUTTON_TEXT_CONTACTS_DELETE_PRESSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/multiline"; alias: "elm/button/base/text_only/multiline"; images { image: "00_button_04_normal.png" COMP; image: "00_button_04_press.png" COMP; image: "00_button_04_dim.png" COMP; image: "00_button_04_normal_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } styles{ style { name: "btn_multiline_style"; base: "font=SLP:style=Medium font_size=18 align=center color=#ffffff wrap=mixed text_class=slp_medium"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: 10 46; image { normal: "00_button_04_normal.png"; border: 4 4 3 3; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_04_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: 2 2; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: 2 2; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 1; min: 0 40; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 5 0; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: 40 40; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { style: "btn_multiline_style"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: 80 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_TEXT_DISABLED_COLOR_INC; visible: 1; min: 80 0; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/default"; alias: "elm/button/base/searchbar/default"; images { image: "00_button_01_normal.png" COMP; image: "00_button_01_normal_press.png" COMP; image: "00_button_01_normal_dim.png" COMP; image: "00_button_01_normal_Focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_DEFAULT_STYLE_BG_MIN_INC; image { normal: "00_button_01_normal.png"; border: BUTTON_DEFAULT_STYLE_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_normal_Focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_DEFAULT_STYLE_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_DEFAULT_STYLE_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; visible: 0; rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; } rel2.to: "elm.swallow.content"; fixed: 1 0; min: 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible inherit: "default" 0.0; min: BUTTON_DEFAULT_STYLE_PADDING_ICON_TEXT_VISIBLE_MIN_INC; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_DEFAULT_STYLE_ICONONLY_ICON_MIN_INC; rel1 { relative: 1.0 0.0; to_x: "padding_left_top"; } rel2 { relative: 0.0 1.0; to_x: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_DEFAULT_STYLE_FONT_SIZE_INC; min: 0 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_DEFAULT_STYLE_TEXT_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_DEFAULT_STYLE_TEXT_MIN_INC; color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_DEFAULT_STYLE_TEXT_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// #define BUTTON_COLORSELECTOR_STYLES(style_name, image_normal, image_press,image_disable) \ group { name: "elm/button/base/"style_name; \ images { \ image: image_normal COMP; \ image: image_press COMP; \ image: image_disable COMP; \ image: "00_button_01_normal.png" COMP; \ image: "00_button_01_normal_press.png" COMP; \ image: "00_button_01_normal_dim.png" COMP; \ image: "00_button_01_normal_Focus.png" COMP; \ } \ parts { \ part { name: "button_image"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_COLORSELECTOR_BG_DEFAULT_MIN_INC; \ max: BUTTON_COLORSELECTOR_BG_DEFAULT_MIN_INC; \ image { \ normal: "00_button_01_normal.png"; \ border: BUTTON_COLORSELECTOR_BG_BORDER_INC; \ border_scale: 1; \ } \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: "00_button_01_normal_press.png"; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ image.normal: "00_button_01_normal_dim.png"; \ } \ description { \ state: "focused" 0.0; \ inherit: "default" 0.0; \ image.normal: "00_button_01_normal_Focus.png"; \ } \ } \ part { name: "button_center_part"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_COLORSELECTOR_IMAGE_MIN_MAX_INC; \ max: BUTTON_COLORSELECTOR_IMAGE_MIN_MAX_INC; \ image.normal: image_normal; \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: image_press; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ image.normal: image_disable; \ } \ } \ part { name: "over1"; \ type: RECT; \ ignore_flags: ON_HOLD; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "over2"; \ repeat_events: 1; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "disabler"; \ type: RECT; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ visible: 0; \ } \ description { state: "disabled" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ } \ } \ } \ programs { \ program { name: "button_click"; \ signal: "mouse,down,1"; \ source: "over1"; \ action: SIGNAL_EMIT "elm,action,press" ""; \ after: "button_click_anim"; \ } \ program { name: "button_click_anim"; \ action: STATE_SET "clicked" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "button_unclick"; \ signal: "mouse,up,1"; \ source: "over2"; \ action: SIGNAL_EMIT "elm,action,unpress" ""; \ after: "button_unclick_anim"; \ } \ program { name: "button_unclick_anim"; \ action: STATE_SET "default" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "touch_snd"; \ signal: "mouse,clicked,1"; \ source: "over1"; \ action: PLAY_SAMPLE "touch_sound" 1.0; \ after: button_unclick3; \ } \ program { name: "button_unclick3"; \ action: SIGNAL_EMIT "elm,action,click" ""; \ } \ program { name: "disable"; \ signal: "elm,state,disabled"; \ source: "elm"; \ action: STATE_SET "disabled" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "enable"; \ signal: "elm,state,enabled"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "button_center_part"; \ } \ } \ } /////////////////////////////////////////////////////////////////////////////////////// BUTTON_COLORSELECTOR_STYLES("colorselector/left/default", "00_color_picker_btn_left.png", "00_color_picker_btn_left_press.png", "00_color_picker_btn_left_dim.png") /////////////////////////////////////////////////////////////////////////////////////// BUTTON_COLORSELECTOR_STYLES("colorselector/right/default", "00_color_picker_btn_right.png", "00_color_picker_btn_right_press.png", "00_color_picker_btn_right_dim.png") /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/hidden"; images { image: "00_button_sweep.png" COMP; image: "00_button_sweep_press.png" COMP; image: "00_button_sweep_focus.png" COMP; image: "00_button_sweep_dim.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_HIDDEN_BG_NORMAL_MIN_INC; image { normal: "00_button_sweep.png"; border: BUTTON_HIDDEN_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_sweep_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_HIDDEN_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_HIDDEN_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_HIDDEN_ICON_RECT_MIN_INC; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_HIDDEN_PADDING_ICON_TEXT_VISIBLE_MIN_INC; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_HIDDEN_ICON_ICONONLY_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_HIDDEN_BUTTON_TEXT_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_HIDDEN_FONT_SIZE_INC; min: 0 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_HIDDEN_TEXT_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_HIDDEN_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_HIDDEN_BUTTON_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_HIDDEN_TEXT_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_HIDDEN_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/picker/bar/default"; images { image: "00_picker_btn_normal.png" COMP; image: "00_picker_btn_press.png" COMP; image: "00_picker_btn_normal_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_MIN_INC; image { normal: "00_picker_btn_normal.png"; border: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_IMAGE_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_PICKER_BAR_DEFAULT_ICON_RECT_DEFAULT_MIN_INC; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_PICKER_BAR_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_PICKER_BAR_DEFAULT_CONTENT_ICONONLY_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_PICKER_TEXT_DEFAULT_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_PICKER_BAR_DEFAULT_TEXT_FONT_SIZE_INC; min: 1 0; max: 0 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_PICKER_TEXT_CLICKED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_PICKER_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/picker/prev/text/default"; alias: "elm/button/base/picker/next/text/default"; images { image: "00_picker_btn_normal.png" COMP; image: "00_picker_btn_press.png" COMP; image: "00_picker_btn_normal_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_MIN_INC; image { normal: "00_picker_btn_normal.png"; border: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_ICON_RECT_MIN_INC; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_CONTENT_ICON_ONLY_MIN_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_PICKER_TEXT_DEFAULT_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_FONT_SIZE_INC; min: 1 0; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_PICKER_TEXT_CLICKED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC; visible: 1; min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_PICKER_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// #define BUTTON_CONTACT_STYLES(style_name, image_normal, image_press) \ group { name: "elm/button/base/contact/"style_name; \ images { \ image: "00_contacts_circle_bg.png" COMP; \ image: image_normal COMP; \ image: image_press COMP; \ } \ parts { \ part { name: "button_image"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_CONTACT_STYLE_BG_MIN_MAX_INC; \ max: BUTTON_CONTACT_STYLE_BG_MIN_MAX_INC; \ image.normal: "00_contacts_circle_bg.png"; \ color: 255 255 255 255; \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: "00_contacts_circle_bg.png"; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ color: 255 255 255 128; \ } \ } \ part { name: "button_center_part"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_CONTACT_STYLE_IMAGE_MIN_MAX_INC; \ max: BUTTON_CONTACT_STYLE_IMAGE_MIN_MAX_INC; \ image.normal: image_normal; \ color: 255 255 255 255; \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: image_press; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ color: 255 255 255 128; \ } \ } \ part { name: "over1"; \ type: RECT; \ ignore_flags: ON_HOLD; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "over2"; \ repeat_events: 1; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "disabler"; \ type: RECT; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ visible: 0; \ } \ description { state: "disabled" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ } \ } \ } \ programs { \ program { name: "button_click"; \ signal: "mouse,down,1"; \ source: "over1"; \ action: SIGNAL_EMIT "elm,action,press" ""; \ after: "button_click_anim"; \ } \ program { name: "button_click_anim"; \ action: STATE_SET "clicked" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "button_unclick"; \ signal: "mouse,up,1"; \ source: "over2"; \ action: SIGNAL_EMIT "elm,action,unpress" ""; \ after: "button_unclick_anim"; \ } \ program { name: "button_unclick_anim"; \ action: STATE_SET "default" 0.0; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "touch_snd"; \ signal: "mouse,clicked,1"; \ source: "over1"; \ action: PLAY_SAMPLE "touch_sound" 1.0; \ after: button_unclick3; \ } \ program { name: "button_unclick3"; \ action: SIGNAL_EMIT "elm,action,click" ""; \ } \ program { name: "disable"; \ signal: "elm,state,disabled"; \ source: "elm"; \ action: STATE_SET "disabled" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "button_center_part"; \ } \ program { name: "enable"; \ signal: "elm,state,enabled"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "button_center_part"; \ } \ } \ } /////////////////////////////////////////////////////////////////////////////////////// BUTTON_CONTACT_STYLES("expand_closed", "00_button_expand_closed.png", "00_button_expand_closed_press.png") BUTTON_CONTACT_STYLES("expand_opened", "00_button_expand_opened.png", "00_button_expand_opened_press.png") BUTTON_CONTACT_STYLES("plus", "00_button_plus.png", "00_button_plus_press.png") /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/contact"; alias: "elm/button/base/text_only/contact"; images { image: "00_contacts_button_bg.png" COMP; image: "00_contacts_button_bg_press.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; rel1 { to_x: "padding.left"; to_y: "elm.text"; } rel2 { to_x: "padding.right"; to_y: "elm.text"; } min: BUTTON_CONTACT_BG_MIN_INC; image { normal: "00_contacts_button_bg.png"; border: BUTTON_CONTACT_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_contacts_button_bg_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "focused" 0.0; inherit: "default" 0.0; } } part { name: "padding.left"; type: RECT; scale: 1; description { state: "default" 0.0; visible: 0; min: BUTTON_CONTACT_PADDING_MIN_INC; fixed: 1 0; color: 0 0 0 0; rel2 { relative: 0.0 1.0; to_x: "elm.text"; } align: 1.0 0.0; } } part { name: "padding.right"; type: RECT; scale: 1; description { state: "default" 0.0; visible: 0; min: BUTTON_CONTACT_PADDING_MIN_INC; fixed: 1 0; color: 0 0 0 0; rel1 { relative: 1.0 0.0; to_x: "elm.text"; } align: 0.0 0.0; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; fixed: 1 1; color: BUTTON_CONTACT_BUTTON_TEXT_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_CONTACT_FONT_SIZE_INC; min: 1 1; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: 1 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 1 1; color: BUTTON_CONTACT_BUTTON_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_CONTACT_BUTTON_TEXT_DISABLED_COLOR_INC; visible: 1; min: 1 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 1 1; color: BUTTON_CONTACT_BUTTON_TEXT_FOCUSED_COLOR_INC; } } part { name: "over1"; mouse_events: 0; description { state: "default" 0.0; rel2.relative: 1.0 0.5; } } part { name: "over2"; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; rel1.to: "button_image"; rel2.to: "button_image"; } } part { name: "over3"; repeat_events: 1; description { state: "default" 0.0; rel1.to: "button_image"; rel2.to: "button_image"; color: 0 0 0 0; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; rel1.to: "button_image"; rel2.to: "button_image"; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; target: "elm.text"; } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "clicked") || !strcmp(st, "focused")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/naviframe/back_btn/default"; alias: "elm/button/base/naviframe/prev_btn/default"; alias: "elm/button/base/naviframe/end_btn/default"; images { image: "00_winset_toolbar_press.png" COMP; image: "00_winset_Back.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC; max: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC; color: 0 0 0 0; } description { state: "clicked" 0.0; min: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC; max: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC; image { normal: "00_winset_toolbar_press.png"; border: BUTTON_NAVIFRAME_BACK_BUTTON_BG_BORDER_INC; } } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 127 127 127 127; } description { state: "focused" 0.0; min: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC; max: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC; image { normal: "00_winset_toolbar_press.png"; border: BUTTON_NAVIFRAME_BACK_BUTTON_BG_BORDER_INC; } } } part { name: "back_button"; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC; max: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC; rel1.to: "button_image"; rel2.to: "button_image"; image.normal: "00_winset_Back.png"; } description { state: "clicked" 0.0; inherit: "default" 0.0; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 127 127 127 127; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; target: "back_button"; after: "disable_button"; } program { name: "disable_button"; script { set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; target: "back_button"; after: "enable_button"; } program { name: "enable_button"; script { set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/picker/prev/icon/default"; images { image: "00_picker_btn_normal.png" COMP; image: "00_picker_btn_press.png" COMP; image: "00_picker_btn_normal_focus.png" COMP; image: "00_picker_arrow_left.png" COMP; image: "00_picker_arrow_left_press.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC; max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC; image { normal: "00_picker_btn_normal.png"; border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "left_arrow"; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC; max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } image.normal: "00_picker_arrow_left.png"; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_arrow_left_press.png"; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_button"; } program { name: "disable_button"; script { set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_button"; } program { name: "enable_button"; script { set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/picker/next/icon/default"; images { image: "00_picker_btn_normal.png" COMP; image: "00_picker_btn_press.png" COMP; image: "00_picker_btn_normal_focus.png" COMP; image: "00_picker_arrow_right.png" COMP; image: "00_picker_arrow_right_press.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC; max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC; image { normal: "00_picker_btn_normal.png"; border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "right_arrow"; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC; max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } image.normal: "00_picker_arrow_right.png"; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_arrow_right_press.png"; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_button"; } program { name: "disable_button"; script { set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_button"; } program { name: "enable_button"; script { set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/naviframe_control/default"; alias: "elm/button/base/naviframe_control/center"; script { public button_state = BUTTON_STATE_ENABLED; } images { image: "00_Option_header_bt.png" COMP; image: "00_Option_header_bt_dim.png" COMP; image: "00_Option_header_bt_press.png" COMP; image: "00_Option_header_bt_focus.png" COMP; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC; color: 0 0 0 0; rel1.offset: 0 0; rel2.offset: -1 -1; image { normal: "00_Option_header_bt.png"; border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC; } color: 255 255 255 255; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_Option_header_bt_dim.png"; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_Option_header_bt_press.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_Option_header_bt_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } description { state: "visible" 0.0; min: BUTTON_NAVIFRAME_CENTER_ICON_RECT_VISIBLE_MIN_SIZE; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "visible" 0.0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC; color: 0 0 0 0; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_NAVIFRAME_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC; max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC; max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_NAVIFRAME_CENTER_TEXT_FONT_SIZE_INC; min: 0 0; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } description { state: "disabled" 0.0; color: 255 255 255 127; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); } set_state(PART:"elm.text", "visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "icon_rect"; target: "padding_after_icon"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "clipper"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; set_int(button_state, BUTTON_STATE_DISABLED); get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "clicked") || !strcmp(st, "focused")) set_state(PART:"elm.text", "visible", 0.0); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "clipper"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; set_int(button_state, BUTTON_STATE_ENABLED); get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "clicked") || !strcmp(st, "focused")) set_state(PART:"elm.text", "visible", 0.0); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/naviframe_control/multiline"; script { public button_state = BUTTON_STATE_ENABLED; } images { image: "00_Option_header_bt.png" COMP; image: "00_Option_header_bt_dim.png" COMP; image: "00_Option_header_bt_press.png" COMP; image: "00_Option_header_bt_focus.png" COMP; } styles{ style { name: "btn_multiline_naviframe_controlbar_style"; base: "font=SLP:style=Medium font_size="BUTTON_NAVIFRAME_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed text_class=slp_medium"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC; rel1.offset: 0 0; rel2.offset: -1 -1; image { normal: "00_Option_header_bt.png"; border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC; } color: 255 255 255 255; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_Option_header_bt_dim.png"; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_Option_header_bt_press.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_Option_header_bt_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } } part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2 { relative: 1.0 1.0; to: "icon_rect"; } fixed: 1 0; min: 0 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2 { relative: 1.0 1.0; to: "icon_rect"; } } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC; max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC; max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } } } part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC; text { style: "btn_multiline_naviframe_controlbar_style"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: 80 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } description { state: "disabled" 0.0; color: 255 255 255 127; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } set_state(PART:"elm.text", "visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"padding_icon_text", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"padding_icon_text", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_icon_text"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "clipper"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; set_int(button_state, BUTTON_STATE_DISABLED); get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "clicked") || !strcmp(st, "focused")) set_state(PART:"elm.text", "visible", 0.0); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "clipper"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; set_int(button_state, BUTTON_STATE_ENABLED); get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "clicked") || !strcmp(st, "focused")) set_state(PART:"elm.text", "visible", 0.0); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } ///////////////////////////////////////////////////////////// group { name: "elm/button/base/naviframe/title1/default"; images { image: "00_winset_Back_btn_normal.png" COMP; image: "00_winset_Back_btn_press.png" COMP; image: "00_winset_Back_btn_normal_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_TITLE1_BG_MIN_INC; image { normal: "00_winset_Back_btn_normal.png"; border: BUTTON_NAVIFRAME_TITLE1_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_winset_Back_btn_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 127 127 127 127; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_winset_Back_btn_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_NAVIFRAME_TITLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_TITLE1_BG_MIN_INC; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_NAVIFRAME_TITLE1_BG_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; min: BUTTON_NAVIFRAME_TITLE1_BG_MIN_INC; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_NAVIFRAME_TITLE1_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_NAVIFRAME_TITLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_NAVIFRAME_TITLE1_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_NAVIFRAME_TITLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_NAVIFRAME_TITLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_NAVIFRAME_TITLE1_VISIBLE_ICON_MIN_MAX_INC; max: BUTTON_NAVIFRAME_TITLE1_VISIBLE_ICON_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_NAVIFRAME_TITLE1_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_NAVIFRAME_TITLE1_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_NAVIFRAME_TITLE1_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_NAVIFRAME_TITLE1_FONT_SIZE_INC; min: 1 0; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_NAVIFRAME_TITLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_NAVIFRAME_TITLE1_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_NAVIFRAME_TITLE1_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; target: "bg"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } ////////////////////////////////////////////////////////////// group { name: "elm/button/base/naviframe/title/default"; script { public button_state = BUTTON_STATE_ENABLED; } images { image: "00_title_btn_bg_press.png" COMP; } styles{ style { name: "btn_naviframe_style"; base: "font=SLP:style=Medium font_size="BUTTON_NAVIFRAME_TITLE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed ellipise=1.0 text_class=slp_medium"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_TITLE_TEXT_BG_NORMAL_MIN_INC; max: BUTTON_NAVIFRAME_TITLE_TEXT_BG_NORMAL_MIN_INC; color: 0 0 0 0; } description { state: "clicked" 0.0; min: BUTTON_NAVIFRAME_TITLE_TEXT_BG_PRESSED_MIN_INC; max: BUTTON_NAVIFRAME_TITLE_TEXT_BG_PRESSED_MIN_INC; image { normal: "00_title_btn_bg_press.png"; border: BUTTON_NAVIFRAME_TITLE_TEXT_BG_PRESSED_BORDER_INC; border_scale: 1; } } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_NAVIFRAME_TITLE_TEXT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_NAVIFRAME_TITLE_TEXT_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_NAVIFRAME_TITLE_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_NAVIFRAME_TITLE_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_NAVIFRAME_TITLE_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_NAVIFRAME_TITLE_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_NAVIFRAME_TITLE_TEXT_NORMAL_COLOR_INC; text { style: "btn_naviframe_style"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_NAVIFRAME_TITLE_TEXT_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_NAVIFRAME_TITLE_TEXT_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_NAVIFRAME_TITLE_TEXT_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// #define BUTTON_NAVIFRAME_TITLE_ICON_STYLES(style_name, image_normal, image_press, min_width, min_height) \ group { name: "elm/button/base/naviframe/title/icon/"style_name; \ images { \ image: image_normal COMP; \ image: image_press COMP; \ image: "00_title_btn_bg_press.png" COMP; \ } \ parts { \ part { name: "button_image"; \ scale: 1; \ description { state: "default" 0.0; \ min: BUTTON_NAVIFRAME_TITLE_ICON_BG_NORMAL_MIN_INC; \ max: BUTTON_NAVIFRAME_TITLE_ICON_BG_NORMAL_MIN_INC; \ color: 0 0 0 0; \ } \ description { \ state: "clicked" 0.0; \ min: BUTTON_NAVIFRAME_TITLE_ICON_BG_PRESSED_MIN_INC; \ max: BUTTON_NAVIFRAME_TITLE_ICON_BG_PRESSED_MIN_INC; \ image { \ normal: "00_title_btn_bg_press.png"; \ border: BUTTON_NAVIFRAME_TITLE_ICON_BG_PRESSED_BORDER_INC; \ border_scale: 1; \ } \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ } \ description { state: "focused" 0.0; \ inherit: "default" 0.0;\ } \ } \ part { name: "icon_part"; \ scale: 1; \ description { state: "default" 0.0; \ min: min_width min_height; \ max: min_width min_height; \ rel1.to: "button_image"; \ rel2.to: "button_image"; \ image.normal: image_normal; \ } \ description { \ state: "clicked" 0.0; \ inherit: "default" 0.0; \ image.normal: image_press; \ } \ description { \ state: "disabled" 0.0; \ inherit: "default" 0.0; \ color: 127 127 127 127; \ } \ } \ part { name: "over1"; \ type: RECT; \ ignore_flags: ON_HOLD; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "over2"; \ repeat_events: 1; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { name: "disabler"; \ type: RECT; \ description { state: "default" 0.0; \ color: 0 0 0 0; \ visible: 0; \ } \ description { state: "disabled" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ } \ } \ } \ programs { \ program { name: "button_click"; \ signal: "mouse,down,1"; \ source: "over1"; \ action: SIGNAL_EMIT "elm,action,press" ""; \ after: "button_click_anim"; \ } \ program { name: "button_click_anim"; \ action: STATE_SET "clicked" 0.0; \ target: "button_image"; \ target: "icon_part"; \ } \ program { name: "button_unclick"; \ signal: "mouse,up,1"; \ source: "over2"; \ action: SIGNAL_EMIT "elm,action,unpress" ""; \ after: "button_unclick_anim"; \ } \ program { name: "button_unclick_anim"; \ action: STATE_SET "default" 0.0; \ target: "button_image"; \ target: "icon_part"; \ } \ program { name: "touch_snd"; \ signal: "mouse,clicked,1"; \ source: "over1"; \ action: PLAY_SAMPLE "touch_sound" 1.0; \ after: button_unclick3; \ } \ program { name: "button_unclick3"; \ action: SIGNAL_EMIT "elm,action,click" ""; \ } \ program { name: "disable"; \ signal: "elm,state,disabled"; \ source: "elm"; \ action: STATE_SET "disabled" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "icon_part"; \ } \ program { name: "enable"; \ signal: "elm,state,enabled"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "disabler"; \ target: "button_image"; \ target: "icon_part"; \ } \ } \ } /////////////////////////////////////////////////////////////////////////////////////// BUTTON_NAVIFRAME_TITLE_ICON_STYLES("cancel", "00_button_cancel.png", "00_button_cancel_pressed.png", BUTTON_NAVIFRAME_TITLE_ICON_CANCEL_MIN_WIDTH_INC, BUTTON_NAVIFRAME_TITLE_ICON_CANCEL_MIN_HEIGHT_INC) BUTTON_NAVIFRAME_TITLE_ICON_STYLES("plus", "00_button_plus.png", "00_button_plus_pressed.png", BUTTON_NAVIFRAME_TITLE_ICON_PLUS_MIN_WIDTH_INC, BUTTON_NAVIFRAME_TITLE_ICON_PLUS_MIN_HEIGHT_INC) BUTTON_NAVIFRAME_TITLE_ICON_STYLES("more", "00_winset_more.png", "00_winset_more_press.png", BUTTON_NAVIFRAME_TITLE_ICON_MORE_MIN_WIDTH_INC, BUTTON_NAVIFRAME_TITLE_ICON_MORE_MIN_HEIGHT_INC) BUTTON_NAVIFRAME_TITLE_ICON_STYLES("search", "00_title_icon_search.png", "00_title_icon_search_press.png", BUTTON_NAVIFRAME_TITLE_ICON_SEARCH_MIN_WIDTH_INC, BUTTON_NAVIFRAME_TITLE_ICON_SEARCH_MIN_HEIGHT_INC) BUTTON_NAVIFRAME_TITLE_ICON_STYLES("previous", "00_winset_Back.png", "00_winset_Back.png", BUTTON_NAVIFRAME_TITLE_ICON_PREV_MIN_WIDTH_INC, BUTTON_NAVIFRAME_TITLE_ICON_PREV_MIN_HEIGHT_INC) ///////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/naviframe/more/default"; images { image: "00_winset_more.png" COMP; image: "00_winset_more_press.png" COMP; image: "00_title_btn_bg_press.png" COMP; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC; max: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC; color: 0 0 0 0; } description { state: "clicked" 0.0; min: BUTTON_NAVIFRAME_MORE_BG_PRESSED_MIN_MAX_INC; max: BUTTON_NAVIFRAME_MORE_BG_PRESSED_MIN_MAX_INC; image { normal: "00_title_btn_bg_press.png"; border: BUTTON_NAVIFRAME_MORE_BG_PRESSED_BORDER_INC; border_scale: 1; } } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; } } part { name: "more_image"; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC; max: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC; rel1.to: "button_image"; rel2.to: "button_image"; image.normal: "00_winset_more.png"; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_winset_more_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 255 255 255 127; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; target: "more_image"; } program { name: "button_unclick"; signal: "mouse,up,1"; source: "over3"; action: SIGNAL_EMIT "elm,action,unpress" ""; after: "button_unclick_anim"; } program { name: "button_unclick_anim"; action: STATE_SET "default" 0.0; target: "button_image"; target: "more_image"; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "disabler"; target: "button_image"; target: "more_image"; } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "disabler"; target: "button_image"; target: "more_image"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/tickernoti"; images { image: "00_button_06_normal.png" COMP; image: "00_button_06_press.png" COMP; image: "00_button_06_dim.png" COMP; image: "00_button_06_normal_focus.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; image { normal: "00_button_06_normal.png"; border: BUTTON_TICKERNOTI_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_06_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_06_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_06_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_TICKERNOTI_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: BUTTON_TICKERNOTI_BG_MIN_INC; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: BUTTON_TICKERNOTI_VISIBLE_BG_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; min: BUTTON_TICKERNOTI_ICONONLY_BG_MIN_INC; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_TICKERNOTI_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: 0 0; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "visible" 0.0; visible: 0; min: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC; max: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC; fixed: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; visible: 0; } description { state: "visible" 0.0; visible: 0; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC; } description { state: "icononly" 0.0; inherit: "default" 0.0; } } part { name: "padding_before_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC; visible: 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; min: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC; max: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; } } description { state: "icononly" 0.0; min: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC; max: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } color: BUTTON_TICKERNOTI_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_TICKERNOTI_FONT_SIZE_INC; min: 1 0; max: 1 0; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TICKERNOTI_DISABLED_COLOR_INC; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) { emit("elm,action,default,text,set", ""); set_state(PART:"elm.text", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } } program { name: "icon_show"; signal: "elm,state,icon,visible"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) { set_state(PART:"elm.swallow.content", "visible", 0.0); set_state(PART:"icon_rect", "visible", 0.0); set_state(PART:"padding_after_icon", "visible", 0.0); set_state(PART:"bg", "visible", 0.0); } else { set_state(PART:"elm.swallow.content", "icononly", 0.0); set_state(PART:"icon_rect", "icononly", 0.0); set_state(PART:"padding_after_icon", "icononly", 0.0); set_state(PART:"bg", "icononly", 0.0); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "padding_after_icon"; target: "icon_rect"; target: "bg"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/expandable_number"; alias: "elm/button/base/text_only/expandable_number"; images { image: "00_button_05_normal.png" COMP; image: "00_button_05_press.png" COMP; image: "00_button_05_dim.png" COMP; image: "00_button_05_normal_focus.png" COMP; image: "00_arrow_expand.png" COMP; image: "00_arrow_expand_press.png" COMP; image: "00_arrow_expand_dim.png" COMP; } script { public button_state = BUTTON_STATE_ENABLED; } parts { part { name: "button_image"; scale: 1; description { state: "default" 0.0; min: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC; max: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC; image { normal: "00_button_05_normal.png"; border: BUTTON_EXPANDABLE_NUMBER_BG_BORDER_INC; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_button_05_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal: "00_button_05_dim.png"; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_05_normal_focus.png"; } } part { name: "padding_left_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel2.relative: 0.0 0.0; min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 1.0 1.0; min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC; fixed: 1 1; visible: 0; } } part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC; max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "padding_right_bottom"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } align: 1.0 0.5; color: 0 0 0 0; } } part { name: "arrow_expand"; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.5; min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC; max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC; fixed: 0 0; rel1.to: "icon_rect"; rel2.to: "icon_rect"; image.normal:"00_arrow_expand.png"; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal:"00_arrow_expand_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; image.normal:"00_arrow_expand_dim.png"; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC; max: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC; fixed:1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 1.0; to_x:"padding_left_top"; to_y:"padding_right_bottom"; } align: 0.0 0.5; color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: BUTTON_EXPANDABLE_NUMBER_FONT_SIZE_INC; min: 0 0; fit: 1 1; size_range: 14 20; text_class: "slp_medium"; } } description { state: "visible" 0.0; inherit: "default" 0.0; } description { state: "clicked" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC; } description { state: "focused" 0.0; inherit: "default" 0.0; color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC; } } part { name: "over2"; type: RECT; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "over3"; type: RECT; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "button_click"; signal: "mouse,down,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,press" ""; after: "button_click_anim"; } program { name: "button_click_anim"; action: STATE_SET "clicked" 0.0; target: "button_image"; target: "arrow_expand"; after: "text_clicked"; } program { name: "text_clicked"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "clicked", 0.0); } } program { name: "button_unpress"; action: SIGNAL_EMIT "elm,action,unpress" ""; } program { name: "button_mouseout_clicked"; signal: "mouse,up,1"; source: "over3"; script { if (get_int(button_state) != BUTTON_STATE_DISABLED) { set_state(PART:"button_image", "default", 0.0); set_state(PART:"elm.text", "visible", 0.0); set_state(PART:"arrow_expand", "default", 0.0); } } after: button_unpress; } program { name: "touch_snd"; signal: "mouse,clicked,1"; source: "over2"; action: PLAY_SAMPLE "touch_sound" 1.0; after: button_unclick3; } program { name: "button_unclick3"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; script { if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); } } program { name: "text_hide"; signal: "elm,state,text,hidden"; source: "elm"; script { set_state(PART:"elm.text", "default", 0.0); } } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "disabler"; after: "disable_text"; } program { name: "disable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "disabled_visible", 0.0); else set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "disabler"; after: "enable_text"; } program { name: "enable_text"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } program { name: "focused"; //signal: "elm,action,focus"; //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; //signal: "elm,action,unfocus"; //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; } program { name: "unfocus_text"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } #undef BUTTON_STATE_ENABLED #undef BUTTON_STATE_DISABLED