Merge branch 'intefl/surc'
[profile/ivi/efl-theme-tizen.git] / themes / widgets / index.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    group { name: "elm/index/base/vertical/default";
20       script {
21          public timer_flag;
22          public index_hide_timer(val) {
23             if (get_int(timer_flag) == 1)
24                run_program(PROGRAM:"index0.inactive");
25             return 0;
26          }
27       }
28       images {
29          image: "00_fast_scroll_popup_bg.png" COMP;
30          image: "00_fast_scroll_rollover_bg.png" COMP;
31          image: "00_fast_scroll_rollover_index_1_bg.png" COMP;
32       }
33       data{
34          item: "min_obj_height" "32";
35          item: "min_1st_level_obj_height" "32";
36          item: "special_char" "*";
37       }
38       parts {
39          part { name: "clip";
40             scale: 1;
41             type: RECT;
42             mouse_events:  0;
43             description { state: "default" 0.0;
44                visible:  0;
45                color: 255 255 255 0;
46             }
47             description { state: "active" 0.0;
48                visible:  1;
49                color: 255 255 255 255;
50             }
51          }
52          part { name: "clip2";
53             scale: 1;
54             type: RECT;
55             mouse_events:  0;
56             clip_to: "clip";
57             description { state: "default" 0.0;
58                visible: 0;
59                color: 255 255 255 0;
60             }
61             description { state: "active" 0.0;
62                visible:  1;
63                color: 255 255 255 255;
64             }
65          }
66          part { name: "elm.dragable.index.1";
67             mouse_events: 0;
68             scale: 1;
69             dragable {
70                x: 0 0 0;
71                y: 1 1 0;
72                confine: "elm.swallow.index.0";
73             }
74             description { state: "default" 0.0;
75                fixed: 1 1;
76                min: 20 38;
77                rel1 {
78                   relative: 0.5  0.5;
79                   offset:   0    0;
80                   to: "elm.swallow.index.0";
81                }
82                rel2 {
83                   relative: 0.5  0.5;
84                   offset:   0    0;
85                   to: "elm.swallow.index.0";
86                }
87             }
88          }
89          part { name: "elm.swallow.index.1.padding.right";
90             type: RECT;
91             scale: 1;
92             description { state: "default" 0.0;
93                min: INDEX_LEVEL_PADDING_INC 0;
94                fixed: 1 0;
95                align: 1.0 0.0;
96                rel1 {
97                   relative: 1.0 0.0;
98                   offset: 0 0;
99                }
100                rel2 {
101                   relative: 1.0 0.0;
102                   offset: 0 0;
103                }
104                color: 0 0 0 0;
105             }
106          }
107          part { name: "index.1.bg.image.middle";
108             mouse_events: 0;
109             scale: 1;
110             description { state: "default" 0.0;
111                visible: 0;
112                rel1 {
113                   to: "elm.swallow.index.1";
114                   offset: 0 0;
115                }
116                rel2 {
117                   to: "elm.swallow.index.1";
118                   offset: 0 0;
119                }
120                image {
121                   normal: "00_fast_scroll_rollover_index_1_bg.png";
122                   border: INDEX_BG_NINEPATCH_INC;
123                   border_scale: 1;
124                }
125                fill.smooth: 0;
126             }
127             description { state: "active" 0.0;
128                inherit: "default" 0.0;
129                visible: 1;
130             }
131          }
132          part { name: "elm.swallow.index.1";
133             type: SWALLOW;
134             scale: 1;
135             clip_to: "clip2";
136             description { state: "default" 0.0;
137                align: 0.5 0.5;
138                rel1 {
139                   to_y: "elm.dragable.index.1";
140                   relative: 1.0 0.5;
141                   offset: -1 0;
142                }
143                rel2 {
144                   to_y: "elm.dragable.index.1";
145                   relative: 1.0 0.5;
146                   offset: -1 -1;
147                }
148                color: 255 255 255 0;
149             }
150             description { state: "active" 0.0;
151                inherit: "default" 0.0;
152                rel1 {
153                   to_x: "elm.swallow.index.1.padding.right";
154                   relative: 0.0 0.5;
155                   offset: 0 0;
156                }
157                rel2 {
158                   to_x: "elm.swallow.index.1.padding.right";
159                   relative: 0.0 0.5;
160                   offset: 0 -1;
161                }
162                color: 255 255 255 255;
163             }
164          }
165          part { name: "index.0.bg.image.middle";
166             mouse_events: 0;
167             scale: 1;
168             description { state: "default" 0.0;
169                rel1 {
170                   to: "elm.swallow.index.0";
171                   offset: 0 0;
172                }
173                rel2 {
174                   to: "elm.swallow.index.0";
175                   offset: 0 0;
176                }
177                image {
178                   normal: "00_fast_scroll_rollover_bg.png";
179                   border: INDEX_BG_NINEPATCH_INC;
180                   border_scale: 1;
181                }
182                fill.smooth: 0;
183                visible: 0;
184                }
185             description { state: "active" 0.0;
186                inherit: "default" 0.0;
187                visible: 1;
188             }
189         }
190         part { name: "elm.swallow.index.0";
191             type: SWALLOW;
192             clip_to: "clip";
193             scale: 1;
194             description { state: "default" 0.0;
195                visible: 1;
196                align: 1.0 0.5;
197                rel1 {
198                   relative: 1.0 0.5;
199                   offset: -1 0;
200                }
201                rel2 {
202                   relative: 1.0 0.5;
203                   offset: -1 0;
204                }
205                color: 255 255 255 50;
206             }
207             description { state: "active" 0.0;
208                inherit: "default" 0.0;
209                color: 255 255 255 255;
210             }
211          }
212          part { name: "button_image_padding";
213             mouse_events: 0;
214             scale: 1;
215             clip_to: "clip";
216             type: RECT;
217             description { state: "default" 0.0;
218                align: 0.0 0.0;
219                min: 0 0;
220                max: 0 0;
221                fixed: 0 1;
222                rel1 {
223                   relative: 0.5 0.5;
224                   offset: 0 0;
225                }
226                rel2 {
227                   relative: 0.5 0.5;
228                   offset: 0 0;
229                }
230             }
231          }
232          part { name: "button_image";
233             scale: 1;
234             clip_to: "clip";
235             description { state: "default" 0.0;
236                align: 0.5 0.5;
237                min: INDEX_1ST_LEVEL_POPUP_WIDTH_INC INDEX_POPUP_HEIGHT_INC;
238                fixed: 1 1;
239                rel1 {
240                   to: "elm.text";
241                   relative: 0.0 0.0;
242                   offset: -10 0;
243                }
244                rel2 {
245                   to: "elm.text";
246                   relative: 1.067 1.083;
247                   offset: 10 0;
248                }
249                image {
250                   normal: "00_fast_scroll_popup_bg.png";
251                   border: INDEX_POPUP_BG_NINEPATCH_INC;
252                   border_scale: 1;
253                }
254                image.middle: 1;
255             }
256             description { state: "invisible" 0.0;
257                inherit: "default" 0.0;
258                visible: 0;
259             }
260             description { state: "index1" 0.0;
261                inherit: "default" 0.0;
262                min: INDEX_2ND_LEVEL_POPUP_WIDTH_INC INDEX_POPUP_HEIGHT_INC;
263             }
264             description { state: "active" 0.0;
265                inherit: "default" 0.0;
266                visible: 1;
267             }
268          }
269          part {
270             name: "elm.text";
271             type: "TEXT";
272             mouse_events: 0;
273             scale: 1;
274             clip_to: "clip";
275             description {
276                state: "default" 0.0;
277                align: 0.5 0.5;
278                fixed: 1 1;
279                min: 40 20;
280                visible: 0;
281                rel1 {
282                   to_y: "button_image_padding";
283                   relative: 0.5 1.0;
284                }
285                rel2 {
286                   to_y: "button_image_padding";
287                   relative: 0.5 1.0;
288                }
289                color: INDEX_POPUP_TEXT_COLOR_INC;
290                color3: 0 0 0 64;
291                text {
292                   font: "SLP:style=Medium";
293                   size: INDEX_POPUP_TEXT_SIZE_INC;
294                   min: 1 1;
295                   text_class: "slp_medium";
296                }
297             }
298             description { state: "active" 0.0;
299                inherit: "default" 0.0;
300                visible: 1;
301             }
302          }
303          part { name: "elm.dragable.pointer";
304             type: RECT;
305             scale: 1;
306             mouse_events: 0;
307             dragable {
308                x: 1 1 0;
309                y: 1 1 0;
310             }
311             clip_to: "clip";
312             description { state: "default" 0.0;
313                fixed: 1 1;
314                min: 8 8;
315                max: 8 8;
316                rel1 {
317                   relative: 0.0 0.0;
318                   offset:   0 0;
319                }
320                rel2 {
321                   relative: 0.0 0.0;
322                   offset:   0 0;
323                }
324                color: 0 0 0 0;
325             }
326          }
327          part { name: "elm.swallow.event.0.bottom.padding";
328             type: RECT;
329             scale: 1;
330             description { state: "default" 0.0;
331                min: 0 SOFTKEY_H;
332                fixed: 0 1;
333                align: 0.5 1.0;
334                rel1{
335                   relative: 1.0 1.0; offset: 0 0;
336                }
337                color: 0 0 0 0;
338             }
339          }
340          part { name: "elm.swallow.event.0";
341             type: SWALLOW;
342             scale: 1;
343             description { state: "default" 0.0;
344                fixed: 1 1;
345                align: 1.0 0.5;
346                rel1 {
347                   relative: 1.0 0.0;
348                   offset: -1 0;
349                }
350                rel2 {
351                   relative: 1.0 0.0;
352                   offset: -1 -1;
353                   to_y: "elm.swallow.event.0.bottom.padding";
354                }
355             }
356          }
357          part { name: "elm.swallow.event.1";
358             type: SWALLOW;
359             scale: 1;
360             description { state: "default" 0.0;
361                align: 1.0 0.5;
362                fixed: 1 1;
363                rel1 {
364                   to: "elm.swallow.index.1";
365                   relative: 0.0 0.0;
366                   offset: -1 0;
367                }
368                rel2 {
369                   to: "elm.swallow.index.1";
370                   relative: 0.0 1.0;
371                   offset: -1 -1;
372                }
373             }
374          }
375       }
376       programs {
377          program { name: "load";
378             signal: "load";
379             source: "";
380             script {
381                run_program(PROGRAM:"initial.index0.active");
382                run_program(PROGRAM:"button.image.hidden");
383                timer(2.0, "index_hide_timer", 0);
384             }
385          }
386          program { name: "drag2";
387             signal: "drag,set";
388             source: "elm.dragable.index.1";
389             script {
390                new Float:dx;
391                new Float:dy;
392                get_drag(PART:"elm.dragable.index.1", dx, dy);
393                custom_state(PART:"elm.dragable.index.1", "default", 0.0);
394                set_state_val(PART:"elm.dragable.index.1", STATE_ALIGNMENT, 0.5, dy);
395             }
396          }
397          program { name: "index0.active";
398             signal: "elm,state,active";
399             source: "elm";
400             action: STATE_SET "active" 0.0;
401             transition: DECELERATE 0.3;
402             target: "elm.swallow.index.0";
403             target: "clip";
404             after: "disable_timer";
405          }
406          program { name: "initial.index0.active";
407             action: STATE_SET "active" 0.0;
408             transition: DECELERATE 0.3;
409             target: "elm.swallow.index.0";
410             target: "clip";
411             target: "index.0.bg.image.middle";
412             after: "enable_timer";
413          }
414          program { name: "index0.inactive";
415             signal: "elm,state,inactive";
416             source: "elm";
417             action: STATE_SET "default" 0.0;
418             transition: DECELERATE 0.3;
419             target: "elm.swallow.index.0";
420             target: "clip";
421             target: "index.0.bg.image.middle";
422          }
423          program { name: "index1.inactive";
424             signal: "elm,state,level,0";
425             source: "elm";
426             action: STATE_SET "default" 0.0;
427             transition: DECELERATE 0.3;
428             target: "elm.swallow.index.1";
429             target: "clip2";
430             target: "index.1.bg.image.middle";
431          }
432          program { name: "index1.active";
433             signal: "elm,state,level,1";
434             source: "elm";
435             action: STATE_SET "active" 0.0;
436             transition: DECELERATE 0.3;
437             target: "elm.swallow.index.1";
438             target: "clip2";
439             target: "index.1.bg.image.middle";
440          }
441          program { name: "index.active";
442             signal: "elm,indicator,state,active";
443             source: "elm";
444             action: STATE_SET "active" 0.0;
445             transition: DECELERATE 0.5;
446             target: "clip2";
447             target: "elm.swallow.index.0";
448             target: "clip";
449             target: "index.0.bg.image.middle";
450             target: "elm.text";
451             target: "button_image";
452          }
453          program { name: "index.inactive";
454             signal: "elm,indicator,state,inactive";
455             source: "elm";
456             action: STATE_SET "default" 0.0;
457             transition: DECELERATE 0.5;
458             target: "clip2";
459          }
460          program { name: "button.image.hidden";
461             signal: "elm,state,button,image,hide";
462             source: "elm";
463             action: STATE_SET "invisible" 0.0;
464             target: "button_image";
465          }
466          program { name: "disable_timer";
467             script {
468                set_int(timer_flag, 0);
469             }
470          }
471          program { name: "enable_timer";
472             script {
473                set_int(timer_flag, 1);
474             }
475          }
476       }
477    }
478
479    group { name: "elm/index/item/vertical/default";
480       alias: "elm/index/item_odd/vertical/default";
481       data.item: "stacking" "above";
482       data.item: "selectraise" "on";
483       images {
484          image: "00_fast_scroll_rollover_bg_focus_bg.png" COMP;
485       }
486       parts {
487          part { name: "scroll.bg";
488             type: RECT;
489             mouse_events: 0;
490             scale: 1;
491             description {
492                state: "default" 0.0;
493                visible: 1;
494                rel1.to: "elm.text";
495                rel2.to: "elm.text";
496                color: INDEX_SCROLL_BG_COLOR_INC;
497             }
498             description {
499                state: "active" 0.0;
500                inherit: "default" 0.0;
501                visible: 0;
502             }
503          }
504          part { name: "bottom.line";
505             type: RECT;
506             mouse_events: 0;
507             scale: 1;
508             description {
509                state: "default" 0.0;
510                visible: 1;
511                rel1 {
512                   relative: 0.0 1.0; offset: 0 -1;
513                }
514                rel2 {
515                   relative: 1.0 1.0;
516                }
517                color: INDEX_BOTTOM_LINE_COLOR_INC;
518             }
519          }
520          part { name: "left.line";
521             type: RECT;
522             mouse_events: 0;
523             scale: 1;
524             description {
525                state: "default" 0.0;
526                visible: 1;
527                rel1 {
528                   relative: 0.0 0.0;
529                }
530                rel2 {
531                   relative: 0.0 1.0; offset: 1 0;
532                }
533                color: INDEX_LEFT_LINE_COLOR_INC;
534             }
535             description {
536                state: "active" 0.0;
537                inherit: "default" 0.0;
538                visible: 0;
539             }
540          }
541          part { name: "item.bg";
542             type: IMAGE;
543             mouse_events: 0;
544             scale: 1;
545             description {
546                state: "default" 0.0;
547                visible: 0;
548                rel1 {
549                   relative: 0.0 0.0;
550                }
551                rel2 {
552                   relative: 1.0 1.0;
553                }
554                image {
555                   normal: "00_fast_scroll_rollover_bg_focus_bg.png";
556                   border: INDEX_BG_NINEPATCH_INC;
557                   border_scale: 1;
558                }
559             }
560             description {
561                state: "active" 0.0;
562                inherit: "default" 0.0;
563                visible: 1;
564             }
565          }
566          part { name: "elm.text";
567             type: TEXT;
568             mouse_events: 0;
569             scale: 1;
570             description {
571                min: INDEX_ITEM_WIDTH_INC INDEX_ITEM_HEIGHT_INC;
572                align: 0.5 0.5;
573                state: "default" 0.0;
574                rel1 {
575                   relative: 0.0  0.0;
576                }
577                rel2 {
578                   relative: 1.0  1.0;
579                }
580                color: INDEX_ROLLOVER_TEXT_COLOR_INC;
581                text {
582                   font: "SLP:style=Medium";
583                   size: INDEX_ROLLOVER_TEXT_SIZE_INC;
584                   min: 1 1;
585                   align: 0.5 0.5;
586                   text_class: "slp_medium";
587                }
588             }
589             description { state: "active" 0.0;
590                inherit: "default" 0.0;
591                color: INDEX_ROLLOVER_ACTIVE_TEXT_COLOR_INC;
592             }
593          }
594       }
595       programs {
596          program { name: "active";
597             signal: "elm,state,active";
598             source: "elm";
599             action: STATE_SET "active" 0.0;
600             transition: DECELERATE 0.0;
601             target: "elm.text";
602             target: "item.bg";
603             target: "left.line";
604             target: "scroll.bg";
605          }
606          program { name: "inactive";
607             signal: "elm,state,inactive";
608             source: "elm";
609             action: STATE_SET "default" 0.0;
610             transition: DECELERATE 0.0;
611             target: "elm.text";
612             target: "item.bg";
613             target: "left.line";
614             target: "scroll.bg";
615          }
616       }
617    }
618    group {
619       name: "elm/index/base/vertical/pagecontrol";
620       alias: "elm/index/base/horizontal/pagecontrol";
621       parts {
622          part { name: "clip";
623             type: RECT;
624             mouse_events:  0;
625             description { state: "default" 0.0;
626                visible:  0;
627                color: 255 255 255 0;
628             }
629             description { state: "active" 0.0;
630                visible:  1;
631                color: 255 255 255 255;
632             }
633          }
634          part { name: "elm.swallow.index.0";
635             type: SWALLOW;
636             scale: 1;
637             clip_to: "clip";
638             description {
639                state: "default" 0.0;
640                align: 0.5 0.5;
641                rel1.relative: 0 0;
642                rel2.relative: 1 1;
643             }
644          }
645          part { name: "elm.swallow.event.0";
646             type: SWALLOW;
647             description { state: "default" 0.0;
648                align: 0.5 0.5;
649             }
650          }
651       }
652       programs {
653          program { name: "active";
654             signal: "elm,state,active";
655             source: "elm";
656             action: STATE_SET "active" 0.0;
657             transition: DECELERATE 0.5;
658             target: "clip";
659          }
660          program { name: "inactive";
661             signal: "elm,state,inactive";
662             source: "elm";
663             action: STATE_SET "default" 0.0;
664             transition: DECELERATE 0.5;
665             target: "clip";
666          }
667       }
668    }
669    group {
670       name: "elm/index/item/vertical/pagecontrol";
671       alias: "elm/index/item_odd/vertical/pagecontrol";
672       alias: "elm/index/item/horizontal/pagecontrol";
673       alias: "elm/index/item_odd/horizontal/pagecontrol";
674       images {
675          image: "00_mainmenu_page_bar_001.png" COMP;
676          image: "00_mainmenu_page_bar_002.png" COMP;
677       }
678       parts {
679          part { name:"bg";
680             type : RECT;
681             scale: 1;
682             description { state: "default" 0.0;
683                min: INDEX_PAGECONTROL_IND_INC;
684                max: INDEX_PAGECONTROL_IND_INC;
685                visible: 0;
686                align: 0.5 0.5;
687             }
688          }
689          part { name: "indicator1";
690             type: IMAGE;
691             mouse_events: 0;
692             scale: 1;
693             description { state: "default" 0.0;
694                align: 0.5 0.5;
695                fixed: 1 1;
696                rel1.to: "bg";
697                rel2.to: "bg";
698                image {
699                   normal: "00_mainmenu_page_bar_001.png";
700                }
701             }
702             description { state: "active" 0.0;
703                inherit: "default" 0.0;
704                visible: 0;
705             }
706          }
707          part { name: "indicator2";
708             type: IMAGE;
709             mouse_events: 0;
710             scale: 1;
711             description { state: "default" 0.0;
712                align: 0.5 0.5;
713                fixed: 1 1;
714                min: INDEX_PAGECONTROL_IND_MIN_INC;
715                max: INDEX_PAGECONTROL_IND_MIN_INC;
716                image.normal: "00_mainmenu_page_bar_002.png";
717                visible: 0;
718             }
719             description { state: "active" 0.0;
720                inherit: "default" 0.0;
721                min: INDEX_PAGECONTROL_IND_INC;
722                max: INDEX_PAGECONTROL_IND_INC;
723                visible: 1;
724             }
725          }
726          part { name: "elm.text";
727             type: TEXT;
728             mouse_events: 0;
729             scale: 1;
730             description { state: "default" 0.0;
731                fixed: 1 1;
732                color: INDEX_PAGECONTROL_FONT_COLOR_INC 0;
733                align: 0.5 0.5;
734                text {
735                   font: "SLP:style=Medium";
736                   size: INDEX_PAGECONTROL_FONT_SIZE_INC;
737                   min: 0 1;
738                   align: 0.5 0.5;
739                   text_class: "slp_medium";
740                }
741                rel1 { to: "indicator2"; }
742                rel2 { to: "indicator2"; }
743             }
744             description { state: "active" 0.0;
745                inherit: "default" 0.0;
746                color: INDEX_PAGECONTROL_FONT_COLOR_INC 255;
747             }
748          }
749       }
750       programs {
751          program { name: "active";
752             signal: "elm,state,active";
753             source: "elm";
754             action: STATE_SET "active" 0.0;
755             target: "indicator1";
756             target: "indicator2";
757             target: "elm.text";
758             transition: LINEAR 0.2;
759          }
760          program { name: "inactive";
761             signal: "elm,state,inactive";
762             source: "elm";
763             action: STATE_SET "default" 0.0;
764             target: "indicator1";
765             target: "indicator2";
766             target: "elm.text";
767             transition: LINEAR 0.2;
768          }
769       }
770    }