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 #define ITEM_STATE_ENABLED 0
21 #define ITEM_STATE_DISABLED 1
23 #define TOOLBAR_TEXT_STYLE(_font_size) \
24 style { name: "toolbar_text_style_"_font_size; \
25 base: "font=Tizen:style=Medium style=far_shadow,bottom shadow_color=#ffffffff font_size="_font_size" align=center color="TABBAR_ITEM_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=-10"; \
28 tag: "hilight" "+ font=Tizen:style=Bold"; \
29 tag: "b" "+ font=Tizen:style=Bold"; \
33 #define TOOLBAR_SELECTED_TEXT_STYLE(_font_size) \
34 style { name: "toolbar_selected_text_style_"_font_size; \
35 base: "font=Tizen:style=Medium style=far_shadow,bottom shadow_color=#ffffffff font_size="_font_size" align=center color="TABBAR_ITEM_SELECTED_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=-10"; \
38 tag: "hilight" "+ font=Tizen:style=Bold"; \
39 tag: "b" "+ font=Tizen:style=Bold"; \
44 TOOLBAR_TEXT_STYLE(24)
45 TOOLBAR_TEXT_STYLE(28)
46 TOOLBAR_TEXT_STYLE(30)
47 TOOLBAR_SELECTED_TEXT_STYLE(24)
48 TOOLBAR_SELECTED_TEXT_STYLE(28)
49 TOOLBAR_SELECTED_TEXT_STYLE(30)
52 group { name: "elm/toolbar/base/default";
57 description { state: "default" 0.0;
58 color: 248 246 239 255;
61 part { name: "clipper";
76 part { name: "elm.swallow.content";
89 description { state: "default" 0.0;
96 group { name: "elm/toolbar/item/default";
98 image: "00_tab_press.png" COMP;
101 data.item: "transition_animation_on" "1";
103 public item_state = ITEM_STATE_ENABLED;
104 public items_number = 0;
109 description { state: "default" 0.0;
111 color: 255 255 255 0;
114 offset: TOOLBAR_ITEM_BG_REL1_OFFSET_INC;
118 offset: TOOLBAR_ITEM_BG_REL2_OFFSET_INC;
121 normal: "00_tab_press.png";
122 border: TOOLBAR_ITEM_BG_SELECTED_BORDER_INC;
127 description { state: "selected" 0.0;
128 inherit: "default" 0.0;
130 color: 255 255 255 255;
132 description { state: "disabled" 0.0;
133 inherit: "default" 0.0;
135 color: 255 255 255 0;
138 part { name: "padding_left_top";
142 description { state: "default" 0.0;
144 rel2.relative: 0.0 0.0;
151 part { name: "padding_right_bottom";
155 description { state: "default" 0.0;
157 rel1.relative: 1.0 1.0;
169 description { state: "default" 0.0;
174 to: "padding_left_top";
178 to_x: "padding_right_bottom";
179 to_y: "padding_left_top";
184 description { state: "visible" 0.0;
185 min: TABBAR_ITEM_ICON_SIZE_INC;
189 to: "padding_left_top";
193 to_x: "padding_right_bottom";
194 to_y: "padding_left_top";
199 description { state: "icononly" 0.0;
200 inherit: "default" 0.0;
203 part { name: "padding_after_icon";
207 description { state: "default" 0.0; //when only icon or no icon is there
213 rel2.to: "icon_rect";
218 description { state: "visible" 0.0;
219 inherit: "default" 0.0;
221 description { state: "icononly" 0.0;
222 inherit: "default" 0.0;
225 part { name: "padding_before_text";
229 description { state: "default" 0.0; //when only icon or no icon is there
233 to_x: "padding_left_top";
238 to_x: "padding_right_bottom";
246 part { name: "elm.swallow.icon";
249 clip_to: "elm.icon.clipper";
250 description { state: "default" 0.0;
255 to: "padding_left_top";
259 to_x: "padding_right_bottom";
260 to_y: "padding_left_top";
264 description { state: "visible" 0.0;
266 min: TABBAR_ITEM_ICON_SIZE_INC;
267 max: TABBAR_ITEM_ICON_SIZE_INC;
270 to: "padding_left_top";
274 to_x: "padding_right_bottom";
275 to_y: "padding_before_text";
278 aspect_preference: HORIZONTAL;
280 description { state: "icononly" 0.0;
281 min: TABBAR_ITEM_ICON_SIZE_INC;
282 max: TABBAR_ITEM_ICON_SIZE_INC;
285 to: "padding_left_top";
289 to: "padding_right_bottom";
292 aspect_preference: HORIZONTAL;
295 part { name: "elm.swallow.icon_new";
298 clip_to: "elm.icon_new.clipper";
299 description { state: "default" 0.0;
304 to: "padding_left_top";
308 to_x: "padding_right_bottom";
309 to_y: "padding_left_top";
313 description { state: "visible" 0.0;
315 min: TABBAR_ITEM_ICON_SIZE_INC;
316 max: TABBAR_ITEM_ICON_SIZE_INC;
319 to: "padding_left_top";
323 to_x: "padding_right_bottom";
324 to_y: "padding_before_text";
327 aspect_preference: HORIZONTAL;
329 description { state: "icononly" 0.0;
330 min: TABBAR_ITEM_ICON_SIZE_INC;
331 max: TABBAR_ITEM_ICON_SIZE_INC;
334 to: "padding_left_top";
338 to: "padding_right_bottom";
341 aspect_preference: HORIZONTAL;
344 part { name: "elm.text";
348 clip_to: "elm.text.clipper";
349 description { state: "default" 0.0;
353 to_x: "padding_left_top";
354 to_y: "padding_after_icon";
358 to: "padding_right_bottom";
360 color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
363 style: "toolbar_text_style_26";
367 description { state: "visible" 0.0;
368 inherit: "default" 0.0;
371 description { state: "visible_30" 0.0;
372 inherit: "default" 0.0;
373 text.style: "toolbar_text_style_30";
376 description { state: "visible_32" 0.0;
377 inherit: "default" 0.0;
378 text.style: "toolbar_text_style_32";
381 description { state: "visible_36" 0.0;
382 inherit: "default" 0.0;
383 text.style: "toolbar_text_style_36";
387 part { name: "elm.text_new";
391 clip_to: "elm.text_new.clipper";
392 description { state: "default" 0.0;
396 to_x: "padding_left_top";
397 to_y: "padding_after_icon";
401 to: "padding_right_bottom";
403 color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
406 style: "toolbar_text_style_26";
410 description { state: "visible" 0.0;
411 inherit: "default" 0.0;
414 description { state: "visible_30" 0.0;
415 inherit: "default" 0.0;
416 text.style: "toolbar_text_style_30";
419 description { state: "visible_32" 0.0;
420 inherit: "default" 0.0;
421 text.style: "toolbar_text_style_32";
424 description { state: "visible_36" 0.0;
425 inherit: "default" 0.0;
426 text.style: "toolbar_text_style_36";
430 part { name: "elm.text.clipper";
432 description { state: "default" 0.0;
433 color: 255 255 255 255;
435 description { state: "animation" 0.0;
436 color: 255 255 255 0;
438 description { state: "disabled" 0.0;
439 color: 255 255 255 153;
442 part { name: "elm.text_new.clipper";
444 description { state: "default" 0.0;
445 color: 255 255 255 0;
447 description { state: "animation" 0.0;
448 color: 255 255 255 255;
450 description { state: "disabled" 0.0;
451 color: 255 255 255 153;
454 part { name: "elm.icon.clipper";
456 description { state: "default" 0.0;
457 color: 255 255 255 255;
459 description { state: "animation" 0.0;
460 color: 255 255 255 0;
462 description { state: "disabled" 0.0;
463 color: 255 255 255 153;
466 part { name: "elm.icon_new.clipper";
468 description { state: "default" 0.0;
469 color: 255 255 255 0;
471 description { state: "animation" 0.0;
472 color: 255 255 255 255;
474 description { state: "disabled" 0.0;
475 color: 255 255 255 153;
478 part { name: "event";
481 ignore_flags: ON_HOLD;
482 description { state: "default" 0.0;
486 part { name: "event2";
490 description { state: "default" 0.0;
496 program { name: "pressed";
497 signal: "mouse,down,1";
500 if (get_int(item_state) != ITEM_STATE_DISABLED)
501 set_state(PART:"bg", "selected", 0.0);
503 transition: LINEAR 0.2;
505 program { name: "unpressed";
506 signal: "mouse,up,1";
508 action: STATE_SET "default" 0.0;
510 transition: LINEAR 0.1;
512 program { name: "go";
513 signal: "mouse,clicked,1";
515 action: SIGNAL_EMIT "elm,action,click" "elm";
517 program { name: "mouse,in";
520 action: SIGNAL_EMIT "elm,mouse,in" "elm";
522 program { name: "mouse,out";
525 action: SIGNAL_EMIT "elm,mouse,out" "elm";
527 program { name: "disable";
528 signal: "elm,state,disabled";
531 set_int(item_state, ITEM_STATE_DISABLED);
532 set_state(PART:"bg", "disabled", 0.0);
533 set_state(PART:"elm.text.clipper", "disabled", 0.0);
534 set_state(PART:"elm.icon.clipper", "disabled", 0.0);
535 run_program(PROGRAM:"label_set,animation,done");
536 run_program(PROGRAM:"icon_set,animation,done");
539 program { name: "enable";
540 signal: "elm,state,enabled";
543 set_int(item_state, ITEM_STATE_ENABLED);
544 set_state(PART:"bg", "default", 0.0);
545 set_state(PART:"elm.text.clipper", "default", 0.0);
546 set_state(PART:"elm.icon.clipper", "default", 0.0);
547 run_program(PROGRAM:"label_set,animation,done");
548 run_program(PROGRAM:"icon_set,animation,done");
551 program { name: "label_set,animation,forward";
552 signal: "elm,state,label_set,forward";
554 after: "label_set,sync";
556 program { name: "label_set,animation,backward";
557 signal: "elm,state,label_set,backward";
559 after: "label_set,sync";
561 program { name: "label_set,sync";
562 signal: "elm,state,label_set";
567 get_state(PART:"elm.text", st, 30, vl);
568 set_state(PART:"elm.text_new", st, vl);
570 after: "label_set,animation";
572 program { name: "label_set,animation";
573 action: STATE_SET "animation" 0.0;
574 target: "elm.text.clipper";
575 target: "elm.text_new.clipper";
576 transition: LINEAR 0.2;
577 after: "label_set,animation,done";
579 program { name: "label_set,animation,done";
580 action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
582 program { name: "label,reset";
583 signal: "elm,state,label,reset";
586 set_state(PART:"elm.text_new.clipper", "default", 0.0);
587 if (get_int(item_state) != ITEM_STATE_DISABLED)
588 set_state(PART:"elm.text.clipper", "default", 0.0);
590 set_state(PART:"elm.text.clipper", "disabled", 0.0);
593 program { name: "icon_set,animation,forward";
594 signal: "elm,state,icon_set,forward";
596 after: "icon_set,animation";
598 program { name: "icon_set,animation,backward";
599 signal: "elm,state,icon_set,backward";
601 after: "icon_set,animation";
603 program { name: "icon_set,animation";
604 signal: "elm,state,icon_set";
606 action: STATE_SET "animation" 0.0;
607 target: "elm.icon.clipper";
608 target: "elm.icon_new.clipper";
609 transition: LINEAR 0.2;
610 after: "icon_set,animation,done";
612 program { name: "icon_set,animation,done";
613 action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
615 program { name: "icon,reset";
616 signal: "elm,state,icon,reset";
619 set_state(PART:"elm.icon_new.clipper", "default", 0.0);
620 if (get_int(item_state) != ITEM_STATE_DISABLED)
621 set_state(PART:"elm.icon.clipper", "default", 0.0);
623 set_state(PART:"elm.icon.clipper", "disabled", 0.0);
626 program { name: "text_show";
627 signal: "elm,state,text,visible";
632 get_state(PART:"elm.swallow.icon", st, 30, vl);
633 if (!strcmp(st, "icononly"))
635 set_state(PART:"elm.swallow.icon", "visible", 0.0);
636 set_state(PART:"icon_rect", "visible", 0.0);
637 set_state(PART:"padding_after_icon", "visible", 0.0);
639 if (strcmp(st, "default"))
641 set_state(PART:"elm.text", "visible", 0.0);
645 if (get_int(items_number) <= 3)
646 set_state(PART:"elm.text", "visible_32", 0.0);
647 else if (get_int(items_number) >= 4)
648 set_state(PART:"elm.text", "visible_30", 0.0);
652 program { name: "text_hide";
653 signal: "elm,state,text,hidden";
658 get_state(PART:"elm.swallow.icon", st, 30, vl);
659 if (!strcmp(st, "visible"))
661 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
662 set_state(PART:"icon_rect", "icononly", 0.0);
663 set_state(PART:"padding_after_icon", "icononly", 0.0);
665 set_state(PART:"elm.text", "default", 0.0);
668 program { name: "icon_show";
669 signal: "elm,state,icon,visible";
674 get_state(PART:"elm.text", st, 30, vl);
675 if (!strncmp(st, "visible", 7))
677 set_state(PART:"elm.swallow.icon", "visible", 0.0);
678 set_state(PART:"icon_rect", "visible", 0.0);
679 set_state(PART:"padding_after_icon", "visible", 0.0);
680 set_state(PART:"elm.text", "visible", 0.0);
684 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
685 set_state(PART:"icon_rect", "icononly", 0.0);
686 set_state(PART:"padding_after_icon", "icononly", 0.0);
690 program { name: "icon_hide";
691 signal: "elm,state,icon,hidden";
696 get_state(PART:"elm.text", st, 30, vl);
697 if (!strncmp(st, "visible", 7))
699 if (get_int(items_number) <= 3)
700 set_state(PART:"elm.text", "visible_32", 0.0);
701 else if (get_int(items_number) >= 4)
702 set_state(PART:"elm.text", "visible_30", 0.0);
704 set_state(PART:"elm.swallow.icon", "default", 0.0);
705 set_state(PART:"icon_rect", "default", 0.0);
706 set_state(PART:"padding_after_icon", "default", 0.0);
709 program { name: "text_only_item_1";
710 signal: "elm,number,item,1";
713 set_int(items_number, 1);
715 after: "text_only_item_under_3";
717 program { name: "text_only_item_2";
718 signal: "elm,number,item,2";
721 set_int(items_number, 2);
723 after: "text_only_item_under_3";
725 program { name: "text_only_item_3";
726 signal: "elm,number,item,3";
729 set_int(items_number, 3);
731 after: "text_only_item_under_3";
733 program { name: "text_only_item_under_3";
737 get_state(PART:"elm.swallow.icon", st, 30, vl);
738 if (strcmp(st, "visible"))
740 get_state(PART:"elm.text", st, 30, vl);
741 if (!strncmp(st, "visible", 7))
743 set_state(PART:"elm.text", "visible_32", 0.0);
748 program { name: "text_only_item_4";
749 signal: "elm,number,item,4";
752 set_int(items_number, 4);
754 after: "text_only_item_upper_4";
756 program { name: "text_only_item_5";
757 signal: "elm,number,item,5";
760 set_int(items_number, 5);
762 after: "text_only_item_upper_4";
764 program { name: "text_only_item_6";
765 signal: "elm,number,item,6";
768 set_int(items_number, 6);
770 after: "text_only_item_upper_4";
772 program { name: "text_only_item_7";
773 signal: "elm,number,item,7";
776 set_int(items_number, 7);
778 after: "text_only_item_upper_4";
780 program { name: "text_only_item_8";
781 signal: "elm,number,item,8";
784 set_int(items_number, 8);
786 after: "text_only_item_upper_4";
788 program { name: "text_only_item_9";
789 signal: "elm,number,item,9";
792 set_int(items_number, 9);
794 after: "text_only_item_upper_4";
796 program { name: "text_only_item_10";
797 signal: "elm,number,item,10";
800 set_int(items_number, 10);
802 after: "text_only_item_upper_4";
804 program { name: "text_only_item_upper_4";
805 signal: "elm,number,item,4";
810 get_state(PART:"elm.swallow.icon", st, 30, vl);
811 if (strcmp(st, "visible"))
813 get_state(PART:"elm.text", st, 30, vl);
814 if (!strncmp(st, "visible", 7))
816 set_state(PART:"elm.text", "visible_30", 0.0);
824 group { name: "elm/toolbar/item/item_horizontal";
825 inherit: "elm/toolbar/item/default";
827 part { name: "icon_rect";
828 description { state: "default" 0.0;
832 description { state: "visible" 0.0;
836 to_x: "padding_left_top";
837 to_y: "padding_right_bottom";
842 part { name: "padding_after_icon";
843 description { state: "default" 0.0; //when only icon or no icon is there
844 rel1.relative: 1.0 0.0;
847 description { state: "visible" 0.0;
848 inherit: "default" 0.0;
852 part { name: "padding_before_text";
853 description { state: "default" 0.0; //when only icon or no icon is there
858 to_y: "padding_left_top";
862 to_y: "padding_right_bottom";
868 part { name: "elm.swallow.icon";
869 description { state: "default" 0.0;
873 to_x: "padding_left_top";
874 to_y: "padding_right_bottom";
878 description { state: "visible" 0.0;
883 to_x: "padding_before_text";
884 to_y: "padding_left_top";
888 to_x: "padding_before_text";
889 to_y: "padding_right_bottom";
891 aspect_preference: VERTICAL;
893 description { state: "icononly" 0.0;
894 aspect_preference: VERTICAL;
897 part { name: "elm.swallow.icon_new";
898 description { state: "default" 0.0;
902 to_x: "padding_left_top";
903 to_y: "padding_right_bottom";
907 description { state: "visible" 0.0;
912 to_x: "padding_before_text";
913 to_y: "padding_left_top";
917 to_x: "padding_before_text";
918 to_y: "padding_right_bottom";
920 aspect_preference: VERTICAL;
922 description { state: "icononly" 0.0;
923 aspect_preference: VERTICAL;
926 part { name: "elm.text";
928 description { state: "default" 0.0;
931 to_x: "padding_after_icon";
932 to_y: "padding_left_top";
938 description { state: "visible" 0.0;
939 inherit: "default" 0.0;
942 description { state: "visible_30" 0.0;
943 inherit: "default" 0.0;
944 text.style: "toolbar_text_style_30";
947 description { state: "visible_32" 0.0;
948 inherit: "default" 0.0;
949 text.style: "toolbar_text_style_32";
952 description { state: "visible_36" 0.0;
953 inherit: "default" 0.0;
954 text.style: "toolbar_text_style_36";
958 part { name: "elm.text_new";
960 description { state: "default" 0.0;
963 to_x: "padding_after_icon";
964 to_y: "padding_left_top";
970 description { state: "visible" 0.0;
971 inherit: "default" 0.0;
974 description { state: "visible_30" 0.0;
975 inherit: "default" 0.0;
976 text.style: "toolbar_text_style_30";
979 description { state: "visible_32" 0.0;
980 inherit: "default" 0.0;
981 text.style: "toolbar_text_style_32";
984 description { state: "visible_36" 0.0;
985 inherit: "default" 0.0;
986 text.style: "toolbar_text_style_36";
993 group { name: "elm/toolbar/separator/default";
995 part { name: "divider";
998 description { state: "default" 0.0;
1010 part { name: "divider_left";
1013 description { state: "default" 0.0;
1014 color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
1025 part { name: "divider_right";
1028 description { state: "default" 0.0;
1029 color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
1043 group { name: "elm/toolbar/object/default";
1045 part { name: "elm.swallow.object"; // object group
1048 state: "default" 0.0;
1054 group { name: "elm/toolbar/base/tabbar";
1056 image: "00_effect_tab_bounce_left.png" COMP;
1057 image: "00_effect_tab_bounce_right.png" COMP;
1060 public left_timer, right_timer;
1061 public l_timer(val) {
1062 emit("do-hide-left-shadow", "");
1063 set_int(left_timer, 0);
1066 public r_timer(val) {
1067 emit("do-hide-right-shadow", "");
1068 set_int(right_timer, 0);
1073 part { name: "base";
1076 description { state: "default" 0.0;
1077 color: 248 246 239 255;
1080 part { name: "left_padding";
1085 state: "default" 0.0;
1092 rel1.relative: 0.0 0.0;
1093 rel2.relative: 0.0 1.0;
1096 part { name: "right_padding";
1101 state: "default" 0.0;
1108 rel1.relative: 1.0 0.0;
1109 rel2.relative: 1.0 1.0;
1112 part { name: "clipper";
1117 state: "default" 0.0;
1118 rel1.to: "left_padding";
1119 rel1.relative: 1.0 0.0;
1120 rel2.to: "right_padding";
1121 rel2.relative: 0.0 1.0;
1124 part { name: "elm.swallow.content";
1129 state: "default" 0.0;
1134 part { name: "left_shadow_clip";
1138 description { state: "default" 0.0;
1140 color: 255 255 255 0;
1142 description { state: "show" 0.0;
1145 part { name: "right_shadow_clip";
1149 description { state: "default" 0.0;
1151 color: 255 255 255 0;
1153 description { state: "show" 0.0;
1156 part { name: "shadow_left";
1157 clip_to: "left_shadow_clip";
1161 description { state: "default" 0.0;
1165 color: 255 255 255 255;
1166 rel1.relative: 0.0 0.0;
1167 rel2.relative: 0.0 1.0;
1168 image.normal: "00_effect_tab_bounce_left.png";
1171 part { name: "shadow_right";
1172 clip_to: "right_shadow_clip";
1176 description { state: "default" 0.0;
1180 color: 255 255 255 255;
1181 rel1.relative: 1.0 0.0;
1182 rel2.relative: 1.0 1.0;
1183 image.normal: "00_effect_tab_bounce_right.png";
1188 program { name: "load";
1190 set_int(left_timer, 0);
1191 set_int(right_timer, 0);
1194 program { name: "left_shadow_show";
1195 signal: "do-show-left-shadow";
1197 action: STATE_SET "show" 0.0;
1198 transition: LINEAR 0.3;
1199 target: "left_shadow_clip";
1201 program { name: "left_shadow_hide";
1202 signal: "do-hide-left-shadow";
1204 action: STATE_SET "default" 0.0;
1205 transition: LINEAR 0.3;
1206 target: "left_shadow_clip";
1208 program { name: "right_shadow_show";
1209 signal: "do-show-right-shadow";
1211 action: STATE_SET "show" 0.0;
1212 transition: LINEAR 0.3;
1213 target: "right_shadow_clip";
1215 program { name: "right_shadow_hide";
1216 signal: "do-hide-right-shadow";
1218 action: STATE_SET "default" 0.0;
1219 transition: LINEAR 0.3;
1220 target: "right_shadow_clip";
1222 program { name: "edge_left";
1223 signal: "elm,edge,left";
1227 v = get_int(left_timer);
1229 emit("do-show-left-shadow", "");
1231 if (v > 0) cancel_timer(v);
1232 v = timer(0.5, "l_timer", 0);
1233 set_int(left_timer, v);
1236 program { name: "edge_right";
1237 signal: "elm,edge,right";
1241 v = get_int(right_timer);
1243 emit("do-show-right-shadow", "");
1245 if (v > 0) cancel_timer(v);
1246 v = timer(0.5, "r_timer", 0);
1247 set_int(right_timer, v);
1253 group { name: "elm/toolbar/item/tabbar";
1255 image: "00_tab_press.png" COMP;
1256 image: "00_badge_bg.png" COMP;
1257 image: "00_focus.png" COMP;
1260 data.item: "transition_animation_on" "1";
1262 public item_state = ITEM_STATE_ENABLED;
1263 public items_number = 0;
1264 public selected = 0;
1272 description { state: "default" 0.0;
1276 description { state: "icon_text" 0.0;
1277 inherit: "default" 0.0;
1281 part { name: "bg_cover";
1285 description { state: "default" 0.0;
1287 image.normal: "00_tab_press.png";
1289 description { state: "pressed" 0.0;
1290 inherit: "default" 0.0;
1293 description { state: "moving" 0.0;
1294 inherit: "default" 0.0;
1298 part { name: "padding_left_top";
1302 description { state: "default" 0.0;
1304 rel2.relative: 0.0 0.0;
1311 part { name: "padding_right_bottom";
1315 description { state: "default" 0.0;
1317 rel1.relative: 1.0 1.0;
1329 description { state: "default" 0.0;
1334 to: "padding_left_top";
1338 to_x: "padding_left_top";
1339 to_y: "padding_right_bottom";
1344 description { state: "visible" 0.0;
1345 inherit: "default" 0.0;
1346 min: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1348 description { state: "icononly" 0.0;
1349 inherit: "default" 0.0;
1352 part { name: "padding_after_icon";
1356 description { state: "default" 0.0; //when only icon or no icon is there
1362 rel2.to: "icon_rect";
1367 description { state: "visible" 0.0;
1368 inherit: "default" 0.0;
1371 description { state: "icononly" 0.0;
1372 inherit: "default" 0.0;
1375 part { name: "padding_before_text";
1379 description { state: "default" 0.0; //when only icon or no icon is there
1384 to_y: "padding_left_top";
1389 to_y: "padding_right_bottom";
1396 part { name: "elm.swallow.icon";
1399 clip_to: "elm.icon.clipper";
1400 description { state: "default" 0.0;
1402 min: TABBAR_ITEM_ICON_SIZE_INC;
1403 max: TABBAR_ITEM_ICON_SIZE_INC;
1404 rel1.to: "padding_left_top";
1405 rel2.to: "padding_right_bottom";
1407 aspect_preference: HORIZONTAL;
1409 description { state: "visible" 0.0;
1411 min: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1412 max: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1416 to_x: "padding_before_text";
1417 to_y: "padding_left_top";
1421 to_x: "padding_before_text";
1422 to_y: "padding_right_bottom";
1425 aspect_preference: HORIZONTAL;
1427 description { state: "icononly" 0.0;
1428 inherit: "default" 0.0;
1432 part { name: "elm.swallow.icon_new";
1435 clip_to: "elm.icon_new.clipper";
1436 description { state: "default" 0.0;
1438 min: TABBAR_ITEM_ICON_SIZE_INC;
1439 max: TABBAR_ITEM_ICON_SIZE_INC;
1440 rel1.to: "padding_left_top";
1441 rel2.to: "padding_right_bottom";
1443 aspect_preference: HORIZONTAL;
1445 description { state: "visible" 0.0;
1447 min: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1448 max: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1451 to_x: "padding_before_text";
1452 to_y: "padding_left_top";
1456 to_x: "padding_before_text";
1457 to_y: "padding_right_bottom";
1460 aspect_preference: HORIZONTAL;
1462 description { state: "icononly" 0.0;
1463 inherit: "default" 0.0;
1467 part { name: "elm.swallow.icon_new.proxy";
1470 clip_to: "elm.icon_new.proxy.clipper";
1471 description { state: "default" 0.0;
1472 source: "elm.swallow.icon_new";
1473 rel1.to: "elm.swallow.icon_new";
1475 rel2.to: "elm.swallow.icon_new";
1479 part { name: "elm.swallow.icon.proxy";
1482 clip_to: "elm.icon.proxy.clipper";
1483 description { state: "default" 0.0;
1484 source: "elm.swallow.icon";
1485 rel1.to: "elm.swallow.icon";
1487 rel2.to: "elm.swallow.icon";
1491 part { name: "elm.text";
1495 clip_to: "elm.text.clipper";
1496 description { state: "default" 0.0;
1500 to_x: "padding_after_icon";
1501 to_y: "padding_left_top";
1505 to: "padding_right_bottom";
1510 style: "toolbar_text_style_30";
1515 description { state: "visible" 0.0;
1516 inherit: "default" 0.0;
1519 description { state: "visible" 0.24;
1520 inherit: "visible" 0.0;
1522 text.style: "toolbar_text_style_24";
1524 description { state: "visible" 0.28;
1525 inherit: "visible" 0.0;
1527 text.style: "toolbar_text_style_28";
1529 description { state: "visible" 0.30;
1530 inherit: "visible" 0.0;
1532 text.style: "toolbar_text_style_30";
1534 description { state: "selected" 0.0;
1535 inherit: "visible" 0.0;
1536 text.style: "toolbar_selected_text_style_30";
1538 description { state: "selected" 0.24;
1539 inherit: "visible" 0.24;
1540 text.style: "toolbar_selected_text_style_24";
1542 description { state: "selected" 0.28;
1543 inherit: "visible" 0.28;
1544 text.style: "toolbar_selected_text_style_28";
1546 description { state: "selected" 0.30;
1547 inherit: "visible" 0.30;
1548 text.style: "toolbar_selected_text_style_30";
1551 part { name: "elm.text_new";
1555 clip_to: "elm.text_new.clipper";
1556 description { state: "default" 0.0;
1560 to_x: "padding_after_icon";
1561 to_y: "padding_left_top";
1565 to: "padding_right_bottom";
1571 style: "toolbar_text_style_30";
1576 description { state: "visible" 0.0;
1577 inherit: "default" 0.0;
1580 description { state: "visible" 0.24;
1581 inherit: "visible" 0.0;
1583 text.style: "toolbar_text_style_24";
1585 description { state: "visible" 0.28;
1586 inherit: "visible" 0.0;
1588 text.style: "toolbar_text_style_28";
1590 description { state: "visible" 0.30;
1591 inherit: "visible" 0.0;
1593 text.style: "toolbar_text_style_30";
1595 description { state: "selected" 0.0;
1596 inherit: "visible" 0.0;
1597 text.style: "toolbar_selected_text_style_30";
1599 description { state: "selected" 0.24;
1600 inherit: "visible" 0.24;
1601 text.style: "toolbar_selected_text_style_24";
1603 description { state: "selected" 0.28;
1604 inherit: "visible" 0.28;
1605 text.style: "toolbar_selected_text_style_28";
1607 description { state: "selected" 0.30;
1608 inherit: "visible" 0.30;
1609 text.style: "toolbar_selected_text_style_30";
1612 part { name: "padding.selected_line";
1616 description { state: "default" 0.0;
1630 part { name: "selected_line";
1634 description { state: "default" 0.0;
1636 to: "padding.selected_line";
1640 to: "padding.selected_line";
1644 color: 59 115 182 255;
1649 description { state: "selected" 0.0;
1650 inherit: "default" 0.0;
1654 part { name: "padding.badge";
1658 description { state: "default" 0.0;
1670 description { state: "default" 0.10;
1671 inherit: "default" 0.0;
1674 description { state: "default" 0.06;
1675 inherit: "default" 0.0;
1678 description { state: "default" 0.04;
1679 inherit: "default" 0.0;
1683 part { name: "elm.image.badge";
1686 description { state: "default" 0.0;
1691 to: "left.padding.text";
1695 to: "right.padding.text";
1699 normal: "00_badge_bg.png";
1704 description { state: "visible" 0.0;
1705 inherit: "default" 0.0;
1709 part { name: "left.padding.text";
1713 state: "default" 0.0;
1718 to: "elm.text.badge";
1722 to: "elm.text.badge";
1728 part { name: "right.padding.text";
1732 state: "default" 0.0;
1737 to: "padding.badge";
1741 to: "padding.badge";
1747 part { name: "elm.text.badge";
1752 state: "default" 0.0;
1755 to: "right.padding.text";
1759 to: "right.padding.text";
1765 color: 10 100 208 255;
1767 font: "Tizen:style=Bold";
1772 description { state: "visible" 0.0;
1773 inherit: "default" 0.0;
1777 part { name: "elm.text.clipper";
1779 description { state: "default" 0.0;
1780 color: 255 255 255 255;
1782 description { state: "animation" 0.0;
1783 color: 255 255 255 0;
1785 description { state: "disabled" 0.0;
1786 color: 255 255 255 153;
1789 part { name: "elm.text_new.clipper";
1791 description { state: "default" 0.0;
1792 color: 255 255 255 0;
1794 description { state: "animation" 0.0;
1795 color: 255 255 255 255;
1797 description { state: "disabled" 0.0;
1798 color: 255 255 255 153;
1801 part { name: "elm.icon.clipper";
1803 description { state: "default" 0.0;
1804 color: 255 255 255 255;
1806 description { state: "animation" 0.0;
1807 color: 255 255 255 0;
1809 description { state: "selected" 0.0;
1810 color: 255 255 255 255;
1812 description { state: "disabled" 0.0;
1813 color: 255 255 255 153;
1816 part { name: "elm.icon_new.clipper";
1818 description { state: "default" 0.0;
1819 color: 255 255 255 0;
1821 description { state: "animation" 0.0;
1822 color: 255 255 255 255;
1824 description { state: "selected" 0.0;
1825 color: 255 255 255 255;
1827 description { state: "disabled" 0.0;
1828 color: 255 255 255 153;
1831 part { name: "elm.icon.proxy.clipper";
1833 description { state: "default" 0.0;
1834 color: 153 153 153 255;
1836 description { state: "animation" 0.0;
1837 color: 255 255 255 0;
1839 description { state: "selected" 0.0;
1840 color: 61 114 180 255;
1842 description { state: "disabled" 0.0;
1843 color: 255 255 255 153;
1846 part { name: "elm.icon_new.proxy.clipper";
1848 description { state: "default" 0.0;
1849 color: 255 255 255 0;
1851 description { state: "animation" 0.0;
1852 color: 255 255 255 255;
1854 description { state: "selected" 0.0;
1855 color: 61 114 180 255;
1857 description { state: "disabled" 0.0;
1858 color: 255 255 255 153;
1861 part { name: "divider";
1864 description { state: "default" 0.0;
1870 to_y: "elm.swallow.icon";
1874 to_y: "elm.swallow.icon";
1877 description { state: "hidden" 0.0;
1878 inherit: "default" 0.0;
1882 part { name: "divider_left";
1885 description { state: "default" 0.0;
1886 color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
1897 part { name: "divider_right";
1900 description { state: "default" 0.0;
1901 color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
1912 part { name: "highlight";
1914 description { state: "default" 0.0;
1917 normal: "00_focus.png";
1921 description { state: "highlighted" 0.0;
1922 inherit: "default" 0.0;
1926 part { name: "event";
1933 description { state: "default" 0.0;
1939 program { name: "go_active";
1940 signal: "elm,state,selected";
1942 action: STATE_SET "selected" 0.0;
1943 target: "elm.icon.clipper";
1944 target: "elm.icon.proxy.clipper";
1945 target: "selected_line";
1946 after: "selected_text";
1948 program { name: "selected_text";
1952 set_int(selected, 1);
1953 get_state(PART:"elm.text", st, 30, vl);
1954 if (!strcmp(st, "visible"))
1955 set_state(PART:"elm.text", "selected", vl);
1958 program { name: "go_passive";
1959 signal: "elm,state,unselected";
1961 action: STATE_SET "default" 0.0;
1962 target: "elm.icon.clipper";
1963 target: "elm.icon.proxy.clipper";
1964 target: "selected_line";
1965 after: "unselected_text";
1967 program { name: "unselected_text";
1971 set_int(selected, 0);
1972 get_state(PART:"elm.text", st, 30, vl);
1973 if (!strcmp(st, "selected"))
1974 set_state(PART:"elm.text", "visible", vl);
1977 program { name: "moving";
1978 signal: "elm,state,moving";
1980 action: STATE_SET "moving" 0.0;
1983 program { name: "pressed";
1984 signal: "mouse,down,1";
1986 action: STATE_SET "pressed" 0.0;
1996 new Float:dx, Float:dy;
1997 get_state(PART:"bg_cover", st, 30, vl);
1998 if (strcmp(st, "moving"))
2000 get_drag(PART:"event", dx, dy);
2001 if ((abs(dx)*abs(dx))+(abs(dy)*abs(dy)) > 400)
2003 set_drag(PART:"event", 0.0, 0.0);
2004 set_state(PART:"bg_cover", "default", 0.0);
2006 set_drag(PART:"event", 0.0, 0.0);
2010 program { name: "unpressed";
2011 signal: "mouse,up,1";
2014 set_drag(PART:"event", 0.0, 0.0);
2015 set_state(PART:"bg_cover", "default", 0.0);
2018 program { name: "go";
2019 signal: "mouse,clicked,1";
2021 action: SIGNAL_EMIT "elm,action,click" "elm";
2022 after: "play_sound";
2024 program { name: "play_sound";
2025 action: PLAY_SAMPLE "touch_sound" 1.0;
2027 program { name: "mouse,in";
2030 action: SIGNAL_EMIT "elm,mouse,in" "elm";
2032 program { name: "mouse,out";
2033 signal: "mouse,out";
2035 action: SIGNAL_EMIT "elm,mouse,out" "elm";
2037 program { name: "disable";
2038 signal: "elm,state,disabled";
2041 set_int(item_state, ITEM_STATE_DISABLED);
2042 set_state(PART:"bg", "disabled", 0.0);
2043 set_state(PART:"elm.text.clipper", "disabled", 0.0);
2044 set_state(PART:"elm.icon.clipper", "disabled", 0.0);
2045 set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
2046 run_program(PROGRAM:"label_set,animation,done");
2047 run_program(PROGRAM:"icon_set,animation,done");
2050 program { name: "enable";
2051 signal: "elm,state,enabled";
2054 set_int(item_state, ITEM_STATE_ENABLED);
2055 set_state(PART:"bg", "default", 0.0);
2056 set_state(PART:"elm.text.clipper", "default", 0.0);
2057 set_state(PART:"elm.icon.clipper", "default", 0.0);
2058 set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
2059 run_program(PROGRAM:"label_set,animation,done");
2060 run_program(PROGRAM:"icon_set,animation,done");
2063 program { name: "label_set,animation,forward";
2064 signal: "elm,state,label_set,forward";
2066 after: "label_set,sync";
2068 program { name: "label_set,animation,backward";
2069 signal: "elm,state,label_set,backward";
2071 after: "label_set,sync";
2073 program { name: "label_set,sync";
2074 signal: "elm,state,label_set";
2079 get_state(PART:"elm.text", st, 30, vl);
2080 set_state(PART:"elm.text_new", st, vl);
2082 after: "label_set,animation";
2084 program { name: "label_set,animation";
2085 action: STATE_SET "animation" 0.0;
2086 target: "elm.text.clipper";
2087 target: "elm.text_new.clipper";
2088 transition: LINEAR 0.2;
2089 after: "label_set,animation,done";
2091 program { name: "label_set,animation,done";
2092 action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
2094 program { name: "label,reset";
2095 signal: "elm,state,label,reset";
2098 set_state(PART:"elm.text_new.clipper", "default", 0.0);
2099 if (get_int(item_state) != ITEM_STATE_DISABLED)
2100 set_state(PART:"elm.text.clipper", "default", 0.0);
2102 set_state(PART:"elm.text.clipper", "disabled", 0.0);
2105 program { name: "icon_set,animation,forward";
2106 signal: "elm,state,icon_set,forward";
2108 after: "icon_set,animation";
2110 program { name: "icon_set,animation,backward";
2111 signal: "elm,state,icon_set,backward";
2113 after: "icon_set,animation";
2115 program { name: "icon_set,animation";
2116 signal: "elm,state,icon_set";
2118 action: STATE_SET "animation" 0.0;
2119 target: "elm.icon.clipper";
2120 target: "elm.icon_new.clipper";
2121 target: "elm.icon.proxy.clipper";
2122 target: "elm.icon_new.proxy.clipper";
2123 transition: LINEAR 0.2;
2124 after: "icon_set,animation,done";
2126 program { name: "icon_set,animation,done";
2127 action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
2129 program { name: "icon,reset";
2130 signal: "elm,state,icon,reset";
2133 set_state(PART:"elm.icon_new.clipper", "default", 0.0);
2134 if (get_int(item_state) != ITEM_STATE_DISABLED)
2136 set_state(PART:"elm.icon.clipper", "default", 0.0);
2137 set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
2141 set_state(PART:"elm.icon.clipper", "disabled", 0.0);
2142 set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
2146 program { name: "text_show";
2147 signal: "elm,state,text,visible";
2152 get_state(PART:"elm.swallow.icon", st, 30, vl);
2153 if (!strcmp(st, "icononly"))
2155 set_state(PART:"elm.swallow.icon", "visible", 0.0);
2156 set_state(PART:"icon_rect", "visible", 0.0);
2157 set_state(PART:"padding_after_icon", "visible", 0.0);
2158 set_state(PART:"bg", "icon_text", 0.0);
2160 get_state(PART:"elm.text", st, 30, vl);
2161 if (!strcmp(st, "default"))
2163 if (get_int(selected))
2164 set_str(temp, "selected");
2166 set_str(temp, "visible");
2167 get_str(temp, st, 31);
2169 if (get_int(items_number) <= 2)
2170 set_state(PART:"elm.text", st, 0.30);
2171 else if (get_int(items_number) == 3)
2172 set_state(PART:"elm.text", st, 0.28);
2173 else if (get_int(items_number) >= 4)
2175 get_state(PART:"bg", st, 30, vl);
2176 if (!strcmp(st, "icon_text"))
2177 set_state(PART:"elm.text", st, 0.28);
2179 set_state(PART:"elm.text", st, 0.24);
2184 program { name: "text_hide";
2185 signal: "elm,state,text,hidden";
2190 get_state(PART:"elm.swallow.icon", st, 30, vl);
2191 if (!strcmp(st, "visible"))
2193 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2194 set_state(PART:"icon_rect", "icononly", 0.0);
2195 set_state(PART:"padding_after_icon", "icononly", 0.0);
2197 set_state(PART:"elm.text", "default", 0.0);
2198 set_state(PART:"bg", "default", 0.0);
2201 program { name: "icon_show";
2202 signal: "elm,state,icon,visible";
2207 get_state(PART:"elm.text", st, 30, vl);
2208 if (!strncmp(st, "visible", 7))
2210 set_state(PART:"elm.swallow.icon", "visible", 0.0);
2211 set_state(PART:"icon_rect", "visible", 0.0);
2212 set_state(PART:"padding_after_icon", "visible", 0.0);
2213 set_state(PART:"bg", "icon_text", 0.0);
2217 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2218 set_state(PART:"icon_rect", "icononly", 0.0);
2219 set_state(PART:"padding_after_icon", "icononly", 0.0);
2223 program { name: "icon_hide";
2224 signal: "elm,state,icon,hidden";
2227 set_state(PART:"elm.swallow.icon", "default", 0.0);
2228 set_state(PART:"icon_rect", "default", 0.0);
2229 set_state(PART:"padding_after_icon", "default", 0.0);
2230 set_state(PART:"bg", "default", 0.0);
2233 program { name: "text_only_item_1";
2234 signal: "elm,number,item,1";
2237 set_int(items_number, 1);
2239 after: "text_only_item_under_2";
2241 program { name: "text_only_item_2";
2242 signal: "elm,number,item,2";
2245 set_int(items_number, 2);
2247 after: "text_only_item_under_2";
2249 program { name: "text_only_item_under_2";
2253 get_state(PART:"elm.text", st, 30, vl);
2254 if (!strncmp(st, "visible", 7))
2256 set_state(PART:"elm.text", st, 0.30);
2258 set_state(PART:"padding.badge", "default", 0.10);
2261 program { name: "text_only_item_3";
2262 signal: "elm,number,item,3";
2267 set_int(items_number, 3);
2268 get_state(PART:"elm.text", st, 30, vl);
2269 if (!strncmp(st, "visible", 7))
2271 set_state(PART:"elm.text", st, 0.28);
2273 set_state(PART:"padding.badge", "default", 0.06);
2276 program { name: "text_only_item_4";
2277 signal: "elm,number,item,4";
2280 set_int(items_number, 4);
2282 after: "text_only_item_upper_4";
2284 program { name: "text_only_item_5";
2285 signal: "elm,number,item,5";
2288 set_int(items_number, 5);
2290 after: "text_only_item_upper_4";
2292 program { name: "text_only_item_6";
2293 signal: "elm,number,item,6";
2296 set_int(items_number, 6);
2298 after: "text_only_item_upper_4";
2300 program { name: "text_only_item_7";
2301 signal: "elm,number,item,7";
2304 set_int(items_number, 7);
2306 after: "text_only_item_upper_4";
2308 program { name: "text_only_item_8";
2309 signal: "elm,number,item,8";
2312 set_int(items_number, 8);
2314 after: "text_only_item_upper_4";
2316 program { name: "text_only_item_9";
2317 signal: "elm,number,item,9";
2320 set_int(items_number, 9);
2322 after: "text_only_item_upper_4";
2324 program { name: "text_only_item_10";
2325 signal: "elm,number,item,10";
2328 set_int(items_number, 10);
2330 after: "text_only_item_upper_4";
2332 program { name: "text_only_item_upper_4";
2337 get_state(PART:"elm.text", st, 30, vl);
2338 if (!strcmp(st, "visible") || !strcmp(st, "selected"))
2340 get_state(PART:"bg", stb, 30, vl);
2341 if (!strcmp(stb, "icon_text"))
2342 set_state(PART:"elm.text", st, 0.28);
2344 set_state(PART:"elm.text", st, 0.24);
2346 get_state(PART:"bg", stb, 30, vl);
2347 if (!strcmp(stb, "icon_text"))
2348 set_state(PART:"padding.badge", "default", 0.06);
2350 set_state(PART:"padding.badge", "default", 0.04);
2353 program { name: "badge_show";
2354 signal: "elm,state,elm.text.badge,visible";
2356 action: STATE_SET "visible" 0.0;
2357 target: "elm.text.badge";
2358 target: "elm.image.badge";
2360 program { name: "badge_hide";
2361 signal: "elm,state,elm.text.badge,hidden";
2363 action: STATE_SET "default" 0.0;
2364 target: "elm.text.badge";
2365 target: "elm.image.badge";
2367 program { name: "divider_visible";
2368 signal: "elm,order,first,item";
2369 signal: "elm,order,default,item";
2371 action: STATE_SET "default" 0.0;
2374 program { name: "divider_hidden";
2375 signal: "elm,order,last,item";
2377 action: STATE_SET "hidden" 0.0;
2380 program { name: "highlight_on";
2381 signal: "elm,highlight,on";
2383 action: STATE_SET "highlighted" 0.0;
2384 target: "highlight";
2386 program { name: "highlight_off";
2387 signal: "elm,highlight,off";
2389 action: STATE_SET "default" 0.0;
2390 target: "highlight";
2395 group { name: "elm/toolbar/base/tabbar/item_horizontal";
2396 inherit: "elm/toolbar/base/tabbar";
2398 part { name: "left_padding";
2400 state: "default" 0.0;
2404 part { name: "right_padding";
2406 state: "default" 0.0;
2413 group { name: "elm/toolbar/item/tabbar/item_horizontal";
2414 inherit: "elm/toolbar/item/tabbar";
2417 description { state: "default" 0.0;
2420 description { state: "icon_text" 0.0;