Merge "[Button]Naviframe_control style macro's modified."
[profile/ivi/efl-theme-tizen.git] / themes / widgets / scroller.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved 
3  *
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of SAMSUNG
7  * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
8  * software is owned by Samsung and you shall not disclose such Confidential
9  * Information and shall use it only in accordance with the terms of the license
10  * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
11  * representations or warranties about the suitability of the software, either
12  * express or implied, including but not limited to the implied warranties of
13  * merchantability, fitness for a particular purpose, or non-infringement.
14  * SAMSUNG shall not be liable for any damages suffered by licensee arising out
15  * of or releated to this software.
16  *
17  */
18
19 /*
20  * vim:ts=3
21 */
22 group { name: "elm/scroller/base/default";
23
24    alias: "elm/list/base/default";
25    alias: "elm/genlist/base/default";
26    alias: "elm/carousel/base/default";
27    alias: "elm/gengrid/base/default";
28    alias: "elm/scroller/base/map_bubble";
29    alias: "elm/genscroller/base/default";
30
31    data {
32       item: "focus_highlight" "on";
33    }
34
35    script {
36       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
37       public timer0(val) {
38          new v;
39          v = get_int(sbvis_v);
40          if (v) {
41             v = get_int(sbalways_v);
42             if (!v) {
43                emit("do-hide-vbar", "");
44                set_int(sbvis_v, 0);
45             }
46          }
47          v = get_int(sbvis_h);
48          if (v) {
49             v = get_int(sbalways_h);
50             if (!v) {
51                emit("do-hide-hbar", "");
52                set_int(sbvis_h, 0);
53             }
54          }
55          set_int(sbvis_timer, 0);
56          return 0;
57       }
58    }
59    images {
60       image: "00_scroll_bar.png" COMP;
61    }
62    parts {
63       part { name: "bg";
64          type: RECT;
65          scale: 1;
66          description { state: "default" 0.0;
67             rel1.offset: 0 0;
68             rel2.offset: -1 -1;
69             color: 255 255 255 0;
70          }
71       }
72       part { name: "clipper";
73          type: RECT;
74          mouse_events: 0;
75          scale: 1;
76          description { state: "default" 0.0;
77             rel1.to: "bg";
78             rel2.to: "bg";
79             rel1.offset: 0 0;
80             rel2.offset: -1 -1;
81          }
82       }
83       part { name: "elm.swallow.content";
84          clip_to: "clipper";
85          type: SWALLOW;
86          scale: 1;
87          description { state: "default" 0.0;
88             rel1.to: "bg";
89             rel2.to: "bg";
90             rel1.offset: 0 0;
91             rel2.offset: -1 -1;
92          }
93       }
94       part { name: "sb_vbar_clip_master";
95          type: RECT;
96          mouse_events: 0;
97          scale: 1;
98          description { state: "default" 0.0;
99          }
100          description { state: "hidden" 0.0;
101             visible: 0;
102             color: 255 255 255 0;
103          }
104       }
105       part { name: "sb_vbar_clip";
106          clip_to: "sb_vbar_clip_master";
107          type: RECT;
108          mouse_events: 0;
109          scale: 1;
110          description { state: "default" 0.0;
111          }
112          description { state: "hidden" 0.0;
113             visible: 0;
114             color: 255 255 255 0;
115          }
116       }
117       part { name: "sb_vbar";
118          type: RECT;
119          mouse_events: 0;
120          scale: 1;
121          description { state: "default" 0.0;
122             fixed: 1 1;
123             visible: 0;
124             min: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MIN_SIZE_INC;
125             align: 1.0 0.0;
126             rel1 {
127                relative: 1.0 0.0;
128                offset:   0 0;
129                to_y:     "elm.swallow.content";
130                to_x:     "elm.swallow.content";
131             }
132             rel2 {
133                relative: 1.0 1.0;
134                offset:   -1 -1;
135                to_y:     "sb_hbar";
136                to_x:     "elm.swallow.content";
137             }
138          }
139       }
140       part { name: "elm.dragable.vbar";
141          clip_to: "sb_vbar_clip";
142          mouse_events: 0;
143          scale: 1;
144          dragable {
145             x: 0 0 0;
146             y: 1 1 0;
147             confine: "sb_vbar";
148          }
149          description { state: "default" 0.0;
150             fixed: 1 1;
151             min: SCROLLER_DEFAULT_SCROLLBAR_VBAR_MIN_SIZE_INC;
152             max: 10 99999;
153             rel1 {
154                relative: 0.5  0.5;
155                offset:   0    0;
156                to: "sb_vbar";
157             }
158             rel2 {
159                relative: 0.5  0.5;
160                offset:   0    0;
161                to: "sb_vbar";
162             }
163             image {
164                normal: "00_scroll_bar.png";
165                border: 2 2 2 2;
166                border_scale: 1;
167                middle: DEFAULT;
168             }
169          }
170       }
171       part { name: "sb_hbar_clip_master";
172          type: RECT;
173          mouse_events: 0;
174          scale: 1;
175          description { state: "default" 0.0;
176          }
177          description { state: "hidden" 0.0;
178             visible: 0;
179             color: 255 255 255 0;
180          }
181       }
182       part { name: "sb_hbar_clip";
183          clip_to: "sb_hbar_clip_master";
184          type: RECT;
185          mouse_events: 0;
186          scale: 1;
187          description { state: "default" 0.0;
188          }
189          description { state: "hidden" 0.0;
190             visible: 0;
191             color: 255 255 255 0;
192          }
193       }
194       part { name: "sb_hbar";
195          type: RECT;
196          mouse_events: 0;
197          scale: 1;
198          description { state: "default" 0.0;
199             fixed: 1 1;
200             visible: 0;
201             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MIN_SIZE_INC;
202             align: 0.0 1.0;
203             rel1 {
204                relative: 0.0 1.0;
205                offset:   0 0;
206                to_x:     "elm.swallow.content";
207                to_y:     "elm.swallow.content";
208             }
209             rel2 {
210                relative: 0.0 1.0;
211                offset:   -1 -1;
212                to_x:     "sb_vbar";
213                to_y:     "elm.swallow.content";
214             }
215          }
216       }
217       part { name: "elm.dragable.hbar";
218          clip_to: "sb_hbar_clip";
219          mouse_events: 0;
220          scale: 1;
221          dragable {
222             x: 1 1 0;
223             y: 0 0 0;
224             confine: "sb_hbar";
225          }
226          description { state: "default" 0.0;
227             fixed: 1 1;
228             min: SCROLLER_DEFAULT_SCROLLBAR_HBAR_MIN_SIZE_INC;
229             max: 99999 10;
230             rel1 {
231                relative: 0.5  0.5;
232                offset:   0    0;
233                to: "sb_hbar";
234             }
235             rel2 {
236                relative: 0.5  0.5;
237                offset:   0    0;
238                to: "sb_hbar";
239             }
240             image {
241                normal: "00_scroll_bar.png";
242                border: 2 2 2 2;
243                border_scale: 1;
244                middle: DEFAULT;
245             }
246          }
247       }
248       part { name: "disabler";
249          type: RECT;
250          scale: 1;
251          description { state: "default" 0.0;
252             rel1.to: "clipper";
253             rel2.to: "clipper";
254             color: 0 0 0 0;
255             visible: 0;
256          }
257          description { state: "disabled" 0.0;
258             inherit: "default" 0.0;
259             visible: 1;
260             color: 128 128 128 128;
261          }
262       }
263    }
264    programs {
265       program { name: "load";
266          signal: "load";
267          source: "";
268          script {
269             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
270             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
271             set_int(sbvis_h, 0);
272             set_int(sbvis_v, 0);
273             set_int(sbalways_v, 0);
274             set_int(sbalways_h, 0);
275             set_int(sbvis_timer, 0);
276          }
277       }
278
279       program { name: "vbar_show";
280          signal: "elm,action,show,vbar";
281          source: "elm";
282          action:  STATE_SET "default" 0.0;
283          target: "sb_vbar_clip_master";
284       }
285       program { name: "vbar_hide";
286          signal: "elm,action,hide,vbar";
287          source: "elm";
288          action:  STATE_SET "hidden" 0.0;
289          target: "sb_vbar_clip_master";
290       }
291       program { name: "vbar_show_always";
292          signal: "elm,action,show_always,vbar";
293          source: "elm";
294          script {
295             new v;
296             v = get_int(sbvis_v);
297             v |= get_int(sbalways_v);
298             if (!v) {
299                set_int(sbalways_v, 1);
300                emit("do-show-vbar", "");
301                set_int(sbvis_v, 1);
302             }
303          }
304       }
305       program { name: "vbar_show_notalways";
306          signal: "elm,action,show_notalways,vbar";
307          source: "elm";
308          script {
309             new v;
310             v = get_int(sbalways_v);
311             if (v) {
312                set_int(sbalways_v, 0);
313                v = get_int(sbvis_v);
314                if (!v) {
315                   emit("do-hide-vbar", "");
316                   set_int(sbvis_v, 0);
317                }
318             }
319          }
320       }
321       program { name: "sb_vbar_show";
322          signal: "do-show-vbar";
323          source: "";
324          action:  STATE_SET "default" 0.0;
325          transition: LINEAR 0.5;
326          target: "sb_vbar_clip";
327       }
328       program { name: "sb_vbar_hide";
329          signal: "do-hide-vbar";
330          source: "";
331          action:  STATE_SET "hidden" 0.0;
332          transition: LINEAR 0.5;
333          target: "sb_vbar_clip";
334       }
335
336       program { name: "hbar_show";
337          signal: "elm,action,show,hbar";
338          source: "elm";
339          action:  STATE_SET "default" 0.0;
340          target: "sb_hbar_clip_master";
341       }
342       program { name: "hbar_hide";
343          signal: "elm,action,hide,hbar";
344          source: "elm";
345          action:  STATE_SET "hidden" 0.0;
346          target: "sb_hbar_clip_master";
347       }
348       program { name: "hbar_show_always";
349          signal: "elm,action,show_always,hbar";
350          source: "elm";
351          script {
352             new v;
353             v = get_int(sbvis_h);
354             v |= get_int(sbalways_h);
355             if (!v) {
356                set_int(sbalways_h, 1);
357                emit("do-show-hbar", "");
358                set_int(sbvis_h, 1);
359             }
360          }
361       }
362       program { name: "hbar_show_notalways";
363          signal: "elm,action,show_notalways,hbar";
364          source: "elm";
365          script {
366             new v;
367             v = get_int(sbalways_h);
368             if (v) {
369                set_int(sbalways_h, 0);
370                v = get_int(sbvis_h);
371                if (!v) {
372                   emit("do-hide-hbar", "");
373                   set_int(sbvis_h, 0);
374                }
375             }
376          }
377       }
378       program { name: "sb_hbar_show";
379          signal: "do-show-hbar";
380          source: "";
381          action:  STATE_SET "default" 0.0;
382          transition: LINEAR 0.5;
383          target: "sb_hbar_clip";
384       }
385       program { name: "sb_hbar_hide";
386          signal: "do-hide-hbar";
387          source: "";
388          action:  STATE_SET "hidden" 0.0;
389          transition: LINEAR 0.5;
390          target: "sb_hbar_clip";
391       }
392
393       program { name: "scroll";
394          signal: "elm,action,scroll";
395          source: "elm";
396          script {
397             new v;
398             v = get_int(sbvis_v);
399             v |= get_int(sbalways_v);
400             if (!v) {
401                emit("do-show-vbar", "");
402                set_int(sbvis_v, 1);
403             }
404             v = get_int(sbvis_h);
405             v |= get_int(sbalways_h);
406             if (!v) {
407                emit("do-show-hbar", "");
408                set_int(sbvis_h, 1);
409             }
410             v = get_int(sbvis_timer);
411             if (v > 0) cancel_timer(v);
412             v = timer(1.0, "timer0", 0);
413             set_int(sbvis_timer, v);
414          }
415       }
416       program { name: "disable";
417          signal: "elm,state,disabled";
418          source: "elm";
419          action: STATE_SET "disabled" 0.0;
420          target: "disabler";
421       }
422       program { name: "enable";
423          signal: "elm,state,enabled";
424          source: "elm";
425          action: STATE_SET "default" 0.0;
426          target: "disabler";
427       }
428    }
429 }
430
431 group { name: "elm/scroller/base/handler";
432
433    alias: "elm/list/base/handler";
434    alias: "elm/genlist/base/handler";
435    alias: "elm/carousel/base/handler";
436
437    data {
438       item: "focus_highlight" "on";
439    }
440    script {
441       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
442       public timer0(val) {
443          new v;
444          v = get_int(sbvis_v);
445          if (v) {
446             v = get_int(sbalways_v);
447             if (!v) {
448                emit("do-hide-vbar", "");
449                set_int(sbvis_v, 0);
450             }
451          }
452          v = get_int(sbvis_h);
453          if (v) {
454             v = get_int(sbalways_h);
455             if (!v) {
456                emit("do-hide-hbar", "");
457                set_int(sbvis_h, 0);
458             }
459          }
460          set_int(sbvis_timer, 0);
461          return 0;
462       }
463    }
464    images {
465       image: "bt_sm_shine.png" COMP;
466       image: "bt_sm_hilight.png" COMP;
467       image: "sb_runnerh.png" COMP;
468       image: "00_scroll_bar_handler_top.png" COMP;
469       image: "00_scroll_bar_handler_middle.png" COMP;
470       image: "00_scroll_bar_handler_bottom.png" COMP;
471       image: "00_scroll_bar_handler_left.png" COMP;
472       image: "00_scroll_bar_handler_hor.png" COMP;
473       image: "00_scroll_bar_handler_right.png" COMP;
474       image: "sl_bt2_2.png" COMP;
475       image: "shelf_inset.png" COMP;
476    }
477    parts {
478       part { name: "bg";
479          type: RECT;
480          scale: 1;
481          description { state: "default" 0.0;
482             rel1.offset: 0 0;
483             rel2.offset: -1 -1;
484             color: 255 255 255 0;
485          }
486       }
487       part { name: "clipper";
488          type: RECT;
489          mouse_events: 0;
490          scale: 1;
491          description { state: "default" 0.0;
492             rel1.to: "bg";
493             rel2.to: "bg";
494             rel1.offset: 0 0;
495             rel2.offset: -1 -1;
496          }
497       }
498       part { name: "elm.swallow.content";
499          clip_to: "clipper";
500          type: SWALLOW;
501          scale: 1;
502          description { state: "default" 0.0;
503             rel1.to: "bg";
504             rel2.to: "bg";
505             rel1.offset: 0 0;
506             rel2.offset: -1 -1;
507          }
508       }
509       part { name: "conf_over";
510          mouse_events:  0;
511          scale: 1;
512          description { state: "default" 0.0;
513             rel1.to: "bg";
514             rel2.to: "bg";
515             visible: 0;
516             image {
517                normal: "shelf_inset.png";
518                border: 7 7 7 7;
519                middle: 0;
520             }
521             fill.smooth : 0;
522          }
523          description { state: "enabled" 0.0;
524             inherit: "default" 0.0;
525             color: 200 155 0 255;
526          }
527       }
528       part { name: "focus_highlight";
529          mouse_events: 0;
530          scale: 1;
531          description { state: "default" 0.0;
532             rel1.offset: -1 -1;
533             rel2.offset: 0 0;
534             image {
535                normal: "sl_bt2_2.png";
536                border: 7 7 7 7;
537                middle: 0;
538             }
539             fill.smooth : 0;
540             color: 200 155 0 0;
541          }
542          description { state: "enabled" 0.0;
543             inherit: "default" 0.0;
544             color: 200 155 0 255;
545          }
546       }
547       part { name: "sb_vbar_clip_master";
548          type: RECT;
549          mouse_events: 0;
550          scale: 1;
551          description { state: "default" 0.0;
552          }
553          description { state: "hidden" 0.0;
554             visible: 0;
555             color: 255 255 255 0;
556          }
557       }
558       part { name: "sb_vbar_clip";
559          clip_to: "sb_vbar_clip_master";
560          type: RECT;
561          mouse_events: 0;
562          scale: 1;
563          description { state: "default" 0.0;
564          }
565          description { state: "hidden" 0.0;
566             visible: 0;
567             color: 255 255 255 0;
568          }
569       }
570       part { name: "sb_vbar";
571          type: RECT;
572          mouse_events: 0;
573          scale: 1;
574          description { state: "default" 0.0;
575             fixed: 1 1;
576             visible: 0;
577             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
578             align: 1.0 0.0;
579             rel1 {
580                relative: 1.0 0.0;
581                offset: SCROLLER_HANDLER_SCROLLBAR_PADDING_INC SCROLLER_HANDLER_SCROLLBAR_PADDING_INC;
582                to_y:     "elm.swallow.content";
583                to_x:     "elm.swallow.content";
584             }
585             rel2 {
586                relative: 1.0 1.0;
587                offset: (-SCROLLER_HANDLER_SCROLLBAR_PADDING_INC-1) (-SCROLLER_HANDLER_SCROLLBAR_PADDING_INC-1);
588                to_y:     "sb_hbar";
589                to_x:     "elm.swallow.content";
590             }
591          }
592       }
593       part { name: "elm.dragable.vbar";
594          clip_to: "sb_vbar_clip";
595          mouse_events: 1;
596          scale: 1;
597          dragable {
598             x: 0 0 0;
599             y: 1 1 0;
600             confine: "sb_vbar";
601          }
602          description { state: "default" 0.0;
603             fixed: 1 1;
604             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIN_SIZE_INC;
605             max: 30 99999;
606             rel1 {
607                relative: 0.5  0.5;
608                offset:   0    0;
609                to: "sb_vbar";
610             }
611             rel2 {
612                relative: 0.5  0.5;
613                offset:   0    0;
614                to: "sb_vbar";
615             }
616          }
617       }
618       part { name: "scrollbar_handler_image_top";
619          clip_to: "sb_vbar_clip";
620          mouse_events: 0;
621          scale: 1;
622          description { state: "default" 0.0;
623             fixed: 1 1;
624             rel1.relative: 0.0 0.0;
625             rel1.to: "elm.dragable.vbar";
626             rel2.relative: 1.0 0.0;
627             rel2.to: "scrollbar_handler_image_middle";
628             visible: 1;
629             image {
630                normal: "00_scroll_bar_handler_top.png";
631                border: 5 5 5 0;
632                border_scale: 1;
633             }
634          }
635       }
636       part { name: "scrollbar_handler_image_middle";
637          clip_to: "sb_vbar_clip";
638          mouse_events: 0;
639          scale: 1;
640          description { state: "default" 0.0;
641             fixed: 1 1;
642             rel1.relative: 0.5 0.5;
643             rel1.to: "elm.dragable.vbar";
644             rel2.relative: 0.5 0.5;
645             rel2.to: "elm.dragable.vbar";
646             visible: 1;
647             min: SCROLLER_HANDLER_SCROLLBAR_VBAR_MIDDLE_MIN_SIZE_INC;
648             image {
649                normal: "00_scroll_bar_handler_middle.png";
650                border: 5 5 0 0;
651                border_scale: 1;
652             }
653          }
654       }
655       part { name: "scrollbar_handler_image_bottom";
656          clip_to: "sb_vbar_clip";
657          mouse_events: 0;
658          scale: 1;
659          description { state: "default" 0.0;
660             fixed: 1 1;
661             rel1.relative: 0.0 1.0;
662             rel1.to: "scrollbar_handler_image_middle";
663             rel2.relative: 1.0 1.0;
664             rel2.to: "elm.dragable.vbar";
665             visible: 1;
666             image {
667                normal: "00_scroll_bar_handler_bottom.png";
668                border: 5 5 0 5;
669                border_scale: 1;
670             }
671          }
672       }
673       part { name: "sb_vbar_over1";
674          clip_to: "sb_vbar_clip";
675          mouse_events: 0;
676          scale: 1;
677          description { state: "default" 0.0;
678             rel1.to: "elm.dragable.vbar";
679             rel2.relative: 1.0 0.5;
680             rel2.to: "elm.dragable.vbar";
681             visible: 0;
682             image {
683                normal: "bt_sm_hilight.png";
684                border: 6 6 6 0;
685                border_scale: 1;
686             }
687          }
688       }
689       part { name: "sb_vbar_over2";
690          clip_to: "sb_vbar_clip";
691          mouse_events: 0;
692          scale: 1;
693          description { state: "default" 0.0;
694             rel1.to: "elm.dragable.vbar";
695             rel2.to: "elm.dragable.vbar";
696             visible: 0;
697             image {
698                normal: "bt_sm_shine.png";
699                border: 6 6 6 0;
700                border_scale: 1;
701             }
702          }
703       }
704       part { name: "sb_hbar_clip_master";
705          type: RECT;
706          mouse_events: 0;
707          scale: 1;
708          description { state: "default" 0.0;
709          }
710          description { state: "hidden" 0.0;
711             visible: 0;
712             color: 255 255 255 0;
713          }
714       }
715       part { name: "sb_hbar_clip";
716          clip_to: "sb_hbar_clip_master";
717          type: RECT;
718          mouse_events: 0;
719          scale: 1;
720          description { state: "default" 0.0;
721          }
722          description { state: "hidden" 0.0;
723             visible: 0;
724             color: 255 255 255 0;
725          }
726       }
727       part { name: "sb_hbar";
728          type: RECT;
729          mouse_events: 0;
730          scale: 1;
731          description { state: "default" 0.0;
732             fixed: 1 1;
733             visible: 0;
734             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
735             align: 0.0 1.0;
736             rel1 {
737                relative: 0.0 1.0;
738                offset: SCROLLER_HANDLER_SCROLLBAR_PADDING_INC SCROLLER_HANDLER_SCROLLBAR_PADDING_INC;
739                to_x:     "elm.swallow.content";
740                to_y:     "elm.swallow.content";
741             }
742             rel2 {
743                relative: 0.0 1.0;
744                offset: -1 -1;
745                offset: (-SCROLLER_HANDLER_SCROLLBAR_PADDING_INC-1) (-SCROLLER_HANDLER_SCROLLBAR_PADDING_INC-1);
746                to_x: "sb_vbar";
747                to_y:     "elm.swallow.content";
748             }
749          }
750       }
751       part { name: "elm.dragable.hbar";
752          clip_to: "sb_hbar_clip";
753          mouse_events: 1;
754          scale: 1;
755          dragable {
756             x: 1 1 0;
757             y: 0 0 0;
758             confine: "sb_hbar";
759          }
760          description { state: "default" 0.0;
761             fixed: 1 1;
762             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIN_SIZE_INC;
763             max: 99999 30;
764             rel1 {
765                relative: 0.5  0.5;
766                offset:   0    0;
767                to: "sb_hbar";
768             }
769             rel2 {
770                relative: 0.5  0.5;
771                offset:   0    0;
772                to: "sb_hbar";
773             }
774          }
775       }
776       part { name: "h_scrollbar_handler_image_left";
777          clip_to: "sb_hbar_clip";
778          mouse_events: 0;
779          scale: 1;
780          description { state: "default" 0.0;
781             fixed: 1 1;
782             rel1.relative: 0.0 0.0;
783             rel1.to: "elm.dragable.hbar";
784             rel2.relative: 0.0 1.0;
785             rel2.to: "scrollbar_handler_image_hor";
786             visible: 1;
787             image {
788                normal: "00_scroll_bar_handler_left.png";
789                border: 5 0 5 5;
790                border_scale: 1;
791             }
792          }
793       }
794       part { name: "scrollbar_handler_image_hor";
795          clip_to: "sb_hbar_clip";
796          mouse_events: 0;
797          scale: 1;
798          description { state: "default" 0.0;
799          fixed: 1 1;
800             rel1.relative: 0.5 0.5;
801             rel1.to: "elm.dragable.hbar";
802             rel2.relative: 0.5 0.5;
803             rel2.to: "elm.dragable.hbar";
804             visible: 1;
805             min: SCROLLER_HANDLER_SCROLLBAR_HBAR_MIDDLE_MIN_SIZE_INC;
806             image {
807                normal: "00_scroll_bar_handler_hor.png";
808                border: 0 0 5 5;
809                border_scale: 1;
810             }
811          }
812       }
813       part { name: "h_scrollbar_handler_image_right";
814          clip_to: "sb_hbar_clip";
815          mouse_events: 0;
816          scale: 1;
817          description { state: "default" 0.0;
818             fixed: 1 1;
819             rel1.relative: 1.0 0.0;
820             rel1.to: "scrollbar_handler_image_hor";
821             rel2.relative: 1.0 1.0;
822             rel2.to: "elm.dragable.hbar";
823             visible: 1;
824             image {
825                normal: "00_scroll_bar_handler_right.png";
826                border: 0 5 5 5;
827                border_scale: 1;
828             }
829          }
830       }
831       part { name: "sb_hbar_over1";
832          clip_to: "sb_hbar_clip";
833          mouse_events: 0;
834          scale: 1;
835          description { state: "default" 0.0;
836             rel1.to: "elm.dragable.hbar";
837             rel2.relative: 1.0 0.5;
838             rel2.to: "elm.dragable.hbar";
839             visible: 0;
840             image {
841                normal: "bt_sm_hilight.png";
842                border: 4 4 4 0;
843                border_scale: 1;
844             }
845          }
846       }
847       part { name: "sb_hbar_over2";
848          clip_to: "sb_hbar_clip";
849          mouse_events: 0;
850          scale: 1;
851          description { state: "default" 0.0;
852             rel1.to: "elm.dragable.hbar";
853             rel2.to: "elm.dragable.hbar";
854             visible: 0;
855             image {
856                normal: "bt_sm_shine.png";
857                border: 4 4 4 0;
858                border_scale: 1;
859             }
860          }
861       }
862       part { name: "disabler";
863          type: RECT;
864          scale: 1;
865          description { state: "default" 0.0;
866             rel1.to: "clipper";
867             rel2.to: "clipper";
868             color: 0 0 0 0;
869             visible: 0;
870          }
871          description { state: "disabled" 0.0;
872             inherit: "default" 0.0;
873             visible: 1;
874             color: 128 128 128 128;
875          }
876       }
877    }
878    programs {
879       program { name: "load";
880          signal: "load";
881          source: "";
882          script {
883             set_state(PART:"sb_hbar_clip", "hidden", 0.0);
884             set_state(PART:"sb_vbar_clip", "hidden", 0.0);
885             set_int(sbvis_h, 0);
886             set_int(sbvis_v, 0);
887             set_int(sbalways_v, 0);
888             set_int(sbalways_h, 0);
889             set_int(sbvis_timer, 0);
890          }
891       }
892       program { name: "vbar_show";
893          signal: "elm,action,show,vbar";
894          source: "elm";
895          action: STATE_SET "default" 0.0;
896          target: "sb_vbar_clip_master";
897       }
898       program { name: "vbar_hide";
899          signal: "elm,action,hide,vbar";
900          source: "elm";
901          action: STATE_SET "hidden" 0.0;
902          target: "sb_vbar_clip_master";
903       }
904       program { name: "vbar_show_always";
905          signal: "elm,action,show_always,vbar";
906          source: "elm";
907          script {
908             new v;
909             v = get_int(sbvis_v);
910             v |= get_int(sbalways_v);
911             if (!v) {
912                set_int(sbalways_v, 1);
913                emit("do-show-vbar", "");
914                set_int(sbvis_v, 1);
915             }
916          }
917       }
918       program { name: "vbar_show_notalways";
919          signal: "elm,action,show_notalways,vbar";
920          source: "elm";
921          script {
922             new v;
923             v = get_int(sbalways_v);
924             if (v) {
925                set_int(sbalways_v, 0);
926                v = get_int(sbvis_v);
927                if (!v) {
928                   emit("do-hide-vbar", "");
929                   set_int(sbvis_v, 0);
930                }
931             }
932          }
933       }
934       program { name: "sb_vbar_show";
935          signal: "do-show-vbar";
936          source: "";
937          action: STATE_SET "default" 0.0;
938          transition: LINEAR 0.5;
939          target: "sb_vbar_clip";
940       }
941       program { name: "sb_vbar_hide";
942          signal: "do-hide-vbar";
943          source: "";
944          action: STATE_SET "hidden" 0.0;
945          transition: LINEAR 0.5;
946          target: "sb_vbar_clip";
947       }
948       program { name: "hbar_show";
949          signal: "elm,action,show,hbar";
950          source: "elm";
951          action: STATE_SET "default" 0.0;
952          target: "sb_hbar_clip_master";
953       }
954       program { name: "hbar_hide";
955          signal: "elm,action,hide,hbar";
956          source: "elm";
957          action:  STATE_SET "hidden" 0.0;
958          target: "sb_hbar_clip_master";
959       }
960       program { name: "hbar_show_always";
961          signal: "elm,action,show_always,hbar";
962          source: "elm";
963          script {
964             new v;
965             v = get_int(sbvis_h);
966             v |= get_int(sbalways_h);
967             if (!v) {
968                set_int(sbalways_h, 1);
969                emit("do-show-hbar", "");
970                set_int(sbvis_h, 1);
971             }
972          }
973       }
974       program { name: "hbar_show_notalways";
975          signal: "elm,action,show_notalways,hbar";
976          source: "elm";
977          script {
978             new v;
979             v = get_int(sbalways_h);
980             if (v) {
981                set_int(sbalways_h, 0);
982                v = get_int(sbvis_h);
983                if (!v) {
984                   emit("do-hide-hbar", "");
985                   set_int(sbvis_h, 0);
986                }
987             }
988          }
989       }
990       program { name: "sb_hbar_show";
991          signal: "do-show-hbar";
992          source: "";
993          action: STATE_SET "default" 0.0;
994          transition: LINEAR 0.5;
995          target: "sb_hbar_clip";
996       }
997       program { name: "sb_hbar_hide";
998          signal: "do-hide-hbar";
999          source: "";
1000          action: STATE_SET "hidden" 0.0;
1001          transition: LINEAR 0.5;
1002          target: "sb_hbar_clip";
1003       }
1004
1005       program { name: "scroll";
1006          signal: "elm,action,scroll";
1007          source: "elm";
1008          script {
1009             new v;
1010             v = get_int(sbvis_v);
1011             v |= get_int(sbalways_v);
1012             if (!v) {
1013                emit("do-show-vbar", "");
1014                set_int(sbvis_v, 1);
1015             }
1016             v = get_int(sbvis_h);
1017             v |= get_int(sbalways_h);
1018             if (!v) {
1019                emit("do-show-hbar", "");
1020                set_int(sbvis_h, 1);
1021             }
1022             v = get_int(sbvis_timer);
1023             if (v > 0) cancel_timer(v);
1024             v = timer(1.0, "timer0", 0);
1025             set_int(sbvis_timer, v);
1026          }
1027       }
1028
1029       program { name: "highlight_show";
1030          signal: "elm,action,focus_highlight,show";
1031          source: "elm";
1032          action: STATE_SET "enabled" 0.0;
1033          transition: ACCELERATE 0.3;
1034          target: "focus_highlight";
1035          target: "conf_over";
1036       }
1037       program { name: "highlight_hide";
1038          signal: "elm,action,focus_highlight,hide";
1039          source: "elm";
1040          action: STATE_SET "default" 0.0;
1041          transition: DECELERATE 0.3;
1042          target: "focus_highlight";
1043          target: "conf_over";
1044       }
1045       program { name: "disable";
1046          signal: "elm,state,disabled";
1047          source: "elm";
1048          action: STATE_SET "disabled" 0.0;
1049          target: "disabler";
1050       }
1051       program { name: "enable";
1052          signal: "elm,state,enabled";
1053          source: "elm";
1054          action: STATE_SET "default" 0.0;
1055          target: "disabler";
1056       }
1057    }
1058 }