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