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 proxy.source_clip: 0;
1474 rel1.to: "elm.swallow.icon_new";
1476 rel2.to: "elm.swallow.icon_new";
1480 part { name: "elm.swallow.icon.proxy";
1483 clip_to: "elm.icon.proxy.clipper";
1484 description { state: "default" 0.0;
1485 source: "elm.swallow.icon";
1486 proxy.source_clip: 0;
1487 rel1.to: "elm.swallow.icon";
1489 rel2.to: "elm.swallow.icon";
1493 part { name: "elm.text";
1497 clip_to: "elm.text.clipper";
1498 description { state: "default" 0.0;
1502 to_x: "padding_after_icon";
1503 to_y: "padding_left_top";
1507 to: "padding_right_bottom";
1512 style: "toolbar_text_style_30";
1517 description { state: "visible" 0.0;
1518 inherit: "default" 0.0;
1521 description { state: "visible" 0.24;
1522 inherit: "visible" 0.0;
1524 text.style: "toolbar_text_style_24";
1526 description { state: "visible" 0.28;
1527 inherit: "visible" 0.0;
1529 text.style: "toolbar_text_style_28";
1531 description { state: "visible" 0.30;
1532 inherit: "visible" 0.0;
1534 text.style: "toolbar_text_style_30";
1536 description { state: "selected" 0.0;
1537 inherit: "visible" 0.0;
1538 text.style: "toolbar_selected_text_style_30";
1540 description { state: "selected" 0.24;
1541 inherit: "visible" 0.24;
1542 text.style: "toolbar_selected_text_style_24";
1544 description { state: "selected" 0.28;
1545 inherit: "visible" 0.28;
1546 text.style: "toolbar_selected_text_style_28";
1548 description { state: "selected" 0.30;
1549 inherit: "visible" 0.30;
1550 text.style: "toolbar_selected_text_style_30";
1553 part { name: "elm.text_new";
1557 clip_to: "elm.text_new.clipper";
1558 description { state: "default" 0.0;
1562 to_x: "padding_after_icon";
1563 to_y: "padding_left_top";
1567 to: "padding_right_bottom";
1573 style: "toolbar_text_style_30";
1578 description { state: "visible" 0.0;
1579 inherit: "default" 0.0;
1582 description { state: "visible" 0.24;
1583 inherit: "visible" 0.0;
1585 text.style: "toolbar_text_style_24";
1587 description { state: "visible" 0.28;
1588 inherit: "visible" 0.0;
1590 text.style: "toolbar_text_style_28";
1592 description { state: "visible" 0.30;
1593 inherit: "visible" 0.0;
1595 text.style: "toolbar_text_style_30";
1597 description { state: "selected" 0.0;
1598 inherit: "visible" 0.0;
1599 text.style: "toolbar_selected_text_style_30";
1601 description { state: "selected" 0.24;
1602 inherit: "visible" 0.24;
1603 text.style: "toolbar_selected_text_style_24";
1605 description { state: "selected" 0.28;
1606 inherit: "visible" 0.28;
1607 text.style: "toolbar_selected_text_style_28";
1609 description { state: "selected" 0.30;
1610 inherit: "visible" 0.30;
1611 text.style: "toolbar_selected_text_style_30";
1614 part { name: "padding.selected_line";
1618 description { state: "default" 0.0;
1632 part { name: "selected_line";
1636 description { state: "default" 0.0;
1638 to: "padding.selected_line";
1642 to: "padding.selected_line";
1646 color: 59 115 182 255;
1651 description { state: "selected" 0.0;
1652 inherit: "default" 0.0;
1656 part { name: "padding.badge";
1660 description { state: "default" 0.0;
1672 description { state: "default" 0.10;
1673 inherit: "default" 0.0;
1676 description { state: "default" 0.06;
1677 inherit: "default" 0.0;
1680 description { state: "default" 0.04;
1681 inherit: "default" 0.0;
1685 part { name: "elm.image.badge";
1688 description { state: "default" 0.0;
1693 to: "left.padding.text";
1697 to: "right.padding.text";
1701 normal: "00_badge_bg.png";
1706 description { state: "visible" 0.0;
1707 inherit: "default" 0.0;
1711 part { name: "left.padding.text";
1715 state: "default" 0.0;
1720 to: "elm.text.badge";
1724 to: "elm.text.badge";
1730 part { name: "right.padding.text";
1734 state: "default" 0.0;
1739 to: "padding.badge";
1743 to: "padding.badge";
1749 part { name: "elm.text.badge";
1754 state: "default" 0.0;
1757 to: "right.padding.text";
1761 to: "right.padding.text";
1767 color: 10 100 208 255;
1769 font: "Tizen:style=Bold";
1774 description { state: "visible" 0.0;
1775 inherit: "default" 0.0;
1779 part { name: "elm.text.clipper";
1781 description { state: "default" 0.0;
1782 color: 255 255 255 255;
1784 description { state: "animation" 0.0;
1785 color: 255 255 255 0;
1787 description { state: "disabled" 0.0;
1788 color: 255 255 255 153;
1791 part { name: "elm.text_new.clipper";
1793 description { state: "default" 0.0;
1794 color: 255 255 255 0;
1796 description { state: "animation" 0.0;
1797 color: 255 255 255 255;
1799 description { state: "disabled" 0.0;
1800 color: 255 255 255 153;
1803 part { name: "elm.icon.clipper";
1805 description { state: "default" 0.0;
1806 color: 255 255 255 255;
1808 description { state: "animation" 0.0;
1809 color: 255 255 255 0;
1811 description { state: "selected" 0.0;
1812 color: 255 255 255 255;
1814 description { state: "disabled" 0.0;
1815 color: 255 255 255 153;
1818 part { name: "elm.icon_new.clipper";
1820 description { state: "default" 0.0;
1821 color: 255 255 255 0;
1823 description { state: "animation" 0.0;
1824 color: 255 255 255 255;
1826 description { state: "selected" 0.0;
1827 color: 255 255 255 255;
1829 description { state: "disabled" 0.0;
1830 color: 255 255 255 153;
1833 part { name: "elm.icon.proxy.clipper";
1835 description { state: "default" 0.0;
1836 color: 153 153 153 255;
1838 description { state: "animation" 0.0;
1839 color: 255 255 255 0;
1841 description { state: "selected" 0.0;
1842 color: 61 114 180 255;
1844 description { state: "disabled" 0.0;
1845 color: 255 255 255 153;
1848 part { name: "elm.icon_new.proxy.clipper";
1850 description { state: "default" 0.0;
1851 color: 255 255 255 0;
1853 description { state: "animation" 0.0;
1854 color: 255 255 255 255;
1856 description { state: "selected" 0.0;
1857 color: 61 114 180 255;
1859 description { state: "disabled" 0.0;
1860 color: 255 255 255 153;
1863 part { name: "divider";
1866 description { state: "default" 0.0;
1872 to_y: "elm.swallow.icon";
1876 to_y: "elm.swallow.icon";
1879 description { state: "hidden" 0.0;
1880 inherit: "default" 0.0;
1884 part { name: "divider_left";
1887 description { state: "default" 0.0;
1888 color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
1899 part { name: "divider_right";
1902 description { state: "default" 0.0;
1903 color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
1914 part { name: "highlight";
1917 description { state: "default" 0.0;
1920 normal: "00_focus.png";
1925 description { state: "highlighted" 0.0;
1926 inherit: "default" 0.0;
1930 part { name: "event";
1937 description { state: "default" 0.0;
1943 program { name: "go_active";
1944 signal: "elm,state,selected";
1946 action: STATE_SET "selected" 0.0;
1947 target: "elm.icon.clipper";
1948 target: "elm.icon.proxy.clipper";
1949 target: "selected_line";
1950 after: "selected_text";
1952 program { name: "selected_text";
1956 set_int(selected, 1);
1957 get_state(PART:"elm.text", st, 30, vl);
1958 if (!strcmp(st, "visible"))
1959 set_state(PART:"elm.text", "selected", vl);
1962 program { name: "go_passive";
1963 signal: "elm,state,unselected";
1965 action: STATE_SET "default" 0.0;
1966 target: "elm.icon.clipper";
1967 target: "elm.icon.proxy.clipper";
1968 target: "selected_line";
1969 after: "unselected_text";
1971 program { name: "unselected_text";
1975 set_int(selected, 0);
1976 get_state(PART:"elm.text", st, 30, vl);
1977 if (!strcmp(st, "selected"))
1978 set_state(PART:"elm.text", "visible", vl);
1981 program { name: "moving";
1982 signal: "elm,state,moving";
1984 action: STATE_SET "moving" 0.0;
1987 program { name: "pressed";
1988 signal: "mouse,down,1";
1990 action: STATE_SET "pressed" 0.0;
2000 new Float:dx, Float:dy;
2001 get_state(PART:"bg_cover", st, 30, vl);
2002 if (strcmp(st, "moving"))
2004 get_drag(PART:"event", dx, dy);
2005 if ((abs(dx)*abs(dx))+(abs(dy)*abs(dy)) > 400)
2007 set_drag(PART:"event", 0.0, 0.0);
2008 set_state(PART:"bg_cover", "default", 0.0);
2010 set_drag(PART:"event", 0.0, 0.0);
2014 program { name: "unpressed";
2015 signal: "mouse,up,1";
2018 set_drag(PART:"event", 0.0, 0.0);
2019 set_state(PART:"bg_cover", "default", 0.0);
2022 program { name: "go";
2023 signal: "mouse,clicked,1";
2025 action: SIGNAL_EMIT "elm,action,click" "elm";
2026 after: "play_sound";
2028 program { name: "play_sound";
2029 action: PLAY_SAMPLE "touch_sound" 1.0;
2031 program { name: "mouse,in";
2034 action: SIGNAL_EMIT "elm,mouse,in" "elm";
2036 program { name: "mouse,out";
2037 signal: "mouse,out";
2039 action: SIGNAL_EMIT "elm,mouse,out" "elm";
2041 program { name: "disable";
2042 signal: "elm,state,disabled";
2045 set_int(item_state, ITEM_STATE_DISABLED);
2046 set_state(PART:"bg", "disabled", 0.0);
2047 set_state(PART:"elm.text.clipper", "disabled", 0.0);
2048 set_state(PART:"elm.icon.clipper", "disabled", 0.0);
2049 set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
2050 run_program(PROGRAM:"label_set,animation,done");
2051 run_program(PROGRAM:"icon_set,animation,done");
2054 program { name: "enable";
2055 signal: "elm,state,enabled";
2058 set_int(item_state, ITEM_STATE_ENABLED);
2059 set_state(PART:"bg", "default", 0.0);
2060 set_state(PART:"elm.text.clipper", "default", 0.0);
2061 set_state(PART:"elm.icon.clipper", "default", 0.0);
2062 set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
2063 run_program(PROGRAM:"label_set,animation,done");
2064 run_program(PROGRAM:"icon_set,animation,done");
2067 program { name: "label_set,animation,forward";
2068 signal: "elm,state,label_set,forward";
2070 after: "label_set,sync";
2072 program { name: "label_set,animation,backward";
2073 signal: "elm,state,label_set,backward";
2075 after: "label_set,sync";
2077 program { name: "label_set,sync";
2078 signal: "elm,state,label_set";
2083 get_state(PART:"elm.text", st, 30, vl);
2084 set_state(PART:"elm.text_new", st, vl);
2086 after: "label_set,animation";
2088 program { name: "label_set,animation";
2089 action: STATE_SET "animation" 0.0;
2090 target: "elm.text.clipper";
2091 target: "elm.text_new.clipper";
2092 after: "label_set,animation,done";
2094 program { name: "label_set,animation,done";
2095 action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
2097 program { name: "label,reset";
2098 signal: "elm,state,label,reset";
2101 set_state(PART:"elm.text_new.clipper", "default", 0.0);
2102 if (get_int(item_state) != ITEM_STATE_DISABLED)
2103 set_state(PART:"elm.text.clipper", "default", 0.0);
2105 set_state(PART:"elm.text.clipper", "disabled", 0.0);
2108 program { name: "icon_set,animation,forward";
2109 signal: "elm,state,icon_set,forward";
2111 after: "icon_set,animation";
2113 program { name: "icon_set,animation,backward";
2114 signal: "elm,state,icon_set,backward";
2116 after: "icon_set,animation";
2118 program { name: "icon_set,animation";
2119 signal: "elm,state,icon_set";
2121 action: STATE_SET "animation" 0.0;
2122 target: "elm.icon.clipper";
2123 target: "elm.icon_new.clipper";
2124 target: "elm.icon.proxy.clipper";
2125 target: "elm.icon_new.proxy.clipper";
2126 after: "icon_set,animation,done";
2128 program { name: "icon_set,animation,done";
2129 action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
2131 program { name: "icon,reset";
2132 signal: "elm,state,icon,reset";
2135 set_state(PART:"elm.icon_new.clipper", "default", 0.0);
2136 if (get_int(item_state) != ITEM_STATE_DISABLED)
2138 set_state(PART:"elm.icon.clipper", "default", 0.0);
2139 set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
2143 set_state(PART:"elm.icon.clipper", "disabled", 0.0);
2144 set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
2148 program { name: "text_show";
2149 signal: "elm,state,text,visible";
2154 get_state(PART:"elm.swallow.icon", st, 30, vl);
2155 if (!strcmp(st, "icononly"))
2157 set_state(PART:"elm.swallow.icon", "visible", 0.0);
2158 set_state(PART:"icon_rect", "visible", 0.0);
2159 set_state(PART:"padding_after_icon", "visible", 0.0);
2160 set_state(PART:"bg", "icon_text", 0.0);
2162 get_state(PART:"elm.text", st, 30, vl);
2163 if (!strcmp(st, "default"))
2165 if (get_int(selected))
2166 set_str(temp, "selected");
2168 set_str(temp, "visible");
2169 get_str(temp, st, 31);
2171 if (get_int(items_number) <= 2)
2172 set_state(PART:"elm.text", st, 0.30);
2173 else if (get_int(items_number) == 3)
2174 set_state(PART:"elm.text", st, 0.28);
2175 else if (get_int(items_number) >= 4)
2177 get_state(PART:"bg", st, 30, vl);
2178 if (!strcmp(st, "icon_text"))
2179 set_state(PART:"elm.text", st, 0.28);
2181 set_state(PART:"elm.text", st, 0.24);
2186 program { name: "text_hide";
2187 signal: "elm,state,text,hidden";
2192 get_state(PART:"elm.swallow.icon", st, 30, vl);
2193 if (strcmp(st, "default"))
2195 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2196 set_state(PART:"icon_rect", "icononly", 0.0);
2197 set_state(PART:"padding_after_icon", "icononly", 0.0);
2199 set_state(PART:"elm.text", "default", 0.0);
2200 set_state(PART:"bg", "default", 0.0);
2203 program { name: "icon_show";
2204 signal: "elm,state,icon,visible";
2209 get_state(PART:"elm.text", st, 30, vl);
2210 if (strncmp(st, "default", 7))
2212 set_state(PART:"elm.swallow.icon", "visible", 0.0);
2213 set_state(PART:"icon_rect", "visible", 0.0);
2214 set_state(PART:"padding_after_icon", "visible", 0.0);
2215 set_state(PART:"bg", "icon_text", 0.0);
2219 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2220 set_state(PART:"icon_rect", "icononly", 0.0);
2221 set_state(PART:"padding_after_icon", "icononly", 0.0);
2225 program { name: "icon_hide";
2226 signal: "elm,state,icon,hidden";
2229 set_state(PART:"elm.swallow.icon", "default", 0.0);
2230 set_state(PART:"icon_rect", "default", 0.0);
2231 set_state(PART:"padding_after_icon", "default", 0.0);
2232 set_state(PART:"bg", "default", 0.0);
2235 program { name: "text_only_item_1";
2236 signal: "elm,number,item,1";
2239 set_int(items_number, 1);
2241 after: "text_only_item_under_2";
2243 program { name: "text_only_item_2";
2244 signal: "elm,number,item,2";
2247 set_int(items_number, 2);
2249 after: "text_only_item_under_2";
2251 program { name: "text_only_item_under_2";
2255 get_state(PART:"elm.text", st, 30, vl);
2256 if (!strncmp(st, "visible", 7))
2258 set_state(PART:"elm.text", st, 0.30);
2260 set_state(PART:"padding.badge", "default", 0.10);
2263 program { name: "text_only_item_3";
2264 signal: "elm,number,item,3";
2269 set_int(items_number, 3);
2270 get_state(PART:"elm.text", st, 30, vl);
2271 if (!strncmp(st, "visible", 7))
2273 set_state(PART:"elm.text", st, 0.28);
2275 set_state(PART:"padding.badge", "default", 0.06);
2278 program { name: "text_only_item_4";
2279 signal: "elm,number,item,4";
2282 set_int(items_number, 4);
2284 after: "text_only_item_upper_4";
2286 program { name: "text_only_item_5";
2287 signal: "elm,number,item,5";
2290 set_int(items_number, 5);
2292 after: "text_only_item_upper_4";
2294 program { name: "text_only_item_6";
2295 signal: "elm,number,item,6";
2298 set_int(items_number, 6);
2300 after: "text_only_item_upper_4";
2302 program { name: "text_only_item_7";
2303 signal: "elm,number,item,7";
2306 set_int(items_number, 7);
2308 after: "text_only_item_upper_4";
2310 program { name: "text_only_item_8";
2311 signal: "elm,number,item,8";
2314 set_int(items_number, 8);
2316 after: "text_only_item_upper_4";
2318 program { name: "text_only_item_9";
2319 signal: "elm,number,item,9";
2322 set_int(items_number, 9);
2324 after: "text_only_item_upper_4";
2326 program { name: "text_only_item_10";
2327 signal: "elm,number,item,10";
2330 set_int(items_number, 10);
2332 after: "text_only_item_upper_4";
2334 program { name: "text_only_item_upper_4";
2339 get_state(PART:"elm.text", st, 30, vl);
2340 if (!strcmp(st, "visible") || !strcmp(st, "selected"))
2342 get_state(PART:"bg", stb, 30, vl);
2343 if (!strcmp(stb, "icon_text"))
2344 set_state(PART:"elm.text", st, 0.28);
2346 set_state(PART:"elm.text", st, 0.24);
2348 get_state(PART:"bg", stb, 30, vl);
2349 if (!strcmp(stb, "icon_text"))
2350 set_state(PART:"padding.badge", "default", 0.06);
2352 set_state(PART:"padding.badge", "default", 0.04);
2355 program { name: "badge_show";
2356 signal: "elm,state,elm.text.badge,visible";
2358 action: STATE_SET "visible" 0.0;
2359 target: "elm.text.badge";
2360 target: "elm.image.badge";
2362 program { name: "badge_hide";
2363 signal: "elm,state,elm.text.badge,hidden";
2365 action: STATE_SET "default" 0.0;
2366 target: "elm.text.badge";
2367 target: "elm.image.badge";
2369 program { name: "divider_visible";
2370 signal: "elm,order,first,item";
2371 signal: "elm,order,default,item";
2373 action: STATE_SET "default" 0.0;
2376 program { name: "divider_hidden";
2377 signal: "elm,order,last,item";
2379 action: STATE_SET "hidden" 0.0;
2382 program { name: "highlight_on";
2383 signal: "elm,highlight,on";
2385 action: STATE_SET "highlighted" 0.0;
2386 target: "highlight";
2388 program { name: "highlight_off";
2389 signal: "elm,highlight,off";
2391 action: STATE_SET "default" 0.0;
2392 target: "highlight";
2397 group { name: "elm/toolbar/base/tabbar/item_horizontal";
2398 inherit: "elm/toolbar/base/tabbar";
2400 part { name: "left_padding";
2402 state: "default" 0.0;
2406 part { name: "right_padding";
2408 state: "default" 0.0;
2415 group { name: "elm/toolbar/item/tabbar/item_horizontal";
2416 inherit: "elm/toolbar/item/tabbar";
2419 description { state: "default" 0.0;
2422 description { state: "icon_text" 0.0;