Merge "[Progressbar] issue image getting invisible for list progressbar. fixed."
[profile/ivi/efl-theme-tizen.git] / themes / groups / genlist / genlist_macro.edc
1 /*
2  *  nBeat-theme
3  *
4  * Copyright (c) 2000 - 2010 Samsung Electronics Co., Ltd.
5  *
6  * Contact: Seokjae Jeong <seok.j.jeong@samsung.com>, Myoungwoon Roy Kim <Myoungwoon.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>, Jaehwan Kim <jae.hwan.kim@samsung.com>, 
7  *              Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>, 
8  *              Hyunsil Park <hyunsil.park@samsung.com>, Sohyun Kim <anna1014.kim@samsung.com>, Seunggyun Kim <sgyun.kim@samsung.com>
9  * 
10  * This library is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU Lesser General Public License as published by the
12  * Free Software Foundation; either version 2.1 of the License, or (at your option)
13  * any later version.
14  * 
15  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this library; if not, write to the Free Software Foundation, Inc., 51
22  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25
26 #define BEAT_GENLIST_PART_BASE( param_item_height ) \
27          part { name: "base"; \
28             type: RECT; \
29             repeat_events: 1; \
30             scale: 1; \
31             description { state: "default" 0.0; \
32                min: 0 param_item_height; \
33                color: GENLIST_PART_BG_COLOR_INC; \
34             } \
35          }
36
37 #define BEAT_GENLIST_PART_BG \
38          part { name: "bg"; \
39             type: RECT; \
40             clip_to: "disclip"; \
41             mouse_events: 0; \
42             description { state: "default" 0.0; \
43                color: GENLIST_PART_BG_COLOR_INC; \
44             } \
45             description { state: "hide" 0.0; \
46                inherit: "default" 0.0; \
47                rel1 { relative: 0.025 0.0; } \
48                rel2 { relative: 1.025 1.0; } \
49             } \
50             description { state: "hide" 0.1;  \
51                inherit: "default" 0.0; \
52                rel1 { relative: 0.13 0.0; } \
53                rel2 { relative: 1.13 1.0; } \
54             } \
55             description { state: "hide" 0.2; \
56                inherit: "default" 0.0; \
57                rel1 { relative: 0.5 0.0; } \
58                rel2 { relative: 1.5 1.0; } \
59             } \
60             description { state: "hide" 0.3; \
61                inherit: "default" 0.0; \
62                rel1 { relative: 1.0 0.0; } \
63                rel2 { relative: 2.0 1.0; } \
64             } \
65          }
66
67 #define BEAT_GENLIST_PART_BG_IMAGE \
68          part { name: "bg_image"; \
69             type: RECT; \
70             clip_to: "disclip"; \
71             mouse_events: 0; \
72             description { state: "default" 0.0; \
73                visible: 0; \
74                color: GENLIST_PART_BG_SELECTED_COLOR_INC; \
75             } \
76             description { state: "selected" 0.0; \
77                inherit: "default" 0.0; \
78                visible: 1; \
79             } \
80          }
81
82 #define BEAT_GENLIST_PART_BOTTOM_LINE \
83          part { name: "bottom_line"; \
84             type: RECT; \
85             clip_to: "disclip"; \
86             mouse_events: 0; \
87             description { state: "default" 0.0; \
88                min: 0 1; \
89                fixed: 0 1; \
90                visible: 1; \
91                color: GENLIST_PART_BOTTOM_LINE_INC; \
92                rel1 { \
93                   relative: 0.0 1.0; \
94                   offset: 0 -1; \
95                } \
96             } \
97          }
98
99 #define BEAT_GENLIST_PART_BOTTOM_EFFECT_LINE \
100          part { name: "bottom_line"; \
101             type: RECT; \
102             clip_to: "disclip"; \
103             mouse_events: 0; \
104             description { state: "default" 0.0; \
105                min: 0 1; \
106                fixed: 0 1; \
107                visible: 1; \
108                color: GENLIST_PART_BOTTOM_LINE_INC; \
109                rel1 { \
110                   relative: 0.0 1.0; \
111                   offset: 0 -1; \
112                } \
113             } \
114             BEAT_GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
115             BEAT_GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
116          }
117
118 #define BEAT_GENLIST_PART_PADDING_TOP( param_padding_size ) \
119        part { name: "elm.padding.top"; \
120             type: RECT; \
121             scale: 1; \
122             description { \
123                state: "default" 0.0; \
124                min: 0 param_padding_size; \
125                fixed: 0 1; \
126                visible: 0; \
127                rel2.relative: 1.0 0.0; \
128                align: 0.0 0.0; \
129             } \
130          }
131
132 #define BEAT_GENLIST_PART_PADDING_TEXT_TOP( param_padding_size ) \
133        part { name: "elm.padding.text.top"; \
134             type: RECT; \
135             scale: 1; \
136             description { \
137                state: "default" 0.0; \
138                min: 0 param_padding_size; \
139                fixed: 0 1; \
140                visible: 0; \
141                rel2.relative: 1.0 0.0; \
142                align: 0.0 0.0; \
143             } \
144          }
145
146 #define BEAT_GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \
147        part { name: "elm.padding.bottom"; \
148             type: RECT; \
149             scale: 1; \
150             description { state: "default" 0.0; \
151                min: 0 param_padding_size; \
152                fixed: 0 1; \
153                visible: 0; \
154                rel1.relative: 0.0 1.0; \
155                align: 0.0 1.0; \
156             } \
157          }
158
159 #define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \
160          part { name: "elm.padding.left"; \
161             type: RECT; \
162             scale: 1; \
163             description { state: "default" 0.0; \
164                min: param_padding_size 0; \
165                fixed: 1 0; \
166                visible: 0; \
167                rel2.relative: 0.0 1.0; \
168                align: 0.0 0.0; \
169             } \
170          }
171
172 #define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
173        part { name: "elm.padding.right"; \
174             type: RECT; \
175             scale: 1; \
176             description { state: "default" 0.0; \
177                min: param_padding_size 0; \
178                fixed: 1 0; \
179                visible: 0; \
180                rel1.relative: 1.0  0.0; \
181                align: 1.0 0.0; \
182             } \
183          }
184
185 #define BEAT_GENLIST_PART_DIALOGUE_BASE( param_item_height ) \
186          part { name: "base"; \
187             type: RECT; \
188             repeat_events: 1; \
189             scale: 1; \
190             description { state: "default" 0.0; \
191                min: 0 param_item_height; \
192                color: 242 238 233 255; \
193             } \
194          }
195
196 #define BEAT_GENLIST_PART_DIALOGUE_PADDING_RIGHT( param_padding_size ) \
197        part { name: "elm.padding.right"; \
198             type: RECT; \
199             scale: 1; \
200             description { state: "default" 0.0; \
201                min: param_padding_size 0; \
202                fixed: 1 0; \
203                visible: 0; \
204                rel1.relative: 1.0  0.0; \
205                align: 1.0 0.0; \
206             } \
207             description { state: "editing" 0.0; \
208                inherit: "default" 0.0; \
209                min: 56 0; \
210                visible: 1; \
211                color: 242 238 233 255; \
212             } \
213       }
214
215 #define BEAT_GENLIST_PART_DIALOGUE_ITEM \
216          part { name: "elm.rect.dialogue"; \
217             type: RECT; \
218             scale: 1; \
219             description { state: "default" 0.0; \
220                min: 10 0; \
221                fixed: 1 0; \
222                color: 199 199 199 255; \
223                rel2.relative: 0.0 1.0; \
224                align: 0.0 0.0; \
225             } \
226          }
227
228 #define BEAT_GENLIST_PART_SWALLOW_END( param_padding_size ) \
229          part { name: "elm.padding.left.swallow.end";\
230             clip_to: "disclip"; \
231             type: RECT;\
232             scale: 1;\
233             description { state: "default" 0.0;\
234                min: param_padding_size 0;\
235                fixed: 1 0;\
236                visible: 0; \
237                rel1.to_x: "elm.swallow.end";\
238                rel2 {\
239                   relative: 0.0  1.0;\
240                   to_x: "elm.swallow.end";\
241                }\
242                align: 1.0 0.5;\
243             }\
244          }\
245          part { name: "elm.swallow.end";\
246             clip_to: "disclip"; \
247             type: SWALLOW;\
248             scale: 1;\
249             description { state: "default" 0.0;\
250                fixed: 1 0;\
251                align: 1.0 0.5;\
252                rel1.to_x: "elm.padding.right";\
253                rel2 {\
254                   relative: 0.0  1.0;\
255                   to_x: "elm.padding.right";\
256                }\
257             }\
258          }
259
260 #define BEAT_GENLIST_PART_DISCLIP \
261         part { name: "disclip"; \
262             type: RECT; \
263             description { state: "default" 0.0; \
264             } \
265             description { state: "disabled" 0.0; \
266                inherit: "default" 0.0; \
267                color: 255 255 255 64; \
268             } \
269          }
270
271 #define BEAT_GENLIST_PART_LIST_PICKER_BASE( param_item_height ) \
272          part { name: "base"; \
273             type: RECT; \
274             repeat_events: 1; \
275             scale: 1; \
276             description { state: "default" 0.0; \
277                min: 0 param_item_height; \
278                color: 71 61 53 255; \
279             } \
280          }
281
282 #define BEAT_GENLIST_PART_LIST_PICKER_BOTTOM_LINE \
283          part { name: "bottom_line"; \
284             type: RECT; \
285             clip_to: "disclip"; \
286             mouse_events: 0; \
287             description { state: "default" 0.0; \
288                min: 0 1; \
289                fixed: 0 1; \
290                visible: 1; \
291                color: 104 97 92 255; \
292                rel1 { \
293                   relative: 0.0 1.0; \
294                   offset: 0 -1; \
295                } \
296             } \
297          }
298
299 #define GENLIST_EXPANDABLE_PART_PERSPECTIVE_POINT() \
300                 part { name: "point"; \
301                         type: RECT; \
302                         scale: 1; \
303                         description { \
304                                 state: "default" 0.0; \
305                                 color: 0 0 0 0; \
306                                 rel1 { relative: 0.0 0.0; } \
307                                 rel2 { relative: 1.0 0.0; } \
308                         } \
309                 }
310
311 #define BEAT_GENLIST_PART_MAP_START( param_x, param_y, param_z ) \
312                 description { state: "map_transition" 0.0; \
313                    inherit: "default" 0.0; \
314                    map { \
315                       perspective: "point"; \
316                       on: 1; \
317                       smooth: 1; \
318                       perspective_on: 1; \
319                       backface_cull: 1; \
320                       rotation { \
321                          center: "point"; \
322                          x: param_x; \
323                          y: param_y; \
324                          z: param_z; \
325                       } \
326                   } \
327                 } \
328                 description { \
329                         state: "hide" 0.0; \
330                         inherit: "default" 0.0; \
331                         visible: 0; \
332                 }
333
334 #define BEAT_GENLIST_PART_MAP_FINISH( param_x, param_y, param_z ) \
335                 description { \
336                         state: "map_rotate" 0.0; \
337                         inherit: "default" 0.0; \
338                         map { \
339                                 perspective: "point"; \
340                                 on: 1; \
341                                 smooth: 1; \
342                                 perspective_on: 1; \
343                                 backface_cull: 1; \
344                                 rotation { \
345                                         center: "point"; \
346                                         x: param_x; \
347                                         y: param_y; \
348                                         z: param_z; \
349                                 } \
350                        } \
351                } \
352
353 #define BEAT_GENLIST_PART_MAP_BASE( param_item_height ) \
354          part { name: "base"; \
355             type: RECT; \
356             repeat_events: 1; \
357             scale: 1; \
358             description { state: "default" 0.0; \
359                min: 0 param_item_height; \
360                color: GENLIST_PART_BG_COLOR_INC; \
361             } \
362             BEAT_GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
363             BEAT_GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
364          }
365
366 #define GENLIST_EXPANDABLE_PART_BASE( GE_HEIGHT , GE_COLOR ) \
367          part { name: "base"; \
368             type: RECT; \
369             repeat_events: 1; \
370             scale: 1; \
371             description { state: "default" 0.0; \
372                min: 0 GE_HEIGHT; \
373                color: GE_COLOR; \
374             } \
375             description { state: "selected" 0.0; \
376                inherit: "default" 0.0; \
377                color: GENLIST_PART_BG_SELECTED_COLOR_INC; \
378             } \
379             BEAT_GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
380             BEAT_GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
381          }
382
383 #define BEAT_GENLIST_PROGRAM_MAP_ROTATE_START() \
384                 name: "rotaion_transition"; \
385                 signal: "flip_item"; \
386                 action: STATE_SET "map_transition" 0.0; \
387                 after: "rotation";
388
389 #define BEAT_GENLIST_PROGRAM_MAP_ROTATE_FINISH( second ) \
390                 name: "rotation"; \
391                 action: STATE_SET "map_rotate" 0.0; \
392                 transition: LINEAR second; \
393                 after: "rotation_end";
394
395 #define BEAT_GENLIST_PROGRAM_MAP_END() \
396                 name: "rotation_end"; \
397                 action: STATE_SET "default" 0.0;
398
399 #define BEAT_GENLIST_PROGRAM_MAP_ROTATE_START2() \
400                 name: "rotaion_transition2"; \
401                 signal: "elm,state,contract_flip"; \
402                 action: STATE_SET "map_rotate" 0.0; \
403                 after: "rotation2";
404
405 #define BEAT_GENLIST_PROGRAM_MAP_ROTATE_FINISH2( second ) \
406                 name: "rotation2"; \
407                 action: STATE_SET "map_transition" 0.0; \
408                 transition: LINEAR second; \
409                 after: "rotation3";
410
411 #define BEAT_GENLIST_PROGRAM_MAP_END2() \
412                 name: "rotation3"; \
413                 action: STATE_SET "hide" 0.0;
414
415 #define BEAT_GENLIST_PART_EXPANDABLE2_NOSHADOW_BASE( param_item_height ) \
416          part { name: "base"; \
417             type: RECT; \
418             repeat_events: 1; \
419             scale: 1; \
420             description { state: "default" 0.0; \
421                min: 0 param_item_height; \
422                color: GENLIST_EXPANDABLE2_NOSHADOW_BG_COLOR_INC; \
423             } \
424             BEAT_GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
425             BEAT_GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
426          }
427
428 #define BEAT_GENLIST_PART_EXPANDABLE_SWALLOW_PADDING \
429          part { name: "elm.swallow.pad"; \
430             type: SWALLOW; \
431             description { state: "default" 0.0; \
432                fixed: 1 0; \
433                align: 0.0 0.5; \
434                rel1 { \
435                   relative: 1.0 0.0;\
436                   to_x: "elm.padding.left"; \
437                } \
438                rel2.to_x: "elm.padding.left"; \
439             } \
440             BEAT_GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
441             BEAT_GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
442          } \
443  
444 #define BEAT_GENLIST_PART_PADDING_LEFT_SLIDE( param_padding_size ) \
445          part { name: "elm.padding.left"; \
446             type: RECT; \
447             scale: 1; \
448             description { \
449                state: "default" 0.0; \
450                min: param_padding_size 0; \
451                fixed: 1 0; \
452                visible: 0; \
453                rel1 { relative: 0.0 0.0; to: "bg"; } \
454                rel2 { relative: 0.0 1.0; to: "bg"; } \
455                align: 0.0 0.0; \
456             } \
457          }
458
459 /* only for demo */
460 #define BEAT_GENLIST_PART_BUTTON( param_name, param_text_name, param_text, param_left, param_right, param_top, param_bottom ) \
461        part { name: param_name; \
462          mouse_events: 1; \
463          description { state: "default" 0.0; \
464             visible: 1; \
465             rel1 { relative: param_left param_top; offset: 0 0; } \
466             rel2 { relative: param_right param_bottom; offset: -1 -1; } \
467             image { \
468                normal: "btn_normal.png"; \
469                border: 10 10 10 10; \
470                border_scale: 1; \
471             } \
472             image.middle: SOLID; \
473             fill.smooth: 0; \
474          } \
475          description { state: "selected" 0.0;  \
476             inherit: "default" 0.0;  \
477             image { \
478                normal: "btn_selected.png"; \
479             } \
480          } \
481       } \
482       part { name: param_text_name;  \
483          type: TEXT;  \
484          mouse_events: 0; \
485          scale: 1; \
486          description {  \
487             align: 0.0 0.0; \
488             state: "default" 0.0;  \
489             color: 0 0 0 255;  \
490             rel1 { relative: 0.0 0.0; to: param_name; } \
491             rel2 { relative: 1.0 1.0; to: param_name; } \
492             text {  \
493                text: param_text; \
494                font: "SLP:style=Roman"; \
495                size: 24;  \
496                min: 1 1;  \
497                align: 0.5 0.5;  \
498             }  \
499          }  \
500       }
501
502 /* only for demo */
503 #define BEAT_GENLIST_PROGRAM_BUTTON( param_name_focused, param_name_normal, param_part_name ) \
504       program { name: param_name_focused; \
505          source: param_part_name; \
506          signal: "mouse,down,1"; \
507          action:  STATE_SET "selected" 0.0;  \
508          target: param_part_name; \
509       } \
510       program { name: param_name_normal; \
511          source: param_part_name; \
512          signal: "mouse,up,1"; \
513          action:  STATE_SET "default" 0.0;  \
514          target: param_part_name; \
515       }
516
517 #define BEAT_GENLIST_PROGRAM_SLIDE_WITH_AFTER( param_name, param_state, param_next ) \
518       program { name: param_name; \
519          action:  STATE_SET "hide" param_state; \
520          target: "bg"; \
521          transition: LINEAR 0.3; \
522          after: param_next; \
523       }
524
525 #define BEAT_GENLIST_PROGRAM_SLIDE( param_name, param_state_name, param_state_value ) \
526       program { name: param_name; \
527          action:  STATE_SET param_state_name param_state_value; \
528          target: "bg"; \
529          transition: LINEAR 0.3; \
530       }
531
532 #define DESC_FLIP_IMAGE( param_state_value, param_image_file_name ) \
533       description { state: "flipping" param_state_value; \
534          inherit: "default" 0.0; \
535          image { normal: param_image_file_name; } \
536       }
537
538 #define DESC_TEXT_HIDE( param_state_value ) \
539    description { state: "hide" param_state_value; \
540       inherit: "default" 0.0; \
541       color: 0 0 0 (255*(1-param_state_value/0.20)); \
542    }
543
544 #define BEAT_GENLIST_EDIT_PART_BASE( param_item_height ) \
545          part { name: "base"; \
546             type: RECT; \
547             repeat_events: 0; \
548             scale: 1; \
549             description { state: "default" 0.0; \
550                min: 0 param_item_height; \
551                color: 0 0 0 0; \
552             } \
553          }