Tizen 2.1 base
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / genlist / genlist.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 /*
21  * vim:ts=3
22 */
23
24 #include "genlist_macro.edc"
25 #include "genlist_textblock_style.edc"
26 #include "genlist_normal.edc"
27 #include "genlist_sweep.edc"
28 #include "genlist_groupindex.edc"
29 #include "genlist_expandable.edc"
30 #include "genlist_decorate.edc"
31
32 #if 0
33    group { name: "elm/genlist/base/dialogue";
34       alias: "elm/scroller/base/dialogue";
35       inherit: "elm/genlist/base/default";
36       parts {
37          part { name: "bg";
38             description { state: "default" 0.0;
39                color: GENLIST_LIST_BG_COLOR;
40             }
41          }
42          part { name: "elm.padding.left";
43             type: RECT;
44             scale: 1;
45             description { state: "default" 0.0;
46                min: DIALOGUE_PADDING_SCROLLER 0;
47                fixed: 1 0;
48                visible: 0;
49                align: 0.0 0.0;
50                rel2.relative: 0.0  1.0;
51                color: GENLIST_PART_DIALOGUE_GROUP_BG_COLOR;
52             }
53          }
54          part { name: "elm.padding.right";
55             type: RECT;
56             scale: 1;
57             description { state: "default" 0.0;
58                min: DIALOGUE_PADDING_SCROLLER 0;
59                fixed: 1 0;
60                visible: 0;
61                align: 1.0 0.0;
62                rel1.relative: 1.0  0.0;
63                color: GENLIST_PART_DIALOGUE_GROUP_BG_COLOR;
64             }
65          }
66          part { name: "elm.swallow.content";
67             clip_to: "clipper";
68             type: SWALLOW;
69             scale: 1;
70             description { state: "default" 0.0;
71                rel1 {
72                   relative: 1.0 0.0;
73                   to_x: "elm.padding.left";
74                }
75                rel2 {
76                   relative: 0.0 1.0;
77                   to_x: "elm.padding.right";
78                }
79                color: 0 0 0 0;
80             }
81          }
82          part { name: "sb_vbar";
83             type: RECT;
84             mouse_events: 0;
85             scale: 1;
86             description { state: "default" 0.0;
87                fixed: 1 1;
88                visible: 0;
89                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
90                align: 1.0 0.0;
91                rel1 {
92                   relative: 1.0 0.0;
93                   offset:   0 0;
94                   to_y:     "bg";
95                   to_x:     "bg";
96                }
97                rel2 {
98                   relative: 1.0 1.0;
99                   offset:   -1 -1;
100                   to_y:     "sb_hbar";
101                   to_x:     "bg";
102                }
103             }
104          }
105       }
106    }
107    group { name: "elm/list/base/matchlist";
108       script {
109          public sbvis_v, sbvis_h, sbnever_v, sbalways_v, sbalways_h, sbvis_timer;
110          public timer0(val) {
111             new v;
112             v = get_int(sbvis_v);
113             if (v) {
114                v = get_int(sbalways_v);
115                if (!v) {
116                   emit("do-hide-vbar", "");
117                   set_int(sbvis_v, 0);
118                }
119             }
120             v = get_int(sbvis_h);
121             if (v) {
122                v = get_int(sbalways_h);
123                if (!v) {
124                   emit("do-hide-hbar", "");
125                   set_int(sbvis_h, 0);
126                }
127             }
128             set_int(sbvis_timer, 0);
129             return 0;
130          }
131       }
132       images {
133          image: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_IMAGE COMP;
134          image: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_IMAGE COMP;
135          image: "bt_sm_shine.png" COMP;
136          image: "bt_sm_hilight.png" COMP;
137          image: "sb_runnerh.png" COMP;
138          image: "sb_runnerv.png" COMP;
139          image: "01_dialoguegroup_bg_default.png" COMP;
140       }
141       parts {
142          part { name: "bg";
143             type: RECT;
144             scale: 1;
145             description { state: "default" 0.0;
146                rel1.offset: 0 0;
147                rel2.offset: -1 -1;
148                color: 255 255 255 0;
149             }
150          }
151          part { name: "bg_image";
152             mouse_events: 0;
153             scale: 1;
154             description { state: "default" 0.0;
155                rel1.to: "bg";
156                rel2.to: "bg";
157                rel1.offset: -5 -3;
158                rel2.offset: 4 10;
159                image {
160                   normal: "01_dialoguegroup_bg_default.png";
161                   border: SCROLLER_MATCHLIST_SCROLLBAR_BG_IMAGE_BORDER;
162                   border_scale: 1;
163                }
164                fill.smooth: 0;
165             }
166          }
167          part { name: "clipper";
168             type: RECT;
169             mouse_events: 0;
170             scale: 1;
171             description { state: "default" 0.0;
172                rel1.to: "bg";
173                rel2.to: "bg";
174             }
175          }
176          part { name: "elm.swallow.content";
177             clip_to: "clipper";
178             type: SWALLOW;
179             scale: 1;
180             description { state: "default" 0.0;
181                rel1.offset: 0 0;
182                rel2.offset: -1 -1;
183             }
184          }
185          part { name: "conf_over";
186             mouse_events: 0;
187             scale: 1;
188             description { state: "default" 0.0;
189                rel1.offset: 0 0;
190                rel2.offset: -1 -1;
191                visible: 0;
192             }
193          }
194          part { name: "sb_vbar_clip_master";
195             type: RECT;
196             mouse_events: 0;
197             scale: 1;
198             description { state: "default" 0.0;
199             }
200             description { state: "hidden" 0.0;
201                visible: 0;
202                color: 255 255 255 0;
203             }
204          }
205          part { name: "sb_vbar_clip";
206             clip_to: "sb_vbar_clip_master";
207             type: RECT;
208             mouse_events: 0;
209             scale: 1;
210             description { state: "default" 0.0;
211             }
212             description { state: "hidden" 0.0;
213                visible: 0;
214                color: 255 255 255 0;
215             }
216          }
217          part {name: "vbar.padding";
218             type: RECT;
219             mouse_events: 0;
220             description { state: "default" 0.0;
221                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_PADDING_SIZE 0;
222                max: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_PADDING_SIZE 0;
223                align: 1 0.5;
224                rel1 {
225                   relative: 0.0 0.0;
226                   to: "elm.swallow.content";
227                }
228                rel2 {
229                   relative: 1.0 1.0;
230                   to: "elm.swallow.content";
231                }
232             }
233          }
234          part { name: "sb_vbar";
235             type: RECT;
236             mouse_events: 0;
237             scale: 1;
238             description { state: "default" 0.0;
239                fixed: 1 1;
240                visible: 0;
241                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
242                align: 1.0 0.0;
243                rel1 {
244                   relative: 1.0 0.0;
245                   offset: 0 0;
246                   to_y: "elm.swallow.content";
247                   to_x: "elm.swallow.content";
248                }
249                rel2 {
250                   relative: 0.0 1.0;
251                   offset: -1 -1;
252                   to_y: "elm.swallow.content";
253                   to_x: "vbar.padding";
254                }
255             }
256          }
257          part { name: "sb_vbar_runner";
258             clip_to: "sb_vbar_clip";
259             mouse_events: 0;
260             scale: 1;
261             description { state: "default" 0.0;
262                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
263                max: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MAX_SIZE_INC;
264                rel1.to: "sb_vbar";
265                rel2.to: "sb_vbar";
266                visible: 0;
267                image {
268                   normal: "sb_runnerv.png";
269                   border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_RUNNER_BORDER;
270                   border_scale: 1;
271                }
272                fill.smooth: 0;
273             }
274          }
275          part { name: "elm.dragable.vbar";
276             clip_to: "sb_vbar_clip";
277             mouse_events: 0;
278             scale: 1;
279             dragable {
280                x: 0 0 0;
281                y: 1 1 0;
282                confine: "sb_vbar";
283             }
284             description { state: "default" 0.0;
285                fixed: 1 1;
286                min: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MIN_SIZE_INC;
287                max: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_MAX_SIZE_INC;
288                rel1 {
289                   relative: 0.5  0.5;
290                   offset:   0    0;
291                   to: "sb_vbar";
292                }
293                rel2 {
294                   relative: 0.5  0.5;
295                   offset:   0    0;
296                   to: "sb_vbar";
297                }
298                image {
299                                    normal: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_IMAGE;
300                                    border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_IMAGE_BORDER;
301                                    border_scale: 1;
302                                    middle: DEFAULT;
303                }
304             }
305          }
306          part { name: "sb_vbar_over1";
307             clip_to: "sb_vbar_clip";
308             mouse_events: 0;
309             scale: 1;
310             description { state: "default" 0.0;
311                rel1.to: "elm.dragable.vbar";
312                rel2.relative: 1.0 0.5;
313                rel2.to: "elm.dragable.vbar";
314                visible: 0;
315                image {
316                   normal: "bt_sm_hilight.png";
317                   border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_OVER1;
318                   border_scale: 1;
319                }
320             }
321          }
322          part { name: "sb_vbar_over2";
323             clip_to: "sb_vbar_clip";
324             mouse_events: 0;
325             scale: 1;
326             description { state: "default" 0.0;
327                rel1.to: "elm.dragable.vbar";
328                rel2.to: "elm.dragable.vbar";
329                visible: 0;
330                image {
331                   normal: "bt_sm_shine.png";
332                   border: SCROLLER_MATCHLIST_SCROLLBAR_VBAR_OVER2;
333                   border_scale: 1;
334                }
335             }
336          }
337          part { name: "sb_hbar_clip_master";
338             type: RECT;
339             mouse_events: 0;
340             description { state: "default" 0.0;
341             }
342             description { state: "hidden" 0.0;
343                visible: 0;
344                color: 255 255 255 0;
345             }
346          }
347          part { name: "sb_hbar_clip";
348             clip_to: "sb_hbar_clip_master";
349             type: RECT;
350             mouse_events: 0;
351             scale: 1;
352             description { state: "default" 0.0;
353             }
354             description { state: "hidden" 0.0;
355                visible: 0;
356                color: 255 255 255 0;
357             }
358          }
359          part {name: "hbar.padding";
360             type: RECT;
361             mouse_events: 0;
362             description { state: "default" 0.0;
363                min: 0 SCROLLER_MATCHLIST_SCROLLBAR_HBAR_PADDING_SIZE;
364                max: 0 SCROLLER_MATCHLIST_SCROLLBAR_HBAR_PADDING_SIZE;
365                align: 1 1;
366                rel1 {
367                   relative: 0.0 0.0;
368                   to: "elm.swallow.content";
369                }
370                rel2 {
371                   relative: 1.0 1.0;
372                   to: "elm.swallow.content";
373                }
374             }
375          }
376          part { name: "sb_hbar";
377             type: RECT;
378             mouse_events: 0;
379             scale: 1;
380             description { state: "default" 0.0;
381                fixed: 1 1;
382                visible: 0;
383                min: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MIN_SIZE_INC;
384                align: 0.0 1.0;
385                rel1 {
386                   relative: 0.0 1.0;
387                   offset: 0 0;
388                   to_y: "elm.swallow.content";
389                   to_x: "elm.swallow.content";
390                }
391                rel2 {
392                   relative: 0.0 1.0;
393                   offset: -1 -1;
394                   to_x: "sb_vbar";
395                   to_y: "hbar.padding";
396                }
397             }
398          }
399          part { name: "sb_hbar_runner";
400             clip_to: "sb_hbar_clip";
401             mouse_events: 0;
402             scale: 1;
403             description { state: "default" 0.0;
404                min: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MIN_SIZE_INC;
405                max: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MAX_SIZE_INC;
406                rel1.to: "sb_hbar";
407                rel2.to: "sb_hbar";
408                visible: 0;
409                image {
410                   normal: "sb_runnerh.png";
411                   border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_RUNNER_BORDER;
412                   border_scale: 1;
413                }
414                fill.smooth: 0;
415             }
416          }
417          part { name: "elm.dragable.hbar";
418             clip_to: "sb_hbar_clip";
419             mouse_events: 0;
420             scale: 1;
421             dragable {
422                x: 1 1 0;
423                y: 0 0 0;
424                confine: "sb_hbar";
425             }
426             description { state: "default" 0.0;
427                fixed: 1 1;
428                min: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MIN_SIZE_INC;
429                max: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_MAX_SIZE_INC;
430                rel1 {
431                   relative: 0.5  0.5;
432                   offset: 0 0;
433                   to: "sb_hbar";
434                }
435                rel2 {
436                   relative: 0.5  0.5;
437                   offset: 0 0;
438                   to: "sb_hbar";
439                }
440                color: 255 255 255 0;
441                image {
442                                    normal: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_IMAGE;
443                                    border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_IMAGE_BORDER;
444                                    border_scale: 1;
445                }
446                image.middle: SOLID;
447             }
448          }
449          part { name: "sb_hbar_over1";
450             clip_to: "sb_hbar_clip";
451             mouse_events: 0;
452             scale: 1;
453             description { state: "default" 0.0;
454                rel1.to: "elm.dragable.hbar";
455                rel2.relative: 1.0 0.5;
456                rel2.to: "elm.dragable.hbar";
457                visible: 0;
458                image {
459                   normal: "bt_sm_hilight.png";
460                   border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_OVER1;
461                   border_scale: 1;
462                }
463             }
464          }
465          part { name: "sb_hbar_over2";
466             clip_to: "sb_hbar_clip";
467             mouse_events: 0;
468             scale: 1;
469             description { state: "default" 0.0;
470                rel1.to: "elm.dragable.hbar";
471                rel2.to: "elm.dragable.hbar";
472                visible: 0;
473                image {
474                   normal: "bt_sm_shine.png";
475                   border: SCROLLER_MATCHLIST_SCROLLBAR_HBAR_OVER2;
476                   border_scale: 1;
477                }
478             }
479          }
480       }
481       programs {
482          program { name: "load";
483             signal: "load";
484             source: "";
485             script {
486                set_state(PART:"sb_hbar_clip", "hidden", 0.0);
487                set_state(PART:"sb_vbar_clip", "hidden", 0.0);
488                set_int(sbvis_h, 0);
489                set_int(sbvis_v, 0);
490                set_int(sbalways_v, 0);
491                set_int(sbalways_h, 0);
492                set_int(sbvis_timer, 0);
493                set_int(sbnever_v, 0);
494             }
495          }
496          program { name: "vbar_show";
497             signal: "elm,action,show,vbar";
498             source: "elm";
499             action: STATE_SET "default" 0.0;
500             target: "sb_vbar_clip_master";
501          }
502          program { name: "vbar_hide";
503             signal: "elm,action,hide,vbar";
504             source: "elm";
505             action: STATE_SET "hidden" 0.0;
506             target: "sb_vbar_clip_master";
507          }
508          program { name: "vbar_show_always";
509             signal: "elm,action,show_always,vbar";
510             source: "elm";
511             script {
512                new v;
513                v = get_int(sbvis_v);
514                v |= get_int(sbalways_v);
515                if (!v) {
516                   set_int(sbalways_v, 1);
517                   emit("do-show-vbar", "");
518                   set_int(sbvis_v, 1);
519                }
520                set_int(sbnever_v, 0);
521             }
522          }
523          program { name: "vbar_show_notalways";
524             signal: "elm,action,show_notalways,vbar";
525             source: "elm";
526             script {
527                new v;
528                v = get_int(sbalways_v);
529                if (v) {
530                   set_int(sbalways_v, 0);
531                   v = get_int(sbvis_v);
532                   if (!v) {
533                      emit("do-hide-vbar", "");
534                      set_int(sbvis_v, 0);
535                   }
536                }
537                set_int(sbnever_v, 0);
538             }
539          }
540          program { name: "vbar_hide_always";
541             signal: "elm,action,hide_always,vbar";
542             source: "elm";
543             script {
544                new v1, v2;
545                v1 = get_int(sbnever_v);
546                if (!v1) {
547                   set_int(sbnever_v, 1);
548                   set_int(sbalways_v, 0);
549                   v2 = get_int(sbvis_v);
550                   if (!v2) {
551                      emit("do-hide-vbar", "");
552                      set_int(sbvis_v, 0);
553                   }
554                }
555             }
556          }
557          program { name: "sb_vbar_show";
558             signal: "do-show-vbar";
559             source: "";
560             action: STATE_SET "default" 0.0;
561             transition: LINEAR 1.0;
562             target: "sb_vbar_clip";
563          }
564          program { name: "sb_vbar_hide";
565             signal: "do-hide-vbar";
566             source: "";
567             action: STATE_SET "hidden" 0.0;
568             transition: LINEAR 1.0;
569             target: "sb_vbar_clip";
570          }
571          program { name: "hbar_show";
572             signal: "elm,action,show,hbar";
573             source: "elm";
574             action: STATE_SET "default" 0.0;
575             target: "sb_hbar_clip_master";
576          }
577          program { name: "hbar_hide";
578             signal: "elm,action,hide,hbar";
579             source: "elm";
580             action:  STATE_SET "hidden" 0.0;
581             target: "sb_hbar_clip_master";
582          }
583          program { name: "hbar_show_always";
584             signal: "elm,action,show_always,hbar";
585             source: "elm";
586             script {
587                new v;
588                v = get_int(sbvis_h);
589                v |= get_int(sbalways_h);
590                if (!v) {
591                   set_int(sbalways_h, 1);
592                   emit("do-show-hbar", "");
593                   set_int(sbvis_h, 1);
594                }
595             }
596          }
597          program { name: "hbar_show_notalways";
598             signal: "elm,action,show_notalways,hbar";
599             source: "elm";
600             script {
601                new v;
602                v = get_int(sbalways_h);
603                if (v) {
604                   set_int(sbalways_h, 0);
605                   v = get_int(sbvis_h);
606                   if (!v) {
607                      emit("do-hide-hbar", "");
608                      set_int(sbvis_h, 0);
609                   }
610                }
611             }
612          }
613          program { name: "sb_hbar_show";
614             signal: "do-show-hbar";
615             source: "";
616             action: STATE_SET "default" 0.0;
617             transition: LINEAR 1.0;
618             target: "sb_hbar_clip";
619          }
620          program { name: "sb_hbar_hide";
621             signal: "do-hide-hbar";
622             source: "";
623             action: STATE_SET "hidden" 0.0;
624             transition: LINEAR 1.0;
625             target: "sb_hbar_clip";
626          }
627          program { name: "scroll";
628             signal: "elm,action,scroll";
629             source: "elm";
630             action:  STATE_SET "default" 0.0;
631             script {
632                new v, v1;
633                v = get_int(sbvis_v);
634                v |= get_int(sbalways_v);
635                v1 = get_int(sbnever_v);
636                if (!v && !v1) {
637                   emit("do-show-vbar", "");
638                   set_int(sbvis_v, 1);
639                }
640                v = get_int(sbvis_h);
641                v |= get_int(sbalways_h);
642                if (!v) {
643                   emit("do-show-hbar", "");
644                   set_int(sbvis_h, 1);
645                }
646                v = get_int(sbvis_timer);
647                if (v > 0) cancel_timer(v);
648                v = timer(0.5, "timer0", 0);
649                set_int(sbvis_timer, v);
650             }
651          }
652       }
653    }
654 #endif