[Genlist] change edit mode style
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / toolbar.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18
19
20 #define ITEM_STATE_ENABLED 0
21 #define ITEM_STATE_DISABLED 1
22 #define TOOLBAR_SLIDING_PER_FPS     2
23 #define TOOLBAR_SLIDING_FPS         40.0
24 #define TOOLBAR_SLIDING_TEXT_GAP    40
25 #define TOOLBAR_SLIDING_TEXT_OFFSET 5
26
27 #define TOOLBAR_TEXT_STYLE(_font_size) \
28    style { name: "toolbar_text_style_"_font_size; \
29       base: "font=Tizen:style=Bold style=far_shadow,bottom shadow_color=#000000be font_size="_font_size" align=center color="TOOLBAR_ITEM_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=0"; \
30       tag: "br" "\n"; \
31       tag: "ps" "ps"; \
32       tag: "hilight" "+ font=Tizen:style=Bold"; \
33       tag: "b" "+ font=Tizen:style=Bold"; \
34       tag: "tab" "\t"; \
35    }
36
37 #define TABBAR_TEXT_STYLE(_font_size) \
38    style { name: "tabbar_text_style_"_font_size; \
39       base: "font=Tizen:style=Bold style=far_shadow,bottom shadow_color=#000000ff font_size="_font_size" align=center color="TABBAR_ITEM_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=0"; \
40       tag: "br" "\n"; \
41       tag: "ps" "ps"; \
42       tag: "hilight" "+ font=Tizen:style=Bold"; \
43       tag: "b" "+ font=Tizen:style=Bold"; \
44       tag: "tab" "\t"; \
45    }
46
47 #define TOOLBAR_SELECTED_TEXT_STYLE(_font_size) \
48    style { name: "toolbar_selected_text_style_"_font_size; \
49       base: "font=Tizen:style=Bold style=far_shadow,bottom shadow_color=#000000ff font_size="_font_size" align=center color="TABBAR_ITEM_SELECTED_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=0"; \
50       tag: "br" "\n"; \
51       tag: "ps" "ps"; \
52       tag: "hilight" "+ font=Tizen:style=Bold"; \
53       tag: "b" "+ font=Tizen:style=Bold"; \
54       tag: "tab" "\t"; \
55    }
56
57 styles{
58    TABBAR_TEXT_STYLE(30)
59    TOOLBAR_TEXT_STYLE(36)
60 }
61
62 group { name: "elm/toolbar/base/default";
63    data {
64       item: "focus_highlight" "on";
65    }
66    images {
67        image: "00_toolbar_bg.png" COMP;
68    }
69    parts {
70       part { name: "base";
71          type: RECT;
72          mouse_events: 1;
73          description { state: "default" 0.0;
74          }
75       }
76       part { name: "base_bg";
77          type: IMAGE;
78          scale: 1;
79          description {
80             state: "default" 0.0;
81             rel1 {
82                 relative: 0.0 0.0;
83                 to: "base";
84             }
85             rel2 {
86                 relative: 1.0 1.0;
87                 to: "base";
88             }
89             image {
90                 normal: "00_toolbar_bg.png";
91                 border: TOOLBAR_ITEM_BG_DEFAULT_BORDER_INC;
92                 border_scale: 1;
93             }
94          }
95       }
96       part { name: "clipper";
97          type: RECT;
98          mouse_events: 0;
99          description {
100             state: "default" 0.0;
101             rel1 {
102                relative: 0.0 0.0;
103                to: "base";
104             }
105             rel2 {
106                relative: 1.0 1.0;
107                to: "base";
108             }
109          }
110       }
111       part { name: "elm.swallow.content";
112          clip_to: "clipper";
113          type: SWALLOW;
114          description {
115             state: "default" 0.0;
116             rel1.to: "clipper";
117             rel2.to: "clipper";
118          }
119       }
120       part { name: "event";
121          type: RECT;
122          mouse_events: 1;
123          repeat_events: 1;
124          description { state: "default" 0.0;
125             color: 0 0 0 0;
126          }
127       }
128    }
129 }
130
131 group { name: "elm/toolbar/item/default";
132    images {
133       image: "00_toolbar_press.png" COMP;
134       image: "00_tab_focus.png" COMP;
135    }
136
137    data.item: "transition_animation_on" "1";
138    script {
139       public item_state = ITEM_STATE_ENABLED;
140       public items_number = 0;
141    }
142    parts {
143       part { name: "bg";
144          type: IMAGE;
145          scale: 1;
146          mouse_events: 0;
147          description { state: "default" 0.0;
148             visible: 0;
149             image {
150                normal: "00_toolbar_press.png";
151                border: TOOLBAR_ITEM_BG_SELECTED_BORDER_INC;
152                border_scale: 1;
153             }
154          }
155          description { state: "selected" 0.0;
156             inherit: "default" 0.0;
157             visible: 1;
158          }
159          description { state: "disabled" 0.0;
160             inherit: "default" 0.0;
161             visible: 0;
162          }
163       }
164       part { name: "padding_left_top";
165          type: RECT;
166          scale: 1;
167          mouse_events: 0;
168          description { state: "default" 0.0;
169             align: 0.0 0.0;
170             rel2.relative: 0.0 0.0;
171             min: 0 0;
172             fixed: 1 1;
173             visible: 0;
174             color: 0 0 0 0;
175          }
176          description { state: "1_item" 0.0;
177             inherit: "default" 0.0;
178             min: 60 0;
179          }
180          description { state: "2_items" 0.0;
181             inherit: "default" 0.0;
182             min: 40 0;
183          }
184          description { state: "3_items" 0.0;
185             inherit: "default" 0.0;
186             min: 20 0;
187          }
188       }
189       part { name: "padding_right_bottom";
190          type: RECT;
191          scale: 1;
192          mouse_events: 0;
193          description { state: "default" 0.0;
194             align: 1.0 1.0;
195             rel1.relative: 1.0 1.0;
196             min: 0 0;
197             fixed: 1 1;
198             visible: 0;
199             color: 0 0 0 0;
200          }
201          description { state: "1_item" 0.0;
202             inherit: "default" 0.0;
203             min: 60 0;
204          }
205          description { state: "2_items" 0.0;
206             inherit: "default" 0.0;
207             min: 40 0;
208          }
209          description { state: "3_items" 0.0;
210             inherit: "default" 0.0;
211             min: 20 0;
212          }
213       }
214       part { name: "elm.text";
215          type: TEXTBLOCK;
216          mouse_events: 0;
217          scale: 1;
218          clip_to: "elm.text.clipper";
219          description { state: "default" 0.0;
220             visible: 0;
221             rel1 {
222                relative: 1.0 1.0;
223                to: "padding_left_top";
224             }
225             rel2 {
226                relative: 0.0 0.0;
227                to: "padding_right_bottom";
228             }
229             fixed: 1 1;
230             max: 9999 60;
231             text {
232                style: "toolbar_text_style_36";
233                min: 0 1;
234             }
235          }
236          description { state: "visible" 0.0;
237             inherit: "default" 0.0;
238             visible: 1;
239          }
240       }
241       part { name: "elm.text_new";
242          type: TEXTBLOCK;
243          mouse_events: 0;
244          scale: 1;
245          clip_to: "elm.text_new.clipper";
246          description { state: "default" 0.0;
247             visible: 0;
248             rel1 {
249                relative: 1.0 1.0;
250                to: "padding_left_top";
251             }
252             rel2 {
253                relative: 0.0 0.0;
254                to: "padding_right_bottom";
255             }
256             color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
257             fixed: 1 1;
258             text {
259                style: "toolbar_text_style_36";
260                min: 0 1;
261             }
262          }
263          description { state: "visible" 0.0;
264             inherit: "default" 0.0;
265             visible: 1;
266          }
267       }
268       part { name: "elm.text.clipper";
269          type: RECT;
270          description { state: "default" 0.0;
271             color: 255 255 255 255;
272          }
273          description { state: "animation" 0.0;
274             color: 255 255 255 0;
275          }
276          description { state: "disabled" 0.0;
277             color: 255 255 255 153;
278          }
279       }
280       part { name: "elm.text_new.clipper";
281          type: RECT;
282          description { state: "default" 0.0;
283             color: 255 255 255 0;
284          }
285          description { state: "animation" 0.0;
286             color: 255 255 255 255;
287          }
288          description { state: "disabled" 0.0;
289             color: 255 255 255 153;
290          }
291       }
292       part { name: "divider";
293          type: RECT;
294          scale: 1;
295          description { state: "default" 0.0;
296             min: 2 78;
297             max: 2 78;
298             fixed: 1 1;
299             rel1 {
300                 relative: 1.0 0.5;
301             }
302             rel2 {
303                 relative: 1.0 0.5;
304             }
305          }
306          description { state: "hidden" 0.0;
307             inherit: "default" 0.0;
308             visible: 0;
309          }
310       }
311       part { name: "divider_left";
312          type: RECT;
313          clip_to: "divider";
314          description { state: "default" 0.0;
315             color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
316             rel1 {
317                 relative: 0.0 0.0;
318                 to: "divider";
319             }
320             rel2 {
321                 relative: 0.5 1.0;
322                 to: "divider";
323             }
324          }
325       }
326       part { name: "divider_right";
327          type: RECT;
328          clip_to: "divider";
329          description { state: "default" 0.0;
330             color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
331             rel1 {
332                 relative: 0.5 0.0;
333                 to: "divider";
334             }
335             rel2 {
336                 relative: 1.0 1.0;
337                 to: "divider";
338             }
339          }
340       }
341       part { name: "event";
342          type: RECT;
343          mouse_events: 1;
344          ignore_flags: ON_HOLD;
345          description { state: "default" 0.0;
346             color: 0 0 0 0;
347          }
348       }
349       part { name: "event2";
350          type: RECT;
351          mouse_events: 1;
352          repeat_events: 1;
353          description { state: "default" 0.0;
354             color: 0 0 0 0;
355          }
356       }
357       part { name: "highlight";
358          type: IMAGE;
359          scale: 1;
360          description { state: "default" 0.0;
361             visible: 0;
362             image {
363                 normal: "00_tab_focus.png";
364                 border: 8 8 8 8;
365                 border_scale: 1;
366             }
367          }
368          description { state: "highlighted" 0.0;
369             inherit: "default" 0.0;
370             visible: 1;
371          }
372       }
373    }
374    programs {
375       program { name: "pressed";
376          signal:  "mouse,down,1";
377          source:  "event";
378          script {
379             if (get_int(item_state) != ITEM_STATE_DISABLED)
380               set_state(PART:"bg", "selected", 0.0);
381          }
382          transition: LINEAR 0.2;
383       }
384       program { name: "unpressed";
385          signal:  "mouse,up,1";
386          source:  "event2";
387          action:  STATE_SET "default" 0.0;
388          target:  "bg";
389          transition: LINEAR 0.1;
390       }
391       program { name: "go";
392          signal:  "mouse,clicked,1";
393          source:  "event";
394          action:  SIGNAL_EMIT "elm,action,click" "elm";
395          after: "play_sound";
396       }
397       program { name: "play_sound";
398          action: PLAY_SAMPLE "touch_sound" 1.0;
399       }
400       program { name: "mouse,in";
401          signal:  "mouse,in";
402          source:  "event";
403          action:  SIGNAL_EMIT "elm,mouse,in" "elm";
404       }
405       program { name: "mouse,out";
406          signal:  "mouse,out";
407          source:  "event";
408          action:  SIGNAL_EMIT "elm,mouse,out" "elm";
409       }
410       program { name: "disable";
411          signal: "elm,state,disabled";
412          source: "elm";
413          script {
414             set_int(item_state, ITEM_STATE_DISABLED);
415             set_state(PART:"bg", "disabled", 0.0);
416             set_state(PART:"elm.text.clipper", "disabled", 0.0);
417             run_program(PROGRAM:"label_set,animation,done");
418          }
419       }
420       program { name: "enable";
421          signal: "elm,state,enabled";
422          source: "elm";
423          script {
424             set_int(item_state, ITEM_STATE_ENABLED);
425             set_state(PART:"bg", "default", 0.0);
426             set_state(PART:"elm.text.clipper", "default", 0.0);
427             run_program(PROGRAM:"label_set,animation,done");
428          }
429       }
430       program { name: "label_set,animation,forward";
431          signal: "elm,state,label_set,forward";
432          source: "elm";
433          after: "label_set,sync";
434       }
435       program { name: "label_set,animation,backward";
436          signal: "elm,state,label_set,backward";
437          source: "elm";
438          after: "label_set,sync";
439       }
440       program { name: "label_set,sync";
441          signal: "elm,state,label_set";
442          source: "elm";
443          script {
444             new st[31];
445             new Float:vl;
446             get_state(PART:"elm.text", st, 30, vl);
447             set_state(PART:"elm.text_new", st, vl);
448          }
449          after: "label_set,animation";
450       }
451       program { name: "label_set,animation";
452          action: STATE_SET "animation" 0.0;
453          target: "elm.text.clipper";
454          target: "elm.text_new.clipper";
455          transition: LINEAR 0.2;
456          after: "label_set,animation,done";
457       }
458       program { name: "label_set,animation,done";
459          action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
460       }
461       program { name: "label,reset";
462          signal: "elm,state,label,reset";
463          source: "elm";
464          script {
465             set_state(PART:"elm.text_new.clipper", "default", 0.0);
466             if (get_int(item_state) != ITEM_STATE_DISABLED)
467               set_state(PART:"elm.text.clipper", "default", 0.0);
468             else
469               set_state(PART:"elm.text.clipper", "disabled", 0.0);
470          }
471       }
472       program { name: "text_show";
473          signal: "elm,state,text,visible";
474          source: "elm";
475          script {
476                set_state(PART:"elm.text", "visible", 0.0);
477          }
478       }
479       program { name: "text_hide";
480          signal: "elm,state,text,hidden";
481          source: "elm";
482          script {
483             set_state(PART:"elm.text", "default", 0.0);
484          }
485       }
486       program { name: "text_only_item_1";
487          signal: "elm,number,item,1";
488          source: "elm";
489          script {
490             set_int(items_number, 1);
491             set_state(PART:"padding_left_top", "1_item", 0.0);
492             set_state(PART:"padding_right_bottom", "1_item", 0.0);
493          }
494       }
495       program { name: "text_only_item_2";
496          signal: "elm,number,item,2";
497          source: "elm";
498          script {
499             set_int(items_number, 2);
500             set_state(PART:"padding_left_top", "2_items", 0.0);
501             set_state(PART:"padding_right_bottom", "2_items", 0.0);
502          }
503       }
504       program { name: "text_only_item_3";
505          signal: "elm,number,item,3";
506          source: "elm";
507          script {
508             set_int(items_number, 3);
509             set_state(PART:"padding_left_top", "3_items", 0.0);
510             set_state(PART:"padding_right_bottom", "3_items", 0.0);
511          }
512       }
513       program { name: "divider_visible";
514          signal: "elm,order,first,item";
515          signal: "elm,order,default,item";
516          source: "elm";
517          action: STATE_SET "default" 0.0;
518          target: "divider";
519       }
520       program { name: "divider_hidden";
521          signal: "elm,order,last,item";
522          source: "elm";
523          action: STATE_SET "hidden" 0.0;
524          target: "divider";
525       }
526       program { name: "highlight_on";
527          signal: "elm,highlight,on";
528          source: "elm";
529          action: STATE_SET "highlighted" 0.0;
530          target: "highlight";
531       }
532       program { name: "highlight_off";
533          signal: "elm,highlight,off";
534          source: "elm";
535          action: STATE_SET "default" 0.0;
536          target: "highlight";
537       }
538    }
539 }
540
541 group { name: "elm/toolbar/separator/default";
542    parts {
543       part { name: "divider";
544          type: RECT;
545          scale: 1;
546          description { state: "default" 0.0;
547             min: 2 88;
548             max: 2 88;
549             fixed: 1 1;
550             rel1 {
551                 relative: 0.5 0.5;
552             }
553             rel2 {
554                 relative: 0.5 0.5;
555             }
556          }
557       }
558       part { name: "divider_left";
559          type: RECT;
560          clip_to: "divider";
561          description { state: "default" 0.0;
562             color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
563             rel1 {
564                 relative: 0.0 0.0;
565                 to: "divider";
566             }
567             rel2 {
568                 relative: 0.5 1.0;
569                 to: "divider";
570             }
571          }
572       }
573       part { name: "divider_right";
574          type: RECT;
575          clip_to: "divider";
576          description { state: "default" 0.0;
577             color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
578             rel1 {
579                 relative: 0.5 0.0;
580                 to: "divider";
581             }
582             rel2 {
583                 relative: 1.0 1.0;
584                 to: "divider";
585             }
586          }
587       }
588    }
589 }
590
591 group { name: "elm/toolbar/object/default";
592    parts {
593       part { name: "elm.swallow.object"; // object group
594          type: SWALLOW;
595          description {
596              state: "default" 0.0;
597          }
598       }
599    }
600 }
601
602 group { name: "elm/toolbar/base/tabbar";
603    data {
604       item: "focus_highlight" "on";
605    }
606    images {
607       image: "00_effect_tab_bounce_left.png" COMP;
608       image: "00_effect_tab_bounce_right.png" COMP;
609       image: "00_title_bg.png" COMP;
610    }
611    script {
612       public left_timer, right_timer;
613       public l_timer(val) {
614          emit("do-hide-left-shadow", "");
615          set_int(left_timer, 0);
616          return 0;
617       }
618       public r_timer(val) {
619          emit("do-hide-right-shadow", "");
620          set_int(right_timer, 0);
621          return 0;
622       }
623    }
624    parts {
625       part { name: "base";
626          type: RECT;
627          scale: 1;
628          description { state: "default" 0.0;
629          }
630       }
631       part { name: "base_bg";
632          type: IMAGE;
633          scale: 1;
634          description {
635             state: "default" 0.0;
636             rel1 {
637                 relative: 0.0 0.0;
638                 to: "base";
639             }
640             rel2 {
641                 relative: 1.0 1.0;
642                 to: "base";
643             }
644             image {
645                 normal: "00_title_bg.png";
646             }
647          }
648       }
649       part { name: "left_padding";
650          type: RECT;
651          mouse_events: 0;
652          scale: 1;
653          description {
654             state: "default" 0.0;
655             min: 0 0;
656             fixed: 1 1;
657             visible: 0;
658             align: 0.0 0.5;
659             rel1.to: "base";
660             rel2.to: "base";
661             rel1.relative: 0.0 0.0;
662             rel2.relative: 0.0 1.0;
663          }
664       }
665       part { name: "right_padding";
666          type: RECT;
667          mouse_events: 0;
668          scale: 1;
669          description {
670             state: "default" 0.0;
671             min: 0 0;
672             fixed: 1 1;
673             visible: 0;
674             align: 1.0 0.5;
675             rel1.to: "base";
676             rel2.to: "base";
677             rel1.relative: 1.0 0.0;
678             rel2.relative: 1.0 1.0;
679          }
680       }
681       part { name: "clipper";
682          type: RECT;
683          mouse_events: 0;
684          scale: 1;
685          description {
686             state: "default" 0.0;
687             rel1.to: "left_padding";
688             rel1.relative: 1.0 0.0;
689             rel2.to: "right_padding";
690             rel2.relative: 0.0 1.0;
691          }
692       }
693       part { name: "elm.swallow.content";
694          clip_to: "clipper";
695          type: SWALLOW;
696          scale: 1;
697          description {
698             state: "default" 0.0;
699             rel1.to: "clipper";
700             rel2.to: "clipper";
701          }
702       }
703       part { name: "left_shadow_clip";
704          type: RECT;
705          mouse_events: 0;
706          scale: 1;
707          description { state: "default" 0.0;
708             visible: 0;
709             color: 255 255 255 0;
710          }
711          description { state: "show" 0.0;
712          }
713       }
714       part { name: "right_shadow_clip";
715          type: RECT;
716          mouse_events: 0;
717          scale: 1;
718          description { state: "default" 0.0;
719             visible: 0;
720             color: 255 255 255 0;
721          }
722          description { state: "show" 0.0;
723          }
724       }
725       part { name: "shadow_left";
726          clip_to: "left_shadow_clip";
727          type: IMAGE;
728          scale: 1;
729          repeat_events: 1;
730          description { state: "default" 0.0;
731             min: 162 0;
732             fixed: 1 1;
733             align: 0.0 0.5;
734             color: 255 255 255 255;
735             rel1.relative: 0.0 0.0;
736             rel2.relative: 0.0 1.0;
737             image.normal: "00_effect_tab_bounce_left.png";
738          }
739       }
740       part { name: "shadow_right";
741          clip_to: "right_shadow_clip";
742          type: IMAGE;
743          scale: 1;
744          repeat_events: 1;
745          description { state: "default" 0.0;
746             min: 162 0;
747             fixed: 1 1;
748             align: 1.0 0.5;
749             color: 255 255 255 255;
750             rel1.relative: 1.0 0.0;
751             rel2.relative: 1.0 1.0;
752             image.normal: "00_effect_tab_bounce_right.png";
753          }
754       }
755    }
756    programs {
757       program { name: "load";
758          script {
759             set_int(left_timer, 0);
760             set_int(right_timer, 0);
761          }
762       }
763       program { name: "left_shadow_show";
764          signal: "do-show-left-shadow";
765          source: "";
766          action:  STATE_SET "show" 0.0;
767          transition: LINEAR 0.3;
768          target: "left_shadow_clip";
769       }
770       program { name: "left_shadow_hide";
771          signal: "do-hide-left-shadow";
772          source: "";
773          action:  STATE_SET "default" 0.0;
774          transition: LINEAR 0.3;
775          target: "left_shadow_clip";
776       }
777       program { name: "right_shadow_show";
778          signal: "do-show-right-shadow";
779          source: "";
780          action:  STATE_SET "show" 0.0;
781          transition: LINEAR 0.3;
782          target: "right_shadow_clip";
783       }
784       program { name: "right_shadow_hide";
785          signal: "do-hide-right-shadow";
786          source: "";
787          action:  STATE_SET "default" 0.0;
788          transition: LINEAR 0.3;
789          target: "right_shadow_clip";
790       }
791       program { name: "edge_left";
792          signal: "elm,edge,left";
793          source: "elm";
794          script {
795             new v;
796             v = get_int(left_timer);
797             if (!v) {
798                 emit("do-show-left-shadow", "");
799             }
800             if (v > 0) cancel_timer(v);
801             v = timer(0.5, "l_timer", 0);
802             set_int(left_timer, v);
803          }
804       }
805       program { name: "edge_right";
806          signal: "elm,edge,right";
807          source: "elm";
808          script {
809             new v;
810             v = get_int(right_timer);
811             if (!v) {
812                 emit("do-show-right-shadow", "");
813             }
814             if (v > 0) cancel_timer(v);
815             v = timer(0.5, "r_timer", 0);
816             set_int(right_timer, v);
817          }
818       }
819    }
820 }
821
822 group { name: "elm/toolbar/item/tabbar";
823    images {
824       image: "00_tab_press.png" COMP;
825       image: "00_badge_bg.png" COMP;
826       image: "00_tab_focus.png" COMP;
827       image: "00_tab_select_bar.png" COMP;
828       image: "00_effect_tab_text_dim_left.png" COMP;
829       image: "00_effect_tab_text_dim_right.png" COMP;
830    }
831
832    data.item: "transition_animation_on" "1";
833    script {
834       public item_state = ITEM_STATE_ENABLED;
835       public items_number = 0;
836       public sliding_timer;
837       public end_timer;
838       public text_w;
839       public org_text_w;
840       public loop_count = 0;
841
842       public get_width() {
843          new x, y, w, h;
844          set_state(PART:"elm.text", "visible", 0.0);
845          get_geometry(PART:"elm.text", x, y, w, h);
846          set_int(org_text_w, w);
847
848          set_state(PART:"elm.text", "sliding", 0.0);
849          get_geometry(PART:"elm.text", x, y, w, h);
850          set_int(text_w, w);
851       }
852       public ender(val) {
853          set_int(loop_count, 0);
854          if (get_int(sliding_timer)) cancel_timer(get_int(sliding_timer));
855          set_int(sliding_timer, 0);
856          if (get_int(end_timer)) cancel_timer(get_int(end_timer));
857          set_int(end_timer, 0);
858          set_state(PART:"elm.text.dim.left", "default", 0.0);
859          set_state(PART:"elm.text_new.clipper", "default", 0.0);
860          if (val == 1) {
861             custom_state(PART:"elm.text", "sliding", 0.0);
862             set_state_val(PART:"elm.text", STATE_REL1_OFFSET, TOOLBAR_SLIDING_TEXT_OFFSET, 0);
863             set_state_val(PART:"elm.text", STATE_REL2_OFFSET, TOOLBAR_SLIDING_TEXT_OFFSET, 0);
864             set_state(PART:"elm.text", "custom", 0.0);
865          } else {
866             set_state(PART:"elm.text", "visible", 0.0);
867             set_state(PART:"elm.text.dim.right", "default", 0.0);
868          }
869       }
870       public sliding(val) {
871          new buf[128];
872          if (val == TOOLBAR_SLIDING_TEXT_OFFSET) {
873             set_int(loop_count, get_int(loop_count) + 1);
874             get_width();
875             if (get_int(text_w) <= get_int(org_text_w)) {
876                ender(0);
877                return;
878             }
879          }
880          val -= TOOLBAR_SLIDING_PER_FPS;
881 // for debuging //////////////////////////////
882 /*         snprintf(buf, 127, "%d:%d:%d",
883             val, get_int(org_text_w), get_int(text_w));
884          set_text(PART:"dbg", buf);*/
885
886          if (val <= -get_int(text_w) - TOOLBAR_SLIDING_TEXT_GAP + TOOLBAR_SLIDING_TEXT_OFFSET)
887             val = TOOLBAR_SLIDING_TEXT_OFFSET;
888          custom_state(PART:"elm.text", "sliding", 0.0);
889          set_state_val(PART:"elm.text", STATE_REL1_OFFSET, val, 0);
890          set_state_val(PART:"elm.text", STATE_REL2_OFFSET, val, 0);
891          set_state(PART:"elm.text", "custom", 0.0);
892
893          set_state(PART:"elm.text_new.clipper", "animation", 0.0);
894          get_text(PART:"elm.text", buf, 128);
895          set_text(PART:"elm.text_new", buf);
896          custom_state(PART:"elm.text_new", "sliding", 0.0);
897          set_state_val(PART:"elm.text_new", STATE_REL1_OFFSET,
898             val + get_int(text_w) + TOOLBAR_SLIDING_TEXT_GAP, 0);
899          set_state_val(PART:"elm.text_new", STATE_REL2_OFFSET,
900             val + get_int(text_w) + TOOLBAR_SLIDING_TEXT_GAP, 0);
901          set_state(PART:"elm.text_new", "custom", 0.0);
902
903          set_state(PART:"elm.text.dim.left", "show", 0.0);
904          set_state(PART:"elm.text.dim.right", "show", 0.0);
905
906          if (val == TOOLBAR_SLIDING_TEXT_OFFSET || val <= -get_int(text_w))
907             set_state(PART:"elm.text.dim.left", "default", 0.0);
908
909          if (val == TOOLBAR_SLIDING_TEXT_OFFSET) {
910             if (get_int(loop_count) < 3)
911                set_int(sliding_timer, timer(2.0, "sliding", TOOLBAR_SLIDING_TEXT_OFFSET));
912             else
913                set_int(end_timer, timer(0.5, "ender", 1));
914          } else
915             set_int(sliding_timer, timer(1.0/TOOLBAR_SLIDING_FPS, "sliding", val));
916       }
917    }
918    parts {
919       part { name: "bg";
920          type: RECT;
921          scale: 1;
922          mouse_events: 0;
923          description { state: "default" 0.0;
924             min: 180 0;
925             visible: 0;
926          }
927          description { state: "icon_text" 0.0;
928             inherit: "default" 0.0;
929             min: 180 0;
930          }
931       }
932       part { name: "selected_line";
933          type: IMAGE;
934          scale: 1;
935          mouse_events: 0;
936          description { state: "default" 0.0;
937             rel1 {
938                 relative: 0.0 1.0;
939             }
940             rel2 {
941                 relative: 1.0 1.0;
942             }
943             image {
944                 normal: "00_tab_select_bar.png";
945                 border: 1 1 1 1;
946                 border_scale: 1;
947             }
948             align: 0.0 1.0;
949             min: 0 10;
950             fixed: 0 1;
951             visible: 0;
952          }
953          description { state: "selected" 0.0;
954             inherit: "default" 0.0;
955             visible: 1;
956          }
957       }
958       part { name: "bg_cover";
959          type: IMAGE;
960          scale: 1;
961          mouse_events: 0;
962          description { state: "default" 0.0;
963             visible: 0;
964             image {
965                normal: "00_tab_press.png";
966                border: 0 0 8 0;
967                border_scale: 1;
968             }
969          }
970          description { state: "pressed" 0.0;
971             inherit: "default" 0.0;
972             visible: 1;
973          }
974          description { state: "moving" 0.0;
975             inherit: "default" 0.0;
976             visible: 1;
977          }
978       }
979       part { name: "padding_left_top";
980          type: RECT;
981          scale: 1;
982          mouse_events: 0;
983          description { state: "default" 0.0;
984             align: 0.0 0.0;
985             rel2.relative: 0.0 0.0;
986             min: 2 0;
987             fixed: 1 1;
988             visible: 0;
989             color: 0 0 0 0;
990          }
991       }
992       part { name: "padding_right_bottom";
993          type: RECT;
994          scale: 1;
995          mouse_events: 0;
996          description { state: "default" 0.0;
997             align: 1.0 1.0;
998             rel1.relative: 1.0 1.0;
999             min: 2 0;
1000             fixed: 1 1;
1001             visible: 0;
1002             color: 0 0 0 0;
1003          }
1004       }
1005       part {
1006          name: "icon_rect";
1007          type: RECT;
1008          scale: 1;
1009          mouse_events: 0;
1010          description { state: "default" 0.0;
1011             min: 0 0;
1012             fixed: 0 1;
1013             rel1 {
1014                relative: 1.0 1.0;
1015                to: "padding_left_top";
1016             }
1017             rel2 {
1018                relative: 0.0 1.0;
1019                to_x: "padding_right_bottom";
1020                to_y: "padding_left_top";
1021             }
1022             align: 0.5 0.0;
1023             color: 0 0 0 0;
1024          }
1025          description { state: "visible" 0.0;
1026             inherit: "default" 0.0;
1027             min: TABBAR_ITEM_ICON_SIZE_INC;
1028          }
1029          description { state: "icononly" 0.0;
1030             inherit: "default" 0.0;
1031          }
1032       }
1033       part { name: "padding_after_icon";
1034          type: RECT;
1035          scale: 1;
1036          mouse_events: 0;
1037          description { state: "default" 0.0; //when only icon or no icon is there
1038             align: 0.5 0.0;
1039             rel1 {
1040                relative: 0.0 1.0;
1041                to: "icon_rect";
1042             }
1043             rel2.to: "icon_rect";
1044             fixed: 0 1;
1045             min: 0 0;
1046             color: 0 0 0 0;
1047          }
1048          description { state: "visible" 0.0;
1049             inherit: "default" 0.0;
1050             min: 0 1;
1051          }
1052          description { state: "icononly" 0.0;
1053             inherit: "default" 0.0;
1054          }
1055       }
1056       part { name: "padding_before_text";
1057          type: RECT;
1058          scale: 1;
1059          mouse_events: 0;
1060          description { state: "default" 0.0; //when only icon or no icon is there
1061             align: 0.5 1.0;
1062             rel1 {
1063                relative: 1.0 0.0;
1064                to_x: "padding_left_top";
1065                to_y: "elm.text";
1066             }
1067             rel2 {
1068                relative: 0.0 0.0;
1069                to_x: "padding_right_bottom";
1070                to_y: "elm.text";
1071             }
1072             fixed: 0 1;
1073             min: 0 0;
1074             color: 0 0 0 0;
1075          }
1076       }
1077       part { name: "elm.swallow.icon.proxy";
1078          type: PROXY;
1079          scale: 1;
1080          clip_to: "elm.icon.proxy.clipper";
1081          description { state: "default" 0.0;
1082              source: "elm.swallow.icon";
1083              proxy.source_clip: 0;
1084              rel1.to: "elm.swallow.icon";
1085              rel1.offset: 0 3;
1086              rel2.to: "elm.swallow.icon";
1087              rel2.offset: -1 2;
1088          }
1089       }
1090       part { name: "elm.swallow.icon_new.proxy";
1091          type: PROXY;
1092          scale: 1;
1093          clip_to: "elm.icon_new.proxy.clipper";
1094          description { state: "default" 0.0;
1095              source: "elm.swallow.icon_new";
1096              proxy.source_clip: 0;
1097              rel1.to: "elm.swallow.icon_new";
1098              rel1.offset: 0 3;
1099              rel2.to: "elm.swallow.icon_new";
1100              rel2.offset: -1 2;
1101          }
1102       }
1103       part { name: "elm.swallow.icon";
1104          type: SWALLOW;
1105          scale: 1;
1106          clip_to: "elm.icon.clipper";
1107          description { state: "default" 0.0;
1108             visible: 0;
1109             min: TABBAR_ITEM_ICON_SIZE_INC;
1110             max: TABBAR_ITEM_ICON_SIZE_INC;
1111             rel1 {
1112                 to: "padding_left_top";
1113             }
1114             rel2 {
1115                 to: "padding_right_bottom";
1116             }
1117             aspect: 1.0 1.0;
1118             aspect_preference: HORIZONTAL;
1119          }
1120          description { state: "visible" 0.0;
1121             fixed: 1 0;
1122             min: TABBAR_ITEM_ICON_SIZE_INC;
1123             max: TABBAR_ITEM_ICON_SIZE_INC;
1124             align: 0.5 1.0;
1125             rel1 {
1126                relative: 1.0 0.0;
1127                to_x: "padding_left_top";
1128                to_y: "padding_before_text";
1129             }
1130             rel2 {
1131                relative: 0.0 0.0;
1132                to_x: "padding_right_bottom";
1133                to_y: "padding_before_text";
1134             }
1135             aspect: 1.0 1.0;
1136             aspect_preference: HORIZONTAL;
1137          }
1138          description { state: "icononly" 0.0;
1139             inherit: "default" 0.0;
1140             visible: 1;
1141          }
1142       }
1143       part { name: "elm.swallow.icon_new";
1144          type: SWALLOW;
1145          scale: 1;
1146          clip_to: "elm.icon_new.clipper";
1147          description { state: "default" 0.0;
1148             visible: 0;
1149             min: TABBAR_ITEM_ICON_SIZE_INC;
1150             max: TABBAR_ITEM_ICON_SIZE_INC;
1151             rel1.to: "padding_left_top";
1152             rel2.to: "padding_right_bottom";
1153             aspect: 1.0 1.0;
1154             aspect_preference: HORIZONTAL;
1155          }
1156          description { state: "visible" 0.0;
1157             fixed: 1 0;
1158             min: TABBAR_ITEM_ICON_SIZE_INC;
1159             max: TABBAR_ITEM_ICON_SIZE_INC;
1160             rel1 {
1161                relative: 0.0 1.0;
1162                to_x: "padding_left_top";
1163                to_y: "padding_before_text";
1164             }
1165             rel2 {
1166                relative: 0.0 0.0;
1167                to_x: "padding_right_bottom";
1168                to_y: "padding_before_text";
1169             }
1170             aspect: 1.0 1.0;
1171             aspect_preference: HORIZONTAL;
1172          }
1173          description { state: "icononly" 0.0;
1174             inherit: "default" 0.0;
1175             visible: 1;
1176          }
1177       }
1178       part { name: "elm.text";
1179          type: TEXTBLOCK;
1180          mouse_events: 0;
1181          scale: 1;
1182          clip_to: "elm.text.clipper";
1183          description { state: "default" 0.0;
1184             visible: 0;
1185             rel1 {
1186                relative: 1.0 1.0;
1187                to_x: "padding_left_top";
1188                to_y: "padding_after_icon";
1189             }
1190             rel2 {
1191                relative: 0.0 0.0;
1192                to: "padding_right_bottom";
1193             }
1194             fixed: 1 1;
1195             max: 0 34;
1196             text {
1197                style: "tabbar_text_style_30";
1198                min: 0 1;
1199                max: 1 0;
1200             }
1201          }
1202          description { state: "visible" 0.0;
1203             inherit: "default" 0.0;
1204             visible: 1;
1205          }
1206          description { state: "sliding" 0.0;
1207             inherit: "visible" 0.0;
1208             rel1.offset: TOOLBAR_SLIDING_TEXT_OFFSET 0;
1209             rel2.offset: TOOLBAR_SLIDING_TEXT_OFFSET 0;
1210             text.min: 1 1;
1211             align: 0.0 0.5;
1212          }
1213       }
1214       part { name: "elm.text_new";
1215          type: TEXTBLOCK;
1216          mouse_events: 0;
1217          scale: 1;
1218          clip_to: "elm.text_new.clipper";
1219          description { state: "default" 0.0;
1220             visible: 0;
1221             rel1 {
1222                relative: 1.0 1.0;
1223                to_x: "padding_left_top";
1224                to_y: "padding_after_icon";
1225             }
1226             rel2 {
1227                relative: 0.0 0.0;
1228                to: "padding_right_bottom";
1229             }
1230             max: 0 34;
1231             fixed: 1 1;
1232             text {
1233                style: "tabbar_text_style_30";
1234                min: 0 1;
1235                max: 1 0;
1236             }
1237          }
1238          description { state: "visible" 0.0;
1239             inherit: "default" 0.0;
1240             visible: 1;
1241          }
1242          description { state: "sliding" 0.0;
1243             inherit: "visible" 0.0;
1244             rel1.offset: TOOLBAR_SLIDING_TEXT_OFFSET 0;
1245             rel2.offset: TOOLBAR_SLIDING_TEXT_OFFSET 0;
1246             text.min: 1 1;
1247             align: 0.0 0.5;
1248          }
1249       }
1250       part { name: "padding.badge";
1251          type: RECT;
1252          scale: 1;
1253          mouse_events: 0;
1254          description { state: "default" 0.0;
1255             align: 1.0 0.0;
1256             rel1 {
1257                 relative: 1.0 0.0;
1258             }
1259             rel2 {
1260                 relative: 1.0 0.0;
1261             }
1262             min: 10 10;
1263             fixed: 1 1;
1264             visible: 0;
1265          }
1266          description { state: "default" 0.10;
1267             inherit: "default" 0.0;
1268             min: 10 10;
1269          }
1270          description { state: "default" 0.06;
1271             inherit: "default" 0.0;
1272             min: 6 10;
1273          }
1274          description { state: "default" 0.04;
1275             inherit: "default" 0.0;
1276             min: 4 10;
1277          }
1278       }
1279       part { name: "elm.image.badge";
1280          mouse_events: 0;
1281          scale: 1;
1282          description { state: "default" 0.0;
1283             visible: 0;
1284             min: 54 54;
1285             fixed: 1 1;
1286             rel1 {
1287                to: "left.padding.text";
1288                relative: 0.0 0.0;
1289             }
1290             rel2 {
1291                to: "right.padding.text";
1292                relative: 1.0 1.0;
1293             }
1294             image {
1295                normal: "00_badge_bg.png";
1296                border: 26 26 0 0;
1297                border_scale: 1;
1298             }
1299          }
1300          description { state: "visible" 0.0;
1301             inherit: "default" 0.0;
1302             visible: 1;
1303          }
1304       }
1305       part { name: "left.padding.text";
1306          type: RECT;
1307          scale: 1;
1308          description {
1309             state: "default" 0.0;
1310             visible: 0;
1311             fixed: 1 1;
1312             min: 12 54;
1313             rel1 {
1314                to: "elm.text.badge";
1315                relative: 0.0 0.0;
1316             }
1317             rel2 {
1318                to: "elm.text.badge";
1319                relative: 0.0 1.0;
1320             }
1321             align: 1.0 0.0;
1322          }
1323       }
1324       part { name: "right.padding.text";
1325          type: RECT;
1326          scale: 1;
1327          description {
1328             state: "default" 0.0;
1329             visible: 0;
1330             fixed: 1 1;
1331             min: 12 54;
1332             rel1 {
1333                to: "padding.badge";
1334                relative: 0.0 1.0;
1335             }
1336             rel2 {
1337                to: "padding.badge";
1338                relative: 0.0 1.0;
1339             }
1340             align: 1.0 0.0;
1341          }
1342       }
1343       part { name: "elm.text.badge";
1344          type: TEXT;
1345          mouse_events: 0;
1346          scale: 1;
1347          description {
1348             state: "default" 0.0;
1349             visible: 0;
1350             rel1 {
1351                to: "right.padding.text";
1352                relative: 0.0 0.0;
1353             }
1354             rel2 {
1355                to: "right.padding.text";
1356                relative: 0.0 1.0;
1357             }
1358             min: 30 0;
1359             fixed: 1 0;
1360             align: 1.0 0.5;
1361             color: 250 250 250 255;
1362             text {
1363                font: "Tizen:style=Bold";
1364                size: 34;
1365                min: 1 0;
1366                text_class: "tizen";
1367             }
1368          }
1369          description { state: "visible" 0.0;
1370             inherit: "default" 0.0;
1371             visible: 1;
1372          }
1373       }
1374       part { name: "elm.text.clipper";
1375          type: RECT;
1376          description { state: "default" 0.0;
1377             rel1 {
1378                relative: 1.0 1.0;
1379                to: "padding_left_top";
1380             }
1381             rel2 {
1382                relative: 0.0 0.0;
1383                to: "padding_right_bottom";
1384             }
1385             color: 255 255 255 255;
1386          }
1387          description { state: "animation" 0.0;
1388             inherit: "default" 0.0;
1389             color: 255 255 255 0;
1390          }
1391          description { state: "disabled" 0.0;
1392             inherit: "default" 0.0;
1393             color: 255 255 255 153;
1394          }
1395       }
1396       part { name: "elm.text_new.clipper";
1397          type: RECT;
1398          description { state: "default" 0.0;
1399             rel1 {
1400                relative: 1.0 1.0;
1401                to: "padding_left_top";
1402             }
1403             rel2 {
1404                relative: 0.0 0.0;
1405                to: "padding_right_bottom";
1406             }
1407             color: 255 255 255 0;
1408          }
1409          description { state: "animation" 0.0;
1410             inherit: "default" 0.0;
1411             color: 255 255 255 255;
1412          }
1413          description { state: "disabled" 0.0;
1414             inherit: "default" 0.0;
1415             color: 255 255 255 153;
1416          }
1417       }
1418       part { name: "elm.icon.proxy.clipper";
1419          type: RECT;
1420          description { state: "default" 0.0;
1421             rel1 {
1422                relative: 1.0 1.0;
1423                to: "padding_left_top";
1424             }
1425             rel2 {
1426                relative: 0.0 0.0;
1427                to: "padding_right_bottom";
1428             }
1429             color: 0 0 0 255;
1430          }
1431          description { state: "animation" 0.0;
1432             inherit: "default" 0.0;
1433             color: 0 0 0 255;
1434          }
1435          description { state: "selected" 0.0;
1436             inherit: "default" 0.0;
1437             color: 0 0 0 255;
1438          }
1439          description { state: "disabled" 0.0;
1440             inherit: "default" 0.0;
1441             color: 0 0 0 255;
1442          }
1443       }
1444       part { name: "elm.icon_new.proxy.clipper";
1445          type: RECT;
1446          description { state: "default" 0.0;
1447             rel1 {
1448                relative: 1.0 1.0;
1449                to: "padding_left_top";
1450             }
1451             rel2 {
1452                relative: 0.0 0.0;
1453                to: "padding_right_bottom";
1454             }
1455             color: 0 0 0 255;
1456          }
1457          description { state: "animation" 0.0;
1458             inherit: "default" 0.0;
1459             color: 0 0 0 255;
1460          }
1461          description { state: "selected" 0.0;
1462             inherit: "default" 0.0;
1463             color: 0 0 0 255;
1464          }
1465          description { state: "disabled" 0.0;
1466             inherit: "default" 0.0;
1467             color: 0 0 0 255;
1468          }
1469       }
1470
1471       part { name: "elm.icon.clipper";
1472          type: RECT;
1473          description { state: "default" 0.0;
1474             rel1 {
1475                relative: 1.0 1.0;
1476                to: "padding_left_top";
1477             }
1478             rel2 {
1479                relative: 0.0 0.0;
1480                to: "padding_right_bottom";
1481             }
1482             color: 255 255 255 255;
1483          }
1484          description { state: "animation" 0.0;
1485             inherit: "default" 0.0;
1486             color: 255 255 255 255;
1487          }
1488          description { state: "selected" 0.0;
1489             inherit: "default" 0.0;
1490             color: 255 255 255 255;
1491          }
1492          description { state: "disabled" 0.0;
1493             inherit: "default" 0.0;
1494             color: 255 255 255 255;
1495          }
1496       }
1497       part { name: "elm.icon_new.clipper";
1498          type: RECT;
1499          description { state: "default" 0.0;
1500             rel1 {
1501                relative: 1.0 1.0;
1502                to: "padding_left_top";
1503             }
1504             rel2 {
1505                relative: 0.0 0.0;
1506                to: "padding_right_bottom";
1507             }
1508             color: 255 255 255 255;
1509          }
1510          description { state: "animation" 0.0;
1511             inherit: "default" 0.0;
1512             color: 255 255 255 255;
1513          }
1514          description { state: "selected" 0.0;
1515             inherit: "default" 0.0;
1516             color: 255 255 255 255;
1517          }
1518          description { state: "disabled" 0.0;
1519             inherit: "default" 0.0;
1520             color: 255 255 255 255;
1521          }
1522       }
1523       part { name: "elm.text.dim.left";
1524          type: IMAGE;
1525          scale: 1;
1526          mouse_events: 0;
1527          description { state: "default" 0.0;
1528             min: 45 0;
1529             fixed: 1 0;
1530             align: 0.0 0.5;
1531             visible: 0;
1532             rel1 {
1533                 relative: 0.0 0.0;
1534                 to_x: "elm.text.clipper";
1535                 to_y: "elm.text";
1536             }
1537             rel2 {
1538                 relative: 0.0 1.0;
1539                 to_x: "elm.text.clipper";
1540                 to_y: "elm.text";
1541             }
1542             image.normal: "00_effect_tab_text_dim_left.png";
1543          }
1544          description { state: "show" 0.0;
1545             inherit: "default" 0.0;
1546             visible: 1;
1547          }
1548       }
1549       part { name: "elm.text.dim.right";
1550          type: IMAGE;
1551          scale: 1;
1552          mouse_events: 0;
1553          description { state: "default" 0.0;
1554             min: 45 0;
1555             fixed: 1 0;
1556             align: 1.0 0.5;
1557             visible: 0;
1558             rel1 {
1559                 relative: 1.0 0.0;
1560                 to_x: "elm.text.clipper";
1561                 to_y: "elm.text";
1562             }
1563             rel2 {
1564                 relative: 1.0 1.0;
1565                 to_x: "elm.text.clipper";
1566                 to_y: "elm.text";
1567             }
1568             image.normal: "00_effect_tab_text_dim_right.png";
1569          }
1570          description { state: "show" 0.0;
1571             inherit: "default" 0.0;
1572             visible: 1;
1573          }
1574       }
1575       part { name: "divider";
1576          type: RECT;
1577          scale: 1;
1578          description { state: "default" 0.0;
1579             min: 2 88;
1580             max: 2 88;
1581             fixed: 1 1;
1582             rel1 {
1583                 relative: 1.0 0.5;
1584             }
1585             rel2 {
1586                 relative: 1.0 0.5;
1587             }
1588          }
1589          description { state: "hidden" 0.0;
1590             inherit: "default" 0.0;
1591             visible: 0;
1592          }
1593       }
1594       part { name: "divider_left";
1595          type: RECT;
1596          clip_to: "divider";
1597          description { state: "default" 0.0;
1598             color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
1599             rel1 {
1600                 relative: 0.0 0.0;
1601                 to: "divider";
1602             }
1603             rel2 {
1604                 relative: 0.5 1.0;
1605                 to: "divider";
1606             }
1607          }
1608       }
1609       part { name: "divider_right";
1610          type: RECT;
1611          clip_to: "divider";
1612          description { state: "default" 0.0;
1613             color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
1614             rel1 {
1615                 relative: 0.5 0.0;
1616                 to: "divider";
1617             }
1618             rel2 {
1619                 relative: 1.0 1.0;
1620                 to: "divider";
1621             }
1622          }
1623       }
1624       part { name: "highlight";
1625          type: IMAGE;
1626          scale: 1;
1627          description { state: "default" 0.0;
1628             visible: 0;
1629             image {
1630                 normal: "00_tab_focus.png";
1631                 border: 8 8 8 8;
1632                 border_scale: 1;
1633             }
1634          }
1635          description { state: "highlighted" 0.0;
1636             inherit: "default" 0.0;
1637             visible: 1;
1638          }
1639       }
1640       part { name: "event";
1641          type: RECT;
1642          mouse_events: 1;
1643          dragable {
1644             x: 1 0 0;
1645             y: 1 0 0;
1646          }
1647          description { state: "default" 0.0;
1648             color: 0 0 0 0;
1649          }
1650       }
1651 // for debuging //////////////////////////////
1652 /*      part { name: "dbg";
1653          type: TEXTBLOCK;
1654          mouse_events: 0;
1655          scale: 1;
1656          description { state: "default" 0.0;
1657             rel1.relative: 1.0 0.0;
1658             rel2.relative: 1.0 0.0;
1659             fixed: 1 1;
1660             align: 1.0 0.0;
1661             text {
1662                style: "tabbar_text_style_30";
1663                text: "test";
1664                min: 1 1;
1665             }
1666          }
1667       }*/
1668    }
1669    programs {
1670       program { name: "go_active";
1671          signal:  "elm,state,selected";
1672          source:  "elm";
1673          action:  STATE_SET "selected" 0.0;
1674          target:  "elm.icon.clipper";
1675          target:  "elm.icon.proxy.clipper";
1676          target:  "selected_line";
1677          after: "selected_text";
1678       }
1679       program { name: "selected_text";
1680          script{
1681             new st[31];
1682             new Float:vl;
1683             get_state(PART:"elm.text", st, 30, vl);
1684             if (strcmp(st, "default"))
1685                 run_program(PROGRAM:"slide_start");
1686          }
1687       }
1688       program { name: "go_passive";
1689          signal:  "elm,state,unselected";
1690          source:  "elm";
1691          action:  STATE_SET "default" 0.0;
1692          target:  "elm.icon.clipper";
1693          target:  "elm.icon.proxy.clipper";
1694          target:  "selected_line";
1695          after: "unselected_text";
1696       }
1697       program { name: "unselected_text";
1698          script{
1699             new st[31];
1700             new Float:vl;
1701             get_state(PART:"elm.text", st, 30, vl);
1702             if (strcmp(st, "default"))
1703                 run_program(PROGRAM:"slide_stop");
1704          }
1705       }
1706       program { name: "moving";
1707          signal:  "elm,state,moving";
1708          source:  "elm";
1709          action:  STATE_SET "moving" 0.0;
1710          target:  "bg_cover";
1711       }
1712       program { name: "pressed";
1713          signal:  "mouse,down,1";
1714          source:  "event";
1715          action:  STATE_SET "pressed" 0.0;
1716          target:  "bg_cover";
1717       }
1718       program {
1719          name: "drag";
1720          signal: "drag";
1721          source: "event";
1722          script {
1723             new st[31];
1724             new Float:vl;
1725             new Float:dx, Float:dy;
1726             get_state(PART:"bg_cover", st, 30, vl);
1727             if (strcmp(st, "moving"))
1728               {
1729                 get_drag(PART:"event", dx, dy);
1730                 if ((abs(dx)*abs(dx))+(abs(dy)*abs(dy)) > 400)
1731                   {
1732                     set_drag(PART:"event", 0.0, 0.0);
1733                     set_state(PART:"bg_cover", "default", 0.0);
1734                   }
1735                 set_drag(PART:"event", 0.0, 0.0);
1736               }
1737           }
1738       }
1739       program { name: "unpressed";
1740          signal:  "mouse,up,1";
1741          source:  "event";
1742          script {
1743             set_drag(PART:"event", 0.0, 0.0);
1744             set_state(PART:"bg_cover", "default", 0.0);
1745          }
1746       }
1747       program { name: "go";
1748          signal:  "mouse,clicked,1";
1749          source:  "event";
1750          action:  SIGNAL_EMIT "elm,action,click" "elm";
1751          after: "play_sound";
1752       }
1753       program { name: "play_sound";
1754          action: PLAY_SAMPLE "touch_sound" 1.0;
1755       }
1756       program { name: "mouse,in";
1757          signal:  "mouse,in";
1758          source:  "event";
1759          action:  SIGNAL_EMIT "elm,mouse,in" "elm";
1760       }
1761       program { name: "mouse,out";
1762          signal:  "mouse,out";
1763          source:  "event";
1764          action:  SIGNAL_EMIT "elm,mouse,out" "elm";
1765       }
1766       program { name: "disable";
1767          signal: "elm,state,disabled";
1768          source: "elm";
1769          script {
1770             set_int(item_state, ITEM_STATE_DISABLED);
1771             set_state(PART:"bg", "disabled", 0.0);
1772             set_state(PART:"elm.text.clipper", "disabled", 0.0);
1773             set_state(PART:"elm.icon.clipper", "disabled", 0.0);
1774             set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
1775             run_program(PROGRAM:"label_set,animation,done");
1776             run_program(PROGRAM:"icon_set,animation,done");
1777          }
1778       }
1779       program { name: "enable";
1780          signal: "elm,state,enabled";
1781          source: "elm";
1782          script {
1783             set_int(item_state, ITEM_STATE_ENABLED);
1784             set_state(PART:"bg", "default", 0.0);
1785             set_state(PART:"elm.text.clipper", "default", 0.0);
1786             set_state(PART:"elm.icon.clipper", "default", 0.0);
1787             set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
1788             run_program(PROGRAM:"label_set,animation,done");
1789             run_program(PROGRAM:"icon_set,animation,done");
1790          }
1791       }
1792       program { name: "label_set,animation,forward";
1793          signal: "elm,state,label_set,forward";
1794          source: "elm";
1795          after: "label_set,sync";
1796       }
1797       program { name: "label_set,animation,backward";
1798          signal: "elm,state,label_set,backward";
1799          source: "elm";
1800          after: "label_set,sync";
1801       }
1802       program { name: "label_set,sync";
1803          signal: "elm,state,label_set";
1804          source: "elm";
1805          script {
1806             new st[31];
1807             new Float:vl;
1808             get_state(PART:"elm.text", st, 30, vl);
1809             set_state(PART:"elm.text_new", st, vl);
1810          }
1811          after: "label_set,animation";
1812       }
1813       program { name: "label_set,animation";
1814          action: STATE_SET "animation" 0.0;
1815          target: "elm.text.clipper";
1816          target: "elm.text_new.clipper";
1817          after: "label_set,animation,done";
1818       }
1819       program { name: "label_set,animation,done";
1820          action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
1821       }
1822       program { name: "label,reset";
1823          signal: "elm,state,label,reset";
1824          source: "elm";
1825          script {
1826             set_state(PART:"elm.text_new.clipper", "default", 0.0);
1827             if (get_int(item_state) != ITEM_STATE_DISABLED)
1828               set_state(PART:"elm.text.clipper", "default", 0.0);
1829             else
1830               set_state(PART:"elm.text.clipper", "disabled", 0.0);
1831          }
1832       }
1833       program { name: "icon_set,animation,forward";
1834          signal: "elm,state,icon_set,forward";
1835          source: "elm";
1836          after: "icon_set,animation";
1837       }
1838       program { name: "icon_set,animation,backward";
1839          signal: "elm,state,icon_set,backward";
1840          source: "elm";
1841          after: "icon_set,animation";
1842       }
1843       program { name: "icon_set,animation";
1844          signal: "elm,state,icon_set";
1845          source: "elm";
1846          action: STATE_SET "animation" 0.0;
1847          target: "elm.icon.clipper";
1848          target: "elm.icon_new.clipper";
1849          target: "elm.icon.proxy.clipper";
1850          target: "elm.icon_new.proxy.clipper";
1851          after: "icon_set,animation,done";
1852       }
1853       program { name: "icon_set,animation,done";
1854          action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
1855       }
1856       program { name: "icon,reset";
1857          signal: "elm,state,icon,reset";
1858          source: "elm";
1859          script {
1860             set_state(PART:"elm.icon_new.clipper", "default", 0.0);
1861             if (get_int(item_state) != ITEM_STATE_DISABLED)
1862               {
1863                  set_state(PART:"elm.icon.clipper", "default", 0.0);
1864                  set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
1865               }
1866             else
1867               {
1868                  set_state(PART:"elm.icon.clipper", "disabled", 0.0);
1869                  set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
1870               }
1871          }
1872       }
1873       program { name: "text_show";
1874          signal: "elm,state,text,visible";
1875          source: "elm";
1876          script {
1877             new st[31];
1878             new Float:vl;
1879             get_state(PART:"elm.swallow.icon", st, 30, vl);
1880             if (!strcmp(st, "icononly"))
1881               {
1882                  set_state(PART:"elm.swallow.icon", "visible", 0.0);
1883                  set_state(PART:"icon_rect", "visible", 0.0);
1884                  set_state(PART:"padding_after_icon", "visible", 0.0);
1885                  set_state(PART:"bg", "icon_text", 0.0);
1886               }
1887             set_state(PART:"elm.text", "visible", 0.0);
1888          }
1889       }
1890       program { name: "text_hide";
1891          signal: "elm,state,text,hidden";
1892          source: "elm";
1893          script {
1894             new st[31];
1895             new Float:vl;
1896             get_state(PART:"elm.swallow.icon", st, 30, vl);
1897             if (strcmp(st, "default"))
1898               {
1899                  set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1900                  set_state(PART:"icon_rect", "icononly", 0.0);
1901                  set_state(PART:"padding_after_icon", "icononly", 0.0);
1902               }
1903             set_state(PART:"elm.text", "default", 0.0);
1904             set_state(PART:"bg", "default", 0.0);
1905          }
1906       }
1907       program { name: "icon_show";
1908          signal: "elm,state,icon,visible";
1909          source: "elm";
1910          script {
1911             new st[31];
1912             new Float:vl;
1913             get_state(PART:"elm.text", st, 30, vl);
1914             if (strncmp(st, "default", 7))
1915               {
1916                  set_state(PART:"elm.swallow.icon", "visible", 0.0);
1917                  set_state(PART:"icon_rect", "visible", 0.0);
1918                  set_state(PART:"padding_after_icon", "visible", 0.0);
1919                  set_state(PART:"bg", "icon_text", 0.0);
1920               }
1921             else
1922               {
1923                  set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1924                  set_state(PART:"icon_rect", "icononly", 0.0);
1925                  set_state(PART:"padding_after_icon", "icononly", 0.0);
1926               }
1927          }
1928       }
1929       program { name: "icon_hide";
1930          signal: "elm,state,icon,hidden";
1931          source: "elm";
1932          script {
1933             set_state(PART:"elm.swallow.icon", "default", 0.0);
1934             set_state(PART:"icon_rect", "default", 0.0);
1935             set_state(PART:"padding_after_icon", "default", 0.0);
1936             set_state(PART:"bg", "default", 0.0);
1937          }
1938       }
1939       program { name: "badge_show";
1940          signal: "elm,state,elm.text.badge,visible";
1941          source: "elm";
1942          action: STATE_SET "visible" 0.0;
1943          target: "elm.text.badge";
1944          target: "elm.image.badge";
1945       }
1946       program { name: "badge_hide";
1947          signal: "elm,state,elm.text.badge,hidden";
1948          source: "elm";
1949          action:  STATE_SET "default" 0.0;
1950          target: "elm.text.badge";
1951          target: "elm.image.badge";
1952       }
1953       program { name: "divider_visible_1";
1954          signal: "elm,order,first,item";
1955          source: "elm";
1956          action: STATE_SET "default" 0.0;
1957          target: "divider";
1958       }
1959       program { name: "divider_visible_2";
1960          signal: "elm,order,default,item";
1961          source: "elm";
1962          action: STATE_SET "default" 0.0;
1963          target: "divider";
1964       }
1965       program { name: "divider_hidden";
1966          signal: "elm,order,last,item";
1967          source: "elm";
1968          action: STATE_SET "hidden" 0.0;
1969          target: "divider";
1970       }
1971       program { name: "highlight_on";
1972          signal: "elm,highlight,on";
1973          source: "elm";
1974          action: STATE_SET "highlighted" 0.0;
1975          target: "highlight";
1976       }
1977       program { name: "highlight_off";
1978          signal: "elm,highlight,off";
1979          source: "elm";
1980          action: STATE_SET "default" 0.0;
1981          target: "highlight";
1982       }
1983       program { name: "tab_item_2";
1984          signal: "elm,number,item,2";
1985          source: "elm";
1986          script {
1987             set_int(items_number, 2);
1988             set_state(PART:"padding.badge", "default", 0.10);
1989          }
1990       }
1991       program { name: "tab_item_3";
1992          signal: "elm,number,item,3";
1993          source: "elm";
1994          script {
1995             set_int(items_number, 3);
1996             set_state(PART:"padding.badge", "default", 0.06);
1997          }
1998       }
1999       program { name: "tab_item_4";
2000          signal: "elm,number,item,4";
2001          source: "elm";
2002          script {
2003             set_int(items_number, 4);
2004          }
2005          after: "tab_item_upper_4";
2006       }
2007       program { name: "tab_item_5";
2008          signal: "elm,number,item,5";
2009          source: "elm";
2010          script {
2011             set_int(items_number, 5);
2012          }
2013          after: "tab_item_upper_4";
2014       }
2015       program { name: "tab_item_6";
2016          signal: "elm,number,item,6";
2017          source: "elm";
2018          script {
2019             set_int(items_number, 6);
2020          }
2021          after: "tab_item_upper_4";
2022       }
2023       program { name: "tab_item_7";
2024          signal: "elm,number,item,7";
2025          source: "elm";
2026          script {
2027             set_int(items_number, 7);
2028          }
2029          after: "tab_item_upper_4";
2030       }
2031       program { name: "tab_item_8";
2032          signal: "elm,number,item,8";
2033          source: "elm";
2034          script {
2035             set_int(items_number, 8);
2036          }
2037          after: "tab_item_upper_4";
2038       }
2039       program { name: "tab_item_9";
2040          signal: "elm,number,item,9";
2041          source: "elm";
2042          script {
2043             set_int(items_number, 9);
2044          }
2045          after: "tab_item_upper_4";
2046       }
2047       program { name: "tab_item_10";
2048          signal: "elm,number,item,10";
2049          source: "elm";
2050          script {
2051             set_int(items_number, 10);
2052          }
2053          after: "tab_item_upper_4";
2054       }
2055       program { name: "tab_item_upper_4";
2056          script {
2057             set_state(PART:"padding.badge", "default", 0.04);
2058          }
2059       }
2060       program { name: "slide_start";
2061          script {
2062             if (!get_int(sliding_timer) && !get_int(end_timer)) {
2063                set_int(sliding_timer, timer(1.5, "sliding", TOOLBAR_SLIDING_TEXT_OFFSET));
2064             }
2065          }
2066       }
2067       program { name: "slide_stop";
2068          script {
2069              ender(0);
2070          }
2071       }
2072    }
2073 }
2074
2075 group { name: "elm/toolbar/base/tabbar/item_with_title";
2076    inherit: "elm/toolbar/base/tabbar";
2077    images {
2078       image: "00_sub_title_bg.png" COMP;
2079    }
2080    parts {
2081        part { name: "base_bg";
2082          type: IMAGE;
2083          scale: 1;
2084          description {
2085             state: "default" 0.0;
2086             rel1 {
2087                 relative: 0.0 0.0;
2088                 to: "base";
2089             }
2090             rel2 {
2091                 relative: 1.0 1.0;
2092                 to: "base";
2093             }
2094             image {
2095                 normal: "00_sub_title_bg.png";
2096                 border: 8 8 35 35;
2097                 border_scale: 1;
2098             }
2099          }
2100       }
2101    }
2102 }
2103
2104 group { name: "elm/toolbar/item/tabbar/item_with_title";
2105    inherit: "elm/toolbar/item/tabbar";
2106    images {
2107       image: "00_effect_tab_text_dim_left_02.png" COMP;
2108       image: "00_effect_tab_text_dim_right_02.png" COMP;
2109    }
2110    parts {
2111       part { name: "elm.text.dim.left";
2112          description { state: "default" 0.0;
2113             image.normal: "00_effect_tab_text_dim_left_02.png";
2114          }
2115          description { state: "show" 0.0;
2116             inherit: "default" 0.0;
2117             visible: 1;
2118          }
2119       }
2120       part { name: "elm.text.dim.right";
2121          description { state: "default" 0.0;
2122             image.normal: "00_effect_tab_text_dim_right_02.png";
2123          }
2124          description { state: "show" 0.0;
2125             inherit: "default" 0.0;
2126             visible: 1;
2127          }
2128       }
2129       part { name: "divider";
2130          type: RECT;
2131          scale: 1;
2132          description { state: "default" 0.0;
2133             min: 2 48;
2134             max: 2 48;
2135             fixed: 1 1;
2136             rel1 {
2137                 relative: 1.0 0.5;
2138             }
2139             rel2 {
2140                 relative: 1.0 0.5;
2141             }
2142          }
2143          description { state: "hidden" 0.0;
2144             inherit: "default" 0.0;
2145             visible: 0;
2146          }
2147       }
2148       part { name: "divider_left";
2149          type: RECT;
2150          clip_to: "divider";
2151          description { state: "default" 0.0;
2152             color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
2153             rel1 {
2154                 relative: 0.0 0.0;
2155                 to: "divider";
2156             }
2157             rel2 {
2158                 relative: 0.5 1.0;
2159                 to: "divider";
2160             }
2161          }
2162       }
2163       part { name: "divider_right";
2164          type: RECT;
2165          clip_to: "divider";
2166          description { state: "default" 0.0;
2167             color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
2168             rel1 {
2169                 relative: 0.5 0.0;
2170                 to: "divider";
2171             }
2172             rel2 {
2173                 relative: 1.0 1.0;
2174                 to: "divider";
2175             }
2176          }
2177       }
2178    }
2179 }