/* * efl-theme-tizen * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "multisense_sound.edc" #include "multisense_haptic.edc" /* Sound and Haptic */ /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/sound_dark"; images { image: "00_button_01_normal.png" COMP; image: "00_button_01_press.png" COMP; image: "00_button_01_focus.png" COMP; } script { public button_state = 0; //0:enabled, 1: disabled } parts { part { name: "button_image"; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 16 50; 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_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_01_focus.png"; } } part { name: "padding_left"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel1.relative: 0.0 0.0; rel2.relative: 0.0 1.0; min: 5 5; fixed: 1 0; color: 0 0 0 0; } } part { name: "padding_right"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 0.0; rel1.relative: 1.0 0.0; rel2.relative: 1.0 1.0; min: 5 5; fixed: 1 0; color: 0 0 0 0; } } part { name: "padding_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel1.relative: 0.0 0.0; rel2.relative: 1.0 0.0; min: 5 5; fixed: 0 1; color: 0 0 0 0; } } part { name: "padding_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 0.0 1.0; rel2.relative: 1.0 1.0; min: 5 5; fixed: 0 1; color: 0 0 0 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_top"; } rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_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 { relative: 1.0 1.0; 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 { relative: 1.0 1.0; to: "icon_rect"; } fixed: 1 0; min: 5 0; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; visible: 1; align: 0.0 0.5; rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0;; visible: 1; min: 40 40; rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } align: 0.5 0.5; aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXT; effect: SHADOW; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; } align: 0.5 0.5; color: 255 255 255 255; color2: 0 0 0 0; text { font: "Tizen:style=Medium"; size: 24; min: 0 0; align: 0.5 0.5; max: 1 0; text_class: "tizen"; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: 90 40; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: 255 255 255 255; color2: 0 0 0 102; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; color3: 0 0 0 0; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: 0 0 0 128; color3: 0 0 0 0; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: 255 255 255 255; color2: 0 0 0 102; } } part { name: "over2"; type: RECT; mouse_events: 1; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "over3"; type: RECT; mouse_events: 1; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; } } 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:touch_sound ; after: "button_click_anim"; } program { name: touch_sound; action: TOUCH_SOUND BUTTON_TOGGLE_OFF_SOUND 1 ; } 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) !=1) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "button_click2"; signal: "mouse,down,1"; source: "over3"; action: STATE_SET "clicked" 0.0; target: "over3"; } program { name: "button_unclick2"; signal: "mouse,clicked,1"; source: "over3"; action: STATE_SET "default" 0.0; target: "over3"; } program { name: "button_unclick3"; signal: "mouse,clicked,1"; source: "over2"; 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"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "over2"; 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, 1); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "over2"; 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, 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/haptic"; images { image: "00_message_button_add_recipient.png" COMP; } script { public button_state = 0; //0:enabled, 1: disabled } parts { part { name: "button_image"; mouse_events: 0; 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: 44 41; image { normal: "00_message_button_add_recipient.png"; border: 21 21 19 19; border_scale: 1; } } description { state: "clicked" 0.0; inherit: "default" 0.0; } description { state: "disabled" 0.0; inherit: "default" 0.0; } 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: 10 1; fixed: 1 0; color: 0 0 0 0; rel1.relative: 0 0; rel2 { relative: 0.0 1.0; to_x: "elm.text";} align: 1 0; } } part { name: "padding.right"; type: RECT; scale: 1; description { state: "default" 0.0; visible: 0; min: 10 1; fixed: 1 0; color: 0 0 0 0; rel1 { relative: 1.0 0.0; to_x: "elm.text";} rel2.relative: 1.0 1.0; align: 0 0; } } part { name: "elm.text"; type: TEXT; effect: SHADOW; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; fixed: 1 1; align: 0.5 0.5; color: 255 255 255 255; color2: 0 0 0 255; text { font: "Tizen:style=Medium"; size: 28; min: 1 1; align: 0.5 0.5; text_class: "tizen"; } } 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: 53 45 39 255; color2: 0 0 0 102; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; color3: 0 0 0 0; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: 0 0 0 128; color3: 0 0 0 0; visible: 1; min: 1 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 1 1; color: 255 255 255 255; } } part { name: "over1"; mouse_events: 0; description { state: "default" 0.0; rel2.relative: 1.0 0.5; } description { state: "disabled" 0.0; inherit: "default" 0.0; } } part { name: "over2"; mouse_events: 1; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; rel1.to: "button_image"; rel2.to: "button_image"; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "over3"; mouse_events: 1; repeat_events: 1; description { state: "default" 0.0; rel1.to: "button_image"; rel2.to: "button_image"; color: 255 255 255 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; color: 255 255 255 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: touch_haptic; after: "button_click_anim"; } program { name: touch_haptic; action: TOUCH_HAPTIC LONG_TAP_HAPTIC 3 ; } 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) !=1) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "button_click2"; signal: "mouse,down,1"; source: "over3"; action: STATE_SET "clicked" 0.0; target: "over3"; } program { name: "button_unclick2"; signal: "mouse,clicked,1"; source: "over3"; action: STATE_SET "default" 0.0; target: "over3"; } program { name: "button_unclick3"; signal: "mouse,clicked,1"; source: "over2"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "text_show"; signal: "elm,state,text,visible"; source: "elm"; action: STATE_SET "visible" 0.0; target: "elm.text"; } 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: "over1"; target: "over2"; 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, 1); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "over1"; target: "over2"; 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, 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"; action: STATE_SET "visible" 0.0; target: "elm.text"; } } } /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/button/base/sound_haptic_multiline"; images { image: "00_button_01_normal.png" COMP; image: "00_button_01_press.png" COMP; image: "00_button_01_focus.png" COMP; } script { public button_state = 0; //0:enabled, 1: disabled } styles{ style { name: "btn_sound_haptic_style"; base: "font=Tizen:style=Medium font_size=18 align=center color=#ffffff wrap=mixed text_class=tizen"; tag: "br" "\n"; tag: "ps" "ps"; tag: "hilight" "+ font=Tizen:style=Bold"; tag: "b" "+ font=Tizen:style=Bold"; tag: "tab" "\t"; } } parts { part { name: "button_image"; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 16 50; image { normal: "00_button_02_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_02_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; } description { state: "focused" 0.0; inherit: "default" 0.0; image.normal: "00_button_02_focus.png"; } } part { name: "padding_left"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel1.relative: 0.0 0.0; rel2.relative: 0.0 1.0; min: 5 5; fixed: 1 0; color: 0 0 0 0; } } part { name: "padding_right"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 0.0; rel1.relative: 1.0 0.0; rel2.relative: 1.0 1.0; min: 5 5; fixed: 1 0; color: 0 0 0 0; } } part { name: "padding_top"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.0; rel1.relative: 0.0 0.0; rel2.relative: 1.0 0.0; min: 5 5; fixed: 0 1; color: 0 0 0 0; } } part { name: "padding_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; rel1.relative: 0.0 1.0; rel2.relative: 1.0 1.0; min: 5 5; fixed: 0 1; color: 0 0 0 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_top"; } rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_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 { relative: 1.0 1.0; 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 { relative: 1.0 1.0; to: "icon_rect"; } fixed: 1 0; min: 5 0; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; description { state: "default" 0.0; visible: 0; align: 0.0 0.5; rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; fixed: 1 0; visible: 1; align: 0.0 0.5; rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0;; visible: 1; min: 40 40; rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } align: 0.5 0.5; aspect: 1.0 1.0; aspect_preference: VERTICAL; } } part { name: "elm.text"; type: TEXTBLOCK; effect: SHADOW; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; } align: 0.5 0.5; color: 255 255 255 255; color2: 0 0 0 0; text { style: "btn_sound_haptic_style"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; min: 90 40; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: 255 255 255 255; color2: 0 0 0 102; } description { state: "disabled" 0.0; inherit: "default" 0.0; color: 0 0 0 128; color3: 0 0 0 0; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; color: 0 0 0 128; color3: 0 0 0 0; visible: 1; } description { state: "focused" 0.0; inherit: "default" 0.0; visible: 1; min: 0 0; color: 255 255 255 255; color2: 0 0 0 102; } } part { name: "over2"; type: RECT; mouse_events: 1; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; color: 0 0 0 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "over3"; type: RECT; mouse_events: 1; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; } } 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:touch_sound ; after:touch_haptic ; after: "button_click_anim"; } program { name: touch_sound; action: TOUCH_SOUND BUTTON_PRESSED_SOUND 1; } program { name: touch_haptic; action: TOUCH_HAPTIC WARNING_HAPTIC 3; } 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) !=1) set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } program { name: "button_click2"; signal: "mouse,down,1"; source: "over3"; action: STATE_SET "clicked" 0.0; target: "over3"; } program { name: "button_unclick2"; signal: "mouse,clicked,1"; source: "over3"; action: STATE_SET "default" 0.0; target: "over3"; } program { name: "button_unclick3"; signal: "mouse,clicked,1"; source: "over2"; 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"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "button_image"; target: "over2"; 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, 1); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; target: "over2"; 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, 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"; } } }