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
27 ////////////////////////////////////////////////////////////////////////////////
28 #define CHECK_STYLE_DEFAULT(style_name, min_width, min_height) \
29 group { name: "elm/check/base/"style_name; \
31 image: "00_check_bg.png" COMP; \
32 image: "00_check_dim_bg.png" COMP; \
33 image: "00_check_activated_dim.png" COMP; \
34 image: "00_check_activated.png" COMP; \
35 image: "00_check_press_bg.png" COMP; \
36 image: "00_check_focus.png" COMP; \
39 public check_state = CHECK_STATE_DEFAULT; \
40 public check_visible = CHECK_HIDE; \
43 part { name: "back_bg"; \
46 description { state: "default" 0.0; \
47 rel2.relative: 0.0 1.0; \
49 min: min_width min_height; \
57 description { state: "default" 0.0; \
58 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
59 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
63 image.normal: "00_check_bg.png"; \
66 description { state: "visible" 0.0; \
67 inherit: "default" 0.0; \
69 description { state: "pressed" 0.0; \
70 inherit: "default" 0.0; \
71 image.normal: "00_check_press_bg.png"; \
73 description { state: "disabled" 0.0; \
74 inherit: "default" 0.0; \
75 image.normal: "00_check_dim_bg.png"; \
78 part { name: "check"; \
79 clip_to: "sequence_clip"; \
82 description { state: "default" 0.0; \
86 image.normal: "00_check_activated.png"; \
87 color: 255 255 255 0; \
89 description { state: "visible" 0.0; \
90 inherit: "default" 0.0; \
92 color: 255 255 255 255; \
94 description { state: "disabled_visible" 0.0; \
95 inherit: "default" 0.0; \
97 image.normal: "00_check_activated_dim.png"; \
98 color: 255 255 255 255; \
100 description { state: "pressed" 0.0; \
101 inherit: "visible" 0.0; \
104 part { name: "sequence_clip"; \
107 description { state: "default" 0.0; \
108 rel2.relative: 0.0 1.0; \
109 color: 255 255 255 255; \
111 description { state: "visible" 0.0; \
112 inherit: "default" 0.0; \
113 rel2.relative: 1.0 1.0; \
116 part { name: "elm.swallow.content"; \
118 clip_to: "disclip"; \
119 description { state: "default" 0.0; \
134 description { state: "visible" 0.0; \
135 inherit: "default" 0.0; \
139 aspect_preference: VERTICAL; \
141 description { state: "disabled" 0.0; \
142 inherit: "default" 0.0; \
144 description { state: "disabled_visible" 0.0; \
145 inherit: "default" 0.0; \
151 part { name: "elm.text"; \
154 clip_to: "disclip"; \
156 description { state: "default" 0.0; \
162 to_x: "elm.swallow.content"; \
170 style: "check_label_textblock_style"; \
173 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
175 description { state: "visible" 0.0; \
176 inherit: "default" 0.0; \
180 description { state: "disabled" 0.0; \
181 inherit: "default" 0.0; \
183 description { state: "disabled_visible" 0.0; \
184 inherit: "default" 0.0; \
187 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
190 part { name: "events1"; \
192 ignore_flags: ON_HOLD; \
193 description { state: "default" 0.0; \
197 part { name: "events2"; \
200 description { state: "default" 0.0; \
204 part { name: "disclip"; \
207 description { state: "default" 0.0; \
208 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
210 description { state: "disabled" 0.0; \
211 inherit: "default" 0.0; \
212 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
215 part { name: "disabler"; \
217 description { state: "default" 0.0; \
221 description { state: "disabled" 0.0; \
222 inherit: "default" 0.0; \
228 program { name: "show"; \
231 set_int(check_visible, CHECK_SHOW); \
234 program { name: "hide"; \
237 set_int(check_visible, CHECK_HIDE); \
240 program { name: "click"; \
241 signal: "mouse,clicked,1"; \
243 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
244 after: "touch_sound"; \
246 program { name: "touch_sound"; \
247 action: PLAY_SAMPLE "touch_sound" 1.0; \
249 program { name: "bg_normal"; \
250 signal: "mouse,up,1"; \
252 action: STATE_SET "default" 0.0; \
256 program { name: "pressed"; \
257 signal: "mouse,down,1"; \
259 action: STATE_SET "pressed" 0.0; \
263 program { name: "mouse,out"; \
264 signal: "mouse,out"; \
267 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
269 set_state(PART:"check", "visible", 0.0); \
270 set_state(PART:"sequence_clip", "visible", 0.0); \
274 set_state(PART:"check", "default", 0.0); \
275 set_state(PART:"sequence_clip", "default", 0.0); \
279 program { name: "check_on"; \
280 signal: "elm,state,check,on"; \
283 set_int(check_state, CHECK_STATE_VISIBLE); \
284 if (get_int(check_visible) == CHECK_SHOW) \
286 run_program(PROGRAM:"check_show_effect"); \
287 run_program(PROGRAM:"check_draw_effect"); \
291 set_state(PART:"check", "visible", 0.0); \
292 set_state(PART:"sequence_clip", "visible", 0.0); \
296 program { name: "check_off"; \
297 signal: "elm,state,check,off"; \
299 action: STATE_SET "default" 0.0; \
302 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
304 set_int(check_state, CHECK_STATE_DEFAULT); \
305 set_state(PART:"check", "default", 0.0); \
306 set_state(PART:"sequence_clip", "default", 0.0); \
310 program { name: "check_show_effect"; \
311 action: STATE_SET "visible" 0.0; \
312 transition: LINEAR 0.233; \
315 program { name: "check_draw_effect"; \
316 action: STATE_SET "visible" 0.0; \
317 transition: LINEAR 0.267; \
318 target: "sequence_clip"; \
320 program { name: "text_show"; \
321 signal: "elm,state,text,visible"; \
323 action: STATE_SET "visible" 0.0; \
324 target: "elm.text"; \
326 program { name: "text_hide"; \
327 signal: "elm,state,text,hidden"; \
329 action: STATE_SET "default" 0.0; \
330 target: "elm.text"; \
332 program { name: "icon_show"; \
333 signal: "elm,state,icon,visible"; \
335 action: STATE_SET "visible" 0.0; \
336 target: "elm.swallow.content"; \
338 program { name: "icon_hide"; \
339 signal: "elm,state,icon,hidden"; \
341 action: STATE_SET "default" 0.0; \
342 target: "elm.swallow.content"; \
344 program { name: "disable"; \
345 signal: "elm,state,disabled"; \
347 action: STATE_SET "disabled" 0.0; \
348 target: "disabler"; \
351 after: "disable_text"; \
353 program { name: "disable_text"; \
357 get_state(PART:"elm.text", st, 30, vl); \
358 if (!strcmp(st, "visible")) \
359 set_state(PART:"elm.text", "disabled_visible", 0.0); \
361 set_state(PART:"elm.text", "disabled", 0.0); \
362 get_state(PART:"elm.swallow.content", st, 30, vl); \
363 if (!strcmp(st, "visible")) \
364 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
366 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
367 get_state(PART:"check", st, 30, vl); \
368 if (!strcmp(st, "visible")) \
370 set_state(PART:"check", "disabled_visible", 0.0); \
371 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
375 program { name: "enable"; \
376 signal: "elm,state,enabled"; \
378 action: STATE_SET "default" 0.0; \
379 target: "disabler"; \
382 after: "enable_text"; \
384 program { name: "enable_text"; \
388 get_state(PART:"elm.text", st, 30, vl); \
389 if (!strcmp(st, "disabled_visible")) \
390 set_state(PART:"elm.text", "visible", 0.0); \
392 set_state(PART:"elm.text", "default", 0.0); \
393 get_state(PART:"elm.swallow.content", st, 30, vl); \
394 if (!strcmp(st, "visible")) \
395 set_state(PART:"elm.swallow.content", "visible", 0.0); \
397 set_state(PART:"elm.swallow.content", "default", 0.0); \
398 get_state(PART:"check", st, 30, vl); \
399 if (!strcmp(st, "disabled_visible")) \
401 set_state(PART:"check", "visible", 0.0); \
402 set_state(PART:"sequence_clip", "visible", 0.0); \
403 set_int(check_state, CHECK_STATE_VISIBLE); \
406 set_int(check_state, CHECK_STATE_DEFAULT); \
411 ////////////////////////////////////////////////////////////////////////////////
412 CHECK_STYLE_DEFAULT("default", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
413 ////////////////////////////////////////////////////////////////////////////////
414 CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
415 ////////////////////////////////////////////////////////////////////////////////
417 #define CHECK_STYLE_DEFAULT_GENLIST(style_name, min_width, min_height) \
418 group { name: "elm/check/base/"style_name; \
420 image: "00_check_bg.png" COMP; \
421 image: "00_check_dim_bg.png" COMP; \
422 image: "00_check_activated_dim.png" COMP; \
423 image: "00_check_activated.png" COMP; \
426 public check_state = CHECK_STATE_DEFAULT; \
427 public check_visible = CHECK_HIDE; \
430 part { name: "back_bg"; \
433 description { state: "default" 0.0; \
434 rel2.relative: 0.0 1.0; \
436 min: min_width min_height; \
444 description { state: "default" 0.0; \
445 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
446 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
448 rel1.to: "back_bg"; \
449 rel2.to: "back_bg"; \
450 image.normal: "00_check_bg.png"; \
453 description { state: "visible" 0.0; \
454 inherit: "default" 0.0; \
456 description { state: "pressed" 0.0; \
457 inherit: "default" 0.0; \
458 image.normal: "00_check_press_bg.png"; \
460 description { state: "disabled" 0.0; \
461 inherit: "default" 0.0; \
462 image.normal: "00_check_dim_bg.png"; \
465 part { name: "check"; \
466 clip_to: "sequence_clip"; \
469 description { state: "default" 0.0; \
473 image.normal: "00_check_activated.png"; \
474 color: 255 255 255 0; \
476 description { state: "visible" 0.0; \
477 inherit: "default" 0.0; \
479 color: 255 255 255 255; \
481 description { state: "disabled_visible" 0.0; \
482 inherit: "default" 0.0; \
484 image.normal: "00_check_activated_dim.png"; \
485 color: 255 255 255 255; \
487 description { state: "pressed" 0.0; \
488 inherit: "visible" 0.0; \
491 part { name: "sequence_clip"; \
494 description { state: "default" 0.0; \
495 rel2.relative: 0.0 1.0; \
496 color: 255 255 255 255; \
498 description { state: "visible" 0.0; \
499 inherit: "default" 0.0; \
500 rel2.relative: 1.0 1.0; \
503 part { name: "elm.swallow.content"; \
505 clip_to: "disclip"; \
506 description { state: "default" 0.0; \
521 description { state: "visible" 0.0; \
522 inherit: "default" 0.0; \
526 aspect_preference: VERTICAL; \
528 description { state: "disabled" 0.0; \
529 inherit: "default" 0.0; \
531 description { state: "disabled_visible" 0.0; \
532 inherit: "default" 0.0; \
538 part { name: "elm.text"; \
541 clip_to: "disclip"; \
543 description { state: "default" 0.0; \
549 to_x: "elm.swallow.content"; \
557 style: "check_label_textblock_style"; \
560 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
562 description { state: "visible" 0.0; \
563 inherit: "default" 0.0; \
567 description { state: "disabled" 0.0; \
568 inherit: "default" 0.0; \
570 description { state: "disabled_visible" 0.0; \
571 inherit: "default" 0.0; \
574 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
577 part { name: "disclip"; \
580 description { state: "default" 0.0; \
581 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
583 description { state: "disabled" 0.0; \
584 inherit: "default" 0.0; \
585 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
588 part { name: "disabler"; \
590 description { state: "default" 0.0; \
594 description { state: "disabled" 0.0; \
595 inherit: "default" 0.0; \
601 program { name: "show"; \
604 set_int(check_visible, CHECK_SHOW); \
607 program { name: "hide"; \
610 set_int(check_visible, CHECK_HIDE); \
613 program { name: "bg_normal"; \
614 signal: "elm,state,mouse,up"; \
617 if (CHECK_SHOW == get_int(check_visible)) \
619 set_state(PART:"check", "visible", 0.0); \
623 set_state(PART:"check", "default", 0.0); \
625 set_state(PART:"bg", "default", 0.0); \
628 program { name: "pressed"; \
629 signal: "elm,state,mouse,down"; \
631 action: STATE_SET "pressed" 0.0; \
633 if (CHECK_SHOW == get_int(check_visible)) \
635 set_state(PART:"check", "pressed", 0.0); \
637 set_state(PART:"bg", "pressed", 0.0); \
640 program { name: "mouse,out"; \
641 signal: "mouse,out"; \
644 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
646 set_state(PART:"check", "visible", 0.0); \
647 set_state(PART:"sequence_clip", "visible", 0.0); \
651 set_state(PART:"check", "default", 0.0); \
652 set_state(PART:"sequence_clip", "default", 0.0); \
656 program { name: "check_on"; \
657 signal: "elm,state,check,on"; \
660 set_int(check_state, CHECK_STATE_VISIBLE); \
661 if (get_int(check_visible) == CHECK_SHOW) \
663 run_program(PROGRAM:"check_show_effect"); \
664 run_program(PROGRAM:"check_draw_effect"); \
668 set_state(PART:"check", "visible", 0.0); \
669 set_state(PART:"sequence_clip", "visible", 0.0); \
673 program { name: "check_off"; \
674 signal: "elm,state,check,off"; \
676 action: STATE_SET "default" 0.0; \
679 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
681 set_int(check_state, CHECK_STATE_DEFAULT); \
682 set_state(PART:"check", "default", 0.0); \
683 set_state(PART:"sequence_clip", "default", 0.0); \
687 program { name: "check_show_effect"; \
688 action: STATE_SET "visible" 0.0; \
689 transition: LINEAR 0.233; \
692 program { name: "check_draw_effect"; \
693 action: STATE_SET "visible" 0.0; \
694 transition: LINEAR 0.267; \
695 target: "sequence_clip"; \
697 program { name: "text_show"; \
698 signal: "elm,state,text,visible"; \
700 action: STATE_SET "visible" 0.0; \
701 target: "elm.text"; \
703 program { name: "text_hide"; \
704 signal: "elm,state,text,hidden"; \
706 action: STATE_SET "default" 0.0; \
707 target: "elm.text"; \
709 program { name: "icon_show"; \
710 signal: "elm,state,icon,visible"; \
712 action: STATE_SET "visible" 0.0; \
713 target: "elm.swallow.content"; \
715 program { name: "icon_hide"; \
716 signal: "elm,state,icon,hidden"; \
718 action: STATE_SET "default" 0.0; \
719 target: "elm.swallow.content"; \
721 program { name: "disable"; \
722 signal: "elm,state,disabled"; \
724 action: STATE_SET "disabled" 0.0; \
725 target: "disabler"; \
728 after: "disable_text"; \
730 program { name: "disable_text"; \
734 get_state(PART:"elm.text", st, 30, vl); \
735 if (!strcmp(st, "visible")) \
736 set_state(PART:"elm.text", "disabled_visible", 0.0); \
738 set_state(PART:"elm.text", "disabled", 0.0); \
739 get_state(PART:"elm.swallow.content", st, 30, vl); \
740 if (!strcmp(st, "visible")) \
741 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
743 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
744 get_state(PART:"check", st, 30, vl); \
745 if (!strcmp(st, "visible")) \
747 set_state(PART:"check", "disabled_visible", 0.0); \
748 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
752 program { name: "enable"; \
753 signal: "elm,state,enabled"; \
755 action: STATE_SET "default" 0.0; \
756 target: "disabler"; \
759 after: "enable_text"; \
761 program { name: "enable_text"; \
765 get_state(PART:"elm.text", st, 30, vl); \
766 if (!strcmp(st, "disabled_visible")) \
767 set_state(PART:"elm.text", "visible", 0.0); \
769 set_state(PART:"elm.text", "default", 0.0); \
770 get_state(PART:"elm.swallow.content", st, 30, vl); \
771 if (!strcmp(st, "visible")) \
772 set_state(PART:"elm.swallow.content", "visible", 0.0); \
774 set_state(PART:"elm.swallow.content", "default", 0.0); \
775 get_state(PART:"check", st, 30, vl); \
776 if (!strcmp(st, "disabled_visible")) \
778 set_state(PART:"check", "visible", 0.0); \
779 set_state(PART:"sequence_clip", "visible", 0.0); \
780 set_int(check_state, CHECK_STATE_VISIBLE); \
783 set_int(check_state, CHECK_STATE_DEFAULT); \
788 ////////////////////////////////////////////////////////////////////////////////
789 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)
790 CHECK_STYLE_DEFAULT_GENLIST("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
791 ////////////////////////////////////////////////////////////////////////////////
793 #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \
794 group { name: "elm/check/base/"style_name; \
796 image: "00_check_bg.png" COMP; \
797 image: "00_check_dim_bg.png" COMP; \
798 image: "00_check_activated_dim.png" COMP; \
799 image: "00_check_activated.png" COMP; \
802 public check_state = CHECK_STATE_DEFAULT; \
805 part { name: "back_bg"; \
808 description { state: "default" 0.0; \
809 min: min_width min_height; \
817 description { state: "default" 0.0; \
818 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
819 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
821 rel1.to: "back_bg"; \
822 rel2.to: "back_bg"; \
823 image.normal: "00_check_bg.png"; \
826 description { state: "disabled" 0.0; \
827 inherit: "default" 0.0; \
828 image.normal: "00_check_dim_bg.png"; \
831 part { name: "check"; \
834 description { state: "default" 0.0; \
838 image.normal: "00_check_activated.png"; \
840 description { state: "visible" 0.0; \
841 inherit: "default" 0.0; \
844 description { state: "disabled_visible" 0.0; \
845 inherit: "default" 0.0; \
847 image.normal: "00_check_activated_dim.png"; \
850 part { name: "elm.swallow.content"; \
852 clip_to: "disclip"; \
853 description { state: "default" 0.0; \
868 description { state: "visible" 0.0; \
869 inherit: "default" 0.0; \
873 aspect_preference: VERTICAL; \
875 description { state: "disabled" 0.0; \
876 inherit: "default" 0.0; \
878 description { state: "disabled_visible" 0.0; \
879 inherit: "default" 0.0; \
885 part { name: "elm.text"; \
888 clip_to: "disclip"; \
890 description { state: "default" 0.0; \
896 to_x: "elm.swallow.content"; \
904 style: "check_label_textblock_style"; \
907 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
909 description { state: "visible" 0.0; \
910 inherit: "default" 0.0; \
914 description { state: "disabled" 0.0; \
915 inherit: "default" 0.0; \
917 description { state: "disabled_visible" 0.0; \
918 inherit: "default" 0.0; \
921 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
924 part { name: "events1"; \
926 ignore_flags: ON_HOLD; \
927 description { state: "default" 0.0; \
931 part { name: "events2"; \
934 description { state: "default" 0.0; \
938 part { name: "disclip"; \
941 description { state: "default" 0.0; \
942 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
944 description { state: "disabled" 0.0; \
945 inherit: "default" 0.0; \
946 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
949 part { name: "disabler"; \
951 description { state: "default" 0.0; \
955 description { state: "disabled" 0.0; \
956 inherit: "default" 0.0; \
962 program { name: "click"; \
963 signal: "mouse,clicked,1"; \
965 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
966 after: "touch_sound"; \
968 program { name: "touch_sound"; \
969 action: PLAY_SAMPLE "touch_sound" 1.0; \
971 program { name: "check_on"; \
972 signal: "elm,state,check,on"; \
975 set_int(check_state, CHECK_STATE_VISIBLE); \
976 set_state(PART:"check", "visible", 0.0); \
979 program { name: "check_off"; \
980 signal: "elm,state,check,off"; \
982 action: STATE_SET "default" 0.0; \
985 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
987 set_int(check_state, CHECK_STATE_DEFAULT); \
988 set_state(PART:"check", "default", 0.0); \
992 program { name: "text_show"; \
993 signal: "elm,state,text,visible"; \
995 action: STATE_SET "visible" 0.0; \
996 target: "elm.text"; \
998 program { name: "text_hide"; \
999 signal: "elm,state,text,hidden"; \
1001 action: STATE_SET "default" 0.0; \
1002 target: "elm.text"; \
1004 program { name: "icon_show"; \
1005 signal: "elm,state,icon,visible"; \
1007 action: STATE_SET "visible" 0.0; \
1008 target: "elm.swallow.content"; \
1010 program { name: "icon_hide"; \
1011 signal: "elm,state,icon,hidden"; \
1013 action: STATE_SET "default" 0.0; \
1014 target: "elm.swallow.content"; \
1016 program { name: "disable"; \
1017 signal: "elm,state,disabled"; \
1019 action: STATE_SET "disabled" 0.0; \
1020 target: "disabler"; \
1021 target: "disclip"; \
1023 after: "disable_text"; \
1025 program { name: "disable_text"; \
1029 get_state(PART:"elm.text", st, 30, vl); \
1030 if (!strcmp(st, "visible")) \
1031 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1033 set_state(PART:"elm.text", "disabled", 0.0); \
1034 get_state(PART:"elm.swallow.content", st, 30, vl); \
1035 if (!strcmp(st, "visible")) \
1036 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1038 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1039 get_state(PART:"check", st, 30, vl); \
1040 if (!strcmp(st, "visible")) \
1042 set_state(PART:"check", "disabled_visible", 0.0); \
1043 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
1047 program { name: "enable"; \
1048 signal: "elm,state,enabled"; \
1050 action: STATE_SET "default" 0.0; \
1051 target: "disabler"; \
1052 target: "disclip"; \
1054 after: "enable_text"; \
1056 program { name: "enable_text"; \
1060 get_state(PART:"elm.text", st, 30, vl); \
1061 if (!strcmp(st, "disabled_visible")) \
1062 set_state(PART:"elm.text", "visible", 0.0); \
1064 set_state(PART:"elm.text", "default", 0.0); \
1065 get_state(PART:"elm.swallow.content", st, 30, vl); \
1066 if (!strcmp(st, "visible")) \
1067 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1069 set_state(PART:"elm.swallow.content", "default", 0.0); \
1070 get_state(PART:"check", st, 30, vl); \
1071 if (!strcmp(st, "disabled_visible")) \
1073 set_state(PART:"check", "visible", 0.0); \
1074 set_int(check_state, CHECK_STATE_VISIBLE); \
1077 set_int(check_state, CHECK_STATE_DEFAULT); \
1082 ////////////////////////////////////////////////////////////////////////////////
1083 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)
1084 ////////////////////////////////////////////////////////////////////////////////
1086 style { name: "check_label_textblock_style";
1087 base: "font=Tizen:style=Roman font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color=#ffffff wrap=char text_class=tizen";
1090 tag: "hilight" "+ font=Tizen:style=Bold";
1091 tag: "b" "+ font=Tizen:style=Bold";
1092 tag: "whitecolor" "+ color=#ffffff";
1097 group { name: "elm/check/base/on&off";
1099 image: "00_button_on_handler.png" COMP;
1100 image: "00_button_on_handler_dim.png" COMP;
1101 image: "00_button_off_handler.png" COMP;
1102 image: "00_button_off_handler_dim.png" COMP;
1103 image: "00_button_on_off_bg.png" COMP;
1104 image: "00_button_on_off_bg_dim.png" COMP;
1105 image: "00_button_handler_focus.png" COMP;
1110 public was_drag = 0;
1111 public check_on = 0;
1118 description { state: "default" 0.0;
1119 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1120 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1121 rel2.relative: 0.0 1.0;
1127 part { name: "padding_left";
1131 description { state: "default" 0.0;
1133 rel1{ relative: 0.0 0.0; to: "bg"; }
1134 rel2{ relative: 0.0 1.0; to: "bg"; }
1140 part { name: "padding_right";
1144 description { state: "default" 0.0;
1159 part { name: "padding_top";
1163 description { state: "default" 0.0;
1175 part { name: "padding_bottom";
1179 description { state: "default" 0.0;
1194 part { name: "bg_image";
1197 description { state: "default" 0.0;
1202 to_y: "padding_top";
1207 to_y: "padding_bottom";
1209 image.normal: "00_button_on_off_bg.png";
1211 description { state: "visible" 0.0;
1212 inherit: "default" 0.0;
1213 image.normal: "00_button_on_off_bg.png";
1215 description { state: "pressed" 0.0;
1216 inherit: "default" 0.0;
1217 image.normal: "00_button_on_off_bg.png";
1219 description { state: "visible_pressed" 0.0;
1220 inherit: "default" 0.0;
1221 image.normal: "00_button_on_off_bg.png";
1223 description { state: "visible_disable" 0.0;
1224 inherit: "default" 0.0;
1225 image.normal: "00_button_on_off_bg_dim.png";
1227 description { state: "off_disable" 0.0;
1228 inherit: "default" 0.0;
1229 image.normal: "00_button_on_off_bg_dim.png";
1232 part { name: "drag_container";
1236 description { state: "default" 0.0;
1239 to_x: "padding_left";
1244 to_x: "padding_right";
1250 part { name: "clipper";
1253 description { state: "default" 0.0;
1256 color: 255 255 255 255;
1259 part { name: "clipper_inner";
1262 description { state: "default" 0.0;
1263 rel1.to: "bg_image";
1264 rel2.to: "bg_image";
1265 color: 255 255 255 255;
1268 part { name: "button";
1275 confine: "drag_container";
1277 description { state: "default" 0.0;
1278 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1279 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1284 image.normal: "00_button_off_handler.png";
1286 description { state: "on" 0.0;
1287 inherit: "default" 0.0;
1288 image.normal: "00_button_on_handler.png";
1290 description { state: "on_disabled" 0.0;
1291 inherit: "default" 0.0;
1292 image.normal: "00_button_on_handler_dim.png";
1294 description { state: "off_disabled" 0.0;
1295 inherit: "default" 0.0;
1296 image.normal: "00_button_off_handler_dim.png";
1299 part { name: "button_events";
1304 description { state: "default" 0.0;
1310 part { name: "onrect";
1315 description { state: "default" 0.0;
1328 part { name: "offrect";
1333 description { state: "default" 0.0;
1345 part { name: "elm.offtext";
1349 clip_to: "clipper_inner";
1350 description { state: "default" 0.0;
1353 color: 255 255 255 255;
1355 font: "Tizen:style=Medium";
1358 text_class: "tizen";
1361 description { state: "disabled" 0.0;
1362 inherit: "default" 0.0;
1363 color: 128 128 128 128;
1366 part { name: "elm.ontext";
1370 clip_to: "clipper_inner";
1371 description { state: "default" 0.0;
1374 color: 255 255 255 255;
1376 font: "Tizen:style=Medium";
1379 text_class: "tizen";
1382 description { state: "disabled" 0.0;
1383 inherit: "default" 0.0;
1384 color: 128 128 128 128;
1387 part { name: "elm.swallow.content";
1390 description { state: "default" 0.0;
1403 description { state: "visible" 0.0;
1404 inherit: "default" 0.0;
1408 aspect_preference: VERTICAL;
1410 description { state: "disabled" 0.0;
1411 inherit: "default" 0.0;
1413 description { state: "disabled_visible" 0.0;
1414 inherit: "default" 0.0;
1420 part { name: "elm.text";
1425 description { state: "default" 0.0;
1431 to_x: "elm.swallow.content";
1439 style: "check_label_textblock_style";
1442 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1444 description { state: "visible" 0.0;
1445 inherit: "default" 0.0;
1449 description { state: "disabled" 0.0;
1450 inherit: "default" 0.0;
1452 description { state: "disabled_visible" 0.0;
1453 inherit: "default" 0.0;
1458 part { name: "disclip";
1461 description { state: "default" 0.0;
1462 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1464 description { state: "disabled" 0.0;
1465 inherit: "default" 0.0;
1466 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1469 part { name: "disabler";
1471 description { state: "default" 0.0;
1475 description { state: "disabled" 0.0;
1476 inherit: "default" 0.0;
1483 signal: "mouse,clicked,1";
1486 new Float:dx, Float:dy;
1487 get_drag(PART:"button", dx, dy);
1488 if (!get_int(was_drag)) {
1490 set_drag(PART:"button", 0.0, 0.0);
1492 set_drag(PART:"button", 1.0, 0.0);
1493 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1494 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1495 if (get_int(check_on)) {
1496 emit("elm,action,check,off", "");
1497 emit("elm,action,touch,sound", "");
1501 if (!get_int(check_on)) {
1502 emit("elm,action,check,on", "");
1503 emit("elm,action,touch,sound", "");
1509 program { name: "touch_sound";
1510 signal: "elm,action,touch,sound";
1512 action: PLAY_SAMPLE "touch_sound" 1.0;
1518 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1519 set_int(is_drag, 1);
1523 signal: "mouse,down,1";
1526 set_int(was_drag, 0);
1527 set_int(is_drag, 0);
1530 program { name: "drag_end";
1531 signal: "mouse,up,1";
1534 new Float:dx, Float:dy;
1535 get_drag(PART:"button", dx, dy);
1536 if (get_int(is_drag)) {
1538 set_drag(PART:"button", 1.0, 0.0);
1540 set_drag(PART:"button", 0.0, 0.0);
1541 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1542 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1543 if (!get_int(check_on)) {
1544 emit("elm,action,check,on", "");
1545 emit("elm,action,touch,sound", "");
1549 if (get_int(check_on)) {
1550 emit("elm,action,check,off", "");
1551 emit("elm,action,touch,sound", "");
1554 set_int(was_drag, get_int(is_drag));
1555 set_int(is_drag, 0);
1556 emit("elm,action,check,drag,stop", "");
1560 program { name: "check_on";
1561 signal: "elm,state,check,on";
1565 if (get_int(is_rtl) == 0) {
1571 set_drag(PART:"button", drag, 0.0);
1572 set_state(PART:"bg_image", "visible", 0.0);
1573 set_state(PART:"button", "on", 0.0);
1574 set_int(check_on, 1);
1577 program { name: "check_off";
1578 signal: "elm,state,check,off";
1582 if (get_int(is_rtl) == 0) {
1588 set_drag(PART:"button", drag, 0.0);
1589 set_state(PART:"bg_image", "default", 0.0);
1590 set_state(PART:"button", "default", 0.0);
1591 set_int(check_on, 0);
1594 program { name: "text_show";
1595 signal: "elm,state,text,visible";
1597 action: STATE_SET "visible" 0.0;
1600 program { name: "text_hide";
1601 signal: "elm,state,text,hidden";
1603 action: STATE_SET "default" 0.0;
1606 program { name: "icon_show";
1607 signal: "elm,state,icon,visible";
1609 action: STATE_SET "visible" 0.0;
1610 target: "elm.swallow.content";
1612 program { name: "icon_hide";
1613 signal: "elm,state,icon,hidden";
1615 action: STATE_SET "default" 0.0;
1616 target: "elm.swallow.content";
1618 program { name: "disable";
1619 signal: "elm,state,disabled";
1621 action: STATE_SET "disabled" 0.0;
1622 target: "elm.offtext";
1623 target: "elm.ontext";
1627 after: "disable_text";
1629 program { name: "disable_text";
1633 get_state(PART:"elm.text", st, 30, vl);
1634 if (!strcmp(st, "visible"))
1635 set_state(PART:"elm.text", "disabled_visible", 0.0);
1637 set_state(PART:"elm.text", "disabled", 0.0);
1638 get_state(PART:"bg_image", st, 30, vl);
1639 if (!strcmp(st, "visible")) {
1640 set_state(PART:"bg_image", "visible_disable", 0.0);
1641 set_state(PART:"button", "on_disabled", 0.0);
1643 set_state(PART:"bg_image", "off_disable", 0.0);
1644 set_state(PART:"button", "off_disabled", 0.0);
1646 get_state(PART:"elm.swallow.content", st, 30, vl);
1647 if (!strcmp(st, "visible"))
1648 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1650 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1653 program { name: "enable";
1654 signal: "elm,state,enabled";
1656 action: STATE_SET "default" 0.0;
1660 after: "enable_text";
1662 program { name: "enable_text";
1666 get_state(PART:"elm.text", st, 30, vl);
1667 if (!strcmp(st, "disabled_visible"))
1668 set_state(PART:"elm.text", "visible", 0.0);
1670 set_state(PART:"elm.text", "default", 0.0);
1671 get_state(PART:"bg_image", st, 30, vl);
1672 if (!strcmp(st, "visible_disable"))
1673 set_state(PART:"bg_image", "visible", 0.0);
1675 set_state(PART:"bg_image", "default", 0.0);
1676 get_state(PART:"elm.swallow.content", st, 30, vl);
1677 if (!strcmp(st, "visible"))
1678 set_state(PART:"elm.swallow.content", "visible", 0.0);
1680 set_state(PART:"elm.swallow.content", "default", 0.0);
1681 set_state(PART:"button", "default", 0.0);
1684 program { name: "to_rtl";
1685 signal: "edje,state,rtl";
1691 program { name: "to_ltr";
1692 signal: "edje,state,ltr";
1700 ///////////////////////////////////////////////////////////////////////////////////////
1702 #define CHECK_STYLE_FAVORITE(style_name, on_image, on_dim_image, off_image, off_dim_image, min_width, min_height) \
1703 group { name: "elm/check/base/"style_name; \
1705 image: on_image COMP; \
1706 image: on_dim_image COMP; \
1707 image: off_image COMP; \
1708 image: off_dim_image COMP; \
1711 part { name: "back_bg"; \
1714 description { state: "default" 0.0; \
1716 rel2.relative: 0.0 1.0; \
1718 min: min_width min_height; \
1722 part { name: "bg"; \
1724 clip_to: "disclip"; \
1726 description { state: "default" 0.0; \
1728 rel1.to: "back_bg"; \
1729 rel2.to: "back_bg"; \
1730 min: min_width min_height; \
1731 max: min_width min_height; \
1735 part { name: "check"; \
1737 clip_to: "disclip"; \
1739 description { state: "default" 0.0; \
1742 image.normal: off_image; \
1744 description { state: "visible" 0.0; \
1745 inherit: "default" 0.0; \
1746 image.normal: on_image; \
1748 description { state: "disabled" 0.0; \
1749 inherit: "default" 0.0; \
1750 image.normal: off_dim_image; \
1752 description { state: "disabled_visible" 0.0; \
1753 inherit: "default" 0.0; \
1754 image.normal: on_dim_image; \
1757 part { name: "elm.swallow.content"; \
1759 clip_to: "disclip"; \
1760 description { state: "default" 0.0; \
1766 relative: 1.0 0.0; \
1771 relative: 1.0 1.0; \
1775 description { state: "visible" 0.0; \
1776 inherit: "default" 0.0; \
1780 aspect_preference: VERTICAL; \
1782 description { state: "disabled" 0.0; \
1783 inherit: "default" 0.0; \
1785 description { state: "disabled_visible" 0.0; \
1786 inherit: "default" 0.0; \
1792 part { name: "elm.text"; \
1794 clip_to: "disclip"; \
1797 description { state: "default" 0.0; \
1801 relative: 1.0 0.5; \
1803 to_x: "elm.swallow.content"; \
1806 relative: 1.0 0.5; \
1811 style: "check_label_textblock_style"; \
1814 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1816 description { state: "visible" 0.0; \
1817 inherit: "default" 0.0; \
1821 description { state: "disabled" 0.0; \
1822 inherit: "default" 0.0; \
1824 description { state: "disabled_visible" 0.0; \
1825 inherit: "default" 0.0; \
1828 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1831 part { name: "disclip"; \
1834 description { state: "default" 0.0; \
1835 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1838 part { name: "events"; \
1840 ignore_flags: ON_HOLD; \
1841 description { state: "default" 0.0; \
1845 part { name: "disabler"; \
1847 description { state: "default" 0.0; \
1851 description { state: "disabled" 0.0; \
1852 inherit: "default" 0.0; \
1858 program { name: "click"; \
1859 signal: "mouse,clicked,1"; \
1861 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1862 after: "touch_sound"; \
1864 program { name: "touch_sound"; \
1865 action: PLAY_SAMPLE "touch_sound" 1.0; \
1867 program { name: "check_on"; \
1868 signal: "elm,state,check,on"; \
1870 action: STATE_SET "visible" 0.0; \
1873 program { name: "check_off"; \
1874 signal: "elm,state,check,off"; \
1876 action: STATE_SET "default" 0.0; \
1879 program { name: "text_show"; \
1880 signal: "elm,state,text,visible"; \
1882 action: STATE_SET "visible" 0.0; \
1883 target: "elm.text"; \
1885 program { name: "text_hide"; \
1886 signal: "elm,state,text,hidden"; \
1888 action: STATE_SET "default" 0.0; \
1889 target: "elm.text"; \
1891 program { name: "icon_show"; \
1892 signal: "elm,state,icon,visible"; \
1894 action: STATE_SET "visible" 0.0; \
1895 target: "elm.swallow.content"; \
1897 program { name: "icon_hide"; \
1898 signal: "elm,state,icon,hidden"; \
1900 action: STATE_SET "default" 0.0; \
1901 target: "elm.swallow.content"; \
1903 program { name: "disable"; \
1904 signal: "elm,state,disabled"; \
1906 action: STATE_SET "disabled" 0.0; \
1907 target: "disabler"; \
1908 after: "disable_text"; \
1910 program { name: "disable_text"; \
1914 get_state(PART:"elm.text", st, 30, vl); \
1915 if (!strcmp(st, "visible")) \
1916 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1918 set_state(PART:"elm.text", "disabled", 0.0); \
1919 get_state(PART:"elm.swallow.content", st, 30, vl); \
1920 if (!strcmp(st, "visible")) \
1921 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1923 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1924 get_state(PART:"check", st, 30, vl); \
1925 if (!strcmp(st, "visible")) \
1926 set_state(PART:"check", "disabled_visible", 0.0); \
1928 set_state(PART:"check", "disabled", 0.0); \
1931 program { name: "enable"; \
1932 signal: "elm,state,enabled"; \
1934 action: STATE_SET "default" 0.0; \
1935 target: "disabler"; \
1936 after: "enable_text"; \
1938 program { name: "enable_text"; \
1942 get_state(PART:"elm.text", st, 30, vl); \
1943 if (!strcmp(st, "disabled_visible")) \
1944 set_state(PART:"elm.text", "visible", 0.0); \
1946 set_state(PART:"elm.text", "default", 0.0); \
1947 get_state(PART:"elm.swallow.content", st, 30, vl); \
1948 if (!strcmp(st, "visible")) \
1949 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1951 set_state(PART:"elm.swallow.content", "default", 0.0); \
1952 get_state(PART:"check", st, 30, vl); \
1953 if (!strcmp(st, "disabled_visible")) \
1954 set_state(PART:"check", "visible", 0.0); \
1956 set_state(PART:"check", "default", 0.0); \
1961 ////////////////////////////////////////////////////////////////////////////////
1962 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)
1963 ////////////////////////////////////////////////////////////////////////////////
1964 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)
1965 ////////////////////////////////////////////////////////////////////////////////
1966 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)
1967 ////////////////////////////////////////////////////////////////////////////////
1969 group { name: "elm/check/base/grid";
1970 images.image: "00_check_bg.png" COMP;
1971 images.image: "00_check_dim_bg.png" COMP;
1972 images.image: "00_check_activated_dim.png" COMP;
1973 images.image: "00_check_activated.png" COMP;
1975 public check_state = CHECK_STATE_DEFAULT;
1976 public check_visible = CHECK_HIDE;
1982 description { state: "default" 0.0;
1986 part { name: "top_left_padding";
1990 description { state: "default" 0.0;
1992 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
2008 description { state: "default" 0.0;
2009 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
2014 to: "top_left_padding";
2018 to: "top_left_padding";
2020 image.normal: "00_check_bg.png";
2022 description { state: "visible" 0.0;
2023 inherit: "default" 0.0;
2025 description { state: "disabled" 0.0;
2026 inherit: "default" 0.0;
2027 image.normal: "00_check_dim_bg.png";
2030 part { name: "check";
2032 clip_to: "sequence_clip";
2034 description { state: "default" 0.0;
2038 image.normal: "00_check_activated.png";
2039 color: 255 255 255 0;
2041 description { state: "visible" 0.0;
2042 inherit: "default" 0.0;
2044 color: 255 255 255 255;
2046 description { state: "pressed" 0.0;
2047 inherit: "visible" 0.0;
2049 description { state: "disabled_visible" 0.0;
2050 inherit: "default" 0.0;
2052 image.normal: "00_check_activated_dim.png";
2055 part { name: "sequence_clip";
2058 description { state: "default" 0.0;
2061 rel2.relative: 0.0 1.0;
2062 color: 255 255 255 255;
2064 description { state: "visible" 0.0;
2065 inherit: "default" 0.0;
2066 rel2.relative: 1.0 1.0;
2069 part { name: "elm.swallow.content";
2072 state: "default" 0.0;
2075 color: 255 255 255 255;
2088 description { state: "visible" 0.0;
2089 inherit: "default" 0.0;
2093 aspect_preference: VERTICAL;
2095 description { state: "disabled" 0.0;
2096 inherit: "default" 0.0;
2097 color: 128 128 128 128;
2099 description { state: "disabled_visible" 0.0;
2100 inherit: "default" 0.0;
2101 color: 128 128 128 128;
2107 part { name: "elm.text";
2111 description { state: "default" 0.0;
2117 to_x: "elm.swallow.content";
2123 color: 255 255 255 255;
2126 style: "check_label_textblock_style";
2129 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2131 description { state: "visible" 0.0;
2132 inherit: "default" 0.0;
2136 description { state: "disabled" 0.0;
2137 inherit: "default" 0.0;
2139 description { state: "disabled_visible" 0.0;
2140 inherit: "default" 0.0;
2143 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2146 part { name: "events";
2148 ignore_flags: ON_HOLD;
2149 description { state: "default" 0.0;
2153 part { name: "disabler";
2155 description { state: "default" 0.0;
2159 description { state: "disabled" 0.0;
2160 inherit: "default" 0.0;
2166 program { name: "show";
2169 set_int(check_visible, CHECK_SHOW);
2172 program { name: "hide";
2175 set_int(check_visible, CHECK_HIDE);
2178 program { name: "click";
2179 signal: "mouse,clicked,1";
2181 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2184 program { name: "bg_normal";
2186 set_state(PART:"bg2", "default", 0.0);
2189 program { name: "pressed";
2190 signal: "mouse,down,1";
2195 get_state(PART:"check", st, 30, vl);
2196 if (!strcmp(st, "visible"))
2198 set_state(PART:"check", "pressed", 0.0);
2199 set_state(PART:"bg2", "visible", 0.0);
2203 program { name: "mouse,out";
2204 signal: "mouse,out";
2207 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2209 set_state(PART:"check", "visible", 0.0);
2210 set_state(PART:"sequence_clip", "visible", 0.0);
2211 set_state(PART:"bg2", "visible", 0.0);
2215 set_state(PART:"check", "default", 0.0);
2216 set_state(PART:"sequence_clip", "default", 0.0);
2217 set_state(PART:"bg2", "default", 0.0);
2221 program { name: "check_on";
2222 signal: "elm,state,check,on";
2225 set_int(check_state, CHECK_STATE_VISIBLE);
2226 if (get_int(check_visible) == CHECK_SHOW)
2228 run_program(PROGRAM:"check_show_effect");
2229 run_program(PROGRAM:"check_draw_effect");
2233 set_state(PART:"check", "visible", 0.0);
2234 set_state(PART:"sequence_clip", "visible", 0.0);
2236 set_state(PART:"bg2", "visible", 0.0);
2239 program { name: "check_off";
2240 signal: "elm,state,check,off";
2242 action: STATE_SET "default" 0.0;
2245 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2247 set_int(check_state, CHECK_STATE_DEFAULT);
2248 set_state(PART:"check", "default", 0.0);
2249 set_state(PART:"sequence_clip", "default", 0.0);
2251 set_state(PART:"bg2", "default", 0.0);
2254 program { name: "check_show_effect";
2255 action: STATE_SET "visible" 0.0;
2256 transition: LINEAR 0.233;
2259 program { name: "check_draw_effect";
2260 action: STATE_SET "visible" 0.0;
2261 transition: LINEAR 0.267;
2262 target: "sequence_clip";
2264 program { name: "text_show";
2265 signal: "elm,state,text,visible";
2267 action: STATE_SET "visible" 0.0;
2270 program { name: "text_hide";
2271 signal: "elm,state,text,hidden";
2273 action: STATE_SET "default" 0.0;
2276 program { name: "icon_show";
2277 signal: "elm,state,icon,visible";
2279 action: STATE_SET "visible" 0.0;
2280 target: "elm.swallow.content";
2282 program { name: "icon_hide";
2283 signal: "elm,state,icon,hidden";
2285 action: STATE_SET "default" 0.0;
2286 target: "elm.swallow.content";
2288 program { name: "disable";
2289 signal: "elm,state,disabled";
2291 action: STATE_SET "disabled" 0.0;
2294 after: "disable_text";
2296 program { name: "disable_text";
2300 get_state(PART:"elm.text", st, 30, vl);
2301 if (!strcmp(st, "visible"))
2302 set_state(PART:"elm.text", "disabled_visible", 0.0);
2304 set_state(PART:"elm.text", "disabled", 0.0);
2305 get_state(PART:"elm.swallow.content", st, 30, vl);
2306 if (!strcmp(st, "visible"))
2307 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2309 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2310 get_state(PART:"check", st, 30, vl);
2311 if (!strcmp(st, "visible"))
2313 set_state(PART:"check", "disabled_visible", 0.0);
2314 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2318 program { name: "enable";
2319 signal: "elm,state,enabled";
2321 action: STATE_SET "default" 0.0;
2324 after: "enable_text";
2326 program { name: "enable_text";
2330 get_state(PART:"elm.text", st, 30, vl);
2331 if (!strcmp(st, "disabled_visible"))
2332 set_state(PART:"elm.text", "visible", 0.0);
2334 set_state(PART:"elm.text", "default", 0.0);
2335 get_state(PART:"elm.swallow.content", st, 30, vl);
2336 if (!strcmp(st, "visible"))
2337 set_state(PART:"elm.swallow.content", "visible", 0.0);
2339 set_state(PART:"elm.swallow.content", "default", 0.0);
2340 get_state(PART:"check", st, 30, vl);
2341 if (!strcmp(st, "disabled_visible"))
2343 set_state(PART:"check", "visible", 0.0);
2344 set_state(PART:"sequence_clip", "visible", 0.0);
2345 set_int(check_state, CHECK_STATE_VISIBLE);
2348 set_int(check_state, CHECK_STATE_DEFAULT);
2354 #undef CHECK_STATE_DEFAULT
2355 #undef CHECK_STATE_VISIBLE
2356 #undef CHECK_STATE_DISABLED_VISIBLE
2357 #undef CHECK_STATE_DISABLED