3 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an AS IS BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 #define CHECK_STATE_DEFAULT 0
21 #define CHECK_STATE_VISIBLE 1
22 #define CHECK_STATE_DISABLED_VISIBLE 2
23 #define CHECK_STATE_DISABLED 3
29 style { name: "check_label_textblock_style";
30 base: "font=Tizen:style=Regular font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color="CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC" wrap=char text_class=tizen";
33 tag: "hilight" "+ font=Tizen:style=Bold";
34 tag: "b" "+ font=Tizen:style=Bold";
35 tag: "whitecolor" "+ color=#ffffff";
38 style { name: "check_label_textblock_style_disable";
39 base: "font=Tizen:style=Regular font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color="CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC" wrap=char text_class=tizen";
42 tag: "hilight" "+ font=Tizen:style=Bold";
43 tag: "b" "+ font=Tizen:style=Bold";
44 tag: "whitecolor" "+ color=#ffffff";
49 ////////////////////////////////////////////////////////////////////////////////
50 #define CHECK_STYLE_DEFAULT(style_name, min_width, min_height) \
51 group { name: "elm/check/base/"style_name; \
53 image: "00_check_bg.png" COMP; \
54 image: "00_check_dim_bg.png" COMP; \
55 image: "00_check_activated_dim.png" COMP; \
56 image: "00_check_activated_press.png" COMP; \
57 image: "00_check_activated.png" COMP; \
58 image: "00_check_press_bg.png" COMP; \
59 image: "00_check_focus.png" COMP; \
62 public check_state = CHECK_STATE_DEFAULT; \
63 public check_visible = CHECK_HIDE; \
66 part { name: "back_bg"; \
69 description { state: "default" 0.0; \
70 rel2.relative: 0.0 1.0; \
72 min: min_width min_height; \
80 description { state: "default" 0.0; \
81 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
82 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
86 image.normal: "00_check_bg.png"; \
89 description { state: "visible" 0.0; \
90 inherit: "default" 0.0; \
92 description { state: "pressed" 0.0; \
93 inherit: "default" 0.0; \
94 image.normal: "00_check_press_bg.png"; \
96 description { state: "disabled" 0.0; \
97 inherit: "default" 0.0; \
98 image.normal: "00_check_dim_bg.png"; \
101 part { name: "check"; \
102 clip_to: "sequence_clip"; \
105 description { state: "default" 0.0; \
109 image.normal: "00_check_activated.png"; \
110 color: 255 255 255 0; \
112 description { state: "visible" 0.0; \
113 inherit: "default" 0.0; \
115 color: 255 255 255 255; \
117 description { state: "disabled_visible" 0.0; \
118 inherit: "default" 0.0; \
120 image.normal: "00_check_activated_dim.png"; \
121 color: 255 255 255 255; \
123 description { state: "pressed" 0.0; \
124 inherit: "visible" 0.0; \
125 image.normal: "00_check_activated_press.png"; \
128 part { name: "sequence_clip"; \
131 description { state: "default" 0.0; \
132 rel2.relative: 0.0 1.0; \
133 color: 255 255 255 255; \
135 description { state: "visible" 0.0; \
136 inherit: "default" 0.0; \
137 rel2.relative: 1.0 1.0; \
140 part { name: "elm.swallow.content"; \
142 clip_to: "disclip"; \
143 description { state: "default" 0.0; \
158 description { state: "visible" 0.0; \
159 inherit: "default" 0.0; \
163 aspect_preference: VERTICAL; \
165 description { state: "disabled" 0.0; \
166 inherit: "default" 0.0; \
168 description { state: "disabled_visible" 0.0; \
169 inherit: "default" 0.0; \
175 part { name: "elm.text"; \
178 clip_to: "disclip"; \
180 description { state: "default" 0.0; \
186 to_x: "elm.swallow.content"; \
194 style: "check_label_textblock_style"; \
198 description { state: "visible" 0.0; \
199 inherit: "default" 0.0; \
203 description { state: "disabled" 0.0; \
204 inherit: "default" 0.0; \
206 description { state: "disabled_visible" 0.0; \
207 inherit: "default" 0.0; \
210 style: "check_label_textblock_style_disable"; \
215 part { name: "events1"; \
217 ignore_flags: ON_HOLD; \
218 description { state: "default" 0.0; \
222 part { name: "events2"; \
225 description { state: "default" 0.0; \
229 part { name: "disclip"; \
232 description { state: "default" 0.0; \
233 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
235 description { state: "disabled" 0.0; \
236 inherit: "default" 0.0; \
237 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
240 part { name: "disabler"; \
242 description { state: "default" 0.0; \
246 description { state: "disabled" 0.0; \
247 inherit: "default" 0.0; \
253 program { name: "show"; \
256 set_int(check_visible, CHECK_SHOW); \
259 program { name: "hide"; \
262 set_int(check_visible, CHECK_HIDE); \
265 program { name: "click"; \
266 signal: "mouse,clicked,1"; \
268 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
269 after: "touch_sound"; \
271 program { name: "touch_sound"; \
272 action: PLAY_SAMPLE "touch_sound" 1.0; \
274 program { name: "bg_normal"; \
275 signal: "mouse,up,1"; \
277 action: STATE_SET "default" 0.0; \
281 program { name: "pressed"; \
282 signal: "mouse,down,1"; \
284 action: STATE_SET "pressed" 0.0; \
288 program { name: "mouse,out"; \
289 signal: "mouse,out"; \
292 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
294 set_state(PART:"check", "visible", 0.0); \
295 set_state(PART:"sequence_clip", "visible", 0.0); \
299 set_state(PART:"check", "default", 0.0); \
300 set_state(PART:"sequence_clip", "default", 0.0); \
304 program { name: "check_on"; \
305 signal: "elm,state,check,on"; \
308 set_int(check_state, CHECK_STATE_VISIBLE); \
309 if (get_int(check_visible) == CHECK_SHOW) \
311 run_program(PROGRAM:"check_show_effect"); \
312 run_program(PROGRAM:"check_draw_effect"); \
316 set_state(PART:"check", "visible", 0.0); \
317 set_state(PART:"sequence_clip", "visible", 0.0); \
321 program { name: "check_off"; \
322 signal: "elm,state,check,off"; \
324 action: STATE_SET "default" 0.0; \
327 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
329 set_int(check_state, CHECK_STATE_DEFAULT); \
330 set_state(PART:"check", "default", 0.0); \
331 set_state(PART:"sequence_clip", "default", 0.0); \
335 program { name: "check_show_effect"; \
336 action: STATE_SET "visible" 0.0; \
337 transition: LINEAR 0.233; \
340 program { name: "check_draw_effect"; \
341 action: STATE_SET "visible" 0.0; \
342 transition: LINEAR 0.267; \
343 target: "sequence_clip"; \
345 program { name: "text_show"; \
346 signal: "elm,state,text,visible"; \
348 action: STATE_SET "visible" 0.0; \
349 target: "elm.text"; \
351 program { name: "text_hide"; \
352 signal: "elm,state,text,hidden"; \
354 action: STATE_SET "default" 0.0; \
355 target: "elm.text"; \
357 program { name: "icon_show"; \
358 signal: "elm,state,icon,visible"; \
360 action: STATE_SET "visible" 0.0; \
361 target: "elm.swallow.content"; \
363 program { name: "icon_hide"; \
364 signal: "elm,state,icon,hidden"; \
366 action: STATE_SET "default" 0.0; \
367 target: "elm.swallow.content"; \
369 program { name: "disable"; \
370 signal: "elm,state,disabled"; \
372 action: STATE_SET "disabled" 0.0; \
373 target: "disabler"; \
376 after: "disable_text"; \
378 program { name: "disable_text"; \
382 get_state(PART:"elm.text", st, 30, vl); \
383 if (!strcmp(st, "visible")) \
384 set_state(PART:"elm.text", "disabled_visible", 0.0); \
386 set_state(PART:"elm.text", "disabled", 0.0); \
387 get_state(PART:"elm.swallow.content", st, 30, vl); \
388 if (!strcmp(st, "visible")) \
389 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
391 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
392 get_state(PART:"check", st, 30, vl); \
393 if (!strcmp(st, "visible")) \
395 set_state(PART:"check", "disabled_visible", 0.0); \
396 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
400 program { name: "enable"; \
401 signal: "elm,state,enabled"; \
403 action: STATE_SET "default" 0.0; \
404 target: "disabler"; \
407 after: "enable_text"; \
409 program { name: "enable_text"; \
413 get_state(PART:"elm.text", st, 30, vl); \
414 if (!strcmp(st, "disabled_visible")) \
415 set_state(PART:"elm.text", "visible", 0.0); \
417 set_state(PART:"elm.text", "default", 0.0); \
418 get_state(PART:"elm.swallow.content", st, 30, vl); \
419 if (!strcmp(st, "visible")) \
420 set_state(PART:"elm.swallow.content", "visible", 0.0); \
422 set_state(PART:"elm.swallow.content", "default", 0.0); \
423 get_state(PART:"check", st, 30, vl); \
424 if (!strcmp(st, "disabled_visible")) \
426 set_state(PART:"check", "visible", 0.0); \
427 set_state(PART:"sequence_clip", "visible", 0.0); \
428 set_int(check_state, CHECK_STATE_VISIBLE); \
431 set_int(check_state, CHECK_STATE_DEFAULT); \
436 ////////////////////////////////////////////////////////////////////////////////
437 CHECK_STYLE_DEFAULT("default", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
438 ////////////////////////////////////////////////////////////////////////////////
439 CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
440 ////////////////////////////////////////////////////////////////////////////////
442 #define CHECK_STYLE_DEFAULT_GENLIST(style_name, min_width, min_height) \
443 group { name: "elm/check/base/"style_name; \
445 image: "00_check_bg.png" COMP; \
446 image: "00_check_dim_bg.png" COMP; \
447 image: "00_check_activated_dim.png" COMP; \
448 image: "00_check_activated_press.png" COMP; \
449 image: "00_check_activated.png" COMP; \
450 image: "00_check_press_bg.png" COMP; \
451 image: "00_check_focus.png" COMP; \
454 public check_state = CHECK_STATE_DEFAULT; \
455 public check_visible = CHECK_HIDE; \
458 part { name: "back_bg"; \
461 description { state: "default" 0.0; \
462 rel2.relative: 0.0 1.0; \
464 min: min_width min_height; \
472 description { state: "default" 0.0; \
473 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
474 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
476 rel1.to: "back_bg"; \
477 rel2.to: "back_bg"; \
478 image.normal: "00_check_bg.png"; \
481 description { state: "visible" 0.0; \
482 inherit: "default" 0.0; \
484 description { state: "pressed" 0.0; \
485 inherit: "default" 0.0; \
486 image.normal: "00_check_press_bg.png"; \
488 description { state: "disabled" 0.0; \
489 inherit: "default" 0.0; \
490 image.normal: "00_check_dim_bg.png"; \
493 part { name: "check"; \
494 clip_to: "sequence_clip"; \
497 description { state: "default" 0.0; \
501 image.normal: "00_check_activated.png"; \
502 color: 255 255 255 0; \
504 description { state: "visible" 0.0; \
505 inherit: "default" 0.0; \
507 color: 255 255 255 255; \
509 description { state: "disabled_visible" 0.0; \
510 inherit: "default" 0.0; \
512 image.normal: "00_check_activated_dim.png"; \
513 color: 255 255 255 255; \
515 description { state: "pressed" 0.0; \
516 inherit: "visible" 0.0; \
517 image.normal: "00_check_activated_press.png"; \
520 part { name: "sequence_clip"; \
523 description { state: "default" 0.0; \
524 rel2.relative: 0.0 1.0; \
525 color: 255 255 255 255; \
527 description { state: "visible" 0.0; \
528 inherit: "default" 0.0; \
529 rel2.relative: 1.0 1.0; \
532 part { name: "elm.swallow.content"; \
534 clip_to: "disclip"; \
535 description { state: "default" 0.0; \
550 description { state: "visible" 0.0; \
551 inherit: "default" 0.0; \
555 aspect_preference: VERTICAL; \
557 description { state: "disabled" 0.0; \
558 inherit: "default" 0.0; \
560 description { state: "disabled_visible" 0.0; \
561 inherit: "default" 0.0; \
567 part { name: "elm.text"; \
570 clip_to: "disclip"; \
572 description { state: "default" 0.0; \
578 to_x: "elm.swallow.content"; \
586 style: "check_label_textblock_style"; \
590 description { state: "visible" 0.0; \
591 inherit: "default" 0.0; \
595 description { state: "disabled" 0.0; \
596 inherit: "default" 0.0; \
598 description { state: "disabled_visible" 0.0; \
599 inherit: "default" 0.0; \
602 style: "check_label_textblock_style_disable"; \
607 part { name: "disclip"; \
610 description { state: "default" 0.0; \
611 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
613 description { state: "disabled" 0.0; \
614 inherit: "default" 0.0; \
615 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
618 part { name: "disabler"; \
620 description { state: "default" 0.0; \
624 description { state: "disabled" 0.0; \
625 inherit: "default" 0.0; \
631 program { name: "show"; \
634 set_int(check_visible, CHECK_SHOW); \
637 program { name: "hide"; \
640 set_int(check_visible, CHECK_HIDE); \
643 program { name: "bg_normal"; \
644 signal: "elm,state,mouse,up"; \
647 if (CHECK_SHOW == get_int(check_visible)) \
649 set_state(PART:"check", "visible", 0.0); \
653 set_state(PART:"check", "default", 0.0); \
655 set_state(PART:"bg", "default", 0.0); \
658 program { name: "pressed"; \
659 signal: "elm,state,mouse,down"; \
661 action: STATE_SET "pressed" 0.0; \
663 if (CHECK_SHOW == get_int(check_visible)) \
665 set_state(PART:"check", "pressed", 0.0); \
667 set_state(PART:"bg", "pressed", 0.0); \
670 program { name: "mouse,out"; \
671 signal: "mouse,out"; \
674 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
676 set_state(PART:"check", "visible", 0.0); \
677 set_state(PART:"sequence_clip", "visible", 0.0); \
681 set_state(PART:"check", "default", 0.0); \
682 set_state(PART:"sequence_clip", "default", 0.0); \
686 program { name: "check_on"; \
687 signal: "elm,state,check,on"; \
690 set_int(check_state, CHECK_STATE_VISIBLE); \
691 if (get_int(check_visible) == CHECK_SHOW) \
693 run_program(PROGRAM:"check_show_effect"); \
694 run_program(PROGRAM:"check_draw_effect"); \
698 set_state(PART:"check", "visible", 0.0); \
699 set_state(PART:"sequence_clip", "visible", 0.0); \
703 program { name: "check_off"; \
704 signal: "elm,state,check,off"; \
706 action: STATE_SET "default" 0.0; \
709 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
711 set_int(check_state, CHECK_STATE_DEFAULT); \
712 set_state(PART:"check", "default", 0.0); \
713 set_state(PART:"sequence_clip", "default", 0.0); \
717 program { name: "check_show_effect"; \
718 action: STATE_SET "visible" 0.0; \
719 transition: LINEAR 0.233; \
722 program { name: "check_draw_effect"; \
723 action: STATE_SET "visible" 0.0; \
724 transition: LINEAR 0.267; \
725 target: "sequence_clip"; \
727 program { name: "text_show"; \
728 signal: "elm,state,text,visible"; \
730 action: STATE_SET "visible" 0.0; \
731 target: "elm.text"; \
733 program { name: "text_hide"; \
734 signal: "elm,state,text,hidden"; \
736 action: STATE_SET "default" 0.0; \
737 target: "elm.text"; \
739 program { name: "icon_show"; \
740 signal: "elm,state,icon,visible"; \
742 action: STATE_SET "visible" 0.0; \
743 target: "elm.swallow.content"; \
745 program { name: "icon_hide"; \
746 signal: "elm,state,icon,hidden"; \
748 action: STATE_SET "default" 0.0; \
749 target: "elm.swallow.content"; \
751 program { name: "disable"; \
752 signal: "elm,state,disabled"; \
754 action: STATE_SET "disabled" 0.0; \
755 target: "disabler"; \
758 after: "disable_text"; \
760 program { name: "disable_text"; \
764 get_state(PART:"elm.text", st, 30, vl); \
765 if (!strcmp(st, "visible")) \
766 set_state(PART:"elm.text", "disabled_visible", 0.0); \
768 set_state(PART:"elm.text", "disabled", 0.0); \
769 get_state(PART:"elm.swallow.content", st, 30, vl); \
770 if (!strcmp(st, "visible")) \
771 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
773 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
774 get_state(PART:"check", st, 30, vl); \
775 if (!strcmp(st, "visible")) \
777 set_state(PART:"check", "disabled_visible", 0.0); \
778 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
782 program { name: "enable"; \
783 signal: "elm,state,enabled"; \
785 action: STATE_SET "default" 0.0; \
786 target: "disabler"; \
789 after: "enable_text"; \
791 program { name: "enable_text"; \
795 get_state(PART:"elm.text", st, 30, vl); \
796 if (!strcmp(st, "disabled_visible")) \
797 set_state(PART:"elm.text", "visible", 0.0); \
799 set_state(PART:"elm.text", "default", 0.0); \
800 get_state(PART:"elm.swallow.content", st, 30, vl); \
801 if (!strcmp(st, "visible")) \
802 set_state(PART:"elm.swallow.content", "visible", 0.0); \
804 set_state(PART:"elm.swallow.content", "default", 0.0); \
805 get_state(PART:"check", st, 30, vl); \
806 if (!strcmp(st, "disabled_visible")) \
808 set_state(PART:"check", "visible", 0.0); \
809 set_state(PART:"sequence_clip", "visible", 0.0); \
810 set_int(check_state, CHECK_STATE_VISIBLE); \
813 set_int(check_state, CHECK_STATE_DEFAULT); \
818 ////////////////////////////////////////////////////////////////////////////////
819 CHECK_STYLE_DEFAULT_GENLIST("default/genlist_editmode", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
820 CHECK_STYLE_DEFAULT_GENLIST("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
821 ////////////////////////////////////////////////////////////////////////////////
823 #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \
824 group { name: "elm/check/base/"style_name; \
826 image: "00_check_bg.png" COMP; \
827 image: "00_check_dim_bg.png" COMP; \
828 image: "00_check_activated_dim.png" COMP; \
829 image: "00_check_activated.png" COMP; \
832 public check_state = CHECK_STATE_DEFAULT; \
835 part { name: "back_bg"; \
838 description { state: "default" 0.0; \
839 min: min_width min_height; \
847 description { state: "default" 0.0; \
848 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
849 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
851 rel1.to: "back_bg"; \
852 rel2.to: "back_bg"; \
853 image.normal: "00_check_bg.png"; \
856 description { state: "disabled" 0.0; \
857 inherit: "default" 0.0; \
858 image.normal: "00_check_dim_bg.png"; \
861 part { name: "check"; \
864 description { state: "default" 0.0; \
868 image.normal: "00_check_activated.png"; \
870 description { state: "visible" 0.0; \
871 inherit: "default" 0.0; \
874 description { state: "disabled_visible" 0.0; \
875 inherit: "default" 0.0; \
877 image.normal: "00_check_activated_dim.png"; \
880 part { name: "elm.swallow.content"; \
882 clip_to: "disclip"; \
883 description { state: "default" 0.0; \
898 description { state: "visible" 0.0; \
899 inherit: "default" 0.0; \
903 aspect_preference: VERTICAL; \
905 description { state: "disabled" 0.0; \
906 inherit: "default" 0.0; \
908 description { state: "disabled_visible" 0.0; \
909 inherit: "default" 0.0; \
915 part { name: "elm.text"; \
918 clip_to: "disclip"; \
920 description { state: "default" 0.0; \
926 to_x: "elm.swallow.content"; \
934 style: "check_label_textblock_style"; \
938 description { state: "visible" 0.0; \
939 inherit: "default" 0.0; \
943 description { state: "disabled" 0.0; \
944 inherit: "default" 0.0; \
946 description { state: "disabled_visible" 0.0; \
947 inherit: "default" 0.0; \
950 style: "check_label_textblock_style_disable"; \
955 part { name: "events1"; \
957 ignore_flags: ON_HOLD; \
958 description { state: "default" 0.0; \
962 part { name: "events2"; \
965 description { state: "default" 0.0; \
969 part { name: "disclip"; \
972 description { state: "default" 0.0; \
973 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
975 description { state: "disabled" 0.0; \
976 inherit: "default" 0.0; \
977 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
980 part { name: "disabler"; \
982 description { state: "default" 0.0; \
986 description { state: "disabled" 0.0; \
987 inherit: "default" 0.0; \
993 program { name: "click"; \
994 signal: "mouse,clicked,1"; \
996 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
997 after: "touch_sound"; \
999 program { name: "touch_sound"; \
1000 action: PLAY_SAMPLE "touch_sound" 1.0; \
1002 program { name: "check_on"; \
1003 signal: "elm,state,check,on"; \
1006 set_int(check_state, CHECK_STATE_VISIBLE); \
1007 set_state(PART:"check", "visible", 0.0); \
1010 program { name: "check_off"; \
1011 signal: "elm,state,check,off"; \
1013 action: STATE_SET "default" 0.0; \
1016 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
1018 set_int(check_state, CHECK_STATE_DEFAULT); \
1019 set_state(PART:"check", "default", 0.0); \
1023 program { name: "text_show"; \
1024 signal: "elm,state,text,visible"; \
1026 action: STATE_SET "visible" 0.0; \
1027 target: "elm.text"; \
1029 program { name: "text_hide"; \
1030 signal: "elm,state,text,hidden"; \
1032 action: STATE_SET "default" 0.0; \
1033 target: "elm.text"; \
1035 program { name: "icon_show"; \
1036 signal: "elm,state,icon,visible"; \
1038 action: STATE_SET "visible" 0.0; \
1039 target: "elm.swallow.content"; \
1041 program { name: "icon_hide"; \
1042 signal: "elm,state,icon,hidden"; \
1044 action: STATE_SET "default" 0.0; \
1045 target: "elm.swallow.content"; \
1047 program { name: "disable"; \
1048 signal: "elm,state,disabled"; \
1050 action: STATE_SET "disabled" 0.0; \
1051 target: "disabler"; \
1052 target: "disclip"; \
1054 after: "disable_text"; \
1056 program { name: "disable_text"; \
1060 get_state(PART:"elm.text", st, 30, vl); \
1061 if (!strcmp(st, "visible")) \
1062 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1064 set_state(PART:"elm.text", "disabled", 0.0); \
1065 get_state(PART:"elm.swallow.content", st, 30, vl); \
1066 if (!strcmp(st, "visible")) \
1067 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1069 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1070 get_state(PART:"check", st, 30, vl); \
1071 if (!strcmp(st, "visible")) \
1073 set_state(PART:"check", "disabled_visible", 0.0); \
1074 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
1078 program { name: "enable"; \
1079 signal: "elm,state,enabled"; \
1081 action: STATE_SET "default" 0.0; \
1082 target: "disabler"; \
1083 target: "disclip"; \
1085 after: "enable_text"; \
1087 program { name: "enable_text"; \
1091 get_state(PART:"elm.text", st, 30, vl); \
1092 if (!strcmp(st, "disabled_visible")) \
1093 set_state(PART:"elm.text", "visible", 0.0); \
1095 set_state(PART:"elm.text", "default", 0.0); \
1096 get_state(PART:"elm.swallow.content", st, 30, vl); \
1097 if (!strcmp(st, "visible")) \
1098 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1100 set_state(PART:"elm.swallow.content", "default", 0.0); \
1101 get_state(PART:"check", st, 30, vl); \
1102 if (!strcmp(st, "disabled_visible")) \
1104 set_state(PART:"check", "visible", 0.0); \
1105 set_int(check_state, CHECK_STATE_VISIBLE); \
1108 set_int(check_state, CHECK_STATE_DEFAULT); \
1113 ////////////////////////////////////////////////////////////////////////////////
1114 CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1115 ////////////////////////////////////////////////////////////////////////////////
1116 group { name: "elm/check/base/on&off";
1118 image: "00_button_on_handler.png" COMP;
1119 image: "00_button_on_handler_dim.png" COMP;
1120 image: "00_button_off_handler.png" COMP;
1121 image: "00_button_off_handler_dim.png" COMP;
1122 image: "00_button_on_off_bg.png" COMP;
1123 image: "00_button_on_off_bg_dim.png" COMP;
1124 image: "00_button_handler_focus.png" COMP;
1129 public was_drag = 0;
1130 public check_on = 0;
1137 description { state: "default" 0.0;
1138 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1139 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1140 rel2.relative: 0.0 1.0;
1146 part { name: "padding_left";
1150 description { state: "default" 0.0;
1152 rel1{ relative: 0.0 0.0; to: "bg"; }
1153 rel2{ relative: 0.0 1.0; to: "bg"; }
1159 part { name: "padding_right";
1163 description { state: "default" 0.0;
1178 part { name: "padding_top";
1182 description { state: "default" 0.0;
1194 part { name: "padding_bottom";
1198 description { state: "default" 0.0;
1213 part { name: "bg_image";
1216 description { state: "default" 0.0;
1221 to_y: "padding_top";
1226 to_y: "padding_bottom";
1228 image.normal: "00_button_on_off_bg.png";
1230 description { state: "visible" 0.0;
1231 inherit: "default" 0.0;
1232 image.normal: "00_button_on_off_bg.png";
1234 description { state: "pressed" 0.0;
1235 inherit: "default" 0.0;
1236 image.normal: "00_button_on_off_bg.png";
1238 description { state: "visible_pressed" 0.0;
1239 inherit: "default" 0.0;
1240 image.normal: "00_button_on_off_bg.png";
1242 description { state: "visible_disable" 0.0;
1243 inherit: "default" 0.0;
1244 image.normal: "00_button_on_off_bg_dim.png";
1246 description { state: "off_disable" 0.0;
1247 inherit: "default" 0.0;
1248 image.normal: "00_button_on_off_bg_dim.png";
1251 part { name: "drag_container";
1255 description { state: "default" 0.0;
1258 to_x: "padding_left";
1263 to_x: "padding_right";
1269 part { name: "clipper";
1272 description { state: "default" 0.0;
1275 color: 255 255 255 255;
1278 part { name: "clipper_inner";
1281 description { state: "default" 0.0;
1282 rel1.to: "bg_image";
1283 rel2.to: "bg_image";
1284 color: 255 255 255 255;
1287 part { name: "button";
1294 confine: "drag_container";
1296 description { state: "default" 0.0;
1297 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1298 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1303 image.normal: "00_button_off_handler.png";
1305 description { state: "on" 0.0;
1306 inherit: "default" 0.0;
1307 image.normal: "00_button_on_handler.png";
1309 description { state: "on_disabled" 0.0;
1310 inherit: "default" 0.0;
1311 image.normal: "00_button_on_handler_dim.png";
1313 description { state: "off_disabled" 0.0;
1314 inherit: "default" 0.0;
1315 image.normal: "00_button_off_handler_dim.png";
1318 part { name: "button_events";
1323 description { state: "default" 0.0;
1329 part { name: "onrect";
1334 description { state: "default" 0.0;
1347 part { name: "offrect";
1352 description { state: "default" 0.0;
1364 part { name: "elm.offtext";
1368 clip_to: "clipper_inner";
1369 description { state: "default" 0.0;
1372 color: 255 255 255 255;
1374 font: "Tizen:style=Medium";
1377 text_class: "tizen";
1380 description { state: "disabled" 0.0;
1381 inherit: "default" 0.0;
1382 color: 128 128 128 128;
1385 part { name: "elm.ontext";
1389 clip_to: "clipper_inner";
1390 description { state: "default" 0.0;
1393 color: 255 255 255 255;
1395 font: "Tizen:style=Medium";
1398 text_class: "tizen";
1401 description { state: "disabled" 0.0;
1402 inherit: "default" 0.0;
1403 color: 128 128 128 128;
1406 part { name: "elm.swallow.content";
1409 description { state: "default" 0.0;
1422 description { state: "visible" 0.0;
1423 inherit: "default" 0.0;
1427 aspect_preference: VERTICAL;
1429 description { state: "disabled" 0.0;
1430 inherit: "default" 0.0;
1432 description { state: "disabled_visible" 0.0;
1433 inherit: "default" 0.0;
1439 part { name: "elm.text";
1444 description { state: "default" 0.0;
1450 to_x: "elm.swallow.content";
1458 style: "check_label_textblock_style";
1462 description { state: "visible" 0.0;
1463 inherit: "default" 0.0;
1467 description { state: "disabled" 0.0;
1468 inherit: "default" 0.0;
1470 description { state: "disabled_visible" 0.0;
1471 inherit: "default" 0.0;
1474 style: "check_label_textblock_style_disable";
1479 part { name: "disclip";
1482 description { state: "default" 0.0;
1483 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1485 description { state: "disabled" 0.0;
1486 inherit: "default" 0.0;
1487 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1490 part { name: "disabler";
1492 description { state: "default" 0.0;
1496 description { state: "disabled" 0.0;
1497 inherit: "default" 0.0;
1504 signal: "mouse,clicked,1";
1507 new Float:dx, Float:dy;
1508 get_drag(PART:"button", dx, dy);
1509 if (!get_int(was_drag)) {
1511 set_drag(PART:"button", 0.0, 0.0);
1513 set_drag(PART:"button", 1.0, 0.0);
1514 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1515 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1516 if (get_int(check_on)) {
1517 emit("elm,action,check,off", "");
1518 emit("elm,action,touch,sound", "");
1522 if (!get_int(check_on)) {
1523 emit("elm,action,check,on", "");
1524 emit("elm,action,touch,sound", "");
1530 program { name: "touch_sound";
1531 signal: "elm,action,touch,sound";
1533 action: PLAY_SAMPLE "touch_sound" 1.0;
1539 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1540 set_int(is_drag, 1);
1544 signal: "mouse,down,1";
1547 set_int(was_drag, 0);
1548 set_int(is_drag, 0);
1551 program { name: "drag_end";
1552 signal: "mouse,up,1";
1555 new Float:dx, Float:dy;
1556 get_drag(PART:"button", dx, dy);
1557 if (get_int(is_drag)) {
1559 set_drag(PART:"button", 1.0, 0.0);
1561 set_drag(PART:"button", 0.0, 0.0);
1562 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1563 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1564 if (!get_int(check_on)) {
1565 emit("elm,action,check,on", "");
1566 emit("elm,action,touch,sound", "");
1570 if (get_int(check_on)) {
1571 emit("elm,action,check,off", "");
1572 emit("elm,action,touch,sound", "");
1575 set_int(was_drag, get_int(is_drag));
1576 set_int(is_drag, 0);
1577 emit("elm,action,check,drag,stop", "");
1581 program { name: "check_on";
1582 signal: "elm,state,check,on";
1586 if (get_int(is_rtl) == 0) {
1592 set_drag(PART:"button", drag, 0.0);
1593 set_state(PART:"bg_image", "visible", 0.0);
1594 set_state(PART:"button", "on", 0.0);
1595 set_int(check_on, 1);
1598 program { name: "check_off";
1599 signal: "elm,state,check,off";
1603 if (get_int(is_rtl) == 0) {
1609 set_drag(PART:"button", drag, 0.0);
1610 set_state(PART:"bg_image", "default", 0.0);
1611 set_state(PART:"button", "default", 0.0);
1612 set_int(check_on, 0);
1615 program { name: "text_show";
1616 signal: "elm,state,text,visible";
1618 action: STATE_SET "visible" 0.0;
1621 program { name: "text_hide";
1622 signal: "elm,state,text,hidden";
1624 action: STATE_SET "default" 0.0;
1627 program { name: "icon_show";
1628 signal: "elm,state,icon,visible";
1630 action: STATE_SET "visible" 0.0;
1631 target: "elm.swallow.content";
1633 program { name: "icon_hide";
1634 signal: "elm,state,icon,hidden";
1636 action: STATE_SET "default" 0.0;
1637 target: "elm.swallow.content";
1639 program { name: "disable";
1640 signal: "elm,state,disabled";
1642 action: STATE_SET "disabled" 0.0;
1643 target: "elm.offtext";
1644 target: "elm.ontext";
1648 after: "disable_text";
1650 program { name: "disable_text";
1654 get_state(PART:"elm.text", st, 30, vl);
1655 if (!strcmp(st, "visible"))
1656 set_state(PART:"elm.text", "disabled_visible", 0.0);
1658 set_state(PART:"elm.text", "disabled", 0.0);
1659 get_state(PART:"bg_image", st, 30, vl);
1660 if (!strcmp(st, "visible")) {
1661 set_state(PART:"bg_image", "visible_disable", 0.0);
1662 set_state(PART:"button", "on_disabled", 0.0);
1664 set_state(PART:"bg_image", "off_disable", 0.0);
1665 set_state(PART:"button", "off_disabled", 0.0);
1667 get_state(PART:"elm.swallow.content", st, 30, vl);
1668 if (!strcmp(st, "visible"))
1669 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1671 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1674 program { name: "enable";
1675 signal: "elm,state,enabled";
1677 action: STATE_SET "default" 0.0;
1681 after: "enable_text";
1683 program { name: "enable_text";
1687 get_state(PART:"elm.text", st, 30, vl);
1688 if (!strcmp(st, "disabled_visible"))
1689 set_state(PART:"elm.text", "visible", 0.0);
1691 set_state(PART:"elm.text", "default", 0.0);
1692 get_state(PART:"bg_image", st, 30, vl);
1693 if (!strcmp(st, "visible_disable")) {
1694 set_state(PART:"bg_image", "visible", 0.0);
1695 set_state(PART:"button", "on", 0.0);
1697 set_state(PART:"bg_image", "default", 0.0);
1698 set_state(PART:"button", "default", 0.0);
1700 get_state(PART:"elm.swallow.content", st, 30, vl);
1701 if (!strcmp(st, "visible"))
1702 set_state(PART:"elm.swallow.content", "visible", 0.0);
1704 set_state(PART:"elm.swallow.content", "default", 0.0);
1707 program { name: "to_rtl";
1708 signal: "edje,state,rtl";
1714 program { name: "to_ltr";
1715 signal: "edje,state,ltr";
1723 ///////////////////////////////////////////////////////////////////////////////////////
1725 #define CHECK_STYLE_FAVORITE(style_name, on_image, on_dim_image, off_image, off_dim_image, min_width, min_height) \
1726 group { name: "elm/check/base/"style_name; \
1728 image: on_image COMP; \
1729 image: on_dim_image COMP; \
1730 image: off_image COMP; \
1731 image: off_dim_image COMP; \
1734 part { name: "back_bg"; \
1737 description { state: "default" 0.0; \
1739 rel2.relative: 0.0 1.0; \
1741 min: min_width min_height; \
1745 part { name: "bg"; \
1747 clip_to: "disclip"; \
1749 description { state: "default" 0.0; \
1751 rel1.to: "back_bg"; \
1752 rel2.to: "back_bg"; \
1753 min: min_width min_height; \
1754 max: min_width min_height; \
1758 part { name: "check"; \
1760 clip_to: "disclip"; \
1762 description { state: "default" 0.0; \
1765 image.normal: off_image; \
1767 description { state: "visible" 0.0; \
1768 inherit: "default" 0.0; \
1769 image.normal: on_image; \
1771 description { state: "disabled" 0.0; \
1772 inherit: "default" 0.0; \
1773 image.normal: off_dim_image; \
1775 description { state: "disabled_visible" 0.0; \
1776 inherit: "default" 0.0; \
1777 image.normal: on_dim_image; \
1780 part { name: "elm.swallow.content"; \
1782 clip_to: "disclip"; \
1783 description { state: "default" 0.0; \
1789 relative: 1.0 0.0; \
1794 relative: 1.0 1.0; \
1798 description { state: "visible" 0.0; \
1799 inherit: "default" 0.0; \
1803 aspect_preference: VERTICAL; \
1805 description { state: "disabled" 0.0; \
1806 inherit: "default" 0.0; \
1808 description { state: "disabled_visible" 0.0; \
1809 inherit: "default" 0.0; \
1815 part { name: "elm.text"; \
1817 clip_to: "disclip"; \
1820 description { state: "default" 0.0; \
1824 relative: 1.0 0.5; \
1826 to_x: "elm.swallow.content"; \
1829 relative: 1.0 0.5; \
1834 style: "check_label_textblock_style"; \
1838 description { state: "visible" 0.0; \
1839 inherit: "default" 0.0; \
1843 description { state: "disabled" 0.0; \
1844 inherit: "default" 0.0; \
1846 description { state: "disabled_visible" 0.0; \
1847 inherit: "default" 0.0; \
1850 style: "check_label_textblock_style_disable"; \
1855 part { name: "disclip"; \
1858 description { state: "default" 0.0; \
1859 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1862 part { name: "events"; \
1864 ignore_flags: ON_HOLD; \
1865 description { state: "default" 0.0; \
1869 part { name: "disabler"; \
1871 description { state: "default" 0.0; \
1875 description { state: "disabled" 0.0; \
1876 inherit: "default" 0.0; \
1882 program { name: "click"; \
1883 signal: "mouse,clicked,1"; \
1885 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1886 after: "touch_sound"; \
1888 program { name: "touch_sound"; \
1889 action: PLAY_SAMPLE "touch_sound" 1.0; \
1891 program { name: "check_on"; \
1892 signal: "elm,state,check,on"; \
1894 action: STATE_SET "visible" 0.0; \
1897 program { name: "check_off"; \
1898 signal: "elm,state,check,off"; \
1900 action: STATE_SET "default" 0.0; \
1903 program { name: "text_show"; \
1904 signal: "elm,state,text,visible"; \
1906 action: STATE_SET "visible" 0.0; \
1907 target: "elm.text"; \
1909 program { name: "text_hide"; \
1910 signal: "elm,state,text,hidden"; \
1912 action: STATE_SET "default" 0.0; \
1913 target: "elm.text"; \
1915 program { name: "icon_show"; \
1916 signal: "elm,state,icon,visible"; \
1918 action: STATE_SET "visible" 0.0; \
1919 target: "elm.swallow.content"; \
1921 program { name: "icon_hide"; \
1922 signal: "elm,state,icon,hidden"; \
1924 action: STATE_SET "default" 0.0; \
1925 target: "elm.swallow.content"; \
1927 program { name: "disable"; \
1928 signal: "elm,state,disabled"; \
1930 action: STATE_SET "disabled" 0.0; \
1931 target: "disabler"; \
1932 after: "disable_text"; \
1934 program { name: "disable_text"; \
1938 get_state(PART:"elm.text", st, 30, vl); \
1939 if (!strcmp(st, "visible")) \
1940 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1942 set_state(PART:"elm.text", "disabled", 0.0); \
1943 get_state(PART:"elm.swallow.content", st, 30, vl); \
1944 if (!strcmp(st, "visible")) \
1945 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1947 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1948 get_state(PART:"check", st, 30, vl); \
1949 if (!strcmp(st, "visible")) \
1950 set_state(PART:"check", "disabled_visible", 0.0); \
1952 set_state(PART:"check", "disabled", 0.0); \
1955 program { name: "enable"; \
1956 signal: "elm,state,enabled"; \
1958 action: STATE_SET "default" 0.0; \
1959 target: "disabler"; \
1960 after: "enable_text"; \
1962 program { name: "enable_text"; \
1966 get_state(PART:"elm.text", st, 30, vl); \
1967 if (!strcmp(st, "disabled_visible")) \
1968 set_state(PART:"elm.text", "visible", 0.0); \
1970 set_state(PART:"elm.text", "default", 0.0); \
1971 get_state(PART:"elm.swallow.content", st, 30, vl); \
1972 if (!strcmp(st, "visible")) \
1973 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1975 set_state(PART:"elm.swallow.content", "default", 0.0); \
1976 get_state(PART:"check", st, 30, vl); \
1977 if (!strcmp(st, "disabled_visible")) \
1978 set_state(PART:"check", "visible", 0.0); \
1980 set_state(PART:"check", "default", 0.0); \
1985 ////////////////////////////////////////////////////////////////////////////////
1986 CHECK_STYLE_FAVORITE("favorite", "00_icon_favorite_on_72x72.png", "00_icon_favorite_on_72x72_dim.png", "00_icon_favorite_off_72x72.png", "00_icon_favorite_off_72x72_dim.png", CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1987 ////////////////////////////////////////////////////////////////////////////////
1988 CHECK_STYLE_FAVORITE("favorite_small", "00_icon_favorite_on_45x45.png", "00_icon_favorite_on_45x45_dim.png", "00_icon_favorite_off_45x45.png", "00_icon_favorite_off_45x45_dim.png", CHECK_STYLE_FAVORITE_SMALL_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_SMALL_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1989 ////////////////////////////////////////////////////////////////////////////////
1990 CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_icon_favorite_on_72x72_dim.png", "00_icon_favorite_off_72x72.png", "00_icon_favorite_off_72x72_dim.png", CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
1991 ////////////////////////////////////////////////////////////////////////////////
1993 group { name: "elm/check/base/grid";
1995 image: "00_check_bg.png" COMP;
1996 image: "00_check_dim_bg.png" COMP;
1997 image: "00_check_activated_dim.png" COMP;
1998 image: "00_check_activated_press.png" COMP;
1999 image: "00_check_activated.png" COMP;
2000 image: "00_check_press_bg.png" COMP;
2001 image: "00_check_focus.png" COMP;
2004 public check_state = CHECK_STATE_DEFAULT;
2005 public check_visible = CHECK_HIDE;
2011 description { state: "default" 0.0;
2015 part { name: "top_left_padding";
2019 description { state: "default" 0.0;
2021 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
2037 description { state: "default" 0.0;
2039 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
2044 to: "top_left_padding";
2048 to: "top_left_padding";
2050 image.normal: "00_check_bg.png";
2052 description { state: "visible" 0.0;
2053 inherit: "default" 0.0;
2056 description { state: "pressed" 0.0;
2057 inherit: "visible" 0.0;
2058 image.normal: "00_check_press_bg.png";
2060 description { state: "disabled" 0.0;
2061 inherit: "visible" 0.0;
2062 image.normal: "00_check_dim_bg.png";
2065 part { name: "check";
2067 clip_to: "sequence_clip";
2069 description { state: "default" 0.0;
2073 image.normal: "00_check_activated.png";
2074 color: 255 255 255 0;
2076 description { state: "visible" 0.0;
2077 inherit: "default" 0.0;
2079 color: 255 255 255 255;
2081 description { state: "pressed" 0.0;
2082 inherit: "visible" 0.0;
2083 image.normal: "00_check_activated_press.png";
2085 description { state: "disabled_visible" 0.0;
2086 inherit: "default" 0.0;
2088 image.normal: "00_check_activated_dim.png";
2091 part { name: "sequence_clip";
2094 description { state: "default" 0.0;
2097 rel2.relative: 0.0 1.0;
2098 color: 255 255 255 255;
2100 description { state: "visible" 0.0;
2101 inherit: "default" 0.0;
2102 rel2.relative: 1.0 1.0;
2105 part { name: "events";
2107 ignore_flags: ON_HOLD;
2108 description { state: "default" 0.0;
2112 description { state: "visible" 0.0;
2113 inherit: "default" 0.0;
2117 part { name: "disabler";
2119 description { state: "default" 0.0;
2123 description { state: "disabled" 0.0;
2124 inherit: "default" 0.0;
2130 program { name: "show";
2131 signal: "elm,state,set,visible";
2134 set_int(check_visible, CHECK_SHOW);
2136 action: STATE_SET "visible" 0.0;
2140 program { name: "hide";
2141 signal: "elm,state,set,hidden";
2144 set_int(check_visible, CHECK_HIDE);
2146 action: STATE_SET "default" 0.0;
2151 program { name: "click";
2152 signal: "mouse,clicked,1";
2154 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2156 program { name: "unpress";
2157 signal: "mouse,up,1";
2159 action: STATE_SET "visible" 0.0;
2162 program { name: "pressed";
2163 signal: "mouse,down,1";
2165 action: STATE_SET "pressed" 0.0;
2168 program { name: "mouse,out";
2169 signal: "mouse,out";
2172 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2174 set_state(PART:"check", "visible", 0.0);
2175 set_state(PART:"sequence_clip", "visible", 0.0);
2179 set_state(PART:"check", "default", 0.0);
2180 set_state(PART:"sequence_clip", "default", 0.0);
2182 set_state(PART:"bg2", "visible", 0.0);
2185 program { name: "check_on";
2186 signal: "elm,state,check,on";
2189 if (get_int(check_state) != CHECK_STATE_VISIBLE) {
2190 set_int(check_state, CHECK_STATE_VISIBLE);
2191 if (get_int(check_visible) == CHECK_SHOW)
2193 run_program(PROGRAM:"check_show_effect");
2194 run_program(PROGRAM:"check_draw_effect");
2198 set_state(PART:"check", "visible", 0.0);
2199 set_state(PART:"sequence_clip", "visible", 0.0);
2201 set_state(PART:"bg2", "visible", 0.0);
2205 program { name: "check_off";
2206 signal: "elm,state,check,off";
2208 action: STATE_SET "default" 0.0;
2211 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2213 set_int(check_state, CHECK_STATE_DEFAULT);
2214 set_state(PART:"check", "default", 0.0);
2215 set_state(PART:"sequence_clip", "default", 0.0);
2217 set_state(PART:"bg2", "visible", 0.0);
2220 program { name: "check_show_effect";
2221 action: STATE_SET "visible" 0.0;
2222 transition: LINEAR 0.233;
2225 program { name: "check_draw_effect";
2226 action: STATE_SET "visible" 0.0;
2227 transition: LINEAR 0.267;
2228 target: "sequence_clip";
2230 program { name: "disable";
2231 signal: "elm,state,disabled";
2233 action: STATE_SET "disabled" 0.0;
2236 after: "disable_check";
2238 program { name: "disable_check";
2242 get_state(PART:"check", st, 30, vl);
2243 if (!strcmp(st, "visible"))
2245 set_state(PART:"check", "disabled_visible", 0.0);
2246 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2250 program { name: "enable";
2251 signal: "elm,state,enabled";
2253 action: STATE_SET "default" 0.0;
2256 after: "enable_check";
2258 program { name: "enable_check";
2262 get_state(PART:"check", st, 30, vl);
2263 if (!strcmp(st, "disabled_visible"))
2265 set_state(PART:"check", "visible", 0.0);
2266 set_state(PART:"sequence_clip", "visible", 0.0);
2267 set_int(check_state, CHECK_STATE_VISIBLE);
2270 set_int(check_state, CHECK_STATE_DEFAULT);
2276 #undef CHECK_STATE_DEFAULT
2277 #undef CHECK_STATE_VISIBLE
2278 #undef CHECK_STATE_DISABLED_VISIBLE
2279 #undef CHECK_STATE_DISABLED