tizen 2.3.1 release
[framework/uifw/efl-theme-tizen.git] / 2.3-mobile / widgets / check.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  *   1. Redistributions of source code must retain the above copyright notice, this
10  *      list of conditions and the following disclaimer.
11  *   2. Redistributions in binary form must reproduce the above copyright notice,
12  *      this list of conditions and the following disclaimer in the documentation
13  *      and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26 group { name: "elm/check/base/default";
27    images {
28       set {
29          name: "core_check_bg";
30             image {
31                image: SMALL"images/Controls/core_check_bg.png" COMP;
32             }
33             image {
34                image: MEDIUM"images/Controls/core_check_bg.png" COMP;
35             }
36       }
37       set {
38          name: "core_check_bg_stroke";
39             image {
40                image: SMALL"images/Controls/core_check_bg_stroke.png" COMP;
41             }
42             image {
43                image: MEDIUM"images/Controls/core_check_bg_stroke.png" COMP;
44             }
45       }
46       set {
47          name: "core_check_icon";
48             image {
49                image: SMALL"images/Controls/core_check_icon.png" COMP;
50             }
51             image {
52                image: MEDIUM"images/Controls/core_check_icon.png" COMP;
53             }
54       }
55    }
56    script {
57       public check_state;
58       public check_disabled;
59       public check_visible;
60    }
61    parts {
62       part { name: "bg";
63          scale: 1;
64          description { state: "default" 0.0;
65             min: CHECK_BG_SIZE;
66             align: 0.0 0.5;
67             aspect: 1 1;
68             aspect_preference: BOTH;
69             image.normal: "core_check_bg";
70             color: 0 0 0 102; /*(Changeable UI) color_class: "W013L1E1";*/
71          }
72          description { state: "on" 0.0;
73             inherit: "default" 0.0;
74             color: 2 61 132 255; /*(Changeable UI) color_class: "W013L1";*/
75          }
76          description { state: "disabled" 0.0;
77             inherit: "default" 0.0;
78             color: 0 0 0 51; /*(Changeable UI) color_class: "W013L1D";*/
79          }
80       }
81       part { name: "bg_stroke";
82          scale: 1;
83          description { state: "default" 0.0;
84             min: CHECK_BG_STROKE_SIZE;
85             align: 0.0 0.5;
86             aspect: 1 1;
87             aspect_preference: BOTH;
88             image.normal: "core_check_bg_stroke";
89             color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2E1";*/
90          }
91          description { state: "on" 0.0;
92             inherit: "default" 0.0;
93             color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2";*/
94          }
95          description { state: "disabled" 0.0;
96             inherit: "default" 0.0;
97             color: 191 191 191 76; /*(Changeable UI) color_class: "W013L2D";*/
98          }
99       }
100       part { name: "check";
101          scale: 1;
102          description { state: "default" 0.0;
103             min: CHECK_ICON_SIZE;
104             rel1.to: "bg";
105             rel1.relative: 0.125 0.125;
106             rel2.to: "bg";
107             rel2.relative: 0.875 0.875;
108             aspect: 1 1;
109             aspect_preference: BOTH;
110             image.normal: "core_check_icon";
111             color: 244 244 244 255; /*(Changeable UI) color_class:"W013L1i";*/
112             visible:0;
113          }
114          description { state: "on" 0.0;
115             inherit: "default" 0.0;
116             visible: 1;
117          }
118          description { state: "disabled" 0.0;
119             inherit: "default" 0.0;
120             color: 244 244 244 153; /*(Changeable UI) color_class:"W013L1iD";*/
121          }
122       }
123       part { name: "event";
124          scale: 1;
125          type: RECT;
126          description { state: "default" 0.0;
127             rel1.to: "bg";
128             rel2.to: "bg";
129             color: 0 0 0 0;
130          }
131       }
132    }
133    programs {
134       program { name: "show";
135          signal: "show";
136          script {
137             set_int(check_visible, 1);
138          }
139       }
140       program { name: "hide";
141          signal: "hide";
142          script {
143             set_int(check_visible, 0);
144          }
145       }
146       program { name: "click";
147          signal: "mouse,clicked,1";
148          source: "event";
149          script {
150             if (get_int(check_disabled) == 1) return;
151             emit("elm,action,check,toggle", "");
152             run_program(PROGRAM:"touch_sound");
153          }
154       }
155       program { name: "touch_sound";
156          action: RUN_PLUGIN "touch_sound";
157       }
158       program { name: "unpressed";
159          signal: "mouse,up,1";
160          source: "event";
161          script {
162             if (get_int(check_disabled) == 1) return;
163             if (get_int(check_state) == 1) {
164               set_state(PART:"check", "on", 0.0);
165               set_state(PART:"bg", "on", 0.0);
166               set_state(PART:"bg_stroke", "on", 0.0);
167             }
168             else {
169               set_state(PART:"check", "default", 0.0);
170               set_state(PART:"bg", "default", 0.0);
171               set_state(PART:"bg_stroke", "default", 0.0);
172             }
173          }
174       }
175       program { name: "unpressed2";
176          signal: "elm,state,mouse,up";
177          source: "elm";
178          script {
179             if (get_int(check_disabled) == 1) return;
180             if (get_int(check_state) == 1) {
181               set_state(PART:"check", "on", 0.0);
182               set_state(PART:"bg", "on", 0.0);
183               set_state(PART:"bg_stroke", "on", 0.0);
184             }
185             else {
186               set_state(PART:"check", "default", 0.0);
187               set_state(PART:"bg", "default", 0.0);
188               set_state(PART:"bg_stroke", "default", 0.0);
189             }
190          }
191       }
192
193       program { name: "check_on";
194          signal: "elm,state,check,on";
195          source: "elm";
196          script {
197             if (get_int(check_disabled) == 1) {
198                set_state(PART:"bg", "disabled", 0.0);
199                set_state(PART:"bg_stroke", "disabled", 0.0);
200             }
201             else {
202                set_state(PART:"bg", "on", 0.0);
203                set_state(PART:"bg_stroke", "on", 0.0);
204             }
205             set_state(PART:"check", "on", 0.0);
206             set_int(check_state, 1);
207          }
208       }
209       program { name: "check_off";
210          signal: "elm,state,check,off";
211          source: "elm";
212          script {
213             if (get_int(check_disabled) == 1) {
214                set_state(PART:"bg", "disabled", 0.0);
215                set_state(PART:"bg_stroke", "disabled", 0.0);
216             }
217             else {
218                set_state(PART:"bg", "default", 0.0);
219                set_state(PART:"bg_stroke", "on", 0.0);
220             }
221             set_state(PART:"check", "default", 0.0);
222             set_int(check_state, 0);
223          }
224       }
225       program { name: "disable";
226          signal: "elm,state,disabled";
227          source: "elm";
228          script {
229             set_int(check_disabled, 1);
230             set_state(PART:"bg", "disabled", 0.0);
231             set_state(PART:"bg_stroke", "disabled", 0.0);
232             set_state(PART:"check", "disabled", 0.0);
233          }
234       }
235       program { name: "enable";
236          signal: "elm,state,enabled";
237          source: "elm";
238          script {
239             set_int(check_disabled, 0);
240             if (get_int(check_state) == 1) {
241               set_state(PART:"bg", "on", 0.0);
242               set_state(PART:"bg_stroke", "on", 0.0);
243               set_state(PART:"check", "on", 0.0);
244             }
245             else {
246               set_state(PART:"bg", "default", 0.0);
247               set_state(PART:"bg_stroke", "default", 0.0);
248               set_state(PART:"check", "default", 0.0);
249             }
250          }
251       }
252    }
253 }
254
255 group { name: "elm/check/base/list";
256    images {
257       image: "core_check_bg.png" COMP;
258       image: "core_check_bg_stroke.png" COMP;
259       image: "core_check_icon.png" COMP;
260    }
261    script {
262       public check_state;
263       public check_disabled;
264       public check_visible;
265    }
266    parts {
267       part { name: "bg";
268          scale: 1;
269          description { state: "default" 0.0;
270             min: CHECK_BG_SIZE;
271             align: 0.0 0.5;
272             aspect: 1 1;
273             aspect_preference: BOTH;
274             image.normal: "core_check_bg.png";
275             color: 0 0 0 102; /*(Changeable UI) color_class: "W013L1E1";*/
276          }
277          description { state: "on" 0.0;
278             inherit: "default" 0.0;
279             color: 2 61 132 255; /*(Changeable UI) color_class: "W013L1";*/
280          }
281          description { state: "disabled" 0.0;
282             inherit: "default" 0.0;
283             color: 0 0 0 51; /*(Changeable UI) color_class: "W013L1D";*/
284          }
285       }
286       part { name: "bg_stroke";
287          scale: 1;
288          description { state: "default" 0.0;
289             min: CHECK_BG_STROKE_SIZE;
290             align: 0.0 0.5;
291             aspect: 1 1;
292             aspect_preference: BOTH;
293             image.normal: "core_check_bg_stroke.png";
294             color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2E1";*/
295          }
296          description { state: "on" 0.0;
297             inherit: "default" 0.0;
298             color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2";*/
299          }
300          description { state: "disabled" 0.0;
301             inherit: "default" 0.0;
302             color: 191 191 191 76; /*(Changeable UI) color_class: "W013L2D";*/
303          }
304       }
305       part { name: "check";
306          scale: 1;
307          description { state: "default" 0.0;
308             min: CHECK_ICON_SIZE;
309             rel1.to: "bg";
310             rel1.relative: 0.125 0.125;
311             rel2.to: "bg";
312             rel2.relative: 0.875 0.875;
313             aspect: 1 1;
314             aspect_preference: BOTH;
315             image.normal: "core_check_icon.png";
316             color: 244 244 244 255; /*(Changeable UI) color_class:"W013L1i";*/
317             visible:0;
318          }
319          description { state: "on" 0.0;
320             inherit: "default" 0.0;
321             visible: 1;
322          }
323          description { state: "disabled" 0.0;
324             inherit: "default" 0.0;
325             color: 244 244 244 153; /*(Changeable UI) color_class:"W013L1iD";*/
326          }
327       }
328       part { name: "event";
329          scale: 1;
330          type: RECT;
331          description { state: "default" 0.0;
332             rel1.to: "bg";
333             rel2.to: "bg";
334             color: 0 0 0 0;
335          }
336       }
337    }
338    programs {
339       program { name: "show";
340          signal: "show";
341          script {
342             set_int(check_visible, 1);
343          }
344       }
345       program { name: "hide";
346          signal: "hide";
347          script {
348             set_int(check_visible, 0);
349          }
350       }
351       program { name: "unpressed";
352          signal: "mouse,up,1";
353          source: "event";
354          script {
355             if (get_int(check_disabled) == 1) return;
356             if (get_int(check_state) == 1) {
357               set_state(PART:"check", "on", 0.0);
358               set_state(PART:"bg", "on", 0.0);
359               set_state(PART:"bg_stroke", "on", 0.0);
360             }
361             else {
362               set_state(PART:"check", "default", 0.0);
363               set_state(PART:"bg", "default", 0.0);
364               set_state(PART:"bg_stroke", "default", 0.0);
365             }
366          }
367       }
368       program { name: "unpressed2";
369          signal: "elm,state,mouse,up";
370          source: "elm";
371          script {
372             if (get_int(check_disabled) == 1) return;
373             if (get_int(check_state) == 1) {
374               set_state(PART:"check", "on", 0.0);
375               set_state(PART:"bg", "on", 0.0);
376               set_state(PART:"bg_stroke", "on", 0.0);
377             }
378             else {
379               set_state(PART:"check", "default", 0.0);
380               set_state(PART:"bg", "default", 0.0);
381               set_state(PART:"bg_stroke", "default", 0.0);
382             }
383          }
384       }
385
386       program { name: "check_on";
387          signal: "elm,state,check,on";
388          source: "elm";
389          script {
390             if (get_int(check_disabled) == 1) {
391                set_state(PART:"bg", "disabled", 0.0);
392                set_state(PART:"bg_stroke", "disabled", 0.0);
393             }
394             else {
395                set_state(PART:"bg", "on", 0.0);
396                set_state(PART:"bg_stroke", "on", 0.0);
397             }
398             set_state(PART:"check", "on", 0.0);
399             set_int(check_state, 1);
400          }
401       }
402       program { name: "check_off";
403          signal: "elm,state,check,off";
404          source: "elm";
405          script {
406             if (get_int(check_disabled) == 1) {
407                set_state(PART:"bg", "disabled", 0.0);
408                set_state(PART:"bg_stroke", "disabled", 0.0);
409             }
410             else {
411                set_state(PART:"bg", "default", 0.0);
412                set_state(PART:"bg_stroke", "on", 0.0);
413             }
414             set_state(PART:"check", "default", 0.0);
415             set_int(check_state, 0);
416          }
417       }
418       program { name: "disable";
419          signal: "elm,state,disabled";
420          source: "elm";
421          script {
422             set_int(check_disabled, 1);
423             set_state(PART:"bg", "disabled", 0.0);
424             set_state(PART:"bg_stroke", "disabled", 0.0);
425             set_state(PART:"check", "disabled", 0.0);
426          }
427       }
428       program { name: "enable";
429          signal: "elm,state,enabled";
430          source: "elm";
431          script {
432             set_int(check_disabled, 0);
433             if (get_int(check_state) == 1) {
434               set_state(PART:"bg", "on", 0.0);
435               set_state(PART:"bg_stroke", "on", 0.0);
436               set_state(PART:"check", "on", 0.0);
437             }
438             else {
439               set_state(PART:"bg", "default", 0.0);
440               set_state(PART:"bg_stroke", "default", 0.0);
441               set_state(PART:"check", "default", 0.0);
442             }
443          }
444       }
445    }
446 }
447
448 group { name: "elm/check/base/favorite";
449    images {
450       set {
451          name: "core_icon_favorite";
452          image {
453             image: SMALL"images/Controls/core_icon_favorite.png" COMP;
454          }
455          image {
456             image: MEDIUM"images/Controls/core_icon_favorite.png" COMP;
457          }
458       }
459    }
460    script {
461       public check_state;
462       public check_disabled;
463       public check_visible;
464    }
465    parts {
466       part { name: "bg";
467          scale: 1;
468          description { state: "default" 0.0;
469             min: CHECK_BG_SIZE ;
470             max: CHECK_BG_SIZE ;
471             image.normal: "core_icon_favorite";
472             color: 7 7 7 76; /*(Changeable UI) color_class: "W016L1iE1";*/
473          }
474          description { state: "on" 0.0;
475             inherit: "default" 0.0;
476             color: 255 178 0 255; /*(Changeable UI) color_class: "W016L1i";*/
477          }
478          description { state: "disabled" 0.0;
479             inherit: "default" 0.0;
480             color: 7 7 7 38; /*(Changeable UI) color_class: "W016L1iD";*/
481          }
482       }
483       part { name: "event";
484          scale: 1;
485          type: RECT;
486          description { state: "default" 0.0;
487             rel1.to: "bg";
488             rel2.to: "bg";
489             color: 0 0 0 0;
490          }
491       }
492    }
493    programs {
494       program { name: "show";
495          signal: "show";
496          script {
497             set_int(check_visible, 1);
498          }
499       }
500       program { name: "hide";
501          signal: "hide";
502          script {
503             set_int(check_visible, 0);
504          }
505       }
506       program { name: "click";
507          signal: "mouse,clicked,1";
508          source: "event";
509          script {
510             if (get_int(check_disabled) == 1) return;
511             emit("elm,action,check,toggle", "");
512             run_program(PROGRAM:"touch_sound");
513          }
514       }
515       program { name: "touch_sound";
516          action: RUN_PLUGIN "touch_sound";
517       }
518       program { name: "unpressed";
519          signal: "mouse,up,1";
520          source: "event";
521          script {
522             if (get_int(check_disabled) == 1) return;
523             if (get_int(check_state) == 1)
524               set_state(PART:"bg", "on", 0.0);
525             else
526               set_state(PART:"bg", "default", 0.0);
527          }
528       }
529       program { name: "unpressed2";
530          signal: "elm,state,mouse,up";
531          source: "elm";
532          script {
533             if (get_int(check_disabled) == 1) return;
534             if (get_int(check_state) == 1)
535               set_state(PART:"bg", "on", 0.0);
536             else
537               set_state(PART:"bg", "default", 0.0);
538          }
539       }
540       program { name: "check_on";
541          signal: "elm,state,check,on";
542          source: "elm";
543          script {
544             set_state(PART:"bg", "on", 0.0);
545             set_int(check_state, 1);
546          }
547       }
548       program { name: "check_off";
549          signal: "elm,state,check,off";
550          source: "elm";
551          script {
552             if (get_int(check_disabled) == 1)
553                set_state(PART:"bg", "disabled", 0.0);
554             else
555                set_state(PART:"bg", "default", 0.0);
556             set_int(check_state, 0);
557          }
558       }
559       program { name: "disable";
560          signal: "elm,state,disabled";
561          source: "elm";
562          script {
563             set_int(check_disabled, 1);
564             if (get_int(check_state) == 1)
565               set_state(PART:"bg", "on", 0.0);
566             else
567               set_state(PART:"bg", "disabled", 0.0);
568          }
569       }
570       program { name: "enable";
571          signal: "elm,state,enabled";
572          source: "elm";
573          script {
574             set_int(check_disabled, 0);
575             if (get_int(check_state) == 1)
576               set_state(PART:"bg", "on", 0.0);
577             else
578               set_state(PART:"bg", "default", 0.0);
579          }
580       }
581    }
582 }
583
584 group { name: "elm/check/base/on&off";
585    images {
586       set {
587          name: "core_toggle_bg";
588          image {
589             image: SMALL"images/Controls/core_toggle_bg.png" COMP;
590          }
591          image {
592             image: MEDIUM"images/Controls/core_toggle_bg.png" COMP;
593          }
594       }
595       set {
596          name: "core_toggle_icon_off";
597          image {
598             image: SMALL"images/Controls/core_toggle_icon_off.png" COMP;
599          }
600          image {
601             image: MEDIUM"images/Controls/core_toggle_icon_off.png" COMP;
602          }
603       }
604       set {
605          name: "core_toggle_icon_on";
606          image {
607             image: SMALL"images/Controls/core_toggle_icon_on.png" COMP;
608          }
609          image {
610             image: MEDIUM"images/Controls/core_toggle_icon_on.png" COMP;
611          }
612       }
613    }
614    script {
615       public check_state;
616       public check_disabled;
617       public check_visible;
618    }
619    parts {
620       part { name: "bg";
621          type: SPACER;
622          mouse_events: 0;
623          scale: 1;
624          description { state: "default" 0.0;
625             min: CHECK_GEN_SIZE;
626             max: CHECK_GEN_SIZE;
627          }
628       }
629       part { name: "bg_image";
630          mouse_events: 0;
631          scale: 1;
632          description { state: "default" 0.0;
633             rel1.to: "bg";
634             rel2.to: "bg";
635             image.normal: "core_toggle_bg";
636             color: 7 7 7 76; /*(Changeable UI) color_class: "W015L1E1";*/
637          }
638          description { state: "on" 0.0;
639             inherit: "default" 0.0;
640             color: 52 158 91 255; /*(Changeable UI) color_class: "W015L1";*/
641          }
642          description { state: "disabled" 0.0;
643             inherit: "default" 0.0;
644             color: 7 7 7 38; /*(Changeable UI) color_class: "W015L1D";*/
645          }
646       }
647       part { name: "button";
648          mouse_events: 0;
649          scale: 1;
650          description { state: "default" 0.0;
651             min: CHECK_SIZE ;
652             max: CHECK_SIZE ;
653             rel1.to: "bg_image";
654             rel2.to: "bg_image";
655             image.normal: "core_toggle_icon_off";
656             color: 244 244 244 255; /*(Changeable UI) color_class: "W015L1i";*/
657          }
658          description { state: "on" 0.0;
659             inherit: "default" 0.0;
660             image.normal: "core_toggle_icon_on";
661             color: 244 244 244 255; /*(Changeable UI) color_class: "W015L1i";*/
662          }
663       }
664       part { name: "event";
665          scale: 1;
666          type: RECT;
667          description { state: "default" 0.0;
668             rel1.to: "bg";
669             rel2.to: "bg";
670             color: 0 0 0 0;
671          }
672       }
673    }
674    programs {
675       program { name: "show";
676          signal: "show";
677          script {
678             set_int(check_visible, 1);
679          }
680       }
681       program { name: "hide";
682          signal: "hide";
683          script {
684             set_int(check_visible, 0);
685          }
686       }
687       program { name: "click";
688          signal: "mouse,clicked,1";
689          source: "event";
690          script {
691             if (get_int(check_disabled) == 1) return;
692             emit("elm,action,check,toggle", "");
693             run_program(PROGRAM:"touch_sound");
694          }
695       }
696       program { name: "touch_sound";
697          action: RUN_PLUGIN "touch_sound";
698       }
699       program { name: "unpressed";
700          signal: "mouse,up,1";
701          source: "event";
702          script {
703             if (get_int(check_disabled) == 1) return;
704             if (get_int(check_state) == 1) {
705               set_state(PART:"bg_image", "on", 0.0);
706               set_state(PART:"button", "on", 0.0);
707             }
708             else {
709               set_state(PART:"bg_image", "default", 0.0);
710               set_state(PART:"button", "default", 0.0);
711             }
712          }
713       }
714       program { name: "unpressed2";
715          signal: "elm,state,mouse,up";
716          source: "elm";
717          script {
718             if (get_int(check_disabled) == 1) return;
719             if (get_int(check_state) == 1) {
720               set_state(PART:"bg_image", "on", 0.0);
721               set_state(PART:"button", "on", 0.0)
722             }
723             else {
724               set_state(PART:"bg_image", "default", 0.0);
725               set_state(PART:"button", "default", 0.0);
726             }
727          }
728       }
729       program { name: "check_on";
730          signal: "elm,state,check,on";
731          source: "elm";
732          script {
733             if (get_int(check_disabled) == 1)
734                set_state(PART:"bg_image", "disabled", 0.0);
735             else
736                set_state(PART:"bg_image", "on", 0.0);
737             set_state(PART:"button", "on", 0.0)
738             set_int(check_state, 1);
739          }
740       }
741       program { name: "check_off";
742          signal: "elm,state,check,off";
743          source: "elm";
744          script {
745             if (get_int(check_disabled) == 1)
746                set_state(PART:"bg_image", "disabled", 0.0);
747             else
748                set_state(PART:"bg_image", "default", 0.0);
749             set_state(PART:"button", "default", 0.0);
750             set_int(check_state, 0);
751          }
752       }
753       program { name: "disable";
754          signal: "elm,state,disabled";
755          source: "elm";
756          script {
757             set_int(check_disabled, 1);
758             set_state(PART:"bg_image", "disabled", 0.0);
759          }
760       }
761       program { name: "enable";
762          signal: "elm,state,enabled";
763          source: "elm";
764          script {
765             set_int(check_disabled, 0);
766             if (get_int(check_state) == 1)
767               set_state(PART:"bg_image", "on", 0.0);
768             else
769               set_state(PART:"bg_image", "default", 0.0);
770          }
771       }
772    }
773 }
774
775 group { name: "elm/check/base/popup";
776    inherit: "elm/check/base/default";
777    parts {
778       part { name: "padding_before_text";
779          type: SPACER;
780          scale: 1;
781          description { state: "default" 0.0;
782             align: 0.0 0.5;
783             min: 0 0;
784             rel1 {
785                to_x: "bg";
786                relative: 1.0 0.0;
787             }
788             rel2 {
789                to_x: "bg";
790                relative: 1.0 1.0;
791             }
792          }
793          description { state: "visible" 0.0;
794             inherit: "default" 0.0;
795             min: CHECK_PAD_BEFORE_TEXT_INC;
796             max: CHECK_PAD_BEFORE_TEXT_INC;
797             fixed: 1 0;
798          }
799       }
800       part { name: "elm.text";
801          type: TEXTBLOCK;
802          mouse_events: 0;
803          scale: 1;
804          description { state: "default" 0.0;
805             visible: 0;
806             fixed: 0 1;
807             rel1 {
808                relative: 1.0 0.5;
809                to_x: "padding_before_text";
810             }
811             rel2 {
812                relative: 1.0 0.5;
813             }
814             align: 0.0 0.5;
815             text {
816                style: "check_popup";
817                min: 0 0;
818             }
819          }
820          description { state: "visible" 0.0;
821             inherit: "default" 0.0;
822             visible: 1;
823             text.min: 1 1;
824          }
825          description { state: "disabled" 0.0;
826             inherit: "default" 0.0;
827          }
828          description { state: "disabled_visible" 0.0;
829             inherit: "default" 0.0;
830             visible: 1;
831             text {
832                style: "check_popup_dim";
833                min: 1 1;
834             }
835          }
836       }
837       part { name: "event";
838          scale: 1;
839          type: RECT;
840          description { state: "default" 0.0;
841             rel1.to: "bg";
842             rel2.to: "elm.text";
843             color: 0 0 0 0;
844          }
845       }
846    }
847    programs {
848       program { name: "text_show";
849          signal: "elm,state,text,visible";
850          source: "elm";
851          action: STATE_SET "visible" 0.0;
852          target: "padding_before_text";
853          target: "elm.text";
854       }
855       program { name: "text_hide";
856          signal: "elm,state,text,hidden";
857          source: "elm";
858          action: STATE_SET "default" 0.0;
859          target: "padding_before_text";
860          target: "elm.text";
861       }
862    }
863  }