3 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an AS IS BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 #include "multisense_sound.edc"
21 #include "multisense_haptic.edc"
26 ///////////////////////////////////////////////////////////////////////////////////////
27 group { name: "elm/button/base/sound_dark";
29 image: "00_button_01_normal.png" COMP;
30 image: "00_button_01_press.png" COMP;
31 image: "00_button_01_focus.png" COMP;
34 public button_state = 0; //0:enabled, 1: disabled
37 part { name: "button_image";
40 description { state: "default" 0.0;
43 normal: "00_button_01_normal.png";
44 border: BUTTON_TEXT_STYLE1_BG_BORDER_INC;
48 description { state: "clicked" 0.0;
49 inherit: "default" 0.0;
50 image.normal: "00_button_01_press.png";
52 description { state: "disabled" 0.0;
53 inherit: "default" 0.0;
55 description { state: "focused" 0.0;
56 inherit: "default" 0.0;
57 image.normal: "00_button_01_focus.png";
65 description { state: "default" 0.0;
67 rel1.relative: 0.0 0.0;
68 rel2.relative: 0.0 1.0;
75 name: "padding_right";
79 description { state: "default" 0.0;
81 rel1.relative: 1.0 0.0;
82 rel2.relative: 1.0 1.0;
93 description { state: "default" 0.0;
95 rel1.relative: 0.0 0.0;
96 rel2.relative: 1.0 0.0;
103 name: "padding_bottom";
107 description { state: "default" 0.0;
109 rel1.relative: 0.0 1.0;
110 rel2.relative: 1.0 1.0;
121 description { state: "default" 0.0;
125 rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; }
126 rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; }
132 name: "padding_icon_text";
136 description { state: "default" 0.0; //when only icon or no icon is there
138 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
139 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
144 description { state: "icononly" 0.0;
145 inherit: "default" 0.0;
147 description { state: "visible" 0.0; //when icon is visible
149 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
150 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
156 part { name: "elm.swallow.content";
159 description { state: "default" 0.0;
162 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
163 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
166 description { state: "visible" 0.0;
170 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
171 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
173 aspect_preference: VERTICAL;
175 description { state: "icononly" 0.0;;
178 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
179 rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
182 aspect_preference: VERTICAL;
185 part { name: "elm.text";
190 description { state: "default" 0.0;
192 rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
193 rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; }
195 color: 255 255 255 255;
198 font: "Tizen:style=Medium";
206 description { state: "visible" 0.0;
207 inherit: "default" 0.0;
211 description { state: "clicked" 0.0;
212 inherit: "default" 0.0;
215 color: 255 255 255 255;
218 description { state: "disabled" 0.0;
219 inherit: "default" 0.0;
223 description { state: "disabled_visible" 0.0;
224 inherit: "default" 0.0;
229 description { state: "focused" 0.0;
230 inherit: "default" 0.0;
233 color: 255 255 255 255;
237 part { name: "over2";
241 ignore_flags: ON_HOLD;
242 description { state: "default" 0.0;
245 description { state: "disabled" 0.0;
246 inherit: "default" 0.0;
250 part { name: "over3";
254 description { state: "default" 0.0;
257 description { state: "clicked" 0.0;
258 inherit: "default" 0.0;
262 part { name: "disabler";
264 description { state: "default" 0.0;
268 description { state: "disabled" 0.0;
269 inherit: "default" 0.0;
275 program { name: "button_click";
276 signal: "mouse,down,1";
278 action: SIGNAL_EMIT "elm,action,press" "";
280 after: "button_click_anim";
282 program { name: touch_sound;
283 action: TOUCH_SOUND BUTTON_TOGGLE_OFF_SOUND 1 ;
285 program { name: "button_click_anim";
286 action: STATE_SET "clicked" 0.0;
287 target: "button_image";
288 after: "text_clicked";
290 program { name: "text_clicked";
294 get_state(PART:"elm.text", st, 30, vl);
295 if (!strcmp(st, "visible"))
296 set_state(PART:"elm.text", "clicked", 0.0);
299 program { name: "button_unpress";
300 action: SIGNAL_EMIT "elm,action,unpress" "";
302 program { name: "button_mouseout_clicked";
303 signal: "mouse,up,1";
308 get_state(PART:"elm.swallow.content", st, 30, vl);
309 if (strcmp(st, "icononly"))
311 emit("elm,action,default,text,set", "");
312 set_state(PART:"elm.text", "visible", 0.0);
314 if(get_int(button_state) !=1)
315 set_state(PART:"button_image", "default", 0.0);
317 after: button_unpress;
319 program { name: "button_click2";
320 signal: "mouse,down,1";
322 action: STATE_SET "clicked" 0.0;
325 program { name: "button_unclick2";
326 signal: "mouse,clicked,1";
328 action: STATE_SET "default" 0.0;
331 program { name: "button_unclick3";
332 signal: "mouse,clicked,1";
334 action: SIGNAL_EMIT "elm,action,click" "";
336 program { name: "text_show";
337 signal: "elm,state,text,visible";
342 get_state(PART:"elm.swallow.content", st, 30, vl);
343 if (!strcmp(st, "icononly"))
345 set_state(PART:"elm.swallow.content", "visible", 0.0);
346 set_state(PART:"padding_icon_text", "visible", 0.0);
348 set_state(PART:"elm.text", "visible", 0.0);
351 program { name: "text_hide";
352 signal: "elm,state,text,hidden";
357 get_state(PART:"elm.swallow.content", st, 30, vl);
358 if (!strcmp(st, "visible"))
360 set_state(PART:"elm.swallow.content", "icononly", 0.0);
361 set_state(PART:"padding_icon_text", "icononly", 0.0);
363 set_state(PART:"elm.text", "default", 0.0);
366 program { name: "icon_show";
367 signal: "elm,state,icon,visible";
372 get_state(PART:"elm.text", st, 30, vl);
373 if (!strcmp(st, "visible"))
375 set_state(PART:"elm.swallow.content", "visible", 0.0);
376 set_state(PART:"padding_icon_text", "visible", 0.0);
380 set_state(PART:"elm.swallow.content", "icononly", 0.0);
381 set_state(PART:"padding_icon_text", "icononly", 0.0);
385 program { name: "icon_hide";
386 signal: "elm,state,icon,hidden";
388 action: STATE_SET "default" 0.0;
389 target: "elm.swallow.content";
391 program { name: "disable";
392 signal: "elm,state,disabled";
394 action: STATE_SET "disabled" 0.0;
395 target: "button_image";
398 after: "disable_text";
400 program { name: "disable_text";
404 get_state(PART:"elm.text", st, 30, vl);
405 if (!strcmp(st, "visible"))
406 set_state(PART:"elm.text", "disabled_visible", 0.0);
408 set_state(PART:"elm.text", "disabled", 0.0);
409 set_int(button_state, 1);
412 program { name: "enable";
413 signal: "elm,state,enabled";
415 action: STATE_SET "default" 0.0;
416 target: "button_image";
419 after: "enable_text";
421 program { name: "enable_text";
425 get_state(PART:"elm.text", st, 30, vl);
426 if (!strcmp(st, "disabled_visible"))
427 set_state(PART:"elm.text", "visible", 0.0);
429 set_state(PART:"elm.text", "default", 0.0);
430 set_int(button_state, 0);
433 program { name: "focused";
434 signal: "elm,action,focus";
436 action: STATE_SET "focused" 0.0;
437 target: "button_image";
440 program { name: "unfocused";
441 signal: "elm,action,unfocus";
443 action: STATE_SET "default" 0.0;
444 target: "button_image";
445 after: "unfocus_text";
447 program { name: "unfocus_text";
448 action: STATE_SET "visible" 0.0;
454 ///////////////////////////////////////////////////////////////////////////////////////
455 group { name: "elm/button/base/haptic";
457 image: "00_message_button_add_recipient.png" COMP;
460 public button_state = 0; //0:enabled, 1: disabled
463 part { name: "button_image";
466 description { state: "default" 0.0;
467 rel1 { to_x: "padding.left"; to_y: "elm.text";}
468 rel2 { to_x: "padding.right"; to_y: "elm.text";}
471 normal: "00_message_button_add_recipient.png";
476 description { state: "clicked" 0.0;
477 inherit: "default" 0.0;
479 description { state: "disabled" 0.0;
480 inherit: "default" 0.0;
482 description { state: "focused" 0.0;
483 inherit: "default" 0.0;
486 part { name: "padding.left";
489 description { state: "default" 0.0;
495 rel2 { relative: 0.0 1.0; to_x: "elm.text";}
499 part { name: "padding.right";
502 description { state: "default" 0.0;
507 rel1 { relative: 1.0 0.0; to_x: "elm.text";}
508 rel2.relative: 1.0 1.0;
512 part { name: "elm.text";
517 description { state: "default" 0.0;
521 color: 255 255 255 255;
524 font: "Tizen:style=Medium";
531 description { state: "visible" 0.0;
532 inherit: "default" 0.0;
536 description { state: "clicked" 0.0;
537 inherit: "default" 0.0;
543 description { state: "disabled" 0.0;
544 inherit: "default" 0.0;
548 description { state: "disabled_visible" 0.0;
549 inherit: "default" 0.0;
555 description { state: "focused" 0.0;
556 inherit: "default" 0.0;
559 color: 255 255 255 255;
562 part { name: "over1";
564 description { state: "default" 0.0;
565 rel2.relative: 1.0 0.5;
567 description { state: "disabled" 0.0;
568 inherit: "default" 0.0;
571 part { name: "over2";
574 ignore_flags: ON_HOLD;
575 description { state: "default" 0.0;
576 rel1.to: "button_image";
577 rel2.to: "button_image";
579 description { state: "disabled" 0.0;
580 inherit: "default" 0.0;
584 part { name: "over3";
587 description { state: "default" 0.0;
588 rel1.to: "button_image";
589 rel2.to: "button_image";
590 color: 255 255 255 0;
592 description { state: "clicked" 0.0;
593 inherit: "default" 0.0;
595 color: 255 255 255 0;
598 part { name: "disabler";
600 description { state: "default" 0.0;
601 rel1.to: "button_image";
602 rel2.to: "button_image";
606 description { state: "disabled" 0.0;
607 inherit: "default" 0.0;
613 program { name: "button_click";
614 signal: "mouse,down,1";
616 action: SIGNAL_EMIT "elm,action,press" "";
618 after: "button_click_anim";
620 program { name: touch_haptic;
621 action: TOUCH_HAPTIC LONG_TAP_HAPTIC 3 ;
623 program { name: "button_click_anim";
624 action: STATE_SET "clicked" 0.0;
625 target: "button_image";
628 program { name: "button_unpress";
629 action: SIGNAL_EMIT "elm,action,unpress" "";
631 program { name: "button_mouseout_clicked";
632 signal: "mouse,up,1";
637 get_state(PART:"elm.text", st, 30, vl);
638 if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
640 emit("elm,action,default,text,set", "");
641 set_state(PART:"elm.text", "visible", 0.0);
643 if(get_int(button_state) !=1)
644 set_state(PART:"button_image", "default", 0.0);
646 after: button_unpress;
648 program { name: "button_click2";
649 signal: "mouse,down,1";
651 action: STATE_SET "clicked" 0.0;
654 program { name: "button_unclick2";
655 signal: "mouse,clicked,1";
657 action: STATE_SET "default" 0.0;
660 program { name: "button_unclick3";
661 signal: "mouse,clicked,1";
663 action: SIGNAL_EMIT "elm,action,click" "";
665 program { name: "text_show";
666 signal: "elm,state,text,visible";
668 action: STATE_SET "visible" 0.0;
671 program { name: "text_hide";
672 signal: "elm,state,text,hidden";
674 action: STATE_SET "default" 0.0;
678 program { name: "disable";
679 signal: "elm,state,disabled";
681 action: STATE_SET "disabled" 0.0;
682 target: "button_image";
686 after: "disable_text";
688 program { name: "disable_text";
692 get_state(PART:"elm.text", st, 30, vl);
693 if (!strcmp(st, "visible"))
694 set_state(PART:"elm.text", "disabled_visible", 0.0);
696 set_state(PART:"elm.text", "disabled", 0.0);
697 set_int(button_state, 1);
700 program { name: "enable";
701 signal: "elm,state,enabled";
703 action: STATE_SET "default" 0.0;
704 target: "button_image";
708 after: "enable_text";
710 program { name: "enable_text";
714 get_state(PART:"elm.text", st, 30, vl);
715 if (!strcmp(st, "disabled_visible"))
716 set_state(PART:"elm.text", "visible", 0.0);
718 set_state(PART:"elm.text", "default", 0.0);
719 set_int(button_state, 0);
722 program { name: "focused";
723 signal: "elm,action,focus";
725 action: STATE_SET "focused" 0.0;
726 target: "button_image";
729 program { name: "unfocused";
730 signal: "elm,action,unfocus";
732 action: STATE_SET "default" 0.0;
733 target: "button_image";
734 action: STATE_SET "visible" 0.0;
739 ///////////////////////////////////////////////////////////////////////////////////////
740 group { name: "elm/button/base/sound_haptic_multiline";
742 image: "00_button_01_normal.png" COMP;
743 image: "00_button_01_press.png" COMP;
744 image: "00_button_01_focus.png" COMP;
747 public button_state = 0; //0:enabled, 1: disabled
750 style { name: "btn_sound_haptic_style";
751 base: "font=Tizen:style=Medium font_size=18 align=center color=#ffffff wrap=mixed text_class=tizen";
754 tag: "hilight" "+ font=Tizen:style=Bold";
755 tag: "b" "+ font=Tizen:style=Bold";
760 part { name: "button_image";
763 description { state: "default" 0.0;
766 normal: "00_button_02_normal.png";
767 border: BUTTON_TEXT_STYLE1_BG_BORDER_INC;
771 description { state: "clicked" 0.0;
772 inherit: "default" 0.0;
773 image.normal: "00_button_02_press.png";
775 description { state: "disabled" 0.0;
776 inherit: "default" 0.0;
778 description { state: "focused" 0.0;
779 inherit: "default" 0.0;
780 image.normal: "00_button_02_focus.png";
784 name: "padding_left";
788 description { state: "default" 0.0;
790 rel1.relative: 0.0 0.0;
791 rel2.relative: 0.0 1.0;
798 name: "padding_right";
802 description { state: "default" 0.0;
804 rel1.relative: 1.0 0.0;
805 rel2.relative: 1.0 1.0;
816 description { state: "default" 0.0;
818 rel1.relative: 0.0 0.0;
819 rel2.relative: 1.0 0.0;
826 name: "padding_bottom";
830 description { state: "default" 0.0;
832 rel1.relative: 0.0 1.0;
833 rel2.relative: 1.0 1.0;
844 description { state: "default" 0.0;
848 rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; }
849 rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; }
855 name: "padding_icon_text";
859 description { state: "default" 0.0; //when only icon or no icon is there
861 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
862 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
867 description { state: "icononly" 0.0;
868 inherit: "default" 0.0;
870 description { state: "visible" 0.0; //when icon is visible
872 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
873 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
879 part { name: "elm.swallow.content";
882 description { state: "default" 0.0;
885 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
886 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
889 description { state: "visible" 0.0;
893 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
894 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
896 aspect_preference: VERTICAL;
898 description { state: "icononly" 0.0;;
901 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
902 rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
905 aspect_preference: VERTICAL;
908 part { name: "elm.text";
913 description { state: "default" 0.0;
915 rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
916 rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; }
918 color: 255 255 255 255;
921 style: "btn_sound_haptic_style";
926 description { state: "visible" 0.0;
927 inherit: "default" 0.0;
931 description { state: "clicked" 0.0;
932 inherit: "default" 0.0;
935 color: 255 255 255 255;
938 description { state: "disabled" 0.0;
939 inherit: "default" 0.0;
943 description { state: "disabled_visible" 0.0;
944 inherit: "default" 0.0;
949 description { state: "focused" 0.0;
950 inherit: "default" 0.0;
953 color: 255 255 255 255;
957 part { name: "over2";
961 ignore_flags: ON_HOLD;
962 description { state: "default" 0.0;
965 description { state: "disabled" 0.0;
966 inherit: "default" 0.0;
970 part { name: "over3";
974 description { state: "default" 0.0;
977 description { state: "clicked" 0.0;
978 inherit: "default" 0.0;
982 part { name: "disabler";
984 description { state: "default" 0.0;
988 description { state: "disabled" 0.0;
989 inherit: "default" 0.0;
995 program { name: "button_click";
996 signal: "mouse,down,1";
998 action: SIGNAL_EMIT "elm,action,press" "";
1000 after:touch_haptic ;
1001 after: "button_click_anim";
1003 program { name: touch_sound;
1004 action: TOUCH_SOUND BUTTON_PRESSED_SOUND 1;
1006 program { name: touch_haptic;
1007 action: TOUCH_HAPTIC WARNING_HAPTIC 3;
1009 program { name: "button_click_anim";
1010 action: STATE_SET "clicked" 0.0;
1011 target: "button_image";
1012 after: "text_clicked";
1014 program { name: "text_clicked";
1018 get_state(PART:"elm.text", st, 30, vl);
1019 if (!strcmp(st, "visible"))
1020 set_state(PART:"elm.text", "clicked", 0.0);
1023 program { name: "button_unpress";
1024 action: SIGNAL_EMIT "elm,action,unpress" "";
1026 program { name: "button_mouseout_clicked";
1027 signal: "mouse,up,1";
1032 get_state(PART:"elm.swallow.content", st, 30, vl);
1033 if (strcmp(st, "icononly"))
1035 emit("elm,action,default,text,set", "");
1036 set_state(PART:"elm.text", "visible", 0.0);
1038 if(get_int(button_state) !=1)
1039 set_state(PART:"button_image", "default", 0.0);
1041 after: button_unpress;
1043 program { name: "button_click2";
1044 signal: "mouse,down,1";
1046 action: STATE_SET "clicked" 0.0;
1049 program { name: "button_unclick2";
1050 signal: "mouse,clicked,1";
1052 action: STATE_SET "default" 0.0;
1055 program { name: "button_unclick3";
1056 signal: "mouse,clicked,1";
1058 action: SIGNAL_EMIT "elm,action,click" "";
1060 program { name: "text_show";
1061 signal: "elm,state,text,visible";
1066 get_state(PART:"elm.swallow.content", st, 30, vl);
1067 if (!strcmp(st, "icononly"))
1069 set_state(PART:"elm.swallow.content", "visible", 0.0);
1070 set_state(PART:"padding_icon_text", "visible", 0.0);
1072 set_state(PART:"elm.text", "visible", 0.0);
1075 program { name: "text_hide";
1076 signal: "elm,state,text,hidden";
1081 get_state(PART:"elm.swallow.content", st, 30, vl);
1082 if (!strcmp(st, "visible"))
1084 set_state(PART:"elm.swallow.content", "icononly", 0.0);
1085 set_state(PART:"padding_icon_text", "icononly", 0.0);
1087 set_state(PART:"elm.text", "default", 0.0);
1090 program { name: "icon_show";
1091 signal: "elm,state,icon,visible";
1096 get_state(PART:"elm.text", st, 30, vl);
1097 if (!strcmp(st, "visible"))
1099 set_state(PART:"elm.swallow.content", "visible", 0.0);
1100 set_state(PART:"padding_icon_text", "visible", 0.0);
1104 set_state(PART:"elm.swallow.content", "icononly", 0.0);
1105 set_state(PART:"padding_icon_text", "icononly", 0.0);
1109 program { name: "icon_hide";
1110 signal: "elm,state,icon,hidden";
1112 action: STATE_SET "default" 0.0;
1113 target: "elm.swallow.content";
1115 program { name: "disable";
1116 signal: "elm,state,disabled";
1118 action: STATE_SET "disabled" 0.0;
1119 target: "button_image";
1122 after: "disable_text";
1124 program { name: "disable_text";
1128 get_state(PART:"elm.text", st, 30, vl);
1129 if (!strcmp(st, "visible"))
1130 set_state(PART:"elm.text", "disabled_visible", 0.0);
1132 set_state(PART:"elm.text", "disabled", 0.0);
1133 set_int(button_state, 1);
1136 program { name: "enable";
1137 signal: "elm,state,enabled";
1139 action: STATE_SET "default" 0.0;
1140 target: "button_image";
1143 after: "enable_text";
1145 program { name: "enable_text";
1149 get_state(PART:"elm.text", st, 30, vl);
1150 if (!strcmp(st, "disabled_visible"))
1151 set_state(PART:"elm.text", "visible", 0.0);
1153 set_state(PART:"elm.text", "default", 0.0);
1154 set_int(button_state, 0);
1157 program { name: "focused";
1158 signal: "elm,action,focus";
1160 action: STATE_SET "focused" 0.0;
1161 target: "button_image";
1164 program { name: "unfocused";
1165 signal: "elm,action,unfocus";
1167 action: STATE_SET "default" 0.0;
1168 target: "button_image";
1169 after: "unfocus_text";
1171 program { name: "unfocus_text";
1172 action: STATE_SET "visible" 0.0;