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