2 * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
4 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
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.
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.
26 group { name: "elm/check/base/default";
29 name: "core_check_bg";
31 image: SMALL"images/Controls/core_check_bg.png" COMP;
34 image: MEDIUM"images/Controls/core_check_bg.png" COMP;
38 name: "core_check_bg_stroke";
40 image: SMALL"images/Controls/core_check_bg_stroke.png" COMP;
43 image: MEDIUM"images/Controls/core_check_bg_stroke.png" COMP;
47 name: "core_check_icon";
49 image: SMALL"images/Controls/core_check_icon.png" COMP;
52 image: MEDIUM"images/Controls/core_check_icon.png" COMP;
58 public check_disabled;
64 description { state: "default" 0.0;
68 aspect_preference: BOTH;
69 image.normal: "core_check_bg";
70 color: 0 0 0 102; /*(Changeable UI) color_class: "W013L1E1";*/
72 description { state: "on" 0.0;
73 inherit: "default" 0.0;
74 color: 2 61 132 255; /*(Changeable UI) color_class: "W013L1";*/
76 description { state: "disabled" 0.0;
77 inherit: "default" 0.0;
78 color: 0 0 0 51; /*(Changeable UI) color_class: "W013L1D";*/
81 part { name: "bg_stroke";
83 description { state: "default" 0.0;
84 min: CHECK_BG_STROKE_SIZE;
87 aspect_preference: BOTH;
88 image.normal: "core_check_bg_stroke";
89 color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2E1";*/
91 description { state: "on" 0.0;
92 inherit: "default" 0.0;
93 color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2";*/
95 description { state: "disabled" 0.0;
96 inherit: "default" 0.0;
97 color: 191 191 191 76; /*(Changeable UI) color_class: "W013L2D";*/
100 part { name: "check";
102 description { state: "default" 0.0;
103 min: CHECK_ICON_SIZE;
105 rel1.relative: 0.125 0.125;
107 rel2.relative: 0.875 0.875;
109 aspect_preference: BOTH;
110 image.normal: "core_check_icon";
111 color: 244 244 244 255; /*(Changeable UI) color_class:"W013L1i";*/
114 description { state: "on" 0.0;
115 inherit: "default" 0.0;
118 description { state: "disabled" 0.0;
119 inherit: "default" 0.0;
120 color: 244 244 244 153; /*(Changeable UI) color_class:"W013L1iD";*/
123 part { name: "event";
126 description { state: "default" 0.0;
134 program { name: "show";
137 set_int(check_visible, 1);
140 program { name: "hide";
143 set_int(check_visible, 0);
146 program { name: "click";
147 signal: "mouse,clicked,1";
150 if (get_int(check_disabled) == 1) return;
151 emit("elm,action,check,toggle", "");
152 run_program(PROGRAM:"touch_sound");
155 program { name: "touch_sound";
156 action: RUN_PLUGIN "touch_sound";
158 program { name: "unpressed";
159 signal: "mouse,up,1";
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);
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);
175 program { name: "unpressed2";
176 signal: "elm,state,mouse,up";
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);
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);
193 program { name: "check_on";
194 signal: "elm,state,check,on";
197 if (get_int(check_disabled) == 1) {
198 set_state(PART:"bg", "disabled", 0.0);
199 set_state(PART:"bg_stroke", "disabled", 0.0);
202 set_state(PART:"bg", "on", 0.0);
203 set_state(PART:"bg_stroke", "on", 0.0);
205 set_state(PART:"check", "on", 0.0);
206 set_int(check_state, 1);
209 program { name: "check_off";
210 signal: "elm,state,check,off";
213 if (get_int(check_disabled) == 1) {
214 set_state(PART:"bg", "disabled", 0.0);
215 set_state(PART:"bg_stroke", "disabled", 0.0);
218 set_state(PART:"bg", "default", 0.0);
219 set_state(PART:"bg_stroke", "on", 0.0);
221 set_state(PART:"check", "default", 0.0);
222 set_int(check_state, 0);
225 program { name: "disable";
226 signal: "elm,state,disabled";
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);
235 program { name: "enable";
236 signal: "elm,state,enabled";
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);
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);
255 group { name: "elm/check/base/list";
257 image: "core_check_bg.png" COMP;
258 image: "core_check_bg_stroke.png" COMP;
259 image: "core_check_icon.png" COMP;
263 public check_disabled;
264 public check_visible;
269 description { state: "default" 0.0;
273 aspect_preference: BOTH;
274 image.normal: "core_check_bg.png";
275 color: 0 0 0 102; /*(Changeable UI) color_class: "W013L1E1";*/
277 description { state: "on" 0.0;
278 inherit: "default" 0.0;
279 color: 2 61 132 255; /*(Changeable UI) color_class: "W013L1";*/
281 description { state: "disabled" 0.0;
282 inherit: "default" 0.0;
283 color: 0 0 0 51; /*(Changeable UI) color_class: "W013L1D";*/
286 part { name: "bg_stroke";
288 description { state: "default" 0.0;
289 min: CHECK_BG_STROKE_SIZE;
292 aspect_preference: BOTH;
293 image.normal: "core_check_bg_stroke.png";
294 color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2E1";*/
296 description { state: "on" 0.0;
297 inherit: "default" 0.0;
298 color: 191 191 191 153; /*(Changeable UI) color_class: "W013L2";*/
300 description { state: "disabled" 0.0;
301 inherit: "default" 0.0;
302 color: 191 191 191 76; /*(Changeable UI) color_class: "W013L2D";*/
305 part { name: "check";
307 description { state: "default" 0.0;
308 min: CHECK_ICON_SIZE;
310 rel1.relative: 0.125 0.125;
312 rel2.relative: 0.875 0.875;
314 aspect_preference: BOTH;
315 image.normal: "core_check_icon.png";
316 color: 244 244 244 255; /*(Changeable UI) color_class:"W013L1i";*/
319 description { state: "on" 0.0;
320 inherit: "default" 0.0;
323 description { state: "disabled" 0.0;
324 inherit: "default" 0.0;
325 color: 244 244 244 153; /*(Changeable UI) color_class:"W013L1iD";*/
328 part { name: "event";
331 description { state: "default" 0.0;
339 program { name: "show";
342 set_int(check_visible, 1);
345 program { name: "hide";
348 set_int(check_visible, 0);
351 program { name: "unpressed";
352 signal: "mouse,up,1";
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);
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);
368 program { name: "unpressed2";
369 signal: "elm,state,mouse,up";
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);
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);
386 program { name: "check_on";
387 signal: "elm,state,check,on";
390 if (get_int(check_disabled) == 1) {
391 set_state(PART:"bg", "disabled", 0.0);
392 set_state(PART:"bg_stroke", "disabled", 0.0);
395 set_state(PART:"bg", "on", 0.0);
396 set_state(PART:"bg_stroke", "on", 0.0);
398 set_state(PART:"check", "on", 0.0);
399 set_int(check_state, 1);
402 program { name: "check_off";
403 signal: "elm,state,check,off";
406 if (get_int(check_disabled) == 1) {
407 set_state(PART:"bg", "disabled", 0.0);
408 set_state(PART:"bg_stroke", "disabled", 0.0);
411 set_state(PART:"bg", "default", 0.0);
412 set_state(PART:"bg_stroke", "on", 0.0);
414 set_state(PART:"check", "default", 0.0);
415 set_int(check_state, 0);
418 program { name: "disable";
419 signal: "elm,state,disabled";
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);
428 program { name: "enable";
429 signal: "elm,state,enabled";
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);
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);
448 group { name: "elm/check/base/favorite";
451 name: "core_icon_favorite";
453 image: SMALL"images/Controls/core_icon_favorite.png" COMP;
456 image: MEDIUM"images/Controls/core_icon_favorite.png" COMP;
462 public check_disabled;
463 public check_visible;
468 description { state: "default" 0.0;
471 image.normal: "core_icon_favorite";
472 color: 7 7 7 76; /*(Changeable UI) color_class: "W016L1iE1";*/
474 description { state: "on" 0.0;
475 inherit: "default" 0.0;
476 color: 255 178 0 255; /*(Changeable UI) color_class: "W016L1i";*/
478 description { state: "disabled" 0.0;
479 inherit: "default" 0.0;
480 color: 7 7 7 38; /*(Changeable UI) color_class: "W016L1iD";*/
483 part { name: "event";
486 description { state: "default" 0.0;
494 program { name: "show";
497 set_int(check_visible, 1);
500 program { name: "hide";
503 set_int(check_visible, 0);
506 program { name: "click";
507 signal: "mouse,clicked,1";
510 if (get_int(check_disabled) == 1) return;
511 emit("elm,action,check,toggle", "");
512 run_program(PROGRAM:"touch_sound");
515 program { name: "touch_sound";
516 action: RUN_PLUGIN "touch_sound";
518 program { name: "unpressed";
519 signal: "mouse,up,1";
522 if (get_int(check_disabled) == 1) return;
523 if (get_int(check_state) == 1)
524 set_state(PART:"bg", "on", 0.0);
526 set_state(PART:"bg", "default", 0.0);
529 program { name: "unpressed2";
530 signal: "elm,state,mouse,up";
533 if (get_int(check_disabled) == 1) return;
534 if (get_int(check_state) == 1)
535 set_state(PART:"bg", "on", 0.0);
537 set_state(PART:"bg", "default", 0.0);
540 program { name: "check_on";
541 signal: "elm,state,check,on";
544 set_state(PART:"bg", "on", 0.0);
545 set_int(check_state, 1);
548 program { name: "check_off";
549 signal: "elm,state,check,off";
552 if (get_int(check_disabled) == 1)
553 set_state(PART:"bg", "disabled", 0.0);
555 set_state(PART:"bg", "default", 0.0);
556 set_int(check_state, 0);
559 program { name: "disable";
560 signal: "elm,state,disabled";
563 set_int(check_disabled, 1);
564 if (get_int(check_state) == 1)
565 set_state(PART:"bg", "on", 0.0);
567 set_state(PART:"bg", "disabled", 0.0);
570 program { name: "enable";
571 signal: "elm,state,enabled";
574 set_int(check_disabled, 0);
575 if (get_int(check_state) == 1)
576 set_state(PART:"bg", "on", 0.0);
578 set_state(PART:"bg", "default", 0.0);
584 group { name: "elm/check/base/on&off";
587 name: "core_toggle_bg";
589 image: SMALL"images/Controls/core_toggle_bg.png" COMP;
592 image: MEDIUM"images/Controls/core_toggle_bg.png" COMP;
596 name: "core_toggle_icon_off";
598 image: SMALL"images/Controls/core_toggle_icon_off.png" COMP;
601 image: MEDIUM"images/Controls/core_toggle_icon_off.png" COMP;
605 name: "core_toggle_icon_on";
607 image: SMALL"images/Controls/core_toggle_icon_on.png" COMP;
610 image: MEDIUM"images/Controls/core_toggle_icon_on.png" COMP;
616 public check_disabled;
617 public check_visible;
624 description { state: "default" 0.0;
629 part { name: "bg_image";
632 description { state: "default" 0.0;
635 image.normal: "core_toggle_bg";
636 color: 7 7 7 76; /*(Changeable UI) color_class: "W015L1E1";*/
638 description { state: "on" 0.0;
639 inherit: "default" 0.0;
640 color: 52 158 91 255; /*(Changeable UI) color_class: "W015L1";*/
642 description { state: "disabled" 0.0;
643 inherit: "default" 0.0;
644 color: 7 7 7 38; /*(Changeable UI) color_class: "W015L1D";*/
647 part { name: "button";
650 description { state: "default" 0.0;
655 image.normal: "core_toggle_icon_off";
656 color: 244 244 244 255; /*(Changeable UI) color_class: "W015L1i";*/
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";*/
664 part { name: "event";
667 description { state: "default" 0.0;
675 program { name: "show";
678 set_int(check_visible, 1);
681 program { name: "hide";
684 set_int(check_visible, 0);
687 program { name: "click";
688 signal: "mouse,clicked,1";
691 if (get_int(check_disabled) == 1) return;
692 emit("elm,action,check,toggle", "");
693 run_program(PROGRAM:"touch_sound");
696 program { name: "touch_sound";
697 action: RUN_PLUGIN "touch_sound";
699 program { name: "unpressed";
700 signal: "mouse,up,1";
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);
709 set_state(PART:"bg_image", "default", 0.0);
710 set_state(PART:"button", "default", 0.0);
714 program { name: "unpressed2";
715 signal: "elm,state,mouse,up";
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)
724 set_state(PART:"bg_image", "default", 0.0);
725 set_state(PART:"button", "default", 0.0);
729 program { name: "check_on";
730 signal: "elm,state,check,on";
733 if (get_int(check_disabled) == 1)
734 set_state(PART:"bg_image", "disabled", 0.0);
736 set_state(PART:"bg_image", "on", 0.0);
737 set_state(PART:"button", "on", 0.0)
738 set_int(check_state, 1);
741 program { name: "check_off";
742 signal: "elm,state,check,off";
745 if (get_int(check_disabled) == 1)
746 set_state(PART:"bg_image", "disabled", 0.0);
748 set_state(PART:"bg_image", "default", 0.0);
749 set_state(PART:"button", "default", 0.0);
750 set_int(check_state, 0);
753 program { name: "disable";
754 signal: "elm,state,disabled";
757 set_int(check_disabled, 1);
758 set_state(PART:"bg_image", "disabled", 0.0);
761 program { name: "enable";
762 signal: "elm,state,enabled";
765 set_int(check_disabled, 0);
766 if (get_int(check_state) == 1)
767 set_state(PART:"bg_image", "on", 0.0);
769 set_state(PART:"bg_image", "default", 0.0);
775 group { name: "elm/check/base/popup";
776 inherit: "elm/check/base/default";
778 part { name: "padding_before_text";
781 description { state: "default" 0.0;
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;
800 part { name: "elm.text";
804 description { state: "default" 0.0;
809 to_x: "padding_before_text";
816 style: "check_popup";
820 description { state: "visible" 0.0;
821 inherit: "default" 0.0;
825 description { state: "disabled" 0.0;
826 inherit: "default" 0.0;
828 description { state: "disabled_visible" 0.0;
829 inherit: "default" 0.0;
832 style: "check_popup_dim";
837 part { name: "event";
840 description { state: "default" 0.0;
848 program { name: "text_show";
849 signal: "elm,state,text,visible";
851 action: STATE_SET "visible" 0.0;
852 target: "padding_before_text";
855 program { name: "text_hide";
856 signal: "elm,state,text,hidden";
858 action: STATE_SET "default" 0.0;
859 target: "padding_before_text";