[check.edc]modified the default style to support list requirements and removed the...
[profile/ivi/efl-theme-tizen.git] / themes / groups / check.edc
1 /*
2  *  nBeat-theme
3  *
4  * Copyright (c) 2000 - 2010 Samsung Electronics Co., Ltd.
5  *
6  * Contact: Seokjae Jeong <seok.j.jeong@samsung.com>, Myoungwoon Roy Kim <Myoungwoon.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>, Jaehwan Kim <jae.hwan.kim@samsung.com>, 
7  *       Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>, 
8  *    Hyunsil Park <hyunsil.park@samsung.com>, Sohyun Kim <anna1014.kim@samsung.com>, Seunggyun Kim <sgyun.kim@samsung.com>
9  * 
10  * This library is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU Lesser General Public License as published by the
12  * Free Software Foundation; either version 2.1 of the License, or (at your option)
13  * any later version.
14  * 
15  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this library; if not, write to the Free Software Foundation, Inc., 51
22  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 #define CHECK_STATE_DEFAULT 0
26 #define CHECK_STATE_VISIBLE 1
27 #define CHECK_STATE_DISABLED_VISIBLE 2
28 #define CHECK_STATE_DISABLED 3
29 ////////////////////////////////////////////////////////////////////////////////
30 #define CHECK_STYLE_DEFAULT(style_name, min_width, min_height) \
31  group { name: "elm/check/base/"style_name; \
32       images { \
33          image: "00_check_bg.png" COMP; \
34          image: "00_check_bg_dim.png" COMP; \
35          image: "00_check_checking.png" COMP; \
36       } \
37       script { \
38          public check_state = CHECK_STATE_DEFAULT; \
39       } \
40       parts { \
41          part { name: "back_bg"; \
42             type: RECT; \
43             mouse_events: 1; \
44             scale: 1; \
45             description { state: "default" 0.0; \
46                rel2.relative: 0.0 1.0; \
47                align: 0 0.5; \
48                min: min_width min_height; \
49                fixed: 1 0; \
50                visible: 1; \
51                color: 0 0 0 0; \
52             } \
53          } \
54          part { name: "bg"; \
55             mouse_events: 0; \
56             scale: 1; \
57             description { state: "default" 0.0; \
58                min: 26 26; \
59                max: 26 26; \
60                fixed: 1 1; \
61                rel1{ to: "back_bg"; } \
62                rel2{ to: "back_bg"; } \
63                align: 0.5 0.5; \
64                visible: 1; \
65                image { \
66                   normal: "00_check_bg.png"; \
67                } \
68                fill.smooth : 0; \
69             } \
70             description { state: "disabled" 0.0; \
71                inherit: "default" 0.0; \
72                image { \
73                   normal: "00_check_bg_dim.png"; \
74                } \
75                fill.smooth : 0; \
76             } \
77          } \
78          part { name: "check"; \
79             mouse_events: 0; \
80             scale: 1; \
81             description { state: "default" 0.0; \
82                rel1.to: "bg"; \
83                rel2.to: "bg"; \
84                visible: 0; \
85             } \
86             description { state: "visible" 0.0; \
87                inherit: "default" 0.0; \
88                visible: 1; \
89                image.normal: "00_check_checking.png"; \
90             } \
91             description { state: "disabled_visible" 0.0; \
92                inherit: "visible" 0.0; \
93                visible: 1; \
94             } \
95          } \
96          part { name: "elm.swallow.content"; \
97             type: SWALLOW; \
98             description { state: "default" 0.0; \
99                fixed: 1 0; \
100                visible: 0; \
101                color: 255 255 255 255; \
102                align: 0.0 0.5; \
103                rel1.to_x: "bg"; \
104                rel1.relative: 1.0 0.0; \
105                rel1.offset: 1 1; \
106                rel2.to_x: "bg"; \
107                rel2.relative: 1.0 1.0; \
108                rel2.offset: 2 -2; \
109             } \
110             description { state: "visible" 0.0; \
111                inherit: "default" 0.0; \
112                fixed: 1 1; \
113                visible: 1; \
114                aspect: 1.0 1.0; \
115                aspect_preference: VERTICAL; \
116             } \
117             description { state: "disabled" 0.0; \
118                inherit: "default" 0.0; \
119                color: 128 128 128 128; \
120             } \
121             description { state: "disabled_visible" 0.0; \
122                inherit: "default" 0.0; \
123                color: 128 128 128 128; \
124                fixed: 1 1; \
125                visible: 1; \
126                aspect: 1.0 1.0; \
127             } \
128          } \
129          part { name: "elm.text"; \
130             type: TEXTBLOCK; \
131             mouse_events: 0; \
132             scale: 1; \
133             description { state: "default" 0.0; \
134                visible: 0; \
135                fixed: 0 1; \
136                rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; } \
137                rel2 { relative: 1.0 0.5; offset: -2 -2; } \
138                align: 0.0 0.5; \
139                text { \
140                   style: "check_label_textblock_style"; \
141                   min: 0 0; \
142                } \
143                color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
144             } \
145             description { state: "visible" 0.0; \
146                inherit: "default" 0.0; \
147                visible: 1; \
148                text.min: 1 1; \
149             } \
150             description { state: "disabled" 0.0; \
151                inherit: "default" 0.0; \
152             } \
153             description { state: "disabled_visible" 0.0; \
154                inherit: "default" 0.0; \
155                visible: 1; \
156                text.min: 1 1; \
157                color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
158             } \
159          } \
160          part { name: "events1"; \
161             type: RECT; \
162             ignore_flags: ON_HOLD; \
163             description { state: "default" 0.0; \
164                color: 0 0 0 0; \
165             } \
166          } \
167          part { name: "events2"; \
168             type: RECT; \
169             repeat_events: 1; \
170             description { state: "default" 0.0; \
171                color: 0 0 0 0; \
172             } \
173          } \
174          part { name: "disabler"; \
175             type: RECT; \
176             description { state: "default" 0.0; \
177                color: 0 0 0 0; \
178                visible: 0; \
179             } \
180             description { state: "disabled" 0.0; \
181                inherit: "default" 0.0; \
182                visible: 1; \
183             } \
184          } \
185       } \
186       programs { \
187          program { name: "click"; \
188             signal: "mouse,clicked,1"; \
189             source: "events1"; \
190             action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
191          } \
192          program { name: "check_on"; \
193             signal: "elm,state,check,on"; \
194             source: "elm"; \
195             script { \
196                set_int(check_state, CHECK_STATE_VISIBLE); \
197                set_state(PART:"check", "visible", 0.0); \
198             } \
199          } \
200          program { name: "check_off"; \
201             signal: "elm,state,check,off"; \
202             source: "elm"; \
203             action:  STATE_SET "default" 0.0; \
204             target: "check"; \
205             script { \
206                if(get_int(check_state) == CHECK_STATE_VISIBLE) \
207                { \
208                   set_int(check_state, CHECK_STATE_DEFAULT); \
209                   set_state(PART:"check", "default", 0.0); \
210                } \
211             } \
212          } \
213          program { name: "text_show"; \
214             signal: "elm,state,text,visible"; \
215             source: "elm"; \
216             action:  STATE_SET "visible" 0.0; \
217             target: "elm.text"; \
218          } \
219          program { name: "text_hide"; \
220             signal: "elm,state,text,hidden"; \
221             source: "elm"; \
222             action:  STATE_SET "default" 0.0; \
223             target: "elm.text"; \
224          } \
225          program { name: "icon_show"; \
226             signal: "elm,state,icon,visible"; \
227             source: "elm"; \
228             action:  STATE_SET "visible" 0.0; \
229             target: "elm.swallow.content"; \
230          } \
231          program { name: "icon_hide"; \
232             signal: "elm,state,icon,hidden"; \
233             source: "elm"; \
234             action:  STATE_SET "default" 0.0; \
235             target: "elm.swallow.content"; \
236          } \
237          program { name: "disable"; \
238             signal: "elm,state,disabled"; \
239             source: "elm"; \
240             action: STATE_SET "disabled" 0.0; \
241             target: "disabler"; \
242             target: "bg"; \
243             after: "disable_text"; \
244          } \
245          program { name: "disable_text"; \
246             script { \
247                new st[31]; \
248                new Float:vl; \
249                get_state(PART:"elm.text", st, 30, vl); \
250                if (!strcmp(st, "visible")) \
251                   set_state(PART:"elm.text", "disabled_visible", 0.0); \
252                else \
253                   set_state(PART:"elm.text", "disabled", 0.0); \
254                get_state(PART:"elm.swallow.content", st, 30, vl); \
255                if (!strcmp(st, "visible")) \
256                   set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
257                else \
258                   set_state(PART:"elm.swallow.content", "disabled", 0.0); \
259                get_state(PART:"check", st, 30, vl); \
260                if (!strcmp(st, "visible")) \
261                { \
262                   set_state(PART:"check", "disabled_visible", 0.0); \
263                   set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
264                } \
265             } \
266          } \
267          program { name: "enable"; \
268             signal: "elm,state,enabled"; \
269             source: "elm"; \
270             action: STATE_SET "default" 0.0; \
271             target: "disabler"; \
272             target: "bg"; \
273             after: "enable_text"; \
274          } \
275          program { name: "enable_text"; \
276             script { \
277                new st[31]; \
278                new Float:vl; \
279                get_state(PART:"elm.text", st, 30, vl); \
280                if (!strcmp(st, "disabled_visible")) \
281                   set_state(PART:"elm.text", "visible", 0.0); \
282                else \
283                   set_state(PART:"elm.text", "default", 0.0); \
284                get_state(PART:"elm.swallow.content", st, 30, vl); \
285                if (!strcmp(st, "visible")) \
286                   set_state(PART:"elm.swallow.content", "visible", 0.0); \
287                else \
288                   set_state(PART:"elm.swallow.content", "default", 0.0); \
289                get_state(PART:"check", st, 30, vl); \
290                if (!strcmp(st, "disabled_visible")) \
291                { \
292                   set_state(PART:"check", "visible", 0.0); \
293                   set_int(check_state, CHECK_STATE_VISIBLE); \
294                } \
295                else \
296                   set_int(check_state, CHECK_STATE_DEFAULT); \
297             } \
298          } \
299       } \
300    }
301 ////////////////////////////////////////////////////////////////////////////////
302 CHECK_STYLE_DEFAULT("default", 26, 26)
303
304 ////////////////////////////////////////////////////////////////////////////////
305 CHECK_STYLE_DEFAULT("default/extended", 60, 75)
306
307 ////////////////////////////////////////////////////////////////////////////////
308    group { name: "elm/check/base/multicheck";
309       images {
310          image: "00_check_bg.png" COMP;
311          image: "00_check_bg_press.png" COMP;
312          image: "00_check_bg_dim.png" COMP;
313          image: "multicheck_0001.png" COMP;
314          image: "multicheck_0002.png" COMP;
315          image: "multicheck_0003.png" COMP;
316          image: "multicheck_0004.png" COMP;
317          image: "multicheck_0005.png" COMP;
318          image: "multicheck_0006.png" COMP;
319          image: "00_check_checking_dim.png" COMP;
320       }
321       script {
322          public check_state = 0; //0:default, 1: visible, 2: disabled_visible
323       }
324       parts {
325          part { name: "bg";
326             mouse_events: 1;
327             scale: 1;
328             description { state: "default" 0.0;
329                rel2.relative: 0.0 1.0;
330                align: 0.0 0.5;
331                min: 44 44;
332                max: 44 44;
333                aspect: 1.0 1.0;
334                aspect_preference: VERTICAL;
335                visible: 1;
336                image {
337                   normal: "00_check_bg.png";
338                }
339                fill.smooth : 0;
340             }
341             description { state: "pressed" 0.0;
342                inherit: "default" 0.0;
343                image {
344                   normal: "00_check_bg_press.png";
345                }
346                fill.smooth : 0;
347             }
348             description { state: "disabled" 0.0;
349                inherit: "default" 0.0;
350                image {
351                   normal: "00_check_bg_dim.png";
352                }
353                fill.smooth : 0;
354             }
355          }
356          part { name: "check";
357             mouse_events: 0;
358             scale: 1;
359             description { state: "default" 0.0;
360                rel1.to: "bg";
361                rel2.to: "bg";
362                visible: 0;
363             }
364             description { state: "visible_1" 0.0;
365                inherit: "default" 0.0;
366                visible: 1;
367                image.normal: "multicheck_0001.png";
368             }
369             description { state: "visible_2" 0.0;
370                inherit: "default" 0.0;
371                visible: 1;
372                image.normal: "multicheck_0002.png";
373             }
374             description { state: "visible_3" 0.0;
375                inherit: "default" 0.0;
376                visible: 1;
377                image.normal: "multicheck_0003.png";
378             }
379             description { state: "visible_4" 0.0;
380                inherit: "default" 0.0;
381                visible: 1;
382                image.normal: "multicheck_0004.png";
383             }
384             description { state: "visible_5" 0.0;
385                inherit: "default" 0.0;
386                visible: 1;
387                image.normal: "multicheck_0005.png";
388             }
389             description { state: "visible" 0.0;
390                inherit: "default" 0.0;
391                visible: 1;
392                image.normal: "multicheck_0006.png";
393             }
394             description { state: "pressed" 0.0;
395                inherit: "default" 0.0;
396                visible: 1;
397                image.normal: "multicheck_0006.png";
398             }
399             description { state: "disabled_visible" 0.0;
400                inherit: "default" 0.0;
401                image.normal: "00_check_checking_dim.png";
402                visible: 1;
403             }
404          }
405          part { name: "elm.swallow.content";
406             type: SWALLOW;
407             description { state: "default" 0.0;
408                fixed: 1 0;
409                visible: 0;
410                color: 255 255 255 255;
411                align: 0.0 0.5;
412                rel1.to_x: "bg";
413                rel1.relative: 1.0 0.0;
414                rel1.offset: 1 1;
415                rel2.to_x: "bg";
416                rel2.relative: 1.0 1.0;
417                rel2.offset: 2 -2;
418             }
419             description { state: "visible" 0.0;
420                inherit: "default" 0.0;
421                fixed: 1 1;
422                visible: 1;
423                aspect: 1.0 1.0;
424                aspect_preference: VERTICAL;
425             }
426             description { state: "disabled" 0.0;
427                inherit: "default" 0.0;
428                color: 128 128 128 128;
429             }
430             description { state: "disabled_visible" 0.0;
431                inherit: "default" 0.0;
432                color: 128 128 128 128;
433                fixed: 1 1;
434                visible: 1;
435                aspect: 1.0 1.0;
436             }
437          }
438          part { name: "elm.text";
439             type: TEXTBLOCK;
440             mouse_events: 0;
441             scale: 1;
442             description { state: "default" 0.0;
443                visible: 0;
444                fixed: 0 1;
445                rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; }
446                rel2 { relative: 1.0 0.5; offset: -2 -2; }
447                align: 0.0 0.5;
448                text {
449                   style: "check_label_textblock_style";
450                   min: 0 0;
451                }
452                color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
453             }
454             description { state: "visible" 0.0;
455                inherit: "default" 0.0;
456                visible: 1;
457                text.min: 1 1;
458             }
459             description { state: "disabled" 0.0;
460                inherit: "default" 0.0;
461             }
462             description { state: "disabled_visible" 0.0;
463                inherit: "default" 0.0;
464                visible: 1;
465                text.min: 1 1;
466                color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
467             }
468          }
469          part { name: "events1";
470             type: RECT;
471             ignore_flags: ON_HOLD;
472             description { state: "default" 0.0;
473                color: 0 0 0 0;
474             }
475          }
476          part { name: "events2";
477             type: RECT;
478             repeat_events: 1;
479             description { state: "default" 0.0;
480                color: 0 0 0 0;
481             }
482          }
483          part { name: "disabler";
484             type: RECT;
485             description { state: "default" 0.0;
486                color: 0 0 0 0;
487                visible: 0;
488             }
489             description { state: "disabled" 0.0;
490                inherit: "default" 0.0;
491                visible: 1;
492             }
493          }
494       }
495       programs {
496          program { name: "click";
497             signal: "mouse,clicked,1";
498             source: "events1";
499          action: SIGNAL_EMIT "elm,action,check,toggle" "";
500          }
501          program { name: "bg_normal";
502             signal: "mouse,up,1";
503             source: "events2";
504             script {
505                new st[31];
506                new Float:vl;
507                get_state(PART:"check", st, 30, vl);
508                if (!strcmp(st, "pressed"))
509                   set_state(PART:"check", "visible", 0.0);
510                set_state(PART:"bg", "default", 0.0);
511             }
512          }
513          program { name: "pressed";
514             signal: "mouse,down,1";
515             source: "events2";
516             script {
517                new st[31];
518                new Float:vl;
519                get_state(PART:"check", st, 30, vl);
520                if (!strcmp(st, "default"))
521                  set_state(PART:"check", "pressed", 0.0);
522                else
523                  set_state(PART:"check", "default", 0.0);
524
525                set_state(PART:"bg", "pressed", 0.0);
526             }
527          }
528          program { name: "mouse,out";
529             signal: "mouse,out";
530             source: "events2";
531             script {
532                if(get_int(check_state) == 1)
533                  set_state(PART:"check", "visible", 0.0);
534                else
535                  set_state(PART:"check", "default", 0.0);
536             }
537          }
538          program { name: "check_on";
539             signal: "elm,state,check,on";
540             source: "elm";
541             script {
542                set_int(check_state, 1);
543             }
544             after: "check_on_1";
545          }
546          program { name: "check_on_1";
547             in: 0.05 0.0;
548             script {
549                if(get_int(check_state) == 1)
550                   set_state(PART:"check", "visible_1", 0.0);
551             }
552             after: "check_on_2";
553          }
554          program { name: "check_on_2";
555             in: 0.05 0.0;
556             script {
557                if(get_int(check_state) == 1)
558                   set_state(PART:"check", "visible_2", 0.0);
559             }
560             after: "check_on_3";
561          }
562          program { name: "check_on_3";
563             in: 0.05 0.0;
564             script {
565                if(get_int(check_state) == 1)
566                   set_state(PART:"check", "visible_3", 0.0);
567             }
568             after: "check_on_4";
569          }
570          program { name: "check_on_4";
571             in: 0.05 0.0;
572             script {
573                if(get_int(check_state) == 1)
574                   set_state(PART:"check", "visible_4", 0.0);
575             }
576             after: "check_on_5";
577          }
578          program { name: "check_on_5";
579             in: 0.05 0.0;
580             script {
581                if(get_int(check_state) == 1)
582                   set_state(PART:"check", "visible_5", 0.0);
583             }
584             after: "check_on_6";
585          }
586          program { name: "check_on_6";
587             in: 0.05 0.0;
588             script {
589                if(get_int(check_state) == 1)
590                   set_state(PART:"check", "visible", 0.0);
591             }
592          }
593          program { name: "check_off";
594             signal: "elm,state,check,off";
595             source: "elm";
596             action:  STATE_SET "default" 0.0;
597             target: "check";
598             script {
599                if(get_int(check_state) == 1)
600                {
601                   set_int(check_state, 0);
602                   set_state(PART:"check", "default", 0.0);
603                }
604             }
605          }
606          program { name: "text_show";
607             signal: "elm,state,text,visible";
608             source: "elm";
609             action:  STATE_SET "visible" 0.0;
610             target: "elm.text";
611          }
612          program { name: "text_hide";
613             signal: "elm,state,text,hidden";
614             source: "elm";
615             action:  STATE_SET "default" 0.0;
616             target: "elm.text";
617          }
618          program { name: "icon_show";
619             signal: "elm,state,icon,visible";
620             source: "elm";
621             action:  STATE_SET "visible" 0.0;
622             target: "elm.swallow.content";
623          }
624          program { name: "icon_hide";
625             signal: "elm,state,icon,hidden";
626             source: "elm";
627             action:  STATE_SET "default" 0.0;
628             target: "elm.swallow.content";
629          }
630          program { name: "disable";
631             signal: "elm,state,disabled";
632             source: "elm";
633             action: STATE_SET "disabled" 0.0;
634             target: "disabler";
635             target: "bg";
636             after: "disable_text";
637          }
638          program { name: "disable_text";
639             script {
640                new st[31];
641                new Float:vl;
642                get_state(PART:"elm.text", st, 30, vl);
643                if (!strcmp(st, "visible"))
644                   set_state(PART:"elm.text", "disabled_visible", 0.0);
645                else
646                   set_state(PART:"elm.text", "disabled", 0.0);
647
648                get_state(PART:"elm.swallow.content", st, 30, vl);
649                if (!strcmp(st, "visible"))
650                   set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
651                else
652                   set_state(PART:"elm.swallow.content", "disabled", 0.0);
653
654                get_state(PART:"check", st, 30, vl);
655                if (!strcmp(st, "visible"))
656                   set_state(PART:"check", "disabled_visible", 0.0);
657                set_int(check_state, 2);
658             }
659          }
660          program { name: "enable";
661             signal: "elm,state,enabled";
662             source: "elm";
663             action: STATE_SET "default" 0.0;
664             target: "disabler";
665             target: "bg";
666             after: "enable_text";
667          }
668          program { name: "enable_text";
669             script {
670                new st[31];
671                new Float:vl;
672                get_state(PART:"elm.text", st, 30, vl);
673                if (!strcmp(st, "disabled_visible"))
674                   set_state(PART:"elm.text", "visible", 0.0);
675                else
676                   set_state(PART:"elm.text", "default", 0.0);
677
678                get_state(PART:"elm.swallow.content", st, 30, vl);
679                if (!strcmp(st, "visible"))
680                   set_state(PART:"elm.swallow.content", "visible", 0.0);
681                else
682                   set_state(PART:"elm.swallow.content", "default", 0.0);
683
684                get_state(PART:"check", st, 30, vl);
685                if (!strcmp(st, "disabled_visible"))
686                {
687                   set_state(PART:"check", "visible", 0.0);
688                   set_int(check_state, 1);
689                }
690                else
691                   set_int(check_state, 0);
692             }
693          }
694       }
695    }
696
697 ////////////////////////////////////////////////////////////////////////////////
698    group { name: "elm/check/base/on&off";
699       images {
700          image: "00_check_off.png" COMP;
701          //image: "00_check_off_press.png" COMP;
702          image: "00_check_on.png" COMP;
703          //image: "00_check_on_press.png" COMP;
704       }
705       parts {
706          part {
707             name: "bg";
708             mouse_events: 1;
709             scale: 1;
710             type: RECT;
711             description { state: "default" 0.0;
712                rel2.relative: 0.0 1.0;
713                fixed: 1 0;
714                align: 0.0 0.5;
715                min: 38 50;
716                max: 38 50;
717                color: 0 0 0 0;
718             }
719          }
720       part { name: "check";
721             mouse_events: 0;
722             scale: 1;
723             description { state: "default" 0.0;
724                rel1.to: "bg";
725                rel2.to: "bg";
726                visible: 1;
727                image {
728                   normal: "00_check_off.png";
729                   border: 16 12 14 14;
730                   border_scale: 1;
731                }
732             }
733             description { state: "visible" 0.0;
734                inherit: "default" 0.0;
735                image {
736                   normal: "00_check_on.png";
737                }
738             }
739             description { state: "pressed" 0.0;
740                inherit: "default" 0.0;
741                image {
742                   normal: "00_check_off.png";
743                }
744             }
745             description { state: "visible_pressed" 0.0;
746                inherit: "default" 0.0;
747                image {
748                   normal: "00_check_on.png";
749                }
750             }
751          }
752          part { name: "text_onoff";
753             type: TEXT;
754             mouse_events: 0;
755             scale:1;
756             description { state: "default" 0.0;
757                visible: 1;
758                rel1.to: "check";
759                rel2.to: "check";
760                rel2.relative: 0.85 1.0;
761                text {
762                   font: "SLP:style=Medium";
763                   size: 20;
764                   min: 0 0;
765                   align: 1.0 0.5;
766                   text: "OFF";
767                }
768             }
769             description { state: "on" 0.0;
770                inherit: "default" 0.0;
771                rel1.relative: 0.15 0.0;
772                text {
773                   font: "SLP:style=Medium";
774                   size: 20;
775                   min: 0 0;
776                   align: 0.0 0.5;
777                   text: "ON";
778                }
779             }
780          }
781          part { name: "elm.swallow.content";
782             type: SWALLOW;
783             description { state: "default" 0.0;
784                fixed: 1 0;
785                visible: 0;
786                color: 255 255 255 255;
787                align: 0.0 0.5;
788                rel1.to_x: "bg";
789                rel1.relative: 1.0 0.0;
790                rel1.offset: 1 1;
791                rel2.to_x: "bg";
792                rel2.relative: 1.0 1.0;
793                rel2.offset: 2 -2;
794             }
795             description { state: "visible" 0.0;
796                inherit: "default" 0.0;
797                fixed: 1 1;
798                visible: 1;
799                aspect: 1.0 1.0;
800                aspect_preference: VERTICAL;
801             }
802             description { state: "disabled" 0.0;
803                inherit: "default" 0.0;
804                color: 128 128 128 128;
805             }
806             description { state: "disabled_visible" 0.0;
807                inherit: "default" 0.0;
808                color: 128 128 128 128;
809                fixed: 1 1;
810                visible: 1;
811                aspect: 1.0 1.0;
812             }
813          }
814          part { name: "elm.text";
815             type: TEXTBLOCK;
816             mouse_events: 0;
817             scale: 1;
818             description { state: "default" 0.0;
819                visible: 0;
820                fixed: 0 1;
821                rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; }
822                rel2 { relative: 1.0 0.5; offset: -2 -2; }
823                color: 255 255 255 255;
824                align: 0.0 0.5;
825                text {
826                   style: "check_label_textblock_style";
827                   min: 0 0;
828                }
829                color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
830             }
831             description { state: "visible" 0.0;
832                inherit: "default" 0.0;
833                visible: 1;
834                text.min: 1 1;
835             }
836             description { state: "disabled" 0.0;
837                inherit: "default" 0.0;
838             }
839             description { state: "disabled_visible" 0.0;
840                inherit: "default" 0.0;
841                visible: 1;
842                text.min: 1 1;
843                color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
844             }
845          }
846          part { name: "events";
847             type: RECT;
848             ignore_flags: ON_HOLD;
849             description { state: "default" 0.0;
850                color: 0 0 0 0;
851             }
852          }
853          part { name: "disabler";
854             type: RECT;
855             description { state: "default" 0.0;
856                color: 0 0 0 0;
857                visible: 0;
858             }
859             description { state: "disabled" 0.0;
860                inherit: "default" 0.0;
861                visible: 1;
862                color: 0 0 0 128;
863             }
864          }
865       }
866       programs {
867          program { name: "click";
868             signal: "mouse,up,1";
869             source: "events";
870             action: SIGNAL_EMIT "elm,action,check,toggle" "";
871          }
872          program { name: "pressed";
873             signal: "mouse,down,1";
874             source: "events";
875             script {
876                new st[31];
877                new Float:vl;
878                get_state(PART:"check", st, 30, vl);
879                if (!strcmp(st, "visible"))
880                   set_state(PART:"check", "visible_pressed", 0.0);
881                else if (!strcmp(st, "default"))
882                   set_state(PART:"check", "pressed", 0.0);
883             }
884          }
885          program { name: "mouseout";
886             signal: "mouse,out";
887             source: "events";
888             after: "bg_check_normal";
889          }
890          program { name: "bg_check_normal";
891             script {
892                new st[31];
893                new Float:vl;
894                get_state(PART:"check", st, 30, vl);
895                if (!strcmp(st, "pressed"))
896                   set_state(PART:"check", "default", 0.0);
897                else if (!strcmp(st, "visible_pressed"))
898                   set_state(PART:"check", "visible", 0.0);
899             }
900          }
901          program { name: "check_on";
902             signal: "elm,state,check,on";
903             source: "elm";
904             action:  STATE_SET "visible" 0.0;
905             target: "check";
906             after: "text_on";
907          }
908          program { name: "text_on";
909             action:  STATE_SET "on" 0.0;
910             target: "text_onoff";
911          }
912          program { name: "check_off";
913             signal: "elm,state,check,off";
914             source: "elm";
915             action:  STATE_SET "default" 0.0;
916             target: "check";
917             after: "text_off";
918          }
919          program { name: "text_off";
920             action:  STATE_SET "default" 0.0;
921             target: "text_onoff";
922          }
923          program { name: "text_show";
924             signal: "elm,state,text,visible";
925             source: "elm";
926             action:  STATE_SET "visible" 0.0;
927             target: "elm.text";
928          }
929          program { name: "text_hide";
930             signal: "elm,state,text,hidden";
931             source: "elm";
932             action:  STATE_SET "default" 0.0;
933             target: "elm.text";
934          }
935          program { name: "icon_show";
936             signal: "elm,state,icon,visible";
937             source: "elm";
938             action:  STATE_SET "visible" 0.0;
939             target: "elm.swallow.content";
940          }
941          program { name: "icon_hide";
942             signal: "elm,state,icon,hidden";
943             source: "elm";
944             action:  STATE_SET "default" 0.0;
945             target: "elm.swallow.content";
946          }
947          program { name: "disable";
948             signal: "elm,state,disabled";
949             source: "elm";
950             action: STATE_SET "disabled" 0.0;
951             target: "disabler";
952             after: "disable_text";
953          }
954          program { name: "disable_text";
955             script {
956                new st[31];
957                new Float:vl;
958                get_state(PART:"elm.text", st, 30, vl);
959                if (!strcmp(st, "visible"))
960                   set_state(PART:"elm.text", "disabled_visible", 0.0);
961                else
962                   set_state(PART:"elm.text", "disabled", 0.0);
963                get_state(PART:"elm.swallow.content", st, 30, vl);
964                if (!strcmp(st, "visible"))
965                   set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
966                else
967                   set_state(PART:"elm.swallow.content", "disabled", 0.0);
968             }
969          }
970          program { name: "enable";
971             signal: "elm,state,enabled";
972             source: "elm";
973             action: STATE_SET "default" 0.0;
974             target: "disabler";
975             after: "enable_text";
976          }
977          program { name: "enable_text";
978             script {
979                new st[31];
980                new Float:vl;
981                get_state(PART:"elm.text", st, 30, vl);
982                if (!strcmp(st, "disabled_visible"))
983                   set_state(PART:"elm.text", "visible", 0.0);
984                else
985                   set_state(PART:"elm.text", "default", 0.0);
986
987                get_state(PART:"elm.swallow.content", st, 30, vl);
988                if (!strcmp(st, "visible"))
989                   set_state(PART:"elm.swallow.content", "visible", 0.0);
990                else
991                   set_state(PART:"elm.swallow.content", "default", 0.0);
992             }
993          }
994       }
995    }
996
997 ///////////////////////////////////////////////////////////////////////////////////////
998 #define CHECK_STYLE_FAVORITE(style_name, min_width, min_height) \
999    group { name: "elm/check/base/"style_name; \
1000       images { \
1001          image: "00_winset_icon_favorite_off.png" COMP; \
1002          image: "00_winset_icon_favorite_on.png" COMP; \
1003       } \
1004       parts { \
1005          part { name: "back_bg"; \
1006             type: RECT; \
1007             mouse_events: 1; \
1008             scale: 1; \
1009             description { state: "default" 0.0; \
1010                 rel2.relative: 0.0 1.0; \
1011                align: 0 0.5; \
1012                min: min_width min_height; \
1013                fixed: 1 0; \
1014                visible: 1; \
1015                color: 0 0 0 0; \
1016             } \
1017          } \
1018          part { name: "bg"; \
1019             type: RECT; \
1020             mouse_events: 1; \
1021             scale: 1; \
1022             description { state: "default" 0.0; \
1023                rel2.relative: 1.0 1.0; \
1024                align: 0.5 0.5; \
1025                rel1 { to: "back_bg"; } \
1026                rel2 { to: "back_bg"; } \
1027               min: 40 40; \
1028                max: 40 40; \
1029                fixed: 1 1; \
1030                color: 0 0 0 0; \
1031             } \
1032          } \
1033          part { name: "check"; \
1034             mouse_events: 0; \
1035             scale: 1; \
1036             description { state: "default" 0.0; \
1037                rel1.to: "bg"; \
1038                rel2.to: "bg"; \
1039                visible: 1; \
1040                image.normal: "00_winset_icon_favorite_off.png"; \
1041                color: 255 255 255 255; \
1042             } \
1043             description { state: "visible" 0.0; \
1044                inherit: "default" 0.0; \
1045                visible: 1; \
1046                image.normal: "00_winset_icon_favorite_on.png"; \
1047             } \
1048             description { state: "disabled" 0.0; \
1049                inherit: "default" 0.0; \
1050                image.normal: "00_winset_icon_favorite_off.png"; \
1051                color: 128 128 128 255; \
1052                visible: 1; \
1053             } \
1054             description { state: "disabled_visible" 0.0; \
1055                inherit: "default" 0.0; \
1056                image.normal: "00_winset_icon_favorite_on.png"; \
1057                color: 128 128 128 255; \
1058                visible: 1; \
1059             } \
1060          } \
1061          part { name: "elm.swallow.content"; \
1062             type: SWALLOW; \
1063             description { state: "default" 0.0; \
1064                fixed: 1 0; \
1065                visible: 0; \
1066                color: 255 255 255 255; \
1067                align: 0.0 0.5; \
1068                rel1.to_x: "bg"; \
1069                rel1.relative: 1.0 0.0; \
1070                rel1.offset: 1 1; \
1071                rel2.to_x: "bg"; \
1072                rel2.relative: 1.0 1.0; \
1073                rel2.offset: 2 -2; \
1074             } \
1075             description { state: "visible" 0.0; \
1076                inherit: "default" 0.0; \
1077                fixed: 1 1; \
1078                 visible: 1; \
1079                aspect: 1.0 1.0; \
1080                aspect_preference: VERTICAL; \
1081             } \
1082             description { state: "disabled" 0.0; \
1083                inherit: "default" 0.0; \
1084                color: 128 128 128 128; \
1085             } \
1086             description { state: "disabled_visible" 0.0; \
1087                inherit: "default" 0.0; \
1088                color: 128 128 128 128; \
1089                fixed: 1 1; \
1090                visible: 1; \
1091                aspect: 1.0 1.0; \
1092             } \
1093          } \
1094          part { name: "elm.text"; \
1095             type: TEXTBLOCK; \
1096             mouse_events: 0; \
1097             scale: 1; \
1098             description { state: "default" 0.0; \
1099                visible: 0; \
1100                fixed: 0 1; \
1101                rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; } \
1102                rel2 { relative: 1.0 0.5; offset: -2 -2; } \
1103                align: 0.0 0.5; \
1104                text { \
1105                  style: "check_label_textblock_style"; \
1106                  min: 0 0; \
1107                } \
1108                color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1109             } \
1110             description { state: "visible" 0.0; \
1111                inherit: "default" 0.0; \
1112                visible: 1; \
1113                text.min: 1 1; \
1114             } \
1115             description { state: "disabled" 0.0; \
1116                inherit: "default" 0.0; \
1117             } \
1118             description { state: "disabled_visible" 0.0; \
1119                inherit: "default" 0.0; \
1120                visible: 1; \
1121                text.min: 1 1; \
1122                color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1123             } \
1124          } \
1125          part { name: "events"; \
1126             type: RECT; \
1127             ignore_flags: ON_HOLD; \
1128             description { state: "default" 0.0; \
1129                color: 0 0 0 0; \
1130             } \
1131          } \
1132          part { name: "disabler"; \
1133             type: RECT; \
1134             description { state: "default" 0.0; \
1135                color: 0 0 0 0; \
1136                visible: 0; \
1137             } \
1138             description { state: "disabled" 0.0; \
1139                inherit: "default" 0.0; \
1140                visible: 1; \
1141             } \
1142          } \
1143     } \
1144     programs { \
1145          program { name: "click"; \
1146             signal: "mouse,up,1"; \
1147             source: "events"; \
1148          action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1149          } \
1150          program { name: "check_on"; \
1151             signal: "elm,state,check,on"; \
1152             source: "elm"; \
1153             action:  STATE_SET "visible" 0.0; \
1154             target: "check"; \
1155          } \
1156          program { name: "check_off"; \
1157             signal: "elm,state,check,off"; \
1158             source: "elm"; \
1159             action:  STATE_SET "default" 0.0; \
1160             target: "check"; \
1161          } \
1162          program { name: "text_show"; \
1163             signal: "elm,state,text,visible"; \
1164             source: "elm"; \
1165             action:  STATE_SET "visible" 0.0; \
1166             target: "elm.text"; \
1167          } \
1168          program { name: "text_hide"; \
1169             signal: "elm,state,text,hidden"; \
1170             source: "elm"; \
1171             action:  STATE_SET "default" 0.0; \
1172             target: "elm.text"; \
1173          } \
1174          program { name: "icon_show"; \
1175             signal: "elm,state,icon,visible"; \
1176             source: "elm"; \
1177             action:  STATE_SET "visible" 0.0; \
1178             target: "elm.swallow.content"; \
1179          } \
1180          program { name: "icon_hide"; \
1181             signal: "elm,state,icon,hidden"; \
1182             source: "elm"; \
1183             action:  STATE_SET "default" 0.0; \
1184             target: "elm.swallow.content"; \
1185          } \
1186          program { name: "disable"; \
1187             signal: "elm,state,disabled"; \
1188             source: "elm"; \
1189             action: STATE_SET "disabled" 0.0; \
1190             target: "disabler"; \
1191             after: "disable_text"; \
1192          } \
1193          program { name: "disable_text"; \
1194             script { \
1195                new st[31]; \
1196                new Float:vl; \
1197                get_state(PART:"elm.text", st, 30, vl); \
1198                if (!strcmp(st, "visible")) \
1199                  set_state(PART:"elm.text", "disabled_visible", 0.0); \
1200                else \
1201                  set_state(PART:"elm.text", "disabled", 0.0); \
1202                get_state(PART:"elm.swallow.content", st, 30, vl); \
1203                if (!strcmp(st, "visible")) \
1204                  set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1205                else \
1206                  set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1207                get_state(PART:"check", st, 30, vl); \
1208                if (!strcmp(st, "visible")) \
1209                  set_state(PART:"check", "disabled_visible", 0.0); \
1210                else \
1211                   set_state(PART:"check", "disabled", 0.0); \
1212             } \
1213          } \
1214          program { name: "enable"; \
1215             signal: "elm,state,enabled"; \
1216             source: "elm"; \
1217             action: STATE_SET "default" 0.0; \
1218            target: "disabler"; \
1219             after: "enable_text"; \
1220          } \
1221          program { name: "enable_text"; \
1222             script { \
1223                new st[31]; \
1224                new Float:vl; \
1225                get_state(PART:"elm.text", st, 30, vl); \
1226                if (!strcmp(st, "disabled_visible")) \
1227                  set_state(PART:"elm.text", "visible", 0.0); \
1228                else \
1229                  set_state(PART:"elm.text", "default", 0.0); \
1230                get_state(PART:"elm.swallow.content", st, 30, vl); \
1231                if (!strcmp(st, "visible")) \
1232                  set_state(PART:"elm.swallow.content", "visible", 0.0); \
1233                else \
1234                  set_state(PART:"elm.swallow.content", "default", 0.0); \
1235                get_state(PART:"check", st, 30, vl); \
1236                if (!strcmp(st, "disabled_visible")) \
1237                  set_state(PART:"check", "visible", 0.0); \
1238                else \
1239                  set_state(PART:"check", "default", 0.0); \
1240             } \
1241          } \
1242       } \
1243    }
1244 ////////////////////////////////////////////////////////////////////////////////
1245 CHECK_STYLE_FAVORITE("favorite", 40, 40)
1246
1247 ////////////////////////////////////////////////////////////////////////////////
1248 CHECK_STYLE_FAVORITE("favorite/extended", 60, 75)
1249
1250 ////////////////////////////////////////////////////////////////////////////////
1251    group { name: "elm/check/base/delete";
1252       images {
1253          image: "00_button_delete.png" COMP;
1254          image: "00_button_delete_press.png" COMP;
1255          image: "00_button_delete_dim.png" COMP;
1256          image: "00_button_delete_text.png" COMP;
1257          image: "00_button_delete_text_press.png" COMP;
1258       }
1259       script {
1260          public button_state = 0; //0:enabled, 1: disabled
1261       }
1262       parts {
1263          part {
1264             name: "bg";
1265             mouse_events: 1;
1266             scale: 1;
1267             type: IMAGE;
1268             description { state: "default" 0.0;
1269                align: 1.0 0.5;
1270                min: 40 40;
1271                max: 40 40;
1272                rel1.relative: 1.0 0.0;
1273                fixed: 1 0;
1274                image.normal: "00_button_delete.png";
1275             }
1276             description { state: "clicked" 0.0;
1277                inherit: "default" 0.0;
1278                image.normal: "00_button_delete_press.png";
1279             }
1280             description { state: "intermediate" 0.0;
1281                inherit: "default" 0.0;
1282                visible: 0;
1283             }
1284             description { state: "on" 0.0;
1285                inherit: "default" 0.0;
1286                visible: 0;
1287             }
1288             description { state: "disabled" 0.0;
1289                inherit: "default" 0.0;
1290                image.normal: "00_button_delete_dim.png";
1291             }
1292          }
1293          part {
1294             name: "clipper";
1295             type: RECT;
1296             mouse_events: 0;
1297             scale: 1;
1298             description { state: "default" 0.0;
1299                align: 1.0 0.5;
1300                min: 40 40;
1301                max: 40 40;
1302                color: 255 255 255 255;
1303             }
1304             description { state: "on" 0.0;
1305                align: 1.0 0.5;
1306                min: 117 40;
1307                max: 117 40;
1308                color: 255 255 255 255;
1309             }
1310          }
1311          part {
1312             name: "bg_expand";
1313             mouse_events: 0;
1314             scale: 1;
1315             type: IMAGE;
1316             clip_to: "clipper";
1317             description { state: "default" 0.0;
1318                align: 0.0 0.5;
1319                min: 117 40;
1320                max: 117 40;
1321                image.normal: "00_button_delete_text.png";
1322                image.border: 32 16 0 0;
1323                image.border_scale: 1;
1324                rel1 { relative: 1 0; to_x: "bg"; }
1325                rel2 { relative: 1 1; to_x: "bg"; }
1326                fixed: 1 0;
1327             }
1328             description { state: "clicked" 0.0;
1329                align: 1.0 0.5;
1330                min: 117 40;
1331                max: 117 40;
1332                image.normal: "00_button_delete_text.png";
1333                image.border: 32 16 0 0;
1334                image.border_scale: 1;
1335                rel1 { relative: 1 0; to_x: "bg"; }
1336                rel2 { relative: 1 1; to_x: "bg"; }
1337                fixed: 1 0;
1338                image.normal: "00_button_delete_text_press.png";
1339             }
1340             description { state: "intermediate" 0.0;
1341                align: 0.0 0.5;
1342                min: 117 40;
1343                max: 117 40;
1344                image.normal: "00_button_delete_text.png";
1345                image.border: 32 16 0 0;
1346                image.border_scale: 1;
1347                rel1 { relative: 0 0; to_x: "bg"; }
1348                rel2 { relative: 0 1; to_x: "bg"; }
1349                fixed: 1 0;
1350             }
1351             description { state: "on" 0.0;
1352                align: 1.0 0.5;
1353                min: 117 40;
1354                max: 117 40;
1355                image.normal: "00_button_delete_text.png";
1356                image.border: 32 16 0 0;
1357                image.border_scale: 1;
1358                rel1 { relative: 1 0; to_x: "bg"; }
1359                rel2 { relative: 1 1; to_x: "bg"; }
1360                fixed: 1 0;
1361             }
1362          }
1363          part { name: "check";
1364             type: TEXT;
1365             mouse_events: 0;
1366             scale:1;
1367             description { state: "default" 0.0;
1368                visible: 0;
1369                align: 0.8 0.5;
1370                min: 0 0;
1371                text {
1372                   font: "SLP:style=Medium";
1373                   size: 20;
1374                   min: 0 0;
1375                   align: 0.5 0.5;
1376                   text: "";
1377                }
1378             }
1379             description { state: "visible" 0.0;
1380                visible: 1;
1381                align: 0.8 0.5;
1382                min: 75 40;
1383                max: 75 40;
1384                color: CHECK_DELETE_TEXT_DELETE_NORMAL_COLOR_INC;
1385                text {
1386                   font: "SLP:style=Medium";
1387                   size: 20;
1388                   min: 1 0;
1389                   align: 0.0 0.5;
1390                   text: "Delete";
1391                }
1392             }
1393             description { state: "visible_pressed" 0.0;
1394                inherit: "visible" 0.0;
1395                color: CHECK_DELETE_TEXT_DELETE_PRESS_COLOR_INC;
1396             }
1397          }
1398          part { name: "elm.swallow.content";
1399             type: SWALLOW;
1400             description { state: "default" 0.0;
1401                fixed: 1 0;
1402                visible: 0;
1403                color: 255 255 255 255;
1404                align: 0.0 0.5;
1405                rel1.to_x: "bg";
1406                rel1.relative: 1.0 0.0;
1407                rel1.offset: 1 1;
1408                rel2.to_x: "bg";
1409                rel2.relative: 1.0 1.0;
1410                rel2.offset: 2 -2;
1411             }
1412             description { state: "visible" 0.0;
1413                inherit: "default" 0.0;
1414                fixed: 1 1;
1415                visible: 1;
1416                aspect: 1.0 1.0;
1417                aspect_preference: VERTICAL;
1418             }
1419             description { state: "disabled" 0.0;
1420                inherit: "default" 0.0;
1421                color: 128 128 128 128;
1422             }
1423             description { state: "disabled_visible" 0.0;
1424                inherit: "default" 0.0;
1425                color: 128 128 128 128;
1426                fixed: 1 1;
1427                visible: 1;
1428                aspect: 1.0 1.0;
1429             }
1430          }
1431          part { name: "elm.text";
1432             type: TEXTBLOCK;
1433             mouse_events: 0;
1434             scale: 1;
1435             description { state: "default" 0.0;
1436                visible: 0;
1437                fixed: 1 1;
1438                rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; }
1439                rel2 { relative: 1.0 0.5; offset: -2 -2; }
1440                color: 255 255 255 255;
1441                align: 0.0 0.5;
1442                text {
1443                   style: "check_label_textblock_style";
1444                   min: 0 0;
1445                }
1446                color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1447             }
1448             description { state: "visible" 0.0;
1449                inherit: "default" 0.0;
1450                visible: 1;
1451                text.min: 1 1;
1452             }
1453             description { state: "disabled" 0.0;
1454                inherit: "default" 0.0;
1455             }
1456             description { state: "disabled_visible" 0.0;
1457                inherit: "default" 0.0;
1458                visible: 1;
1459                text.min: 1 1;
1460                color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
1461             }
1462          }
1463          part { name: "events1";
1464             type: RECT;
1465             ignore_flags: ON_HOLD;
1466             description { state: "default" 0.0;
1467                color: 0 0 0 0;
1468                rel1.to: "bg";
1469                rel2.to_x: "elm.text";
1470                align: 0.0 0.5;
1471             }
1472             description { state: "visible" 0.0;
1473                color: 0 0 0 0;
1474                rel1.to: "bg_expand";
1475                rel2.to_x: "elm.text";
1476                align: 0.0 0.5;
1477             }
1478          }
1479          part { name: "events2";
1480             type: RECT;
1481             repeat_events: 1;
1482             description { state: "default" 0.0;
1483                color: 0 0 0 0;
1484                rel1.to: "bg";
1485                rel2.to_x: "elm.text";
1486                align: 0.0 0.5;
1487             }
1488             description { state: "visible" 0.0;
1489                color: 0 0 0 0;
1490                rel1.to: "bg_expand";
1491                rel2.to_x: "elm.text";
1492                align: 0.0 0.5;
1493             }
1494          }
1495          part { name: "disabler";
1496             type: RECT;
1497             description { state: "default" 0.0;
1498                rel2.to_x: "elm.text";
1499                color: 0 0 0 0;
1500                visible: 0;
1501             }
1502             description { state: "disabled" 0.0;
1503                inherit: "default" 0.0;
1504                visible: 1;
1505             }
1506          }
1507       }
1508       programs {
1509          program { name: "click";
1510             signal: "mouse,clicked,1";
1511             source: "events1";
1512             script {
1513                new st[31];
1514                new Float:vl;
1515                get_state(PART:"check", st, 30, vl);
1516                if (!strcmp(st, "visible_pressed"))
1517                   set_state(PART:"check", "visible", 0.0);
1518             }
1519             after: "toggle";
1520          }
1521          program { name: "toggle";
1522             action: SIGNAL_EMIT "elm,action,check,toggle" "";
1523          }
1524          program { name: "unfocused";
1525             signal: "elm,action,unfocus";
1526             source: "elm";
1527             script {
1528                new st[31];
1529                new Float:vl;
1530                get_state(PART:"bg", st, 30, vl);
1531                if (!strcmp(st, "on")) {
1532                   emit("elm,action,check,toggle", "");
1533                }
1534             }
1535          }
1536          program { name: "click_down";
1537             signal: "mouse,down,1";
1538             source: "events2";
1539             script {
1540                new st[31];
1541                new Float:vl;
1542                get_state(PART:"check", st, 30, vl);
1543                if (!strcmp(st, "visible"))
1544                {
1545                   set_state(PART:"bg_expand", "clicked", 0.0);
1546                   set_state(PART:"check", "visible_pressed", 0.0);
1547                }
1548                else
1549                   set_state(PART:"bg", "clicked", 0.0);
1550             }
1551          }
1552          program { name: "check_normal";
1553             signal: "mouse,up,1";
1554             source: "events2";
1555             script {
1556                new st[31];
1557                new Float:vl;
1558                get_state(PART:"check", st, 30, vl);
1559                if (!strcmp(st, "visible_pressed"))
1560                {
1561                   set_state(PART:"bg_expand", "on", 0.0);
1562                   set_state(PART:"check", "visible", 0.0);
1563                }
1564                get_state(PART:"bg_expand", st, 30, vl);
1565                if (!strcmp(st, "default"))
1566                   set_state(PART:"bg", "default", 0.0);
1567             }
1568          }
1569          program { name: "check_on";
1570             signal: "elm,state,check,on";
1571             source: "elm";
1572             action: STATE_SET "on" 0.0;
1573             target: "clipper";
1574             after: "start_expand";
1575          }
1576          program { name: "start_expand";
1577             action:  STATE_SET "intermediate" 0.0;
1578             target: "bg";
1579             target: "bg_expand";
1580             after: "expand";
1581          }
1582          program { name: "expand";
1583             action: STATE_SET "on" 0.0;
1584             target: "bg_expand";
1585             target: "bg";
1586             transition: ACCELERATE 0.1;
1587             after: "check_visible";
1588          }
1589          program { name: "check_visible";
1590             action:  STATE_SET "visible" 0.0;
1591             target: "check";
1592             target: "events1";
1593             target: "events2";
1594          }
1595          program { name: "check_off";
1596             signal: "elm,state,check,off";
1597             source: "elm";
1598             action:  STATE_SET "default" 0.0;
1599             target: "check";
1600             after: "contract";
1601          }
1602          program { name: "contract";
1603             action:  STATE_SET "intermediate" 0.0;
1604             target: "bg_expand";
1605             transition: ACCELERATE 0.1;
1606             after: "normal_bg";
1607          }
1608          program { name: "normal_bg";
1609             script {
1610                if(get_int(button_state) !=1)
1611                   set_state(PART:"bg", "default", 0.0);
1612                else
1613                   set_state(PART:"bg", "disabled", 0.0);
1614             }
1615             after: "bg_default";
1616          }
1617          program { name: "bg_default";
1618             action:  STATE_SET "default" 0.0;
1619             target: "bg_expand";
1620             target: "clipper";
1621             target: "events1";
1622             target: "events2";
1623          }
1624          program { name: "text_show";
1625             signal: "elm,state,text,visible";
1626             source: "elm";
1627             action:  STATE_SET "visible" 0.0;
1628             target: "elm.text";
1629          }
1630          program { name: "text_hide";
1631             signal: "elm,state,text,hidden";
1632             source: "elm";
1633             action:  STATE_SET "default" 0.0;
1634             target: "elm.text";
1635          }
1636          program { name: "icon_show";
1637             signal: "elm,state,icon,visible";
1638             source: "elm";
1639             action:  STATE_SET "visible" 0.0;
1640             target: "elm.swallow.content";
1641          }
1642          program { name: "icon_hide";
1643             signal: "elm,state,icon,hidden";
1644             source: "elm";
1645             action:  STATE_SET "default" 0.0;
1646             target: "elm.swallow.content";
1647          }
1648          program { name: "disable";
1649             signal: "elm,state,disabled";
1650             source: "elm";
1651             action: STATE_SET "disabled" 0.0;
1652             target: "disabler";
1653             target: "bg";
1654             after: "disable_text";
1655          }
1656          program { name: "disable_text";
1657             script {
1658                new st[31];
1659                new Float:vl;
1660                get_state(PART:"elm.text", st, 30, vl);
1661                if (!strcmp(st, "visible"))
1662                   set_state(PART:"elm.text", "disabled_visible", 0.0);
1663                else
1664                   set_state(PART:"elm.text", "disabled", 0.0);
1665                get_state(PART:"elm.swallow.content", st, 30, vl);
1666                if (!strcmp(st, "visible"))
1667                   set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1668                else
1669                   set_state(PART:"elm.swallow.content", "disabled", 0.0);
1670                set_int(button_state, 1);
1671             }
1672          }
1673          program { name: "enable";
1674             signal: "elm,state,enabled";
1675             source: "elm";
1676             action: STATE_SET "default" 0.0;
1677             target: "disabler";
1678             target: "bg";
1679             after: "enable_text";
1680          }
1681          program { name: "enable_text";
1682             script {
1683                new st[31];
1684                new Float:vl;
1685                get_state(PART:"elm.text", st, 30, vl);
1686                if (!strcmp(st, "disabled_visible"))
1687                   set_state(PART:"elm.text", "visible", 0.0);
1688                else
1689                   set_state(PART:"elm.text", "default", 0.0);
1690
1691                get_state(PART:"elm.swallow.content", st, 30, vl);
1692                if (!strcmp(st, "visible"))
1693                   set_state(PART:"elm.swallow.content", "visible", 0.0);
1694                else
1695                   set_state(PART:"elm.swallow.content", "default", 0.0);
1696                set_int(button_state, 0);
1697             }
1698          }
1699       }
1700    }
1701
1702    group { name: "elm/check/base/delete/extended";
1703       images {
1704          image: "00_button_delete.png" COMP;
1705          image: "00_button_delete_press.png" COMP;
1706          image: "00_button_delete_dim.png" COMP;
1707          image: "00_button_delete_text.png" COMP;
1708          image: "00_button_delete_text_press.png" COMP;
1709       }
1710       script {
1711          public button_state = 0; //0:enabled, 1: disabled
1712       }
1713       parts {
1714          part {
1715             name: "bg";
1716             mouse_events: 1;
1717             scale: 1;
1718             type: IMAGE;
1719             description { state: "default" 0.0;
1720                align: 1.0 0.5;
1721                min: 40 40;
1722                max: 40 40;
1723                rel1.relative: 1.0 0.0;
1724                fixed: 1 0;
1725                image.normal: "00_button_delete.png";
1726             }
1727             description { state: "clicked" 0.0;
1728                inherit: "default" 0.0;
1729                image.normal: "00_button_delete_press.png";
1730             }
1731             description { state: "intermediate" 0.0;
1732                inherit: "default" 0.0;
1733                visible: 0;
1734             }
1735             description { state: "on" 0.0;
1736                inherit: "default" 0.0;
1737                visible: 0;
1738             }
1739             description { state: "disabled" 0.0;
1740                inherit: "default" 0.0;
1741                image.normal: "00_button_delete_dim.png";
1742             }
1743          }
1744          part {
1745             name: "clipper";
1746             type: RECT;
1747             mouse_events: 0;
1748             scale: 1;
1749             description { state: "default" 0.0;
1750                align: 1.0 0.5;
1751                min: 40 40;
1752                max: 40 40;
1753                color: 255 255 255 255;
1754             }
1755             description { state: "on" 0.0;
1756                align: 1.0 0.5;
1757                min: 117 40;
1758                max: 117 40;
1759                color: 255 255 255 255;
1760             }
1761          }
1762          part {
1763             name: "bg_expand";
1764             mouse_events: 0;
1765             scale: 1;
1766             type: IMAGE;
1767             clip_to: "clipper";
1768             description { state: "default" 0.0;
1769                align: 0.0 0.5;
1770                min: 117 40;
1771                max: 117 40;
1772                image.normal: "00_button_delete_text.png";
1773                image.border: 32 16 0 0;
1774                image.border_scale: 1;
1775                rel1 { relative: 1 0; to_x: "bg"; }
1776                rel2 { relative: 1 1; to_x: "bg"; }
1777                fixed: 1 0;
1778             }
1779             description { state: "clicked" 0.0;
1780                align: 1.0 0.5;
1781                min: 117 40;
1782                max: 117 40;
1783                image.normal: "00_button_delete_text.png";
1784                image.border: 32 16 0 0;
1785                image.border_scale: 1;
1786                rel1 { relative: 1 0; to_x: "bg"; }
1787                rel2 { relative: 1 1; to_x: "bg"; }
1788                fixed: 1 0;
1789                image.normal: "00_button_delete_text_press.png";
1790             }
1791             description { state: "intermediate" 0.0;
1792                align: 0.0 0.5;
1793                min: 117 40;
1794                max: 117 40;
1795                image.normal: "00_button_delete_text.png";
1796                image.border: 32 16 0 0;
1797                image.border_scale: 1;
1798                rel1 { relative: 0 0; to_x: "bg"; }
1799                rel2 { relative: 0 1; to_x: "bg"; }
1800                fixed: 1 0;
1801             }
1802             description { state: "on" 0.0;
1803                align: 1.0 0.5;
1804                min: 117 40;
1805                max: 117 40;
1806                image.normal: "00_button_delete_text.png";
1807                image.border: 32 16 0 0;
1808                image.border_scale: 1;
1809                rel1 { relative: 1 0; to_x: "bg"; }
1810                rel2 { relative: 1 1; to_x: "bg"; }
1811                fixed: 1 0;
1812             }
1813          }
1814          part { name: "check";
1815             type: TEXT;
1816             mouse_events: 0;
1817             scale:1;
1818             description { state: "default" 0.0;
1819                visible: 0;
1820                align: 0.8 0.5;
1821                min: 0 0;
1822                text {
1823                   font: "SLP:style=Medium";
1824                   size: 20;
1825                   min: 0 0;
1826                   align: 0.5 0.5;
1827                   text: "";
1828                }
1829             }
1830             description { state: "visible" 0.0;
1831                visible: 1;
1832                align: 0.8 0.5;
1833                min: 75 40;
1834                max: 75 40;
1835                color: CHECK_DELETE_TEXT_DELETE_NORMAL_COLOR_INC;
1836                text {
1837                   font: "SLP:style=Medium";
1838                   size: 20;
1839                   min: 1 0;
1840                   align: 0.0 0.5;
1841                   text: "Delete";
1842                }
1843             }
1844             description { state: "visible_pressed" 0.0;
1845                inherit: "visible" 0.0;
1846                color: CHECK_DELETE_TEXT_DELETE_PRESS_COLOR_INC;
1847             }
1848          }
1849          part { name: "elm.swallow.content";
1850             type: SWALLOW;
1851             description { state: "default" 0.0;
1852                fixed: 1 0;
1853                visible: 0;
1854                color: 255 255 255 255;
1855                align: 0.0 0.5;
1856                rel1.to_x: "bg";
1857                rel1.relative: 1.0 0.0;
1858                rel1.offset: 1 1;
1859                rel2.to_x: "bg";
1860                rel2.relative: 1.0 1.0;
1861                rel2.offset: 2 -2;
1862             }
1863             description { state: "visible" 0.0;
1864                inherit: "default" 0.0;
1865                fixed: 1 1;
1866                visible: 1;
1867                aspect: 1.0 1.0;
1868                aspect_preference: VERTICAL;
1869             }
1870             description { state: "disabled" 0.0;
1871                inherit: "default" 0.0;
1872                color: 128 128 128 128;
1873             }
1874             description { state: "disabled_visible" 0.0;
1875                inherit: "default" 0.0;
1876                color: 128 128 128 128;
1877                fixed: 1 1;
1878                visible: 1;
1879                aspect: 1.0 1.0;
1880             }
1881          }
1882          part { name: "elm.text";
1883             type: TEXTBLOCK;
1884             mouse_events: 0;
1885             scale: 1;
1886             description { state: "default" 0.0;
1887                visible: 0;
1888                fixed: 1 1;
1889                rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; }
1890                rel2 { relative: 1.0 0.5; offset: -2 -2; }
1891                color: 255 255 255 255;
1892                align: 0.0 0.5;
1893                text {
1894                   style: "check_label_textblock_style";
1895                   min: 0 0;
1896                }
1897                color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1898             }
1899             description { state: "visible" 0.0;
1900                inherit: "default" 0.0;
1901                visible: 1;
1902                text.min: 1 1;
1903             }
1904             description { state: "disabled" 0.0;
1905                inherit: "default" 0.0;
1906             }
1907             description { state: "disabled_visible" 0.0;
1908                inherit: "default" 0.0;
1909                visible: 1;
1910                text.min: 1 1;
1911                color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
1912             }
1913          }
1914          part { name: "events1";
1915             type: RECT;
1916             ignore_flags: ON_HOLD;
1917             description { state: "default" 0.0;
1918                color: 0 0 0 0;
1919                rel1.to: "bg";
1920                rel2.to_x: "elm.text";
1921                align: 0.0 0.5;
1922                fixed: 1 0;
1923                min: 60 75;
1924             }
1925             description { state: "visible" 0.0;
1926                color: 0 0 0 0;
1927                rel1.to: "bg_expand";
1928                rel2.to_x: "elm.text";
1929                align: 0.0 0.5;
1930                fixed: 1 0;
1931                min: 60 75;
1932             }
1933          }
1934          part { name: "events2";
1935             type: RECT;
1936             repeat_events: 1;
1937             description { state: "default" 0.0;
1938                color: 0 0 0 0;
1939                rel1.to: "bg";
1940                rel2.to_x: "elm.text";
1941                align: 0.0 0.5;
1942                fixed: 1 0;
1943                min: 60 75;
1944             }
1945             description { state: "visible" 0.0;
1946                color: 0 0 0 0;
1947                rel1.to: "bg_expand";
1948                rel2.to_x: "elm.text";
1949                align: 0.0 0.5;
1950                fixed: 1 0;
1951                min: 60 75;
1952             }
1953          }
1954          part { name: "disabler";
1955             type: RECT;
1956             description { state: "default" 0.0;
1957                rel2.to_x: "elm.text";
1958                color: 0 0 0 0;
1959                visible: 0;
1960             }
1961             description { state: "disabled" 0.0;
1962                inherit: "default" 0.0;
1963                visible: 1;
1964             }
1965          }
1966       }
1967       programs {
1968          program { name: "click";
1969             signal: "mouse,clicked,1";
1970             source: "events1";
1971             script {
1972                new st[31];
1973                new Float:vl;
1974                get_state(PART:"check", st, 30, vl);
1975                if (!strcmp(st, "visible_pressed"))
1976                   set_state(PART:"check", "visible", 0.0);
1977             }
1978             after: "toggle";
1979          }
1980          program { name: "toggle";
1981             action: SIGNAL_EMIT "elm,action,check,toggle" "";
1982          }
1983          program { name: "unfocused";
1984             signal: "elm,action,unfocus";
1985             source: "elm";
1986             script {
1987                new st[31];
1988                new Float:vl;
1989                get_state(PART:"bg", st, 30, vl);
1990                if (!strcmp(st, "on")) {
1991                   emit("elm,action,check,toggle", "");
1992                }
1993             }
1994          }
1995          program { name: "click_down";
1996             signal: "mouse,down,1";
1997             source: "events2";
1998             script {
1999                new st[31];
2000                new Float:vl;
2001                get_state(PART:"check", st, 30, vl);
2002                if (!strcmp(st, "visible"))
2003                {
2004                   set_state(PART:"bg_expand", "clicked", 0.0);
2005                   set_state(PART:"check", "visible_pressed", 0.0);
2006                }
2007                else
2008                   set_state(PART:"bg", "clicked", 0.0);
2009             }
2010          }
2011          program { name: "check_normal";
2012             signal: "mouse,up,1";
2013             source: "events2";
2014             script {
2015                new st[31];
2016                new Float:vl;
2017                get_state(PART:"check", st, 30, vl);
2018                if (!strcmp(st, "visible_pressed"))
2019                {
2020                   set_state(PART:"bg_expand", "on", 0.0);
2021                   set_state(PART:"check", "visible", 0.0);
2022                }
2023                get_state(PART:"bg_expand", st, 30, vl);
2024                if (!strcmp(st, "default"))
2025                   set_state(PART:"bg", "default", 0.0);
2026             }
2027          }
2028          program { name: "check_on";
2029             signal: "elm,state,check,on";
2030             source: "elm";
2031             action: STATE_SET "on" 0.0;
2032             target: "clipper";
2033             after: "start_expand";
2034          }
2035          program { name: "start_expand";
2036             action:  STATE_SET "intermediate" 0.0;
2037             target: "bg";
2038             target: "bg_expand";
2039             after: "expand";
2040          }
2041          program { name: "expand";
2042             action: STATE_SET "on" 0.0;
2043             target: "bg_expand";
2044             target: "bg";
2045             transition: ACCELERATE 0.1;
2046             after: "check_visible";
2047          }
2048          program { name: "check_visible";
2049             action:  STATE_SET "visible" 0.0;
2050             target: "check";
2051             target: "events1";
2052             target: "events2";
2053          }
2054          program { name: "check_off";
2055             signal: "elm,state,check,off";
2056             source: "elm";
2057             action:  STATE_SET "default" 0.0;
2058             target: "check";
2059             after: "contract";
2060          }
2061          program { name: "contract";
2062             action:  STATE_SET "intermediate" 0.0;
2063             target: "bg_expand";
2064             transition: ACCELERATE 0.1;
2065             after: "normal_bg";
2066          }
2067          program { name: "normal_bg";
2068             script {
2069                if(get_int(button_state) !=1)
2070                   set_state(PART:"bg", "default", 0.0);
2071                else
2072                   set_state(PART:"bg", "disabled", 0.0);
2073             }
2074             after: "bg_default";
2075          }
2076          program { name: "bg_default";
2077             action:  STATE_SET "default" 0.0;
2078             target: "bg_expand";
2079             target: "clipper";
2080             target: "events1";
2081             target: "events2";
2082          }
2083          program { name: "text_show";
2084             signal: "elm,state,text,visible";
2085             source: "elm";
2086             action:  STATE_SET "visible" 0.0;
2087             target: "elm.text";
2088          }
2089          program { name: "text_hide";
2090             signal: "elm,state,text,hidden";
2091             source: "elm";
2092             action:  STATE_SET "default" 0.0;
2093             target: "elm.text";
2094          }
2095          program { name: "icon_show";
2096             signal: "elm,state,icon,visible";
2097             source: "elm";
2098             action:  STATE_SET "visible" 0.0;
2099             target: "elm.swallow.content";
2100          }
2101          program { name: "icon_hide";
2102             signal: "elm,state,icon,hidden";
2103             source: "elm";
2104             action:  STATE_SET "default" 0.0;
2105             target: "elm.swallow.content";
2106          }
2107          program { name: "disable";
2108             signal: "elm,state,disabled";
2109             source: "elm";
2110             action: STATE_SET "disabled" 0.0;
2111             target: "disabler";
2112             target: "bg";
2113             after: "disable_text";
2114          }
2115          program { name: "disable_text";
2116             script {
2117                new st[31];
2118                new Float:vl;
2119                get_state(PART:"elm.text", st, 30, vl);
2120                if (!strcmp(st, "visible"))
2121                   set_state(PART:"elm.text", "disabled_visible", 0.0);
2122                else
2123                   set_state(PART:"elm.text", "disabled", 0.0);
2124                get_state(PART:"elm.swallow.content", st, 30, vl);
2125                if (!strcmp(st, "visible"))
2126                   set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2127                else
2128                   set_state(PART:"elm.swallow.content", "disabled", 0.0);
2129                set_int(button_state, 1);
2130             }
2131          }
2132          program { name: "enable";
2133             signal: "elm,state,enabled";
2134             source: "elm";
2135             action: STATE_SET "default" 0.0;
2136             target: "disabler";
2137             target: "bg";
2138             after: "enable_text";
2139          }
2140          program { name: "enable_text";
2141             script {
2142                new st[31];
2143                new Float:vl;
2144                get_state(PART:"elm.text", st, 30, vl);
2145                if (!strcmp(st, "disabled_visible"))
2146                   set_state(PART:"elm.text", "visible", 0.0);
2147                else
2148                   set_state(PART:"elm.text", "default", 0.0);
2149
2150                get_state(PART:"elm.swallow.content", st, 30, vl);
2151                if (!strcmp(st, "visible"))
2152                   set_state(PART:"elm.swallow.content", "visible", 0.0);
2153                else
2154                   set_state(PART:"elm.swallow.content", "default", 0.0);
2155                set_int(button_state, 0);
2156             }
2157          }
2158       }
2159    }
2160
2161 ////////////////////////////////////////////////////////////////////////////////
2162    group {
2163       name: "elm/check/base/grid";
2164       images {
2165             image: "00_grid_select_check.png" COMP;
2166       }
2167       parts {
2168          part {
2169             name: "bg";
2170             type: RECT;
2171             mouse_events: 1;
2172             scale: 1;
2173             description {
2174                state: "default" 0.0;
2175                rel1.relative: 0.0 0.0;
2176                rel2.relative: 1.0 1.0;
2177                color: 0 0 0 0;
2178                visible: 1;
2179             }
2180             description {
2181                state: "pressed" 0.0;
2182                inherit: "default" 0.0;
2183             }
2184             description {
2185                state: "disabled" 0.0;
2186                inherit: "default" 0.0;
2187                visible: 0;
2188             }
2189          }
2190          part {
2191             name: "bg2";
2192             type: RECT;
2193             mouse_events: 0;
2194             scale: 1;
2195             description {
2196                state: "default" 0.0;
2197                rel2.relative: 1.0 1.0;
2198                align: 0.5 0.5;
2199                min: 40 40;
2200                max: 40 40;
2201                color:  0 0 0 0;
2202                visible: 1;
2203             }
2204             description {
2205                state: "pressed" 0.0;
2206                inherit: "default" 0.0;
2207             }
2208             description {
2209                state: "disabled" 0.0;
2210                inherit: "default" 0.0;
2211                visible: 0;
2212             }
2213          }
2214          part {
2215             name: "selected_bg";
2216             type: RECT;
2217             scale: 1;
2218             description {
2219                state: "default" 0.0;
2220                rel1.to: "bg";
2221                rel2.to: "bg";
2222                color: 0 0 0 0;
2223                visible: 0;
2224             }
2225             description {
2226                state: "visible" 0.0;
2227                inherit: "default" 0.0;
2228                color: 0 0 0 128;
2229                visible: 1;
2230             }
2231          }
2232          part {
2233             name: "check";
2234             mouse_events: 0;
2235             scale: 1;
2236             description {
2237                state: "default" 0.0;
2238                rel1.to: "bg2";
2239                rel2.to: "bg2";
2240                visible: 0;
2241                image.normal: "00_grid_select_check.png";
2242             }
2243             description {
2244                state: "visible" 0.0;
2245                inherit: "default" 0.0;
2246                visible: 1;
2247             }
2248             description {
2249                state: "pressed" 0.0;
2250                inherit: "default" 0.0;
2251                visible: 1;
2252             }
2253             description {
2254                state: "disabled_visible" 0.0;
2255                inherit: "default" 0.0;
2256                visible: 1;
2257             }
2258          }
2259          part {
2260             name: "elm.swallow.content";
2261             type: SWALLOW;
2262             description {
2263                state: "default" 0.0;
2264                fixed: 1 0;
2265                visible: 0;
2266                color: 255 255 255 255;
2267                align: 0.0 0.5;
2268                rel1.to_x: "bg2";
2269                rel1.relative: 1.0 0.0;
2270                rel1.offset: 1 1;
2271                rel2.to_x: "bg2";
2272                rel2.relative: 1.0 1.0;
2273                rel2.offset: 2 -2;
2274             }
2275             description {
2276                state: "visible" 0.0;
2277                inherit: "default" 0.0;
2278                fixed: 1 1;
2279                visible: 1;
2280                aspect: 1.0 1.0;
2281                aspect_preference: VERTICAL;
2282             }
2283             description {
2284                state: "disabled" 0.0;
2285                inherit: "default" 0.0;
2286                color: 128 128 128 128;
2287             }
2288             description {
2289                state: "disabled_visible" 0.0;
2290                inherit: "default" 0.0;
2291                color: 128 128 128 128;
2292                fixed: 1 1;
2293                visible: 1;
2294                aspect: 1.0 1.0;
2295             }
2296          }
2297          part {
2298             name: "elm.text";
2299             type: TEXTBLOCK;
2300             mouse_events: 0;
2301             scale: 1;
2302             description {
2303                state: "default" 0.0;
2304                visible: 0;
2305                fixed: 0 1;
2306                rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; }
2307                rel2 { relative: 1.0 0.5; offset: -2 -2; }
2308                color: 255 255 255 255;
2309                align: 0.0 0.5;
2310                text {
2311                   style: "check_label_textblock_style";
2312                   min: 0 0;
2313                }
2314                color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2315             }
2316             description {
2317                state: "visible" 0.0;
2318                inherit: "default" 0.0;
2319                visible: 1;
2320                text.min: 1 1;
2321             }
2322             description {
2323                state: "disabled" 0.0;
2324                inherit: "default" 0.0;
2325             }
2326             description {
2327                state: "disabled_visible" 0.0;
2328                inherit: "default" 0.0;
2329                visible: 1;
2330                text.min: 1 1;
2331                color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2332             }
2333          }
2334          part {
2335             name: "events";
2336             type: RECT;
2337             ignore_flags: ON_HOLD;
2338             description {
2339                state: "default" 0.0;
2340                color: 0 0 0 0;
2341             }
2342          }
2343          part {
2344             name: "disabler";
2345             type: RECT;
2346             description {
2347                state: "default" 0.0;
2348                color: 0 0 0 0;
2349                visible: 0;
2350             }
2351             description {
2352                state: "disabled" 0.0;
2353                inherit: "default" 0.0;
2354                visible: 1;
2355             }
2356          }
2357       }
2358       programs {
2359          program {
2360             name: "click";
2361             signal: "mouse,up,1";
2362             source: "events";
2363             action: SIGNAL_EMIT "elm,action,check,toggle" "";
2364             after: "bg_normal";
2365          }
2366          program {
2367             name: "bg_normal";
2368             script {
2369                set_state(PART:"bg", "default", 0.0);
2370                set_state(PART:"bg2", "default", 0.0);
2371                }
2372             }
2373          program {
2374             name: "mouseout";
2375             signal: "mouse,out";
2376             source: "events";
2377             after: "bg_check_normal";
2378          }
2379          program {
2380             name: "bg_check_normal";
2381             script {
2382                new st[31];
2383                new Float:vl;
2384                get_state(PART:"check", st, 30, vl);
2385                if (!strcmp(st, "pressed"))
2386                         set_state(PART:"check", "visible", 0.0);
2387                set_state(PART:"bg", "default", 0.0);
2388                set_state(PART:"bg2", "default", 0.0);
2389             }
2390          }
2391          program {
2392             name: "pressed";
2393             signal: "mouse,down,1";
2394             source: "events";
2395             script {
2396                new st[31];
2397                new Float:vl;
2398                get_state(PART:"check", st, 30, vl);
2399                if (!strcmp(st, "visible"))
2400                         set_state(PART:"check", "pressed", 0.0);
2401                set_state(PART:"bg", "pressed", 0.0);
2402                set_state(PART:"bg2", "pressed", 0.0);
2403             }
2404          }
2405          program {
2406             name: "check_on";
2407             signal: "elm,state,check,on";
2408             source: "elm";
2409             action:  STATE_SET "visible" 0.0;
2410             target: "check";
2411             target: "selected_bg";
2412          }
2413          program {
2414             name: "check_off";
2415             signal: "elm,state,check,off";
2416             source: "elm";
2417             action:  STATE_SET "default" 0.0;
2418             target: "check";
2419             target: "selected_bg";
2420          }
2421          program {
2422             name: "text_show";
2423             signal: "elm,state,text,visible";
2424             source: "elm";
2425             action:  STATE_SET "visible" 0.0;
2426             target: "elm.text";
2427          }
2428          program {
2429             name: "text_hide";
2430             signal: "elm,state,text,hidden";
2431             source: "elm";
2432             action:  STATE_SET "default" 0.0;
2433             target: "elm.text";
2434          }
2435          program {
2436             name: "icon_show";
2437             signal: "elm,state,icon,visible";
2438             source: "elm";
2439             action:  STATE_SET "visible" 0.0;
2440             target: "elm.swallow.content";
2441          }
2442          program {
2443             name: "icon_hide";
2444             signal: "elm,state,icon,hidden";
2445             source: "elm";
2446             action:  STATE_SET "default" 0.0;
2447             target: "elm.swallow.content";
2448          }
2449          program {
2450             name: "disable";
2451             signal: "elm,state,disabled";
2452             source: "elm";
2453             action: STATE_SET "disabled" 0.0;
2454             target: "disabler";
2455             target: "bg";
2456             target: "bg2";
2457             after: "disable_text";
2458             }
2459          program {
2460             name: "disable_text";
2461             script {
2462                new st[31];
2463                new Float:vl;
2464                get_state(PART:"elm.text", st, 30, vl);
2465                if (!strcmp(st, "visible"))
2466                   set_state(PART:"elm.text", "disabled_visible", 0.0);
2467                else
2468                   set_state(PART:"elm.text", "disabled", 0.0);
2469                get_state(PART:"elm.swallow.content", st, 30, vl);
2470                if (!strcmp(st, "visible"))
2471                   set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2472                else
2473                   set_state(PART:"elm.swallow.content", "disabled", 0.0);
2474                get_state(PART:"check", st, 30, vl);
2475                if (!strcmp(st, "visible"))
2476                         set_state(PART:"check", "disabled_visible", 0.0);
2477             }
2478          }
2479          program {
2480             name: "enable";
2481             signal: "elm,state,enabled";
2482             source: "elm";
2483             action: STATE_SET "default" 0.0;
2484             target: "disabler";
2485             target: "bg";
2486             target: "bg2";
2487             after: "enable_text";
2488          }
2489          program {
2490             name: "enable_text";
2491             script {
2492                new st[31];
2493                new Float:vl;
2494                get_state(PART:"elm.text", st, 30, vl);
2495                if (!strcmp(st, "disabled_visible"))
2496                   set_state(PART:"elm.text", "visible", 0.0);
2497                else
2498                   set_state(PART:"elm.text", "default", 0.0);
2499
2500                get_state(PART:"elm.swallow.content", st, 30, vl);
2501                if (!strcmp(st, "visible"))
2502                   set_state(PART:"elm.swallow.content", "visible", 0.0);
2503                else
2504                   set_state(PART:"elm.swallow.content", "default", 0.0);
2505                get_state(PART:"check", st, 30, vl);
2506                if (!strcmp(st, "disabled_visible"))
2507                   set_state(PART:"check", "visible", 0.0);
2508             }
2509          }
2510       }
2511    }
2512
2513 #undef CHECK_STATE_DEFAULT
2514 #undef CHECK_STATE_VISIBLE
2515 #undef CHECK_STATE_DISABLED_VISIBLE
2516 #undef CHECK_STATE_DISABLED