Merge "[Button]Naviframe_control style macro's modified."
[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       parts {
484          part { name: "elm.text";
485             type: TEXT;
486             mouse_events: 0;
487             scale: 1;
488             description {
489                min: INDEX_ITEM_WIDTH_INC INDEX_ITEM_HEIGHT_INC;
490                align: 0.5 0.5;
491                state: "default" 0.0;
492                rel1 {
493                   relative: 0.0  0.0;
494                }
495                rel2 {
496                   relative: 1.0  1.0;
497                }
498                color: INDEX_ROLLOVER_TEXT_COLOR_INC;
499                text {
500                   font: "SLP:style=Medium";
501                   size: INDEX_ROLLOVER_TEXT_SIZE_INC;
502                   min: 1 1;
503                   align: 0.5 0.5;
504                   text_class: "slp_medium";
505                }
506             }
507             description { state: "active" 0.0;
508                inherit: "default" 0.0;
509                color: INDEX_ROLLOVER_ACTIVE_TEXT_COLOR_INC;
510             }
511          }
512       }
513       programs {
514          program { name: "active";
515             signal: "elm,state,active";
516             source: "elm";
517             action: STATE_SET "active" 0.0;
518             transition: DECELERATE 1.0;
519             target: "elm.text";
520          }
521          program { name: "inactive";
522             signal: "elm,state,inactive";
523             source: "elm";
524             action: STATE_SET "default" 0.0;
525             transition: DECELERATE 0.1;
526             target: "elm.text";
527          }
528       }
529    }
530    group {
531       name: "elm/index/base/vertical/pagecontrol";
532       alias: "elm/index/base/horizontal/pagecontrol";
533       parts {
534          part { name: "clip";
535             type: RECT;
536             mouse_events:  0;
537             description { state: "default" 0.0;
538                visible:  0;
539                color: 255 255 255 0;
540             }
541             description { state: "active" 0.0;
542                visible:  1;
543                color: 255 255 255 255;
544             }
545          }
546          part { name: "elm.swallow.index.0";
547             type: SWALLOW;
548             scale: 1;
549             clip_to: "clip";
550             description {
551                state: "default" 0.0;
552                align: 0.5 0.5;
553                rel1.relative: 0 0;
554                rel2.relative: 1 1;
555             }
556          }
557          part { name: "elm.swallow.event.0";
558             type: SWALLOW;
559             description { state: "default" 0.0;
560                align: 0.5 0.5;
561             }
562          }
563       }
564       programs {
565          program { name: "active";
566             signal: "elm,state,active";
567             source: "elm";
568             action: STATE_SET "active" 0.0;
569             transition: DECELERATE 0.5;
570             target: "clip";
571          }
572          program { name: "inactive";
573             signal: "elm,state,inactive";
574             source: "elm";
575             action: STATE_SET "default" 0.0;
576             transition: DECELERATE 0.5;
577             target: "clip";
578          }
579       }
580    }
581    group {
582       name: "elm/index/item/vertical/pagecontrol";
583       alias: "elm/index/item_odd/vertical/pagecontrol";
584       alias: "elm/index/item/horizontal/pagecontrol";
585       alias: "elm/index/item_odd/horizontal/pagecontrol";
586       images {
587          image: "00_mainmenu_page_bar_001.png" COMP;
588          image: "00_mainmenu_page_bar_002.png" COMP;
589       }
590       parts {
591          part { name:"bg";
592             type : RECT;
593             scale: 1;
594             description { state: "default" 0.0;
595                min: INDEX_PAGECONTROL_IND_INC;
596                max: INDEX_PAGECONTROL_IND_INC;
597                visible: 0;
598                align: 0.5 0.5;
599             }
600          }
601          part { name: "indicator1";
602             type: IMAGE;
603             mouse_events: 0;
604             scale: 1;
605             description { state: "default" 0.0;
606                align: 0.5 0.5;
607                fixed: 1 1;
608                rel1.to: "bg";
609                rel2.to: "bg";
610                image {
611                   normal: "00_mainmenu_page_bar_001.png";
612                }
613             }
614             description { state: "active" 0.0;
615                inherit: "default" 0.0;
616                visible: 0;
617             }
618          }
619          part { name: "indicator2";
620             type: IMAGE;
621             mouse_events: 0;
622             scale: 1;
623             description { state: "default" 0.0;
624                align: 0.5 0.5;
625                fixed: 1 1;
626                min: INDEX_PAGECONTROL_IND_MIN_INC;
627                max: INDEX_PAGECONTROL_IND_MIN_INC;
628                image.normal: "00_mainmenu_page_bar_002.png";
629                visible: 0;
630             }
631             description { state: "active" 0.0;
632                inherit: "default" 0.0;
633                min: INDEX_PAGECONTROL_IND_INC;
634                max: INDEX_PAGECONTROL_IND_INC;
635                visible: 1;
636             }
637          }
638          part { name: "elm.text";
639             type: TEXT;
640             mouse_events: 0;
641             scale: 1;
642             description { state: "default" 0.0;
643                fixed: 1 1;
644                color: INDEX_PAGECONTROL_FONT_COLOR_INC 0;
645                align: 0.5 0.5;
646                text {
647                   font: "SLP:style=Medium";
648                   size: INDEX_PAGECONTROL_FONT_SIZE_INC;
649                   min: 0 1;
650                   align: 0.5 0.5;
651                   text_class: "slp_medium";
652                }
653                rel1 { to: "indicator2"; }
654                rel2 { to: "indicator2"; }
655             }
656             description { state: "active" 0.0;
657                inherit: "default" 0.0;
658                color: INDEX_PAGECONTROL_FONT_COLOR_INC 255;
659             }
660          }
661       }
662       programs {
663          program { name: "active";
664             signal: "elm,state,active";
665             source: "elm";
666             action: STATE_SET "active" 0.0;
667             target: "indicator1";
668             target: "indicator2";
669             target: "elm.text";
670             transition: LINEAR 0.2;
671          }
672          program { name: "inactive";
673             signal: "elm,state,inactive";
674             source: "elm";
675             action: STATE_SET "default" 0.0;
676             target: "indicator1";
677             target: "indicator2";
678             target: "elm.text";
679             transition: LINEAR 0.2;
680          }
681       }
682    }