59cad3ed4cedf8cd48744188a9cb3b280d1cc462
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / genlist / genlist_macro.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 /* genlist multisense sample/tone listing */
19    sounds {
20       sample {
21          name: "button-pressed" RAW;
22          source: "button-pressed.wav";
23       }
24    }
25
26 //****************************************************************************//
27 // *******************************  Default size macro **********************//
28 //**************************************************************************//
29 // if size is different for each theme, split it into each theme inc.
30
31 #define GENLIST_HEIGHT_1LINE              112
32 #define GENLIST_HEIGHT_2LINE_MAIN         54
33 #define GENLIST_HEIGHT_2LINE_SUB          42
34 #define GENLIST_HEIGHT_MULTILINE_SUB      38
35 #define GENLIST_PART_LIST_LINE_HEIGHT     1
36 #define GENLIST_HEIGHT_GROUPTITLE         46
37
38 #define GENLIST_PADDING_SIZE_DEFAULT            16
39 #define GENLIST_PADDING_SIZE_LEFT               26
40 #define GENLIST_PADDING_SIZE_RIGHT              26
41 // Dialogue group image has bottom padding (2piexl), Giant font can overlapped bottom line of image.
42 #define GENLIST_PADDING_SIZE_TOP                2
43 #define GENLIST_PADDING_SIZE_BOTTOM             2
44 // -----------------------------------------------------
45 #define GENLIST_PADDING_SIZE_TOP_2LINE          22
46 #define GENLIST_PADDING_SIZE_BOTTOM_2LINE       22
47 #define GENLIST_PADDING_SIZE_TOP_3LINE          17
48 #define GENLIST_PADDING_SIZE_BOTTOM_3LINE       17
49 #define GENLIST_PADDING_SIZE_NDEPTH             26
50
51 #define DIALOGUE_PADDING_SCROLLER         16
52 #define DIALOGUE_PADDING_SIZE_LEFT        16+20
53 #define DIALOGUE_PADDING_SIZE_RIGHT       16+20
54
55 #define GENLIST_ICON_SMALL_SIZE           45
56 #define GENLIST_ICON_STAR_SIZE            45
57 #define GENLIST_ICON_MEDIUM_SIZE          72
58 #define GENLIST_ICON_LARGE_SIZE           99
59
60 #define GENLIST_ICON_MEDIUM_MASK_SIZE     84
61 #define GENLIST_ICON_LARGE_MASK_SIZE      108
62 #define GENLIST_ICON_THUMB_MASK_SIZE      132
63
64 #define GENLIST_BTN_01_HEIGHT             74
65 #define GENLIST_BTN_02_SIZE               72
66 #define GENLIST_ICON_ONOFF_WIDTH          132
67 #define GENLIST_ICON_ONOFF_HEIGHT         70
68 #define GENLIST_ICON_CHECK_RADIO_SIZE     64
69 #define GENLIST_ICON_COLORBAR_SIZE        7
70 #define GENLIST_ICON_PASSWORD_SIZE        82
71
72 #define GENLIST_ICON_ENTRY_SIZE           54
73
74 #define GENLIST_TREESIZE_DEFAULT          26
75
76 //#define GENLIST_DIALOGUE_SEPARATOR_DEFAULT_HEIGHT 40
77
78 //****************************************************************************//
79 // *****************  EDJE description have 24 patterns **********************//
80  //**************************************************************************//
81 // ------------------
82 // |  PART == HERE  |
83 // ------------------
84  #define GENLIST_DESCRIPTION_ENVELOP( PART, PARAM ) \
85       description { state: "default" 0.0;\
86          rel1 { \
87             relative: 0 0; \
88             to: PART; \
89          }\
90          rel2 {\
91             relative: 1 1;\
92             to: PART; \
93          }\
94          PARAM\
95       }
96
97 //      |   top  |
98 // ---------------------
99 // left |  HERE  | right
100 // ---------------------
101 //      | bottom |
102 #define GENLIST_DESCRIPTION( left, right, top, bottom, param ) \
103       description { state: "default" 0.0;\
104          rel1 { \
105             relative: 1 1; \
106             to_x: left; \
107             to_y: top; \
108          }\
109          rel2 {\
110             relative: 0 0;\
111             to_x: right;\
112             to_y: bottom;\
113          }\
114          param\
115       }
116
117 // ---------------------
118 // left |--> HERE
119 // ---------------------
120 #define GENLIST_DESCRIPTION_L( left, param ) \
121       description { state: "default" 0.0;\
122          align: 0 0.5; \
123          fixed: 1 0; \
124          rel1 { \
125             relative: 1 0; \
126             to_x: left; \
127             to_y: "base"; \
128          }\
129          rel2 { \
130             relative: 1 1;\
131             to_x: left; \
132             to_y: "base"; \
133          }\
134          param\
135       }
136
137 // ---------------------
138 //   HERE  <--| right
139 // ---------------------
140 #define GENLIST_DESCRIPTION_R( right, param ) \
141       description { state: "default" 0.0;\
142          align: 1 0.5; \
143          fixed: 1 0; \
144          rel1 { \
145             relative: 0 0; \
146             to_x: right; \
147             to_y: "base"; \
148          }\
149          rel2 {\
150             relative: 0 1;\
151             to_x: right; \
152             to_y: "base"; \
153          }\
154          param\
155       }
156
157 // --------------------------
158 // left |--> HERE  <--| right
159 // --------------------------
160 #define GENLIST_DESCRIPTION_LR( left, right, param ) \
161       description { state: "default" 0.0;\
162          rel1 { \
163             relative: 1 0; \
164             to_x: left; \
165             to_y: "base"; \
166          }\
167          rel2 {\
168             relative: 0 1;\
169             to_x: right;\
170             to_y: "base"; \
171          }\
172          param\
173       }
174
175 //   |  top     |
176 // -----------------
177 //  |  HERE  <--| right
178 // -----------------
179 //  | bottom   |
180 #define GENLIST_DESCRIPTION_RTB( right, top, bottom, param ) \
181       description { state: "default" 0.0;\
182          align: 1 0.5;\
183          rel1 { \
184             relative: 0 1; \
185             to_x: right; \
186             to_y: top; \
187          }\
188          rel2 {\
189             relative: 0 0;\
190             to_x: right;\
191             to_y: bottom;\
192          }\
193          param\
194       }
195
196 // left |  HERE  | right
197 // ---------------------
198 //      | bottom |
199 #define GENLIST_DESCRIPTION_LRB( left, right, bottom, param ) \
200       description { state: "default" 0.0;\
201          align: 0.5 1;\
202          rel1 { \
203             relative: 1 0; \
204             to_x: left; \
205             to_y: bottom; \
206          }\
207          rel2 {\
208             relative: 0 0;\
209             to_x: right;\
210             to_y: bottom;\
211          }\
212          param\
213       }
214
215 //      |   top  |
216 // ---------------------
217 // left |  HERE  | right
218 #define GENLIST_DESCRIPTION_LRT( left, right, top, param ) \
219       description { state: "default" 0.0;\
220          align: 0.5 0;\
221          rel1 { \
222             relative: 1 1; \
223             to_x: left; \
224             to_y: top; \
225          }\
226          rel2 {\
227             relative: 0 1;\
228             to_x: right;\
229             to_y: top;\
230          }\
231          param\
232       }
233
234 //      |       top  |
235 // ---------------------
236 // left | -->  HERE  |
237 #define GENLIST_DESCRIPTION_LT( left, top, param ) \
238       description { state: "default" 0.0;\
239          align: 0 0;\
240          rel1 { \
241             relative: 1 1; \
242             to_x: left; \
243             to_y: top; \
244          }\
245          rel2 {\
246             relative: 1 1;\
247             to_x: left;\
248             to_y: top;\
249          }\
250          param\
251       }
252
253 // left |  --> HERE  |
254 // ---------------------
255 //      |     bottom |
256 #define GENLIST_DESCRIPTION_LB( left, bottom, param ) \
257       description { state: "default" 0.0;\
258          align: 0 1;\
259          rel1 { \
260             relative: 1 0; \
261             to_x: left; \
262             to_y: bottom; \
263          }\
264          rel2 {\
265             relative: 1 0;\
266             to_x: left;\
267             to_y: bottom;\
268          }\
269          param\
270       }
271
272 //      |     top  |
273 // ---------------------
274 // left |--> HERE  |
275 // ---------------------
276 //      |   bottom |
277 #define GENLIST_DESCRIPTION_LTB( left, top, bottom, param ) \
278       description { state: "default" 0.0;\
279          align: 0 0.5;\
280          rel1 { \
281             relative: 1 1; \
282             to_x: left; \
283             to_y: top; \
284          }\
285          rel2 {\
286             relative: 1 0;\
287             to_x: left;\
288             to_y: bottom;\
289          }\
290          param\
291       }
292
293 //      |   top  |
294 // ---------------------
295 //     |  HERE <--| right
296 #define GENLIST_DESCRIPTION_RT( right, top, param ) \
297       description { state: "default" 0.0;\
298          align: 1 0;\
299          rel1 { \
300             relative: 0 1; \
301             to_x: right; \
302             to_y: top; \
303          }\
304          rel2 {\
305             relative: 0 1;\
306             to_x: right;\
307             to_y: top;\
308          }\
309          param\
310       }
311
312 //  | HERE <-- | right
313 // ---------------------
314 //  |  bottom  |
315 #define GENLIST_DESCRIPTION_RB( right, bottom, param ) \
316       description { state: "default" 0.0;\
317          align: 1 1;\
318          rel1 { \
319             relative: 0 0; \
320             to_x: right; \
321             to_y: bottom; \
322          }\
323          rel2 {\
324             relative: 0 0;\
325             to_x: right;\
326             to_y: bottom;\
327          }\
328          param\
329       }
330
331 // |   top  |
332 // ----------
333 // |  HERE  |
334 // ----------
335 // | bottom |
336 #define GENLIST_DESCRIPTION_TB( top, bottom, param ) \
337       description { state: "default" 0.0;\
338          align: 0.5 0.5;\
339          rel1 { \
340             relative: 0 1; \
341             to_y: top; \
342          }\
343          rel2 {\
344             relative: 1 0;\
345             to_y: bottom;\
346          }\
347          param\
348       }
349
350 #define GENLIST_PROLOG \
351       data.item: "stacking" "above"; \
352       data.item: "selectraise" "on"; \
353       data.item: "treesize" 0;
354
355 #define GENLIST_PROLOG_NORMAL \
356       GENLIST_PROLOG \
357       data.item: "treesize" GENLIST_TREESIZE_DEFAULT; \
358       data.item: "flips" "elm.flip.icon elm.flip.content elm.flip.eraser"; \
359       images { \
360          image : "00_list_group_bg.png" COMP; \
361          image : "00_list_group_bg_press.png" COMP; \
362       }
363
364 #define GENLIST_PROLOG_DIALOGUE \
365       GENLIST_PROLOG \
366       data.item: "flips" "elm.flip.icon elm.flip.content elm.flip.eraser"; \
367       images { \
368          image : "00_list_group_bg.png" COMP; \
369          image : "00_list_group_bg_press.png" COMP; \
370          image : "00_list_group_bg_top.png" COMP; \
371          image : "00_list_group_bg_top_press.png" COMP; \
372          image : "00_list_group_bg_center.png" COMP; \
373          image : "00_list_group_bg_center_press.png" COMP; \
374          image : "00_list_group_bg_bottom.png" COMP; \
375          image : "00_list_group_bg_bottom_press.png" COMP; \
376       }
377
378 #define GENLIST_NAME(NAME) \
379       name: "elm/genlist/item/"NAME; \
380       alias: "elm/genlist/item_odd/"NAME; \
381       alias: "elm/genlist/item_compress/"NAME; \
382       alias: "elm/genlist/item_compress_odd/"NAME; \
383       alias: "elm/genlist/tree/"NAME; \
384       alias: "elm/genlist/tree_odd/"NAME; \
385       alias: "elm/genlist/tree_compress/"NAME; \
386       alias: "elm/genlist/tree_compress_odd/"NAME; \
387
388 /*****************************************************************************/
389 /******************************* Dialogue group ******************************/
390 /*****************************************************************************/
391 #define GENLIST_DIALOGUE_INHERIT_BODY( _PARTS ) \
392       data.item: "treesize" 0; \
393       parts { \
394          GENLIST_PART_BG_NORMAL_OFF \
395          GENLIST_PART_BOTTOM_LINE_OFF \
396          GENLIST_PART_BG_DIALOGUE \
397          GENLIST_PART_PADDING_LEFT_SIZE( DIALOGUE_PADDING_SIZE_LEFT ) \
398          GENLIST_PART_PADDING_RIGHT_EDIT \
399          _PARTS \
400          GENLIST_PART_FLIP \
401       }
402
403 #define GENLIST_INHERIT_THUMB_CIRCLE(SIZE_PREFIX, MASK_SIZE, PARENT) \
404      images { \
405          image: "thumbnail/"SIZE_PREFIX"/00_list_circle_icon_bg_normal.png" COMP; \
406          image: "thumbnail/"SIZE_PREFIX"/00_list_circle_icon_bg_press.png" COMP; \
407          image: "thumbnail/"SIZE_PREFIX"/00_list_circle_icon_bg_dim.png" COMP; \
408          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png" COMP; \
409          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png" COMP; \
410       } \
411       parts { \
412          GENLIST_PART_RECT("elm.thumb.clip", \
413             description { state: "default";  \
414             } \
415             description { state: "flipped";  \
416                color: 0 0 0 0; \
417             } \
418          ) \
419          GENLIST_PART_IMAGE("elm.thumb", \
420             clip_to: "elm.thumb.clip"; \
421             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
422                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_circle_icon_bg_normal.png"; \
423                min: MASK_SIZE MASK_SIZE; \
424                max: MASK_SIZE MASK_SIZE; \
425                fixed:1 1; \
426             ) \
427             description { state: "selected" 0.0; \
428                inherit: "default" 0.0; \
429                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_circle_icon_bg_press.png"; \
430             } \
431             description { state: "disabled" 0.0; \
432                inherit: "default" 0.0; \
433                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_circle_icon_bg_dim.png"; \
434             } \
435             description { state: "reorder" 0.0; \
436                inherit: "default" 0.0; \
437                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
438             } \
439             description { state: "reorder_selected" 0.0; \
440                inherit: "default" 0.0; \
441                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
442             } \
443             description { state: "reorder_disabled" 0.0; \
444                inherit: "default" 0.0; \
445                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_circle_icon_bg_dim.png"; \
446             } \
447             description { state: "decorate" 0.0; \
448                inherit: "default" 0.0; \
449             } \
450             description { state: "decorate_reorder" 0.0; \
451                inherit: "reorder" 0.0; \
452             } \
453          ) \
454          GENLIST_PART_FLIP \
455       }
456
457 #define GENLIST_INHERIT_THUMB_SQUARE(SIZE_PREFIX, MASK_SIZE, PARENT) \
458       images { \
459          image: "thumbnail/"SIZE_PREFIX"/00_list_square_icon_bg_normal.png" COMP; \
460          image: "thumbnail/"SIZE_PREFIX"/00_list_square_icon_bg_press.png" COMP; \
461          image: "thumbnail/"SIZE_PREFIX"/00_list_square_icon_bg_dim.png" COMP; \
462          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png" COMP; \
463          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png" COMP; \
464       } \
465       parts { \
466          GENLIST_PART_RECT("elm.thumb.clip", \
467             description { state: "default";  \
468             } \
469             description { state: "flipped";  \
470                color: 0 0 0 0; \
471             } \
472          ) \
473          GENLIST_PART_IMAGE("elm.thumb", \
474             clip_to: "elm.thumb.clip"; \
475             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
476                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_square_icon_bg_normal.png"; \
477                min: MASK_SIZE MASK_SIZE; \
478                max: MASK_SIZE MASK_SIZE; \
479                fixed:1 1; \
480             ) \
481             description { state: "selected" 0.0; \
482                inherit: "default" 0.0; \
483                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_square_icon_bg_press.png"; \
484             } \
485             description { state: "disabled" 0.0; \
486                inherit: "default" 0.0; \
487                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_square_icon_bg_dim.png"; \
488             } \
489             description { state: "reorder" 0.0; \
490                inherit: "default" 0.0; \
491                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
492             } \
493             description { state: "reorder_selected" 0.0; \
494                inherit: "default" 0.0; \
495                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
496             } \
497             description { state: "reorder_disabled" 0.0; \
498                inherit: "default" 0.0; \
499                image.normal: "thumbnail/"SIZE_PREFIX"/00_list_square_icon_bg_dim.png"; \
500             } \
501             description { state: "decorate" 0.0; \
502                inherit: "default" 0.0; \
503             } \
504             description { state: "decorate_reorder" 0.0; \
505                inherit: "reorder" 0.0; \
506             } \
507          ) \
508          GENLIST_PART_FLIP \
509       }
510
511
512 #define GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE(SIZE_PREFIX, MASK_SIZE, PARENT) \
513      images { \
514          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png" COMP; \
515          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png" COMP; \
516          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_dim.png" COMP; \
517       } \
518       parts { \
519          GENLIST_PART_RECT("elm.thumb.clip", \
520             description { state: "default";  \
521             } \
522             description { state: "flipped";  \
523                color: 0 0 0 0; \
524             } \
525          ) \
526          GENLIST_PART_IMAGE("elm.thumb", \
527             clip_to: "elm.thumb.clip"; \
528             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
529                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
530                min: MASK_SIZE MASK_SIZE; \
531                max: MASK_SIZE MASK_SIZE; \
532                fixed:1 1; \
533             ) \
534             description { state: "selected" 0.0; \
535                inherit: "default" 0.0; \
536                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
537             } \
538             description { state: "reorder" 0.0; \
539                inherit: "default" 0.0; \
540                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
541             } \
542             description { state: "reorder_selected" 0.0; \
543                inherit: "default" 0.0; \
544                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
545             } \
546             description { state: "decorate" 0.0; \
547                inherit: "default" 0.0; \
548             } \
549             description { state: "decorate_reorder" 0.0; \
550                inherit: "reorder" 0.0; \
551             } \
552          ) \
553       }
554
555 #define GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE(SIZE_PREFIX, MASK_SIZE, PARENT) \
556       images { \
557          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png" COMP; \
558          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png" COMP; \
559          image: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_dim.png" COMP; \
560       } \
561       parts { \
562          GENLIST_PART_RECT("elm.thumb.clip", \
563             description { state: "default";  \
564             } \
565             description { state: "flipped";  \
566                color: 0 0 0 0; \
567             } \
568          ) \
569          GENLIST_PART_IMAGE("elm.thumb", \
570             clip_to: "elm.thumb.clip"; \
571             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
572                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
573                min: MASK_SIZE MASK_SIZE; \
574                max: MASK_SIZE MASK_SIZE; \
575                fixed:1 1; \
576             ) \
577             description { state: "selected" 0.0; \
578                inherit: "default" 0.0; \
579                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
580             } \
581             description { state: "reorder" 0.0; \
582                inherit: "default" 0.0; \
583                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
584             } \
585             description { state: "reorder_selected" 0.0; \
586                inherit: "default" 0.0; \
587                image.normal: "thumbnail/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
588             } \
589             description { state: "decorate" 0.0; \
590                inherit: "default" 0.0; \
591             } \
592             description { state: "decorate_reorder" 0.0; \
593                inherit: "reorder" 0.0; \
594             } \
595          ) \
596       }
597
598 #define GENLIST_INHERIT_THUMB_CIRCLE_MEDIUM(PARENT) \
599    GENLIST_INHERIT_THUMB_CIRCLE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
600
601 #define GENLIST_INHERIT_THUMB_SQUARE_MEDIUM(PARENT) \
602    GENLIST_INHERIT_THUMB_SQUARE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
603
604 #define GENLIST_INHERIT_THUMB_CIRCLE_LARGE(PARENT) \
605    GENLIST_INHERIT_THUMB_CIRCLE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
606
607 #define GENLIST_INHERIT_THUMB_SQUARE_LARGE(PARENT) \
608    GENLIST_INHERIT_THUMB_SQUARE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
609
610
611 #define GENLIST_INHERIT_THUMB_CIRCLE_MEDIUM_DIALOGUE(PARENT) \
612    GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
613
614 #define GENLIST_INHERIT_THUMB_SQUARE_MEDIUM_DIALOGUE(PARENT) \
615    GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
616
617 #define GENLIST_INHERIT_THUMB_CIRCLE_LARGE_DIALOGUE(PARENT) \
618    GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
619
620 #define GENLIST_INHERIT_THUMB_SQUARE_LARGE_DIALOGUE(PARENT) \
621    GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
622
623 //****************************************************************************//
624 // ****************************** BG Image **********************************//
625 //****************************************************************************//
626 #define GENLIST_PART_BG_NORMAL \
627       GENLIST_PART_RECT("bg_clip", \
628          description { state: "default" 0.0; \
629             color: 255 255 255 255; \
630          } \
631          description { state: "decorate" 0.0; \
632             inherit: "default" 0.0; \
633             color: 0 0 0 0; \
634          } \
635          description { state: "reorder" 0.0; \
636             inherit: "default" 0.0; \
637             color: 0 0 0 0; \
638          } \
639          description { state: "decorate_reorder" 0.0; \
640             inherit: "default" 0.0; \
641             color: 0 0 0 0; \
642          } \
643       ) \
644       GENLIST_PART_RECT("bg",  \
645          clip_to: "bg_clip"; \
646          description { state: "default" 0.0; \
647             color: GENLIST_LIST_BG_COLOR; \
648          } \
649          description { state: "selected" 0.0; \
650             inherit: "default" 0.0; \
651             color: GENLIST_LIST_PRESS_COLOR; \
652          } \
653          description { state: "disabled" 0.0; \
654             inherit: "default" 0.0; \
655             color: GENLIST_LIST_DIM_COLOR; \
656          } \
657       ) \
658       GENLIST_PART_RECT("bg_reorder_clip", \
659          description { state: "default" 0.0; \
660             color: 0 0 0 0; \
661          } \
662          description { state: "reorder" 0.0; \
663             inherit: "default" 0.0; \
664             color: 255 255 255 255; \
665          } \
666          description { state: "decorate_reorder" 0.0; \
667             inherit: "default" 0.0; \
668          } \
669          description { state: "decorate" 0.0; \
670             inherit: "default" 0.0; \
671          } \
672          description { state: "reorder_flip" 0.0; \
673             inherit: "default" 0.0; \
674          } \
675       ) \
676       GENLIST_PART_SPACER("bg_reorder_left", \
677          description { state: "default" 0.0; \
678             min: 16 0; \
679             max: 16 -1; \
680             fixed: 1 0; \
681             align: 0 0.5; \
682             rel2.relative: 0 1; \
683          } \
684       ) \
685       GENLIST_PART_SPACER("bg_reorder_right", \
686          description { state: "default" 0.0; \
687             min: 16 0; \
688             max: 16 -1; \
689             fixed: 1 0; \
690             align: 1.0 0.5; \
691             rel1.relative: 1 0; \
692          } \
693       ) \
694       GENLIST_PART_IMAGE("bg_reorder", \
695          clip_to: "bg_reorder_clip"; \
696          GENLIST_DESCRIPTION_LR("bg_reorder_left", "bg_reorder_right", \
697             image { \
698                normal: "00_list_group_bg.png"; \
699                border: 17 17 8 8; \
700                border_scale: 1; \
701             } \
702          ) \
703          description { state: "selected" 0.0; \
704             inherit: "default"; \
705             image { \
706                normal: "00_list_group_bg_press.png"; \
707                border: 17 17 8 8; \
708                border_scale: 1; \
709             } \
710          } \
711          description { state: "flipped" 0.0; \
712             inherit: "default"; \
713             visible: 0; \
714          } \
715       )
716
717 #define GENLIST_PART_BG_NORMAL_OFF \
718    GENLIST_PART_RECT("bg_clip", \
719       description { state: "default" 0.0; \
720          visible: 0; \
721       } \
722       description { state: "decorate" 0.0; \
723          inherit: "default" 0.0; \
724          visible: 0; \
725       } \
726       description { state: "reorder" 0.0; \
727          inherit: "default" 0.0; \
728          visible: 0; \
729       } \
730       description { state: "decorate_reorder" 0.0; \
731          inherit: "default" 0.0; \
732          visible: 0; \
733       } \
734    ) \
735    GENLIST_PART_RECT("bg", \
736       mouse_events: 0; \
737       description { state: "default" 0.0; \
738          visible: 0; \
739       } \
740       description { state: "selected" 0.0; \
741          visible: 0; \
742       } \
743       description { state: "disabled" 0.0; \
744          visible: 0; \
745       } \
746    ) \
747    GENLIST_PART_RECT("bg_reorder_clip", \
748          description { state: "default" 0.0; \
749             visible: 0; \
750          } \
751          description { state: "reorder" 0.0; \
752             visible: 0; \
753          } \
754          description { state: "decorate_reorder" 0.0; \
755             visible: 0; \
756          } \
757          description { state: "decorate" 0.0; \
758             visible: 0; \
759          } \
760          description { state: "reorder_flip" 0.0; \
761             visible: 0; \
762          } \
763       ) \
764    GENLIST_PART_IMAGE("bg_reorder", \
765       description {state: "default" 0.0;\
766          visible: 0;\
767       }\
768       description { state: "selected" 0.0; {\
769          visible: 0; \
770       } \
771       description { state: "flipped" 0.0; {\
772          visible: 0; \
773       } \
774    )
775
776 #define GENLIST_PART_BG_DIALOGUE \
777    GENLIST_PART_RECT("bg_dialogue_clip", \
778       description { state: "default" 0.0; \
779          color: 255 255 255 255; \
780       } \
781       description { state: "2depth" 0.0; \
782          color: 220 218 211 255; \
783       } \
784    ) \
785    GENLIST_PART_SPACER("bg_dialogue_left", \
786       description { state: "default" 0.0; \
787          min: 16 0; \
788          max: 16 -1; \
789          fixed: 1 0; \
790          align: 0 0.5; \
791          rel2.relative: 0 1; \
792       } \
793    ) \
794    GENLIST_PART_SPACER("bg_dialogue_right", \
795       description { state: "default" 0.0; \
796          min: 16 0; \
797          max: 16 -1; \
798          fixed: 1 0; \
799          align: 1.0 0.5; \
800          rel1.relative: 1 0; \
801       } \
802       description { state: "editmode" 0.0; \
803          inherit: "default" 0.0; \
804          min: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_MEDIUM_SIZE) 0; \
805          max: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_MEDIUM_SIZE) 0; \
806       } \
807    ) \
808    GENLIST_PART_IMAGE("bg_dialogue", \
809       insert_after: "base"; \
810       clip_to: "bg_dialogue_clip"; \
811       GENLIST_DESCRIPTION_LR("bg_dialogue_left", "bg_dialogue_right", \
812          image { \
813             normal: "00_list_group_bg.png"; \
814             border: 17 17 8 8; \
815             border_scale: 1; \
816          } \
817       ) \
818       description { state: "selected" 0.0; \
819          inherit: "default" 0.0; \
820          image { \
821             normal: "00_list_group_bg_press.png"; \
822             border: 17 17 8 8; \
823             border_scale: 1; \
824          } \
825       } \
826       description { state: "top" 0.0; \
827          inherit: "default" 0.0; \
828          image { \
829             normal: "00_list_group_bg_top.png"; \
830             border: 17 17 8 8; \
831             border_scale: 1; \
832          } \
833       } \
834       description { state: "top_selected" 0.0; \
835          inherit: "default" 0.0; \
836          image { \
837             normal: "00_list_group_bg_top_press.png"; \
838             border: 17 17 8 8; \
839             border_scale: 1; \
840          } \
841       } \
842       description { state: "center" 0.0; \
843          inherit: "default" 0.0; \
844          image { \
845             normal: "00_list_group_bg_center.png"; \
846             border: 17 17 8 8; \
847             border_scale: 1; \
848          } \
849       } \
850       description { state: "center_selected" 0.0; \
851          inherit: "default" 0.0; \
852          image { \
853             normal: "00_list_group_bg_center_press.png"; \
854             border: 17 17 8 8; \
855             border_scale: 1; \
856          } \
857       } \
858       description { state: "bottom" 0.0; \
859          inherit: "default" 0.0; \
860          image { \
861             normal: "00_list_group_bg_bottom.png"; \
862             border: 17 17 8 8; \
863             border_scale: 1; \
864          } \
865       } \
866       description { state: "bottom_selected" 0.0; \
867          inherit: "default" 0.0; \
868          image { \
869             normal: "00_list_group_bg_bottom_press.png"; \
870             border: 17 17 8 8; \
871             border_scale: 1; \
872          } \
873       } \
874    )
875
876 //****************************************************************************//
877 // ****************************** BASE  ********************************//
878 //****************************************************************************//
879 #define GENLIST_PART_BASE_SIZE(HEIGHT) \
880          part { name: "base"; \
881             type: RECT; \
882             mouse_events: 0; \
883             scale: 1; \
884             description { state: "default" 0.0; \
885                color: 0 0 0 0; \
886                min: 0 HEIGHT; \
887             } \
888             description { state: "disabled" 0.0; \
889                inherit: "default"; \
890             } \
891          } \
892          part { name: "state"; \
893             type: RECT; \
894             mouse_events: 0; \
895             scale: 1; \
896             description { state: "default" 0.0; \
897                color: 0 0 0 0; \
898             } \
899             description { state: "decorate" 0.0; \
900                inherit: "default"; \
901             } \
902             description { state: "reorder" 0.0; \
903                inherit: "default"; \
904             } \
905             description { state: "decorate_reorder" 0.0; \
906                inherit: "default"; \
907             } \
908          }
909
910 #define GENLIST_PART_BASE \
911          GENLIST_PART_BASE_SIZE(0)
912
913 //****************************************************************************//
914 // ****************************** LINE ********************************//
915 //****************************************************************************//
916 #define GENLIST_PART_BOTTOM_LINE \
917          GENLIST_PART_RECT("bottom_line_clip", \
918             description { state: "default" 0.0; \
919                color: 255 255 255 255; \
920             } \
921             description { state: "decorate" 0.0; \
922                inherit: "default" 0.0; \
923                color: 0 0 0 0; \
924             } \
925             description { state: "reorder" 0.0; \
926                inherit: "default" 0.0; \
927                color: 0 0 0 0; \
928             } \
929             description { state: "decorate_reorder" 0.0; \
930                inherit: "default" 0.0; \
931                color: 0 0 0 0; \
932             } \
933          ) \
934          GENLIST_PART_RECT("bottom_line", \
935             mouse_events: 0; \
936             clip_to: "bottom_line_clip"; \
937             description { state: "default" 0.0; \
938                min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
939                max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
940                fixed: 0 1; \
941                align: 0.5 1; \
942                color: GENLIST_LIST_LINE1_COLOR; \
943                rel1.to: "bottom_line2"; \
944                rel2.to: "bottom_line2"; \
945                rel2.relative: 1 0; \
946                rel1.offset: -1 -1; \
947             } \
948             description { state: "selected" 0.0; \
949                inherit: "default" 0.0; \
950                color: GENLIST_LIST_PRESS_COLOR; \
951             } \
952             description { state: "disabled" 0.0; \
953                inherit: "default" 0.0; \
954                color: GENLIST_LIST_DIM_COLOR; \
955             } \
956             description { state: "flipped" 0.0; \
957                inherit: "default" 0.0; \
958                visible: 0; \
959             } \
960          ) \
961          GENLIST_PART_RECT("bottom_line2", \
962             mouse_events: 0; \
963             clip_to: "bottom_line_clip"; \
964             description { state: "default" 0.0; \
965                min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
966                max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
967                fixed: 0 1; \
968                align: 0.5 1; \
969                color: GENLIST_LIST_LINE2_COLOR; \
970                rel1.to_x: "elm.padding.left"; \
971                rel1.relative: 1 0; \
972                rel2.to_x: "elm.padding.right"; \
973                rel2.relative: 0 1; \
974                rel1.offset: -1 -1; \
975             } \
976             description { state: "selected" 0.0; \
977                inherit: "default" 0.0; \
978                color: GENLIST_LIST_PRESS_COLOR; \
979             } \
980             description { state: "disabled" 0.0; \
981                inherit: "default" 0.0; \
982                color: GENLIST_LIST_DIM_COLOR; \
983             } \
984             description { state: "flipped" 0.0; \
985                inherit: "default" 0.0; \
986                visible: 0; \
987             } \
988          )
989
990 #define GENLIST_PART_BOTTOM_LINE_OFF \
991          GENLIST_PART_RECT("bottom_line", \
992             mouse_events: 0; \
993             description { state: "default" 0.0; \
994                visible: 0; \
995             } \
996             description { state: "selected" 0.0; \
997                visible: 0; \
998             } \
999             description { state: "disabled" 0.0; \
1000                visible: 0; \
1001             } \
1002             description { state: "decorate" 0.0; \
1003                visible: 0; \
1004             } \
1005          ) \
1006          GENLIST_PART_RECT("bottom_line2", \
1007             mouse_events: 0; \
1008             description { state: "default" 0.0; \
1009                visible: 0; \
1010             } \
1011             description { state: "selected" 0.0; \
1012                visible: 0; \
1013             } \
1014             description { state: "disabled" 0.0; \
1015                visible: 0; \
1016             } \
1017             description { state: "decorate" 0.0; \
1018                visible: 0; \
1019             } \
1020          )
1021
1022 #define GENLIST_PART_DIVIDER_PADDING \
1023          GENLIST_PART_SPACER("elm.padding.divider.top", \
1024             description { state: "default" 0.0; \
1025                align: 0.5 0; \
1026                min: 0 30; \
1027                max: -1 30; \
1028                fixed: 0 1; \
1029                rel2.relative: 1 0; \
1030             } \
1031          ) \
1032          GENLIST_PART_SPACER("elm.padding.divider.bottom", \
1033             description { state: "default" 0.0; \
1034                align: 0.5 1; \
1035                min: 0 30; \
1036                max: -1 30; \
1037                fixed: 0 1; \
1038                rel1.relative: 0 1; \
1039             } \
1040          ) \
1041
1042 #define GENLIST_PART_DIVIDER_L(LEFT) \
1043          GENLIST_PART_DIVIDER_PADDING \
1044          GENLIST_PART_RECT("elm.divider1", \
1045             mouse_events: 0; \
1046             GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
1047                align: 0 0.5; \
1048                min: 1 0; \
1049                max: 1 -1; \
1050                fixed: 1 0; \
1051                rel2.offset: 0 0; \
1052                color: GENLIST_LIST_DIVIDER1_COLOR; \
1053             ) \
1054          ) \
1055          GENLIST_PART_RECT("elm.divider2", \
1056             mouse_events: 0; \
1057             GENLIST_DESCRIPTION_LTB("elm.divider1", "elm.padding.divider.top", "elm.padding.divider.bottom", \
1058                align: 0 0.5; \
1059                min: 1 0; \
1060                max: 1 -1; \
1061                fixed: 1 0; \
1062                rel2.offset: 0 0; \
1063                color: GENLIST_LIST_DIVIDER2_COLOR; \
1064             ) \
1065          )
1066
1067 #define GENLIST_PART_DIVIDER_R(RIGHT) \
1068          GENLIST_PART_DIVIDER_PADDING \
1069          GENLIST_PART_RECT("elm.divider1", \
1070             mouse_events: 0; \
1071             GENLIST_DESCRIPTION_RTB("elm.divider2", "elm.padding.divider.top", "elm.padding.divider.bottom", \
1072                min: 1 0; \
1073                max: 1 -1; \
1074                fixed: 1 0; \
1075                rel1.offset: -1 0;\
1076                color: GENLIST_LIST_DIVIDER1_COLOR; \
1077             ) \
1078          ) \
1079          GENLIST_PART_RECT("elm.divider2", \
1080             mouse_events: 0; \
1081             GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
1082                min: 1 0; \
1083                max: 1 -1; \
1084                fixed: 1 0; \
1085                rel1.offset: -1 0;\
1086                color: GENLIST_LIST_DIVIDER2_COLOR; \
1087             ) \
1088          )
1089
1090 #define GENLIST_PART_CENTER_LINE_LT(LEFT, TOP) \
1091          GENLIST_PART_SPACER("elm.padding.divider.left", \
1092             GENLIST_DESCRIPTION_L(LEFT, \
1093                min: 16 0; \
1094                max: 16 -1; \
1095                fixed: 1 0; \
1096             ) \
1097          ) \
1098          GENLIST_PART_SPACER("elm.padding.divider.right", \
1099             GENLIST_DESCRIPTION_ENVELOP("base", \
1100                min: 16 0; \
1101                max: 16 -1; \
1102                fixed: 1 0; \
1103                align: 1 0.5; \
1104                rel1.relative: 1 0; \
1105             ) \
1106          ) \
1107          GENLIST_PART_RECT("center_line", \
1108             mouse_events: 0; \
1109             GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", TOP, \
1110                min: 0 1; \
1111                max: -1 1; \
1112                fixed: 0 1; \
1113                color: GENLIST_LIST_DIVIDER1_COLOR; \
1114             ) \
1115          ) \
1116          GENLIST_PART_RECT("center_line2", \
1117             GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", "center_line", \
1118                min: 0 1; \
1119                max: -1 1; \
1120                fixed: 0 1; \
1121                color: GENLIST_LIST_DIVIDER2_COLOR; \
1122             ) \
1123          )
1124
1125 #define GENLIST_PART_COLORBAR \
1126          GENLIST_PART_SPACER("elm.padding.colorbar.top", \
1127              GENLIST_DESCRIPTION_ENVELOP("base", \
1128                align: 0.5 0; \
1129                fixed: 0 1; \
1130                min: 0 4; \
1131                max: -1 4; \
1132                rel2.relative: 1 0; \
1133              ) \
1134          ) \
1135          GENLIST_PART_SPACER("elm.padding.colorbar.bottom", \
1136              GENLIST_DESCRIPTION_ENVELOP("base", \
1137                align: 0.5 1; \
1138                fixed: 0 1; \
1139                min: 0 4; \
1140                max: -1 4; \
1141                rel1.relative: 0 1; \
1142              ) \
1143          ) \
1144          GENLIST_PART_ICON("elm.swallow.colorbar", \
1145             GENLIST_DESCRIPTION_TB("elm.padding.colorbar.top", "elm.padding.colorbar.bottom", \
1146                min: GENLIST_ICON_COLORBAR_SIZE 0; \
1147                max: GENLIST_ICON_COLORBAR_SIZE -1; \
1148                fixed: 1 0; \
1149                align: 0 0.5; \
1150                rel1.relative: 0 1; \
1151                rel2.relative: 0 0; \
1152             ) \
1153          )
1154
1155 #define GENLIST_PART_COLORBAR_DIALOGUE \
1156          GENLIST_PART_SPACER("elm.padding.colorbar.top", \
1157              GENLIST_DESCRIPTION_ENVELOP("base", \
1158                align: 0.5 0; \
1159                fixed: 0 1; \
1160                min: 0 4; \
1161                max: -1 4; \
1162                rel2.relative: 1 0; \
1163              ) \
1164          ) \
1165          GENLIST_PART_SPACER("elm.padding.colorbar.bottom", \
1166              GENLIST_DESCRIPTION_ENVELOP("base", \
1167                align: 0.5 1; \
1168                fixed: 0 1; \
1169                min: 0 4; \
1170                max: -1 4; \
1171                rel1.relative: 0 1; \
1172              ) \
1173          ) \
1174          GENLIST_PART_SPACER("elm.padding.colorbar.left", \
1175              description{ state: "default" 0.0; \
1176                min: 19 0; \
1177                max: 19 -1; \
1178                fixed: 1 0; \
1179                align: 0 0.5; \
1180                rel1.to: "base"; \
1181                rel2.to: "base"; \
1182                rel2.relative: 0 1; \
1183              } \
1184          ) \
1185          GENLIST_PART_ICON("elm.swallow.colorbar", \
1186             GENLIST_DESCRIPTION_LTB("elm.padding.colorbar.left","elm.padding.colorbar.top", "elm.padding.colorbar.bottom", \
1187                min: GENLIST_ICON_COLORBAR_SIZE 0; \
1188                max: GENLIST_ICON_COLORBAR_SIZE -1; \
1189                fixed: 1 0; \
1190             ) \
1191          )
1192
1193 //****************************************************************************//
1194 //********************************* PADDING **********************************//
1195 //****************************************************************************//
1196 #define GENLIST_PART_EXPANDED_PAD \
1197          part { name: "elm.swallow.pad"; \
1198             type: SWALLOW; \
1199             scale: 1; \
1200             mouse_events: 0; \
1201             description { state: "default" 0.0; \
1202                visible: 0; \
1203                min: 0 0; \
1204                fixed: 1 0; \
1205                align: 0.0 0.5; \
1206                rel1.to: "base"; \
1207                rel2.to: "base"; \
1208                rel2.relative: 0.0 1.0; \
1209             } \
1210          } \
1211
1212 #define GENLIST_PART_PADDING( NAME, SIZE, REL1, REL2 ) \
1213       GENLIST_PART_SPACER(NAME, \
1214          description { state: "default" 0.0; \
1215             min: SIZE 0; \
1216             max: SIZE -1; \
1217             fixed: 1 0; \
1218             align: 0.5 0.5; \
1219             rel1 { \
1220                relative: REL1; \
1221                to: "base"; \
1222             } \
1223             rel2 { \
1224                relative: REL2; \
1225                to: "base"; \
1226             } \
1227          } \
1228       )
1229
1230 #define GENLIST_DESCRIPTION_DECORATE_PADDING \
1231    description { state: "decorate" 0.0; \
1232       inherit: "default" 0.0; \
1233       min: 0 0; \
1234       max: 0 0; \
1235    }
1236
1237 #define GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1238    description { state: "decorate_reorder" 0.0; \
1239       inherit: "default" 0.0; \
1240       min: 0 0; \
1241       max: 0 0; \
1242    }
1243
1244 #define GENLIST_DESCRIPTION_REORDER_PADDING \
1245    description { state: "reorder" 0.0; \
1246       inherit: "default" 0.0; \
1247       min: 32 0; \
1248       max: 32 -1; \
1249    }
1250
1251 #define GENLIST_PART_PADDING_LEFT \
1252          GENLIST_PART_EXPANDED_PAD \
1253          GENLIST_PART_SPACER("elm.padding.left", \
1254             GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
1255                min: GENLIST_PADDING_SIZE_LEFT 0; \
1256                max: GENLIST_PADDING_SIZE_LEFT -1; \
1257                fixed: 1 0; \
1258             ) \
1259             GENLIST_DESCRIPTION_DECORATE_PADDING \
1260             GENLIST_DESCRIPTION_REORDER_PADDING \
1261             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1262          )
1263
1264 #define GENLIST_PART_PADDING_LEFT_SIZE( SIZE ) \
1265          GENLIST_PART_EXPANDED_PAD \
1266          GENLIST_PART_SPACER("elm.padding.left", \
1267             GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
1268                min: SIZE 0; \
1269                max: SIZE -1; \
1270                fixed: 1 0; \
1271             ) \
1272             GENLIST_DESCRIPTION_DECORATE_PADDING \
1273             GENLIST_DESCRIPTION_REORDER_PADDING \
1274             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1275          )
1276
1277 #define GENLIST_PART_EDITBTN \
1278    GENLIST_PART_SPACER("elm.padding.edit.right", \
1279       description { state: "default" 0.0; \
1280          fixed: 1 0; \
1281          align: 1.0 0.5; \
1282          rel1.relative: 1 0; \
1283          min: GENLIST_PADDING_SIZE_RIGHT 0; \
1284          max: GENLIST_PADDING_SIZE_RIGHT -1; \
1285       } \
1286    ) \
1287    GENLIST_PART_ICON("elm.icon.edit", \
1288       GENLIST_DESCRIPTION_R("elm.padding.edit.right", \
1289          visible: 0; \
1290       ) \
1291       description { state: "editmode" 0.0; \
1292          inherit: "default" 0.0; \
1293          visible: 1; \
1294          fixed: 1 1; \
1295          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
1296          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
1297       } \
1298    )
1299
1300 #define GENLIST_PART_PADDING_RIGHT \
1301          GENLIST_PART_SPACER("elm.padding.right", \
1302             description { state: "default" 0.0; \
1303                min: GENLIST_PADDING_SIZE_RIGHT 0; \
1304                max: GENLIST_PADDING_SIZE_RIGHT -1; \
1305                fixed: 1 0; \
1306                align: 1.0 0.5; \
1307                rel1.to: "base"; \
1308                rel2.to: "base"; \
1309                rel1.relative: 1 0; \
1310             } \
1311             GENLIST_DESCRIPTION_DECORATE_PADDING \
1312             GENLIST_DESCRIPTION_REORDER_PADDING \
1313             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1314          )
1315
1316 #define GENLIST_PART_PADDING_RIGHT_SIZE( SIZE ) \
1317          GENLIST_PART_SPACER("elm.padding.right", \
1318             description { state: "default" 0.0; \
1319                min: SIZE 0; \
1320                max: SIZE -1; \
1321                fixed: 1 0; \
1322                align: 1.0 0.5; \
1323                rel1.to: "base"; \
1324                rel2.to: "base"; \
1325                rel1.relative: 1 0; \
1326             } \
1327             GENLIST_DESCRIPTION_DECORATE_PADDING \
1328             GENLIST_DESCRIPTION_REORDER_PADDING \
1329             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1330          )
1331
1332 // FIXME: Use RECT instead of SPACER if this group is used on layout
1333 // for blocking events
1334 #define GENLIST_PART_PADDING_RIGHT_EDIT \
1335          GENLIST_PART_SPACER("elm.padding.right", \
1336             GENLIST_DESCRIPTION_R("elm.padding.right.edit", \
1337                min: DIALOGUE_PADDING_SIZE_RIGHT 0; \
1338                max: DIALOGUE_PADDING_SIZE_RIGHT -1; \
1339                fixed: 1 0; \
1340             ) \
1341             GENLIST_DESCRIPTION_DECORATE_PADDING \
1342             GENLIST_DESCRIPTION_REORDER_PADDING \
1343             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1344          ) \
1345          GENLIST_PART_SPACER("elm.padding.right.edit", \
1346             description { state: "default" 0.0; \
1347                min:0 0; \
1348                max: 0 -1; \
1349                fixed: 1 0; \
1350                align: 1.0 0.5; \
1351                rel1.relative: 1 0; \
1352             } \
1353             description { state: "editmode" 0.0; \
1354                inherit: "default" 0.0; \
1355                min: (GENLIST_PADDING_SIZE_DEFAULT+GENLIST_ICON_MEDIUM_SIZE) 0; \
1356                max: (GENLIST_PADDING_SIZE_DEFAULT+GENLIST_ICON_MEDIUM_SIZE) -1; \
1357             } \
1358          ) \
1359          GENLIST_PART_EDITBTN
1360
1361 #define GENLIST_PART_PADDING_TOP \
1362          GENLIST_PART_SPACER("elm.padding.top", \
1363             description { \
1364                state: "default" 0.0; \
1365                min: 0 GENLIST_PADDING_SIZE_TOP; \
1366                max: -1 GENLIST_PADDING_SIZE_TOP; \
1367                fixed: 0 1; \
1368                rel1.to: "base"; \
1369                rel2.to: "base"; \
1370                rel2.relative: 1.0 0.0; \
1371                align: 0.5 0.0; \
1372             } \
1373          )
1374
1375 #define GENLIST_PART_PADDING_TOP_2LINE \
1376          GENLIST_PART_SPACER("elm.padding.top", \
1377             description { \
1378                state: "default" 0.0; \
1379                min: 0 GENLIST_PADDING_SIZE_TOP_2LINE; \
1380                max: -1 GENLIST_PADDING_SIZE_TOP_2LINE; \
1381                fixed: 0 1; \
1382                rel1.to: "base"; \
1383                rel2.to: "base"; \
1384                rel2.relative: 1.0 0.0; \
1385                align: 0.5 0.0; \
1386             } \
1387          )
1388
1389 #define GENLIST_PART_PADDING_TOP_SIZE( SIZE ) \
1390          GENLIST_PART_SPACER("elm.padding.top", \
1391             description { \
1392                state: "default" 0.0; \
1393                min: 0 SIZE; \
1394                max: -1 SIZE; \
1395                fixed: 0 1; \
1396                rel1.to: "base"; \
1397                rel2.to: "base"; \
1398                rel2.relative: 1.0 0.0; \
1399                align: 0.5 0.0; \
1400             } \
1401          )
1402
1403 #define GENLIST_PART_PADDING_BOTTOM \
1404          GENLIST_PART_SPACER("elm.padding.bottom", \
1405             description { state: "default" 0.0; \
1406                min: 0 GENLIST_PADDING_SIZE_BOTTOM; \
1407                max: -1 GENLIST_PADDING_SIZE_BOTTOM; \
1408                fixed: 0 1; \
1409                rel1.to: "base"; \
1410                rel2.to: "base"; \
1411                rel1.relative: 0.0 1.0; \
1412                align: 0.5 1.0; \
1413             } \
1414          )
1415
1416 #define GENLIST_PART_PADDING_BOTTOM_2LINE \
1417          GENLIST_PART_SPACER("elm.padding.bottom", \
1418             description { state: "default" 0.0; \
1419                min: 0 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
1420                max: -1 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
1421                fixed: 0 1; \
1422                rel1.to: "base"; \
1423                rel2.to: "base"; \
1424                rel1.relative: 0.0 1.0; \
1425                align: 0.5 1.0; \
1426             } \
1427          )
1428
1429 #define GENLIST_PART_PADDING_BOTTOM_SIZE( SIZE ) \
1430          GENLIST_PART_SPACER("elm.padding.bottom", \
1431             description { state: "default" 0.0; \
1432                min: 0 SIZE; \
1433                max: -1 SIZE; \
1434                fixed: 0 1; \
1435                rel1.to: "base"; \
1436                rel2.to: "base"; \
1437                rel1.relative: 0.0 1.0; \
1438                align: 0.5 1.0; \
1439             } \
1440          )
1441
1442 #define GENLIST_PART_PADDING_R( NAME, RIGHT ) \
1443          GENLIST_PART_SPACER(NAME, \
1444             description { state: "default" 0.0; \
1445                fixed: 1 0; \
1446                min: GENLIST_PADDING_SIZE_DEFAULT 0; \
1447                max: GENLIST_PADDING_SIZE_DEFAULT -1; \
1448                align: 1 0.5; \
1449                rel1 { \
1450                   relative: 0 0; \
1451                   to_x: RIGHT; \
1452                } \
1453                rel2 { \
1454                   relative: 0 1; \
1455                   to_x: RIGHT; \
1456                } \
1457             } \
1458          )
1459
1460 #define GENLIST_PART_PADDING_R_SIZE( NAME, RIGHT, SIZE ) \
1461          GENLIST_PART_SPACER(NAME, \
1462             description { state: "default" 0.0; \
1463                fixed: 1 0; \
1464                min: SIZE 0; \
1465                max: SIZE -1; \
1466                align: 1 0.5; \
1467                rel1 { \
1468                   relative: 0 0; \
1469                   to_x: RIGHT; \
1470                } \
1471                rel2 { \
1472                   relative: 0 1; \
1473                   to_x: RIGHT; \
1474                } \
1475             } \
1476          )
1477
1478 #define GENLIST_PART_PADDING_L( NAME, LEFT ) \
1479          GENLIST_PART_SPACER(NAME, \
1480             description { state: "default" 0.0; \
1481                fixed: 1 0; \
1482                min: GENLIST_PADDING_SIZE_DEFAULT 0; \
1483                max: GENLIST_PADDING_SIZE_DEFAULT -1; \
1484                align: 0 0.5; \
1485                rel1 { \
1486                   relative: 1 0; \
1487                   to_x: LEFT; \
1488                } \
1489                rel2 { \
1490                   relative: 1 1; \
1491                   to_x: LEFT; \
1492                } \
1493             } \
1494          )
1495
1496 #define GENLIST_PART_PADDING_L_SIZE( NAME, LEFT, SIZE ) \
1497          GENLIST_PART_SPACER(NAME, \
1498             description { state: "default" 0.0; \
1499                fixed: 1 0; \
1500                min: SIZE 0; \
1501                max: SIZE -1; \
1502                align: 0 0.5; \
1503                rel1 { \
1504                   relative: 1 0; \
1505                   to_x: LEFT; \
1506                } \
1507                rel2 { \
1508                   relative: 1 1; \
1509                   to_x: LEFT; \
1510                } \
1511             } \
1512          )
1513
1514
1515 #define GENLIST_PART_PADDING_T_SIZE( NAME, TOP, SIZE ) \
1516          GENLIST_PART_SPACER(NAME, \
1517             description { state: "default" 0.0; \
1518                min: 0 SIZE; \
1519                max: -1 SIZE; \
1520                fixed: 0 1; \
1521                align: 0.5 0; \
1522                rel1 { \
1523                   relative: 0 1; \
1524                   to: TOP; \
1525                } \
1526                rel2 { \
1527                   relative: 1 1; \
1528                   to: TOP; \
1529                } \
1530             } \
1531          )
1532
1533 #define GENLIST_PART_PADDING_B_SIZE( NAME, BOTTOM, SIZE ) \
1534          GENLIST_PART_SPACER(NAME, \
1535             description { state: "default" 0.0; \
1536                min: 0 SIZE; \
1537                max: -1 SIZE; \
1538                fixed: 0 1; \
1539                align: 0.5 1; \
1540                rel1 { \
1541                   relative: 0.5 0; \
1542                   to: BOTTOM; \
1543                } \
1544                rel2 { \
1545                   relative: 0.5 0; \
1546                   to: BOTTOM; \
1547                } \
1548             } \
1549          )
1550
1551 #define GENLIST_PROGRAM_EXPAND_ROOT( TARGET ) \
1552          program { \
1553             name: "go_expanded"; \
1554             signal: "elm,state,expanded"; \
1555             source: "elm"; \
1556             action: STATE_SET "expand_opened" 0.0; \
1557             TARGET \
1558          } \
1559          program { \
1560             name: "go_contracted"; \
1561             signal: "elm,state,contracted"; \
1562             source: "elm"; \
1563             action: STATE_SET "default" 0.0; \
1564             TARGET \
1565          } \
1566
1567 // 2.2.7 Genlist_Edit mode (Rename)
1568 // FIXME: padding is not needed when swallow content is NULL.
1569 // But how can edje know existence of swallow content?
1570 #define GENLIST_PART_FLIP \
1571          GENLIST_PART_RECT("elm.flip.bg", \
1572             mouse_events: 0; \
1573             description { state: "default" 0.0;\
1574                color: 0 0 0 0;\
1575             } \
1576             description { state: "flipped" 0.0; \
1577                inherit: "default" 0.0; \
1578                color: GENLIST_LIST_BG_COLOR;\
1579             }\
1580          ) \
1581          GENLIST_PART_SPACER("elm.flip.padding.left",  \
1582             description { state: "default" 0.0; \
1583                min: 26 0; \
1584                max: 26 -1; \
1585                fixed: 1 0; \
1586                align: 0 0.5; \
1587                rel2.relative: 0 1; \
1588             } \
1589          ) \
1590          GENLIST_PART_SPACER("elm.flip.padding.right", \
1591             description { state: "default" 0.0; \
1592                min: 26 0; \
1593                max: 26 -1; \
1594                fixed: 1 0; \
1595                align: 1 0.5; \
1596                rel1.relative: 1 0; \
1597             } \
1598          ) \
1599          GENLIST_PART_ICON("elm.flip.content", \
1600             GENLIST_DESCRIPTION("elm.flip.padding.left", "elm.flip.padding.eraser.left",  \
1601                "elm.padding.top", "elm.padding.bottom", \
1602                visible: 0; \
1603                aspect: 1 1; \
1604             ) \
1605             description { state: "flipped" 0.0; \
1606                inherit: "default" 0.0; \
1607                visible: 1; \
1608             } \
1609          ) \
1610          GENLIST_PART_PADDING_R("elm.flip.padding.eraser.left", "elm.flip.eraser") \
1611          GENLIST_PART_ICON("elm.flip.eraser", \
1612             GENLIST_DESCRIPTION_RTB("elm.flip.padding.icon.left",  \
1613                "elm.padding.top", "elm.padding.bottom", \
1614                fixed: 1 0; \
1615                visible: 0; \
1616                min: GENLIST_ICON_ENTRY_SIZE GENLIST_ICON_ENTRY_SIZE; \
1617                max: GENLIST_ICON_ENTRY_SIZE GENLIST_ICON_ENTRY_SIZE; \
1618             ) \
1619             description { state: "show" 0.0; \
1620                inherit: "default" 0.0; \
1621                visible: 1; \
1622             } \
1623          ) \
1624          GENLIST_PART_PADDING_R("elm.flip.padding.icon.left", "elm.flip.icon") \
1625          GENLIST_PART_ICON( "elm.flip.icon", \
1626             GENLIST_DESCRIPTION_RTB("elm.flip.padding.right", \
1627                "elm.padding.top", "elm.padding.bottom", \
1628                visible: 0; \
1629                aspect: 1 1; \
1630                align: 1 0.5; \
1631                max: 154 74; \
1632             ) \
1633             description { state: "flipped" 0.0; \
1634                inherit: "default" 0.0; \
1635                visible: 1; \
1636             } \
1637          )
1638
1639 //****************************************************************************//
1640 // *******************************  Programs ********************************//
1641 //**************************************************************************//
1642 // signal: elm,state,%s,active
1643 //   a "check" item named %s went active
1644 // signal: elm,state,%s,passive
1645 //   a "check" item named %s went passive
1646 // default is passive
1647 #define GENLIST_PROGRAM_DEFAULT( TARGET ) \
1648          program { name: "default"; \
1649             signal: "elm,state,default"; \
1650             source: "elm"; \
1651             action: STATE_SET "default" 0.0; \
1652             TARGET \
1653          } \
1654
1655 #define GENLIST_PROGRAM_DISABLED( TARGET ) \
1656          program { name: "enabled"; \
1657             signal: "elm,state,enabled"; \
1658             source: "elm"; \
1659             action: STATE_SET "default" 0.0; \
1660             target: "base"; \
1661             TARGET \
1662          } \
1663          program { name: "disabled"; \
1664             signal: "elm,state,disabled"; \
1665             source: "elm"; \
1666             action: STATE_SET "disabled" 0.0; \
1667             target: "base"; \
1668             TARGET \
1669          }
1670
1671 // If check is swallowed, genlist selected/unselected should be synched with check.
1672 #define GENLIST_PROGRAM_CHECK(CHECK) \
1673          program { name: "selected"CHECK; \
1674             signal: "mouse,down,1"; \
1675             source: CHECK; \
1676             script { \
1677                new st[31]; \
1678                new Float:vl; \
1679                get_state(PART:"base", st, 30, vl); \
1680                if (strcmp(st, "disabled")) \
1681                   run_program(PROGRAM:"selected"); \
1682             } \
1683          } \
1684          program { name: "unselected"CHECK; \
1685             signal: "mouse,up,1"; \
1686             source: CHECK; \
1687             script { \
1688                new st[31]; \
1689                new Float:vl; \
1690                get_state(PART:"base", st, 30, vl); \
1691                if (strcmp(st, "disabled")) \
1692                   run_program(PROGRAM:"unselected"); \
1693             } \
1694          }
1695
1696 #define GENLIST_PROGRAM_SOUND( SRC ) \
1697          program { name: "play_sound"SRC; \
1698             signal: "mouse,clicked,1"; \
1699             source: SRC; \
1700             script { \
1701                new st[31]; \
1702                new Float:vl; \
1703                get_state(PART:"base", st, 30, vl); \
1704                if (strcmp(st, "disabled")) \
1705                   run_program(PROGRAM:"play_button_press"SRC); \
1706             } \
1707          } \
1708          program { name: "play_button_press"SRC; \
1709             action: PLAY_SAMPLE "button-pressed" 1.0; \
1710          }
1711
1712 #define GENLIST_PROGRAM_SELECT( TARGET ) \
1713          program { name: "selected"; \
1714             signal: "elm,state,selected"; \
1715             source: "elm"; \
1716             action: STATE_SET "selected" 0.0; \
1717             TARGET \
1718          } \
1719          program { name: "unselected"; \
1720             signal: "elm,state,unselected"; \
1721             source: "elm"; \
1722             action: STATE_SET "default" 0.0; \
1723             TARGET \
1724          }
1725
1726 #define GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
1727          program { name: "selected"; \
1728             signal: "elm,state,selected"; \
1729             source: "elm"; \
1730             script { \
1731                new st[31]; \
1732                new Float:vl; \
1733                get_state(PART:"bg_dialogue", st, 30, vl); \
1734                if (!strcmp(st, "top")) \
1735                   set_state(PART:"bg_dialogue", "top_selected", 0.0); \
1736                else if (!strcmp(st, "center")) \
1737                   set_state(PART:"bg_dialogue", "center_selected", 0.0); \
1738                else if (!strcmp(st, "bottom")) \
1739                   set_state(PART:"bg_dialogue", "bottom_selected", 0.0); \
1740                else if (!strcmp(st, "default")) \
1741                   set_state(PART:"bg_dialogue", "selected", 0.0); \
1742                run_program(PROGRAM:"target_selected"); \
1743             } \
1744          } \
1745          program { name: "unselected"; \
1746             signal: "elm,state,unselected"; \
1747             source: "elm"; \
1748             script { \
1749                new st[31]; \
1750                new Float:vl; \
1751                get_state(PART:"bg_dialogue", st, 30, vl); \
1752                if (!strcmp(st, "top_selected")) \
1753                   set_state(PART:"bg_dialogue", "top", 0.0); \
1754                else if (!strcmp(st, "center_selected"))  \
1755                   set_state(PART:"bg_dialogue", "center", 0.0); \
1756                else if (!strcmp(st, "bottom_selected"))  \
1757                   set_state(PART:"bg_dialogue", "bottom", 0.0); \
1758                else if (!strcmp(st, "selected")) \
1759                   set_state(PART:"bg_dialogue", "default", 0.0); \
1760                run_program(PROGRAM:"target_unselected"); \
1761             } \
1762          } \
1763          program { name: "target_selected"; \
1764             action: STATE_SET "selected" 0.0; \
1765             TARGET \
1766          }\
1767          program { name: "target_unselected"; \
1768             action: STATE_SET "default" 0.0; \
1769             TARGET \
1770          }\
1771          program { name: "bg_default"; \
1772             signal: "elm,state,default"; \
1773             source: "*"; \
1774             action: STATE_SET "default" 0.0; \
1775             target: "bg_dialogue"; \
1776          } \
1777          program { name: "bg_top"; \
1778             signal: "elm,state,top"; \
1779             source: "*"; \
1780             action: STATE_SET "top" 0.0; \
1781             target: "bg_dialogue"; \
1782          } \
1783          program { name: "bg_center"; \
1784             signal: "elm,state,center"; \
1785             source: "*"; \
1786             action: STATE_SET "center" 0.0; \
1787             target: "bg_dialogue"; \
1788          } \
1789          program { name: "bg_bottom"; \
1790             signal: "elm,state,bottom"; \
1791             source: "*"; \
1792             action: STATE_SET "bottom" 0.0; \
1793             target: "bg_dialogue"; \
1794          }
1795
1796 #define GENLIST_PROGRAM_SELECT_ARROW \
1797          program { name: "selected_arrow"; \
1798             signal: "elm,state,selected"; \
1799             source: "elm"; \
1800             script { \
1801                new st[31]; \
1802                new Float:vl; \
1803                get_state(PART:"arrow", st, 30, vl); \
1804                if (!strcmp(st, "default")) { \
1805                   set_state(PART:"arrow", "default_press", 0.0); \
1806                   set_state(PART:"arrow_clip", "default_press", 0.0); \
1807                } \
1808                else if (!strcmp(st, "expand_opened")) { \
1809                   set_state(PART:"arrow", "expand_opened_press", 0.0); \
1810                   set_state(PART:"arrow_clip", "expand_opened_press", 0.0); \
1811                } \
1812             } \
1813          } \
1814          program { name: "unselected_arrow"; \
1815             signal: "elm,state,unselected"; \
1816             source: "elm"; \
1817             script { \
1818                new st[31]; \
1819                new Float:vl; \
1820                get_state(PART:"arrow", st, 30, vl); \
1821                if (!strcmp(st, "default_press")) { \
1822                   set_state(PART:"arrow", "default", 0.0); \
1823                   set_state(PART:"arrow_clip", "default", 0.0); \
1824                } \
1825                else if (!strcmp(st, "expand_opened_press")) { \
1826                   set_state(PART:"arrow", "expand_opened", 0.0); \
1827                   set_state(PART:"arrow_clip", "expand_opened", 0.0); \
1828                } \
1829             } \
1830          }
1831
1832 #define GENLIST_PROGRAM_DECORATE( TARGET ) \
1833          program { name: "decorate_enabled_effect"; \
1834             signal: "elm,state,decorate,enabled,effect";\
1835             source: "elm";\
1836             action:  STATE_SET "decorate" 0.0;\
1837             TARGET \
1838          }\
1839          program { name: "decorate_disabled_effect";\
1840             signal: "elm,state,decorate,disabled,effect";\
1841             source: "elm";\
1842             action: STATE_SET "default" 0.0; \
1843             TARGET \
1844          }\
1845          program { name: "decorate_enabled";\
1846             signal: "elm,state,decorate,enabled";\
1847             source: "elm";\
1848             action:  STATE_SET "decorate" 0.0;\
1849             TARGET \
1850          }\
1851          program { name: "decorate_disabled";\
1852             signal: "elm,state,decorate,disabled";\
1853             source: "elm";\
1854             action:  STATE_SET "default" 0.0;\
1855             TARGET \
1856          }
1857
1858 #define GENLIST_PROGRAM_REORDER( TARGET ) \
1859          program { name: "reorder_enabled"; \
1860             signal: "elm,state,reorder,mode_set"; \
1861             source: "elm"; \
1862             action: STATE_SET "reorder" 0.0; \
1863             TARGET \
1864          } \
1865          program { name: "reorder_disabled"; \
1866             signal: "elm,state,reorder,mode_unset"; \
1867             source: "elm"; \
1868             action: STATE_SET "default" 0.0; \
1869             TARGET \
1870          }
1871
1872 #define GENLIST_PROGRAM_DECORATE_REORDER( NAME, TARGET ) \
1873          program { name: "reorder_enabled"NAME; \
1874             signal: "elm,state,reorder,mode_set"; \
1875             source: "elm"; \
1876             script { \
1877                new st[31]; \
1878                new Float:vl; \
1879                get_state(PART:"state", st, 30, vl); \
1880                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1881                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1882                } else { \
1883                   run_program(PROGRAM:"reorder_set"NAME); \
1884                } \
1885             } \
1886          } \
1887          program { name: "reorder_disabled"NAME; \
1888             signal: "elm,state,reorder,mode_unset"; \
1889             source: "elm"; \
1890             script { \
1891                new st[31]; \
1892                new Float:vl; \
1893                get_state(PART:"state", st, 30, vl); \
1894                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1895                   run_program(PROGRAM:"decorate_set"NAME); \
1896                } else { \
1897                   run_program(PROGRAM:"default_set"NAME); \
1898                } \
1899             } \
1900          } \
1901          program { name: "decorate_enabled_effect"NAME; \
1902             signal: "elm,state,decorate,enabled,effect";\
1903             source: "elm";\
1904             script { \
1905                new st[31]; \
1906                new Float:vl; \
1907                get_state(PART:"state", st, 30, vl); \
1908                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1909                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1910                } else { \
1911                   run_program(PROGRAM:"decorate_set"NAME); \
1912                } \
1913             } \
1914          }\
1915          program { name: "decorate_disabled_effect"NAME;\
1916             signal: "elm,state,decorate,disabled,effect";\
1917             source: "elm";\
1918             script { \
1919                new st[31]; \
1920                new Float:vl; \
1921                get_state(PART:"state", st, 30, vl); \
1922                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1923                   run_program(PROGRAM:"reorder_set"NAME); \
1924                } else { \
1925                   run_program(PROGRAM:"default_set"NAME); \
1926                } \
1927             } \
1928          }\
1929          program { name: "decorate_enabled"NAME;\
1930             signal: "elm,state,decorate,enabled";\
1931             source: "elm";\
1932             script { \
1933                new st[31]; \
1934                new Float:vl; \
1935                get_state(PART:"state", st, 30, vl); \
1936                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1937                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1938                } else { \
1939                   run_program(PROGRAM:"decorate_set"NAME); \
1940                } \
1941             } \
1942          }\
1943          program { name: "decorate_disabled"NAME;\
1944             signal: "elm,state,decorate,disabled";\
1945             source: "elm";\
1946             script { \
1947                new st[31]; \
1948                new Float:vl; \
1949                get_state(PART:"state", st, 30, vl); \
1950                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1951                   run_program(PROGRAM:"reorder_set"NAME); \
1952                } else { \
1953                   run_program(PROGRAM:"default_set"NAME); \
1954                } \
1955             } \
1956          } \
1957          program { name: "default_set"NAME; \
1958             action: STATE_SET "default" 0.0;\
1959             target: "state"; \
1960             TARGET \
1961          } \
1962          program { name: "decorate_set"NAME; \
1963             action: STATE_SET "decorate" 0.0;\
1964             target: "state"; \
1965             TARGET \
1966          } \
1967          program { name: "reorder_set"NAME; \
1968             action: STATE_SET "reorder" 0.0;\
1969             target: "state"; \
1970             TARGET \
1971          } \
1972          program { name: "decorate_reorder_set"NAME; \
1973             action: STATE_SET "decorate_reorder" 0.0;\
1974             target: "state"; \
1975             TARGET \
1976          }
1977
1978 #define GENLIST_PROGRAM_FLIP \
1979          program { name: "flip_enabled"; \
1980             signal:  "elm,state,flip,enabled"; \
1981             source:  "elm"; \
1982             transition: DECELERATE 0.5; \
1983             action:  STATE_SET "flipped" 0.0; \
1984             target: "elm.flip.content"; \
1985             target: "elm.flip.icon"; \
1986          } \
1987          program { name: "flip_disabled"; \
1988             signal:  "elm,state,flip,disabled"; \
1989             source:  "elm"; \
1990             transition: DECELERATE 0.5; \
1991             action:  STATE_SET "default" 0.0; \
1992             target: "elm.flip.content"; \
1993             target: "elm.flip.icon"; \
1994          } \
1995          program { name: "flip_enabled_bg"; \
1996             signal:  "elm,state,flip,enabled"; \
1997             source:  "elm"; \
1998             action:  STATE_SET "flipped" 0.0; \
1999             target: "elm.flip.bg"; \
2000          } \
2001          program { name: "flip_disabled_bg"; \
2002             signal:  "elm,state,flip,disabled"; \
2003             source:  "elm"; \
2004             action:  STATE_SET "default" 0.0; \
2005             target: "elm.flip.bg"; \
2006          } \
2007          program { \
2008             signal: "elm,state,eraser,show"; \
2009             action: STATE_SET "show" 0.0; \
2010             target: "elm.flip.eraser"; \
2011          } \
2012          program { \
2013             signal: "elm,state,eraser,hide"; \
2014             action: STATE_SET "default" 0.0; \
2015             target: "elm.flip.eraser"; \
2016          }
2017
2018 #define GENLIST_PROGRAM_FLIP_TARGET( TARGET ) \
2019          program { name: "flip_enabled_target"; \
2020             signal:  "elm,state,flip,enabled"; \
2021             source:  "elm"; \
2022             action:  STATE_SET "flipped" 0.0; \
2023             TARGET \
2024          } \
2025          program { name: "flip_disabled_target"; \
2026             signal:  "elm,state,flip,disabled"; \
2027             source:  "elm"; \
2028             action:  STATE_SET "default" 0.0; \
2029             TARGET \
2030          }
2031
2032 #define GENLIST_PROGRAM_FLIP_EFFECT_TARGET( TARGET ) \
2033          program { name: "flip_enabled_effect"; \
2034             signal:  "elm,state,flip,enabled"; \
2035             source:  "elm"; \
2036             transition: DECELERATE 0.5; \
2037             action:  STATE_SET "flipped" 0.0; \
2038             TARGET \
2039          } \
2040          program { name: "flip_disabled_effect"; \
2041             signal:  "elm,state,flip,disabled"; \
2042             source:  "elm"; \
2043             transition: DECELERATE 0.5; \
2044             action:  STATE_SET "default" 0.0; \
2045             TARGET \
2046          }
2047
2048 #define GENLIST_PROGRAM_EDITMODE \
2049    program { name: "edit_enabled"; \
2050       signal:  "elm,state,edit,enabled"; \
2051       source:  "*"; \
2052       action:  STATE_SET "editmode" 0.0; \
2053       target: "elm.padding.right.edit"; \
2054       target: "elm.icon.edit"; \
2055       target: "bg_dialogue_right"; \
2056    } \
2057    program { name: "edit_disabled"; \
2058       signal:  "elm,state,edit,disabled"; \
2059       source:  "*"; \
2060       action:  STATE_SET "default" 0.0; \
2061       target: "elm.padding.right.edit"; \
2062       target: "elm.icon.edit"; \
2063       target: "bg_dialogue_right"; \
2064    }
2065
2066 /***************************************************************************/
2067 /***************************************************************************/
2068
2069 #define GENLIST_PROGRAMS_NORMAL( TARGET ) \
2070    programs { \
2071       GENLIST_PROGRAM_DEFAULT( TARGET \
2072          target: "bg"; \
2073          target: "bg_clip"; \
2074          target: "bottom_line"; \
2075          target: "bottom_line2"; \
2076          target: "bottom_line_clip"; \
2077          target: "bg_reorder"; \
2078          target: "elm.padding.left"; \
2079          target: "elm.padding.right"; \
2080       ) \
2081       GENLIST_PROGRAM_DISABLED( TARGET \
2082          target: "bg"; \
2083          target: "bottom_line"; \
2084          target: "bottom_line2"; \
2085          target: "bg_reorder"; \
2086       ) \
2087       GENLIST_PROGRAM_SELECT( TARGET \
2088          target: "bg"; \
2089          target: "bottom_line"; \
2090          target: "bottom_line2"; \
2091          target: "bg_reorder"; \
2092       ) \
2093       GENLIST_PROGRAM_SOUND( "bg" ) \
2094       GENLIST_PROGRAM_SOUND( "bg_reorder" ) \
2095       GENLIST_PROGRAM_DECORATE_REORDER("normal", TARGET \
2096          target: "bg_clip"; \
2097          target: "bg_reorder_clip"; \
2098          target: "bottom_line_clip"; \
2099          target: "elm.padding.left"; \
2100          target: "elm.padding.right"; \
2101       ) \
2102       GENLIST_PROGRAM_FLIP \
2103    }
2104
2105 // FIXME: inheritance !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
2106 // if GENLIST_PROGRAM_EXPAND is here, expanda effect is something wrong.
2107 // because after can be duplicated when program inheriting.
2108 #define GENLIST_PROGRAMS_DIALOGUE( TARGET ) \
2109    programs { \
2110       GENLIST_PROGRAM_DEFAULT( TARGET \
2111          target: "bg_dialogue"; \
2112          target: "bg_dialogue_clip"; \
2113          target: "elm.padding.left"; \
2114          target: "elm.padding.right"; \
2115       ) \
2116       GENLIST_PROGRAM_DISABLED( TARGET ) \
2117       GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
2118       program { name: "bg_color_change"; \
2119          signal: "bg_color_change"; \
2120          source: "elm"; \
2121          action: STATE_SET "2depth" 0.0; \
2122          target: "bg_dialogue_clip"; \
2123       } \
2124       GENLIST_PROGRAM_SOUND("bg_dialogue") \
2125       GENLIST_PROGRAM_DECORATE_REORDER( "normal", TARGET \
2126          target: "elm.padding.left"; \
2127          target: "elm.padding.right"; \
2128       ) \
2129       GENLIST_PROGRAM_FLIP \
2130       GENLIST_PROGRAM_EDITMODE \
2131    }
2132
2133 #define GENLIST_PROGRAMS_READ_TEXT( TARGET ) \
2134    programs { \
2135       GENLIST_PROGRAM_DEFAULT( TARGET \
2136          target: "bg"; \
2137          target: "bg_clip"; \
2138          target: "bottom_line"; \
2139          target: "bottom_line2"; \
2140          target: "bottom_line_clip"; \
2141          target: "bg_reorder"; \
2142          target: "elm.padding.left"; \
2143          target: "elm.padding.right"; \
2144       ) \
2145       GENLIST_PROGRAM_DISABLED( TARGET \
2146          target: "bg"; \
2147          target: "bottom_line"; \
2148          target: "bottom_line2"; \
2149          target: "bg_reorder"; \
2150       ) \
2151       GENLIST_PROGRAM_SELECT( TARGET \
2152          target: "bg"; \
2153          target: "bottom_line"; \
2154          target: "bottom_line2"; \
2155          target: "bg_reorder"; \
2156       ) \
2157       GENLIST_PROGRAM_SOUND("bg") \
2158       GENLIST_PROGRAM_DECORATE_REORDER( "normal", \
2159          target: "bg_clip"; \
2160          target: "bg_reorder_clip"; \
2161          target: "bottom_line_clip"; \
2162          target: "elm.padding.left"; \
2163          target: "elm.padding.right"; \
2164       ) \
2165       program { name: "unselected_target"; \
2166          action: STATE_SET "default" 0.0; \
2167          TARGET \
2168       } \
2169       program { name: "unselected_read"; \
2170          signal: "elm,state,unselected"; \
2171          source: "elm"; \
2172          script { \
2173             if (get_int(readed) == 1) \
2174                run_program(PROGRAM:"go_read_target"); \
2175             else \
2176                run_program(PROGRAM:"unselected_target"); \
2177          } \
2178       } \
2179       program { name: "go_read"; \
2180          signal: "elm,state,read"; \
2181          source: "*"; \
2182          script { \
2183            set_int(readed, 1); \
2184            run_program(PROGRAM:"go_read_target"); \
2185          } \
2186       } \
2187       program { name: "go_unread"; \
2188          signal: "elm,state,unread"; \
2189          source: "*"; \
2190          script { \
2191            set_int(readed, 0); \
2192            run_program(PROGRAM:"go_unread_target"); \
2193          } \
2194       } \
2195       program { name: "go_read_target"; \
2196          action: STATE_SET "read" 0.0; \
2197          TARGET \
2198       } \
2199       program { name: "go_unread_target"; \
2200          action: STATE_SET "unread" 0.0; \
2201          TARGET \
2202       } \
2203    }
2204
2205 #define GENLIST_PROGRAMS_DECORATE_EFFECT( TARGET ) \
2206    program { name: "decorate_enabled_effect_ef"; \
2207       signal: "elm,state,decorate,enabled,effect";\
2208       source: "elm";\
2209       transition: DECELERATE 0.5;\
2210       action:  STATE_SET "decorate" 0.0;\
2211       TARGET \
2212    }\
2213    program { name: "decorate_disabled_effect_ef";\
2214       signal: "elm,state,decorate,disabled,effect";\
2215       source: "elm";\
2216       transition: ACCELERATE 0.5;\
2217       action:  STATE_SET "default" 0.0;\
2218       TARGET \
2219    } \
2220    program { name: "decorate_enabled_ef";\
2221       signal: "elm,state,decorate,enabled";\
2222       source: "elm";\
2223       action:  STATE_SET "decorate" 0.0;\
2224       TARGET \
2225    }\
2226    program { name: "decorate_disabled_ef";\
2227       signal: "elm,state,decorate,disabled";\
2228       source: "elm";\
2229       action:  STATE_SET "default" 0.0;\
2230       TARGET \
2231    }
2232
2233 #define GENLIST_PROGRAMS_ENTRY \
2234    program { \
2235       signal: "elm,state,eraser,show"; \
2236       action: STATE_SET "show" 0.0; \
2237       target: "elm.icon.eraser"; \
2238    } \
2239    program { \
2240       signal: "elm,state,eraser,hide"; \
2241       action: STATE_SET "default" 0.0; \
2242       target: "elm.icon.eraser"; \
2243    } \
2244     program { \
2245       signal: "elm,state,rename,show"; \
2246       action: STATE_SET "default" 0.0; \
2247       target: "elm.image.rename"; \
2248    } \
2249    program { \
2250       signal: "elm,state,rename,hide"; \
2251       action: STATE_SET "hide" 0.0; \
2252       target: "elm.image.rename"; \
2253    }
2254
2255 #define GENLIST_PROGRAMS_THUMB \
2256    GENLIST_PROGRAM_DECORATE_REORDER( "thumb", target: "elm.thumb"; ) \
2257    GENLIST_PROGRAM_FLIP_TARGET( target: "elm.thumb.clip"; ) \
2258    program { name: "enabled_thumb"; \
2259       signal: "elm,state,enabled"; \
2260       source: "elm"; \
2261       action: STATE_SET "default" 0.0; \
2262       target: "base"; \
2263       target: "elm.thumb"; \
2264    } \
2265    program { name: "disabled_thumb"; \
2266       signal: "elm,state,disabled"; \
2267       source: "elm"; \
2268       action: STATE_SET "disabled" 0.0; \
2269       target: "base"; \
2270       target: "elm.thumb"; \
2271    } \
2272    program { name: "selected_thumb"; \
2273       signal: "elm,state,selected"; \
2274       source: "elm"; \
2275       script { \
2276          new st[31]; \
2277          new Float:vl; \
2278          get_state(PART:"elm.thumb", st, 30, vl); \
2279          if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) \
2280             set_state(PART:"elm.thumb", "reorder_selected", 0.0); \
2281          else \
2282             set_state(PART:"elm.thumb", "selected", 0.0); \
2283       } \
2284    } \
2285    program { name: "unselected_thumb"; \
2286       signal: "elm,state,unselected"; \
2287       source: "elm"; \
2288       script { \
2289          new st[31]; \
2290          new Float:vl; \
2291          get_state(PART:"elm.thumb", st, 30, vl); \
2292          if (!strcmp(st, "reorder_selected")) \
2293             set_state(PART:"elm.thumb", "reorder", 0.0); \
2294          else \
2295             set_state(PART:"elm.thumb", "default", 0.0); \
2296       } \
2297    }
2298
2299 //****************************************************************************//
2300 // *******************************  Icon Part ******************************//
2301 //***************************************************************************//
2302 #define GENLIST_PART_ICON(NAME, DESCRIPION) \
2303    part { name: NAME; \
2304       scale: 1; \
2305       type: SWALLOW; \
2306       DESCRIPION \
2307    }
2308
2309 #define GENLIST_PARAM_ICON_BIG \
2310          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
2311          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE;
2312
2313 #define GENLIST_PARAM_ICON_SMALL \
2314          min: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE; \
2315          max: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE;
2316
2317 #define GENLIST_PARAM_ICON_BTN_01 \
2318          min: 0 GENLIST_BTN_01_HEIGHT; \
2319          max: -1 GENLIST_BTN_01_HEIGHT;
2320
2321 #define GENLIST_PARAM_ICON_BTN_02 \
2322          min: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE; \
2323          max: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE;
2324
2325 #define GENLIST_PARAM_ICON_ONOFF_WIDTH \
2326          min: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT; \
2327          max: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT;
2328
2329 #define GENLIST_PARAM_ICON_THUMBNAIL1\
2330          min: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE; \
2331          max: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE;
2332
2333 #define GENLIST_PARAM_ICON_CHECK_RADIO \
2334          min: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE; \
2335          max: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE;
2336
2337 #define GENLIST_PARAM_ICON_STAR \
2338          min: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2339          max: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2340
2341 #define GENLIST_PART_ICON_BIG_R(NAME, RIGHT) \
2342    GENLIST_PART_ICON(NAME, \
2343       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2344          fixed: 1 1; \
2345          GENLIST_PARAM_ICON_BIG \
2346       ) \
2347    )
2348
2349 #define GENLIST_PART_ICON_BIG_L(NAME, LEFT) \
2350    GENLIST_PART_ICON(NAME, \
2351       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2352          GENLIST_PARAM_ICON_BIG \
2353          fixed: 1 1; \
2354       ) \
2355    )
2356
2357 #define GENLIST_PART_ICON_SMALL_L(NAME, LEFT) \
2358    GENLIST_PART_ICON(NAME, \
2359       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2360          GENLIST_PARAM_ICON_SMALL \
2361          fixed: 1 1; \
2362       ) \
2363    )
2364
2365 #define GENLIST_PART_ICON_SMALL_LB(NAME, LEFT, BOTTOM) \
2366    GENLIST_PART_ICON(NAME, \
2367       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
2368         GENLIST_PARAM_ICON_SMALL \
2369         fixed: 1 1; \
2370       ) \
2371    )
2372
2373 #define GENLIST_PART_ICON_SMALL_LTB(NAME, LEFT, TOP, BOTTOM) \
2374    GENLIST_PART_ICON(NAME, \
2375       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
2376          GENLIST_PARAM_ICON_SMALL \
2377          fixed: 1 1; \
2378       ) \
2379    )
2380
2381 #define GENLIST_PART_ICON_SMALL_RTB(NAME, RIGHT, TOP, BOTTOM) \
2382    GENLIST_PART_ICON(NAME, \
2383       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2384          GENLIST_PARAM_ICON_SMALL \
2385          fixed: 1 1; \
2386       ) \
2387    )
2388
2389 #define GENLIST_PART_ICON_BTN_01_RTB(NAME, RIGHT, TOP, BOTTOM) \
2390    GENLIST_PART_ICON(NAME, \
2391       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2392          GENLIST_PARAM_ICON_BTN_01 \
2393          fixed: 1 1; \
2394       ) \
2395    )
2396
2397 #define GENLIST_PART_ICON_BTN_02_RTB(NAME, RIGHT, TOP, BOTTOM) \
2398    GENLIST_PART_ICON(NAME, \
2399       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2400          GENLIST_PARAM_ICON_BTN_02 \
2401          fixed: 1 1; \
2402       ) \
2403    )
2404
2405 #define GENLIST_PART_ICON_BTN_ONOFF_R(NAME, RIGHT) \
2406    GENLIST_PART_ICON(NAME, \
2407       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2408          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2409          fixed: 1 1; \
2410       ) \
2411    )
2412
2413 #define GENLIST_PART_ICON_BTN_ONOFF_L(NAME, LEFT) \
2414    GENLIST_PART_ICON(NAME, \
2415       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2416          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2417          fixed: 1 1; \
2418       ) \
2419    )
2420
2421 #define GENLIST_PART_ICON_THUMBNAIL1_R(NAME, RIGHT) \
2422    GENLIST_PART_ICON(NAME, \
2423       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2424          GENLIST_PARAM_ICON_THUMBNAIL1 \
2425          fixed: 1 1; \
2426       ) \
2427    )
2428
2429 #define GENLIST_PART_ICON_CHECK_RADIO_L(NAME, LEFT) \
2430    GENLIST_PART_ICON(NAME, \
2431       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2432          GENLIST_PARAM_ICON_CHECK_RADIO \
2433          fixed: 1 1; \
2434       ) \
2435    )
2436
2437 #define GENLIST_PART_ICON_STAR_RTB(NAME, RIGHT, TOP, BOTTOM) \
2438    GENLIST_PART_ICON(NAME, \
2439       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2440          GENLIST_PARAM_ICON_STAR \
2441          fixed: 1 1; \
2442       ) \
2443    )
2444
2445 /*****************************************************************************/
2446 /******************************* Genlist IMAGE ********************************/
2447 /*****************************************************************************/
2448 #define GENLIST_PART_IMAGE(NAME, DESCRIPION) \
2449    part { name: NAME; \
2450       scale: 1; \
2451       type: IMAGE; \
2452       DESCRIPION \
2453    }
2454
2455 #define GENLIST_PARAM_PASSWORD_IMAGE \
2456             min: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2457             max: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2458             image.normal: "00_search_edit_field_bg_02.png"; \
2459             image.border: 12 13 12 13; \
2460             image.border_scale: 1;
2461
2462 /*****************************************************************************/
2463 /******************************* Genlist Bubble ********************************/
2464 /*****************************************************************************/
2465 #define GENLIST_IMAGES_EXPANDABLE_BTN \
2466          images { \
2467             image: "00_button_expand_closed.png" COMP; \
2468             image: "00_button_expand_opened.png" COMP; \
2469          }
2470
2471 #define GENLIST_PART_EXPANDABLE_ARROW \
2472          GENLIST_PART_ICON("touch_arrow", \
2473             ignore_flags: ON_HOLD; \
2474             GENLIST_DESCRIPTION_ENVELOP("arrow", ) \
2475          ) \
2476          GENLIST_PART_RECT("arrow_clip", \
2477             GENLIST_DESCRIPTION_ENVELOP("arrow", \
2478                color: 101 101 101 255; \
2479             ) \
2480             description { state: "disabled" 0.0; \
2481                color: 101 101 101 76; \
2482             } \
2483             description { state: "expand_opened_press" 0.0; \
2484                color: 248 246 239 255; \
2485             } \
2486             description { state: "default_press" 0.0; \
2487                color: 248 246 239 255; \
2488             } \
2489          ) \
2490          GENLIST_PART_IMAGE("arrow", \
2491             clip_to: "arrow_clip"; \
2492             ignore_flags: ON_HOLD; \
2493             mouse_events: 0; \
2494             GENLIST_DESCRIPTION_R("elm.padding.right", \
2495                fixed: 1 1; \
2496                min: 45 45; \
2497                max: 45 45; \
2498                image.normal: "00_button_expand_closed.png"; \
2499             ) \
2500             description { state: "default_press" 0.0; \
2501                inherit: "default" 0.0; \
2502                image.normal: "00_button_expand_closed_press.png"; \
2503             } \
2504             description { state: "expand_opened" 0.0; \
2505                inherit: "default" 0.0; \
2506                image.normal: "00_button_expand_opened.png"; \
2507             } \
2508             description { state: "expand_opened_press" 0.0; \
2509                inherit: "expand_opened" 0.0; \
2510                image.normal: "00_button_expand_opened_press.png"; \
2511             } \
2512          )
2513 /*****************************************************************************/
2514 /******************************* Genlist RECT ********************************/
2515 /*****************************************************************************/
2516 #define GENLIST_PART_SPACER(NAME, DESCRIPION) \
2517     part { name: NAME; \
2518       scale: 1; \
2519       mouse_events: 0; \
2520       type: SPACER; \
2521       DESCRIPION \
2522    }
2523
2524 #define GENLIST_PART_RECT(NAME, DESCRIPION) \
2525     part { name: NAME; \
2526       scale: 1; \
2527       type: RECT; \
2528       DESCRIPION \
2529    }
2530
2531 /*****************************************************************************/
2532 /******************************* Genlist TEXT ********************************/
2533 /*****************************************************************************/
2534 #define GENLIST_PART_TEXT(NAME, DESCRIPION) \
2535     part { name: NAME; \
2536       scale: 1; \
2537       mouse_events: 0; \
2538       type: TEXT; \
2539       DESCRIPION \
2540    }
2541
2542 #define GENLIST_PART_TEXTBLOCK(NAME, DESCRIPION) \
2543     part { name: NAME; \
2544       scale: 1; \
2545       mouse_events: 0; \
2546       type: TEXTBLOCK; \
2547       DESCRIPION \
2548    }
2549
2550 /*************************** parameters **********************************/
2551 #define GENLIST_PARAM_TEXT_LIMIT_RB \
2552    rel1.to_x: "base"; /* This limits text growing. */\
2553    rel1.relative: 0.35 0; /* This limits text growing. */\
2554    text.max: 1 0; /* This limits text growing. */
2555
2556 #define GENLIST_PARAM_TEXT_LIMIT_RT \
2557    rel1.to_x: "base"; /* This limits text growing. */\
2558    rel1.relative: 0.35 1; /* This limits text growing. */\
2559    text.max: 1 0; /* This limits text growing. */
2560
2561 #define GENLIST_PARAM_TEXT_LIMIT_RTB \
2562    rel1.to_x: "base"; /* This limits text growing. */\
2563    rel1.relative: 0.35 1; /* This limits text growing. */\
2564    text.max: 1 0; /* This limits text growing. */
2565
2566 // Group Title
2567 #define GENLIST_PARAM_DIALOGUE_GROUP_TITLE \
2568    color: GENLIST_DIALOGUE_GROUP_TITLE_COLOR; \
2569    text { \
2570       align: 0.0 0.5; \
2571       font: "Tizen:style=Bold"; \
2572       min: 0 1; \
2573       size: GENLIST_DIALOGUE_GROUP_TITLE_SIZE; \
2574       text_class: "list_item"; \
2575    }
2576
2577 // Password style
2578 #define GENLIST_PARAM_PASSWORD_TITLE \
2579    color: DIALOGUE_PASSWORD_TITLE_COLOR; \
2580    text { \
2581       font: "Tizen:style=Bold"; \
2582       size: DIALOGUE_PASSWORD_TITLE_SIZE; \
2583       min: 0 1; \
2584       align: 0 0.5; \
2585       text_class: "list_item"; \
2586    }
2587
2588 // Progress main text
2589 #define GENLIST_PARAM_PROGRESS_MAIN \
2590    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2591    text { \
2592       align: 0 0.5; \
2593       min: 0 1; \
2594       font: "Tizen:style=Regular"; \
2595       size: GENLIST_PROGRESS_MAIN_TEXT_SIZE; \
2596       text_class: "list_item"; \
2597    }
2598
2599 // list main text
2600 #define GENLIST_PARAM_LISTITEM \
2601    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2602    text { \
2603       align: 0 0.5; \
2604       min: 0 1; \
2605       font: "Tizen:style=Regular"; \
2606       size: GENLIST_LIST_MAIN_TEXT_SIZE; \
2607       text_class: "list_item"; \
2608    }
2609
2610 #define GENLIST_PARAM_LISTITEM_TB \
2611    text { \
2612       min: 0 1; \
2613       style: "genlist_style_list_main_text_unread"; \
2614    }
2615
2616 #define GENLIST_PARAM_LISTITEM_TB_WRAP \
2617    text { \
2618       min: 0 1; \
2619       style: "genlist_style_list_main_text_unread_wrap"; \
2620    }
2621
2622 // list subtext
2623 #define GENLIST_PARAM_SUBITEM_DEFAULT \
2624    color: GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR; \
2625    text { \
2626       align: 0 0.5; \
2627       min: 0 1; \
2628       font: "Tizen:style=Medium"; \
2629       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2630       text_class: "tizen"; \
2631    }
2632
2633 #define GENLIST_PARAM_SUBITEM_SETTINGS \
2634    color: GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR; \
2635    text { \
2636       align: 0 0.5; \
2637       min: 0 1; \
2638       font: "Tizen:style=Medium"; \
2639       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2640       text_class: "tizen"; \
2641    }
2642
2643 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2644    text { \
2645       min: 0 1; \
2646       style: "genlist_style_list_sub_text_default"; \
2647    }
2648
2649 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP \
2650    text { \
2651       min: 0 1; \
2652       style: "genlist_style_list_sub_text_default_wrap"; \
2653    }
2654
2655 #define GENLIST_PARAM_SUBITEM_SETTINGS_TB \
2656    text { \
2657       min: 0 1; \
2658       style: "genlist_style_list_sub_text_settings"; \
2659    }
2660
2661 #define GENLIST_PARAM_APPS_NAME\
2662    color: GENLIST_APPS_NAME_COLOR; \
2663    text { \
2664       align: 0 0.5; \
2665       min: 0 1; \
2666       font: "Tizen:style=Bold"; \
2667       size: GENLIST_APPS_NAME_SIZE; \
2668       text_class: "list_item"; \
2669    }
2670
2671 #define GENLIST_PARAM_APPS_INC\
2672    color: GENLIST_APPS_INC_COLOR; \
2673    text { \
2674       align: 0 0.5; \
2675       min: 0 1; \
2676       font: "Tizen:style=Bold"; \
2677       size: GENLIST_APPS_INC_SIZE; \
2678       text_class: "list_item"; \
2679    }
2680
2681 #define GENLIST_PARAM_APPS_RATING\
2682    color: GENLIST_APPS_RATING_COLOR; \
2683    text { \
2684       align: 0 0.5; \
2685       min: 0 1; \
2686       font: "Tizen:style=Bold"; \
2687       size: GENLIST_APPS_RATING_SIZE; \
2688       text_class: "list_item"; \
2689    }
2690
2691 #define GENLIST_PARAM_APPS_PRICE\
2692    color: GENLIST_APPS_PRICE_ORIGINAL_COLOR; \
2693    text { \
2694       align: 0 0.5; \
2695       min: 0 1; \
2696       font: "Tizen:style=Bold"; \
2697       size: GENLIST_APPS_PRICE_SIZE; \
2698       text_class: "list_item"; \
2699    }
2700
2701 #define GENLIST_PARAM_APPS_PRICE_SALE\
2702    color: GENLIST_APPS_PRICE_SALE_COLOR; \
2703    text { \
2704       align: 0 0.5; \
2705       min: 0 1; \
2706       font: "Tizen:style=Bold"; \
2707       size: GENLIST_APPS_PRICE_SIZE; \
2708       text_class: "list_item"; \
2709    }
2710
2711 #define GENLIST_PARAM_CONTENTS_TEXT \
2712    color: GENLIST_CONTENTS_TEXT_COLOR; \
2713    text { \
2714       align: 0 0.5; \
2715       min: 0 1; \
2716       font: "Tizen:style=Regular"; \
2717       size: GENLIST_CONTENTS_TEXT_SIZE; \
2718       text_class: "tizen"; \
2719    }
2720
2721 /*************************** Descriptions **********************************/
2722 // list main text
2723 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2724    description { state: "disabled" 0.0; \
2725       inherit: "default" 0.0; \
2726       color: GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR; \
2727    } \
2728    description { state: "read" 0.0; \
2729       inherit: "default" 0.0; \
2730       color: GENLIST_LIST_MAIN_TEXT_READ_COLOR; \
2731    } \
2732    description { state: "read,disabled" 0.0; \
2733       inherit: "default" 0.0; \
2734       color: GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR; \
2735    } \
2736    description { state: "selected" 0.0; \
2737       inherit: "default" 0.0; \
2738       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2739    }
2740
2741 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2742    description { state: "disabled" 0.0; \
2743       inherit: "default" 0.0; \
2744       text.style: "genlist_style_list_main_text_unread_dim"; \
2745    } \
2746    description { state: "read" 0.0; \
2747       inherit: "default" 0.0; \
2748       text.style: "genlist_style_list_main_text_read"; \
2749    } \
2750    description { state: "read,disabled" 0.0; \
2751       inherit: "default" 0.0; \
2752       text.style: "genlist_style_list_main_text_read_dim"; \
2753    } \
2754    description { state: "selected" 0.0; \
2755       inherit: "default" 0.0; \
2756       text.style: "genlist_style_list_main_text_focus"; \
2757    }
2758
2759 // list sub text
2760 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2761    description { state: "disabled" 0.0; \
2762       inherit: "default" 0.0; \
2763       color: GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR; \
2764    } \
2765    description { state: "selected" 0.0; \
2766       inherit: "default" 0.0; \
2767       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2768    }
2769
2770 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2771    description { state: "disabled" 0.0; \
2772       inherit: "default" 0.0; \
2773       text.style: "genlist_style_list_sub_text_default_dim"; \
2774    } \
2775    description { state: "selected" 0.0; \
2776       inherit: "default" 0.0; \
2777       text.style: "genlist_style_list_sub_text_focus"; \
2778    }
2779
2780 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP \
2781    description { state: "disabled" 0.0; \
2782       inherit: "default" 0.0; \
2783       text.style: "genlist_style_list_sub_text_default_dim_wrap"; \
2784    } \
2785    description { state: "selected" 0.0; \
2786       inherit: "default" 0.0; \
2787       text.style: "genlist_style_list_sub_text_focus_wrap"; \
2788    }
2789
2790 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
2791    description { state: "disabled" 0.0; \
2792       inherit: "default" 0.0; \
2793       color: GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR; \
2794    } \
2795    description { state: "selected" 0.0; \
2796       inherit: "default" 0.0; \
2797       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2798    }
2799
2800 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
2801    description { state: "disabled" 0.0; \
2802       inherit: "default" 0.0; \
2803       text.style: "genlist_style_list_sub_text_settings_dim"; \
2804    } \
2805    description { state: "selected" 0.0; \
2806       inherit: "default" 0.0; \
2807       text.style: "genlist_style_list_sub_text_focus"; \
2808    }
2809
2810 // list main text multiline
2811 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB_WRAP \
2812    description { state: "disabled" 0.0; \
2813       inherit: "default" 0.0; \
2814       text.style: "genlist_style_list_main_text_unread_dim_wrap"; \
2815    } \
2816    description { state: "selected" 0.0; \
2817       inherit: "default" 0.0; \
2818       text.style: "genlist_style_list_main_text_focus_wrap"; \
2819    }
2820
2821 /*************************** Parts **********************************/
2822 #define GENLIST_PART_DIALOGUE_GROUP_HELP_TEXT(NAME, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2823    GENLIST_PART_TEXTBLOCK(NAME, \
2824       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2825          text { \
2826             min: 0 1; \
2827             style: "genlist_style_dialogue_group_help_text"; \
2828          } \
2829          PARAM) \
2830    )
2831
2832 #define GENLIST_PART_LISTITEM(NAME, DESCRIPTION) \
2833    GENLIST_PART_TEXT(NAME, \
2834       DESCRIPTION \
2835       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2836    )
2837
2838 #define GENLIST_PART_LISTITEM_TB(NAME, DESCRIPTION) \
2839    GENLIST_PART_TEXTBLOCK(NAME, \
2840       DESCRIPTION \
2841       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2842    )
2843
2844 #define GENLIST_PART_LISTITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2845    GENLIST_PART_TEXT(NAME, \
2846       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2847          min: 0 HEIGHT; \
2848          GENLIST_PARAM_LISTITEM \
2849          PARAM \
2850       ) \
2851       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2852    )
2853
2854 #define GENLIST_PART_LISTITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2855    GENLIST_PART_TEXTBLOCK(NAME, \
2856       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2857          min: 0 HEIGHT; \
2858          fixed: 1 0; \
2859          GENLIST_PARAM_LISTITEM_TB \
2860          PARAM \
2861       ) \
2862       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2863    )
2864
2865 #define GENLIST_PART_LISTITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2866    GENLIST_PART_TEXT(NAME, \
2867       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2868          min: 0 HEIGHT; \
2869          GENLIST_PARAM_LISTITEM \
2870          PARAM \
2871       ) \
2872       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2873    )
2874
2875 #define GENLIST_PART_LISTITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2876    GENLIST_PART_TEXT(NAME, \
2877       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2878          min: 0 HEIGHT; \
2879          fixed: 0 1; \
2880          GENLIST_PARAM_LISTITEM \
2881          PARAM \
2882       ) \
2883       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2884    )
2885
2886 #define GENLIST_PART_LISTITEM_LRT_TB(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2887    GENLIST_PART_TEXTBLOCK(NAME, \
2888       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2889          min: 0 HEIGHT; \
2890          fixed: 0 1; \
2891          GENLIST_PARAM_LISTITEM_TB \
2892          PARAM \
2893       ) \
2894       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2895    )
2896
2897 #define GENLIST_PART_LISTITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2898    GENLIST_PART_TEXTBLOCK(NAME, \
2899       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2900          min: 0 HEIGHT; \
2901          fixed: 1 0; \
2902          GENLIST_PARAM_LISTITEM_TB \
2903          PARAM \
2904       ) \
2905       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2906    )
2907
2908 #define GENLIST_PART_SUBITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2909    GENLIST_PART_TEXT(NAME, \
2910       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2911          min: 0 HEIGHT; \
2912          GENLIST_PARAM_SUBITEM_DEFAULT \
2913          PARAM \
2914       ) \
2915       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2916    )
2917
2918 #define GENLIST_PART_SUBITEM(NAME, DESCRIPTION) \
2919    GENLIST_PART_TEXT(NAME, \
2920       DESCRIPTION \
2921       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2922    )
2923
2924 #define GENLIST_PART_SUBITEM_R(NAME, HEIGHT, RIGHT) \
2925    GENLIST_PART_TEXT(NAME, \
2926       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2927          min: 0 HEIGHT; \
2928          fixed: 1 0; \
2929          GENLIST_PARAM_TEXT_LIMIT_RB \
2930          GENLIST_PARAM_SUBITEM_DEFAULT \
2931       ) \
2932       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2933    )
2934
2935 #define GENLIST_PART_SUBITEM_RB(NAME, HEIGHT, RIGHT, BOTTOM) \
2936    GENLIST_PART_TEXT(NAME, \
2937       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2938          min: 0 HEIGHT; \
2939          fixed: 1 1; \
2940          GENLIST_PARAM_TEXT_LIMIT_RB \
2941          GENLIST_PARAM_SUBITEM_DEFAULT \
2942       ) \
2943       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2944    )
2945
2946 #define GENLIST_PART_SUBITEM_RB_TB(NAME, HEIGHT, RIGHT, BOTTOM) \
2947    GENLIST_PART_TEXTBLOCK(NAME, \
2948       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2949          min: 0 HEIGHT; \
2950          GENLIST_PARAM_TEXT_LIMIT_RB \
2951          fixed: 1 1; \
2952          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2953       ) \
2954       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2955    )
2956
2957 #define GENLIST_PART_SUBITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM) \
2958    GENLIST_PART_TEXTBLOCK(NAME, \
2959       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2960          min: 0 HEIGHT; \
2961          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2962       ) \
2963       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2964    )
2965
2966 #define GENLIST_PART_SUBITEM_R_FIXED(NAME, WIDTH, HEIGHT, RIGHT) \
2967    GENLIST_PART_TEXT(NAME, \
2968       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2969          min: WIDTH HEIGHT; \
2970          fixed: 1 1; \
2971          GENLIST_PARAM_SUBITEM_DEFAULT \
2972       ) \
2973       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2974    )
2975
2976 #define GENLIST_PART_SUBITEM_R_FIXED_TB(NAME, WIDTH, HEIGHT, RIGHT) \
2977    GENLIST_PART_TEXTBLOCK(NAME, \
2978        GENLIST_DESCRIPTION_R(RIGHT, \
2979          min: WIDTH HEIGHT; \
2980          fixed: 1 0; \
2981          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2982       ) \
2983       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2984    )
2985
2986 #define GENLIST_PART_SUBITEM_L_FIXED(NAME, WIDTH, HEIGHT, LEFT) \
2987    GENLIST_PART_TEXT(NAME, \
2988       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2989          min: WIDTH HEIGHT; \
2990          fixed: 1 1; \
2991          GENLIST_PARAM_SUBITEM_DEFAULT \
2992       ) \
2993       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2994    )
2995
2996 #define GENLIST_PART_SUBITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2997    GENLIST_PART_TEXT(NAME, \
2998       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2999          min: 0 HEIGHT; \
3000          GENLIST_PARAM_SUBITEM_DEFAULT \
3001          PARAM \
3002       ) \
3003       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3004    )
3005
3006 #define GENLIST_PART_SUBITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT) \
3007    GENLIST_PART_TEXTBLOCK(NAME, \
3008       GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
3009          min: 0 HEIGHT; \
3010          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3011       ) \
3012       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3013    )
3014
3015 #define GENLIST_PART_SUBITEM_LB(NAME, HEIGHT, LEFT, RIGHT) \
3016    GENLIST_PART_TEXT(NAME, \
3017       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
3018          min: 0 HEIGHT; \
3019          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3020       ) \
3021       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3022    )
3023
3024 #define GENLIST_PART_SUBITEM_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3025    GENLIST_PART_TEXT(NAME, \
3026       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3027          min: 0 HEIGHT; \
3028          GENLIST_PARAM_SUBITEM_DEFAULT \
3029          fixed: 0 1; \
3030       ) \
3031       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3032    )
3033
3034 #define GENLIST_PART_SUBITEM_SETTINGS_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM, PARAM) \
3035    GENLIST_PART_TEXT(NAME, \
3036       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3037          min: 0 HEIGHT; \
3038          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3039          GENLIST_PARAM_SUBITEM_SETTINGS\
3040          PARAM; \
3041       ) \
3042       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3043    )
3044
3045 #define GENLIST_PART_SUBITEM_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3046    GENLIST_PART_TEXTBLOCK(NAME, \
3047       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3048          min: 0 HEIGHT; \
3049          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3050          fixed: 0 1; \
3051       ) \
3052       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3053    )
3054
3055 #define GENLIST_PART_SUBITEM_SETTINGS_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3056    GENLIST_PART_TEXTBLOCK(NAME, \
3057       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3058          min: 0 HEIGHT; \
3059          GENLIST_PARAM_SUBITEM_SETTINGS_TB \
3060          fixed: 0 1; \
3061       ) \
3062       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
3063    )
3064
3065 #define GENLIST_PART_SUBITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3066    GENLIST_PART_TEXT(NAME, \
3067       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3068          min: 0 HEIGHT; \
3069          fixed: 0 1; \
3070          GENLIST_PARAM_SUBITEM_DEFAULT \
3071       ) \
3072       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3073    )
3074
3075 #define GENLIST_PART_SUBITEM_SETTINGS_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3076    GENLIST_PART_TEXT(NAME, \
3077       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3078          min: 0 HEIGHT; \
3079          fixed: 0 1; \
3080          GENLIST_PARAM_SUBITEM_SETTINGS \
3081       ) \
3082       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3083    )
3084
3085 #define GENLIST_PART_SUBITEM_LTB(NAME, HEIGHT, LEFT, TOP, BOTTOM) \
3086    GENLIST_PART_TEXT(NAME, \
3087       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
3088          min: 0 HEIGHT; \
3089          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3090          GENLIST_PARAM_SUBITEM_DEFAULT \
3091       ) \
3092       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3093    )
3094
3095 #define GENLIST_PART_SUBITEM_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3096    GENLIST_PART_TEXT(NAME, \
3097       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3098          min: 0 HEIGHT; \
3099          GENLIST_PARAM_TEXT_LIMIT_RT \
3100          GENLIST_PARAM_SUBITEM_DEFAULT \
3101          fixed: 1 0; \
3102       ) \
3103       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3104    )
3105
3106 #define GENLIST_PART_SUBITEM_RTB_TB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3107    GENLIST_PART_TEXTBLOCK(NAME, \
3108       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3109          min: 0 HEIGHT; \
3110          GENLIST_PARAM_TEXT_LIMIT_RT \
3111          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3112          fixed: 1 0; \
3113       ) \
3114       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3115    )
3116
3117 #define GENLIST_PARAM_LIST_BUBBLE_TEXT \
3118    color: GENLIST_LIST_BUBBLE_TEXT_COLOR; \
3119    text { \
3120       align: 1 0.5; \
3121       min: 0 1; \
3122       font: "Tizen:style=Bold"; \
3123       size: GENLIST_LIST_BUBBLE_TEXT_SIZE; \
3124       text_class: "tizen"; \
3125    }
3126
3127 // FIXME: Need to find why rel2.offset: 9 -1 will not fix the alignment of bubble text ?
3128 #define GENLIST_PART_LIST_BUBBLE_TEXT_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3129          GENLIST_PART_IMAGE("elm.bubble", \
3130             GENLIST_DESCRIPTION_ENVELOP(NAME, \
3131                image { \
3132                   normal: "00_list_bubble_bg.png"; \
3133                   border: 8 8 0 0; \
3134                } \
3135                rel1.offset: -10 0; \
3136                rel2.offset: 8 -1; \
3137                min: 48 38; \
3138                max: -1 38; \
3139                fixed: 0 1; \
3140                color: GENLIST_LIST_BUBBLE_COLOR; \
3141             ) \
3142             description { state: "selected" 0.0; \
3143                inherit: "default" 0.0; \
3144                color: GENLIST_LIST_BUBBLE_PRESS_COLOR; \
3145             } \
3146          ) \
3147          GENLIST_PART_TEXT(NAME, \
3148             GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3149                min: 0 HEIGHT; \
3150                GENLIST_PARAM_TEXT_LIMIT_RT \
3151                rel2.offset: -10 -1; /* This maintain the text alignment with bubble text. */\
3152                GENLIST_PARAM_LIST_BUBBLE_TEXT \
3153             ) \
3154             description { state: "selected" 0.0; \
3155                inherit: "default" 0.0; \
3156                color: GENLIST_LIST_BUBBLE_TEXT_FOCUS_COLOR; \
3157             } \
3158          )
3159
3160 #if 0
3161 #define GENLIST_PART_BASE__( param_item_height ) \
3162          part { name: "base"; \
3163             type: RECT; \
3164             repeat_events: 1; \
3165             scale: 1; \
3166             description { state: "default" 0.0; \
3167                min: 0 param_item_height; \
3168                color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
3169             } \
3170          }
3171
3172 /******************************************************************************/
3173 /** ETC
3174 /******************************************************************************/
3175 // FIXME: UX do not define selected state. But I thinkt that it is neededs :(
3176
3177 #define GENLIST_PROOGRAM_EXPAND(SRC, TARGET) \
3178    program { \
3179       name: "expand"; \
3180       signal: "mouse,clicked,1"; \
3181       source: SRC; \
3182       action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; \
3183    } \
3184    program { \
3185       name: "go_expanded"; \
3186       signal: "elm,state,expanded"; \
3187       source: "elm"; \
3188       action: STATE_SET "active" 0.0; \
3189       TARGET \
3190    } \
3191    program { \
3192       name: "go_contracted"; \
3193       signal: "elm,state,contracted"; \
3194       source: "elm"; \
3195       action: STATE_SET "default" 0.0; \
3196       TARGET \
3197    }
3198
3199 #define GENLIST_PART_BASE_LIST_H( HEIGHT) \
3200          part { name: "base"; \
3201             type: RECT; \
3202             repeat_events: 1; \
3203             scale: 1; \
3204             description { state: "default" 0.0; \
3205                align: 0.5 0.5; \
3206                color: 0 0 0 0; \
3207                rel2.relative: 1 0; \
3208                rel2.to: "bottom_line"; \
3209                min: 0 HEIGHT; \
3210             } \
3211          } \
3212          GENLIST_PART_BOTTOM_LINE
3213
3214 #define GENLIST_PART_DIALOGUE_ITEM \
3215          part { name: "elm.rect.dialogue"; \
3216             type: RECT; \
3217             scale: 1; \
3218             description { state: "default" 0.0; \
3219                min: 10 0; \
3220                fixed: 1 0; \
3221                color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
3222                rel2.relative: 0.0 1.0; \
3223                align: 0.0 0.0; \
3224             } \
3225          }
3226
3227 #define GENLIST_PART_DIALOGUE_RIGHT_LINE \
3228          part { name: "elm.rect.dialogue.right.line"; \
3229             type: RECT; \
3230             scale: 1; \
3231             description { state: "default" 0.0; \
3232                min: 1 0; \
3233                fixed: 1 0; \
3234                rel1 { \
3235                   relative: 1.0  0.0; \
3236                   offset: -1 0; \
3237                } \
3238                align: 1.0 0.0; \
3239                color: GENLIST_LIST_LINE1_COLOR; \
3240             } \
3241          }
3242
3243 #define GENLIST_PROGRAM_FLIP_1TEXT \
3244          program { name: "flipped"; \
3245             signal: "elm,state,flip,enabled"; \
3246             source: "elm"; \
3247             action: STATE_SET "flipped" 0.0; \
3248             target: "elm.text"; \
3249             target: "elm.flip.content"; \
3250          } \
3251          program { name: "flip_disabled"; \
3252             signal: "elm,state,flip,disabled"; \
3253             source: "elm"; \
3254             action: STATE_SET "default" 0.0; \
3255             target: "elm.text"; \
3256             target: "elm.flip.content"; \
3257          }
3258
3259 #define GENLIST_PROGRAM_FLIP_2TEXT \
3260          program { name: "flipped"; \
3261             signal: "elm,state,flip,enabled"; \
3262             source: "elm"; \
3263             action: STATE_SET "flipped" 0.0; \
3264             target: "elm.text.1"; \
3265             target: "elm.text.2"; \
3266             target: "elm.flip.content"; \
3267          } \
3268          program { name: "flip_disabled"; \
3269             signal: "elm,state,flip,disabled"; \
3270             source: "elm"; \
3271             action: STATE_SET "default" 0.0; \
3272             target: "elm.text.1"; \
3273             target: "elm.text.2"; \
3274             target: "elm.flip.content"; \
3275          }
3276
3277 #define GENLIST_PROGRAM_FLIP_2TEXT_1ICON \
3278          program { name: "flipped"; \
3279             signal: "elm,state,flip,enabled"; \
3280             source: "elm"; \
3281             action: STATE_SET "flipped" 0.0; \
3282             target: "elm.text.1"; \
3283             target: "elm.text.2"; \
3284             target: "elm.icon"; \
3285             target: "elm.flip.content"; \
3286          } \
3287          program { name: "flip_disabled"; \
3288             signal: "elm,state,flip,disabled"; \
3289             source: "elm"; \
3290             action: STATE_SET "default" 0.0; \
3291             target: "elm.text.1"; \
3292             target: "elm.text.2"; \
3293             target: "elm.icon"; \
3294             target: "elm.flip.content"; \
3295          }
3296
3297 #define GENLIST_PROGRAM_FLIP_2TEXT_2ICON \
3298          program { name: "flipped"; \
3299             signal: "elm,state,flip,enabled"; \
3300             source: "elm"; \
3301             action: STATE_SET "flipped" 0.0; \
3302             target: "elm.text.1"; \
3303             target: "elm.text.2"; \
3304             target: "elm.icon.1"; \
3305             target: "elm.icon.2"; \
3306             target: "elm.flip.content"; \
3307          } \
3308          program { name: "flip_disabled"; \
3309             signal: "elm,state,flip,disabled"; \
3310             source: "elm"; \
3311             action: STATE_SET "default" 0.0; \
3312              target: "elm.text.1"; \
3313             target: "elm.text.2"; \
3314             target: "elm.icon.1"; \
3315             target: "elm.icon.2"; \
3316             target: "elm.flip.content"; \
3317          }
3318
3319 #define GENLIST_PROGRAM_FLIP_3TEXT_2ICON \
3320          program { name: "flipped"; \
3321             signal: "elm,state,flip,enabled"; \
3322             source: "elm"; \
3323             action: STATE_SET "flipped" 0.0; \
3324             target: "elm.text.1"; \
3325             target: "elm.text.2"; \
3326             target: "elm.text.3"; \
3327             target: "elm.icon.1"; \
3328             target: "elm.icon.2"; \
3329             target: "elm.flip.content"; \
3330          } \
3331          program { name: "flip_disabled"; \
3332             signal: "elm,state,flip,disabled"; \
3333             source: "elm"; \
3334             action: STATE_SET "default" 0.0; \
3335             target: "elm.text.1"; \
3336             target: "elm.text.2"; \
3337             target: "elm.text.3"; \
3338             target: "elm.icon.1"; \
3339             target: "elm.icon.2"; \
3340             target: "elm.flip.content"; \
3341          }
3342
3343
3344 #define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
3345             description { state: "selected" 1.0; \
3346                inherit: "default" 0.0; \
3347                visible: 0; \
3348             }
3349
3350 #define GENLIST_DESCRIPTION_FLIP_ENABLED \
3351             description { state: "flipped" 0.0; \
3352                inherit: "default" 0.0; \
3353                visible: 0; \
3354             }
3355
3356 #define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_1TEXT \
3357             script { \
3358                new st[31]; \
3359                new Float:vl; \
3360                get_state(PART:"elm.text", st, 30, vl); \
3361                set_state(PART:"bg", "selected", 0.0); \
3362                if (!strcmp(st, "flipped")) \
3363                   set_state(PART:"elm.text", "selected", 1.0); \
3364                else \
3365                   set_state(PART:"elm.text", "selected", 0.0); \
3366             }
3367
3368
3369 /* genlist multisense macro - start */
3370 #define GENLIST_PROGRAM_AFTER_PLAY_BUTTON_PRESS \
3371             after: "play_button_press";
3372
3373 #define GENLIST_PROGRAM_PLAY_BUTTON_PRESS \
3374          program { name: "play_button_press"; \
3375             action: PLAY_SAMPLE "button-pressed" 1.0; \
3376          }
3377 #endif