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_press.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: "default" 0.0; \
103 image.normal: "00_check_press.png"; \
104 color: 255 255 255 255; \
107 part { name: "sequence_clip"; \
110 description { state: "default" 0.0; \
111 rel2.relative: 0.0 1.0; \
112 color: 255 255 255 255; \
114 description { state: "visible" 0.0; \
115 inherit: "default" 0.0; \
116 rel2.relative: 1.0 1.0; \
119 part { name: "elm.swallow.content"; \
121 clip_to: "disclip"; \
122 description { state: "default" 0.0; \
137 description { state: "visible" 0.0; \
138 inherit: "default" 0.0; \
142 aspect_preference: VERTICAL; \
144 description { state: "disabled" 0.0; \
145 inherit: "default" 0.0; \
147 description { state: "disabled_visible" 0.0; \
148 inherit: "default" 0.0; \
154 part { name: "elm.text"; \
157 clip_to: "disclip"; \
159 description { state: "default" 0.0; \
165 to_x: "elm.swallow.content"; \
173 style: "check_label_textblock_style"; \
176 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
178 description { state: "visible" 0.0; \
179 inherit: "default" 0.0; \
183 description { state: "disabled" 0.0; \
184 inherit: "default" 0.0; \
186 description { state: "disabled_visible" 0.0; \
187 inherit: "default" 0.0; \
190 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
193 part { name: "events1"; \
195 ignore_flags: ON_HOLD; \
196 description { state: "default" 0.0; \
200 part { name: "events2"; \
203 description { state: "default" 0.0; \
207 part { name: "disclip"; \
210 description { state: "default" 0.0; \
211 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
213 description { state: "disabled" 0.0; \
214 inherit: "default" 0.0; \
215 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
218 part { name: "disabler"; \
220 description { state: "default" 0.0; \
224 description { state: "disabled" 0.0; \
225 inherit: "default" 0.0; \
231 program { name: "show"; \
234 set_int(check_visible, CHECK_SHOW); \
237 program { name: "hide"; \
240 set_int(check_visible, CHECK_HIDE); \
243 program { name: "click"; \
244 signal: "mouse,clicked,1"; \
246 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
247 after: "touch_sound"; \
249 program { name: "touch_sound"; \
250 action: PLAY_SAMPLE "touch_sound" 1.0; \
252 program { name: "bg_normal"; \
253 signal: "mouse,up,1"; \
255 action: STATE_SET "default" 0.0; \
259 program { name: "pressed"; \
260 signal: "mouse,down,1"; \
262 action: STATE_SET "pressed" 0.0; \
266 program { name: "mouse,out"; \
267 signal: "mouse,out"; \
270 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
272 set_state(PART:"check", "visible", 0.0); \
273 set_state(PART:"sequence_clip", "visible", 0.0); \
277 set_state(PART:"check", "default", 0.0); \
278 set_state(PART:"sequence_clip", "default", 0.0); \
282 program { name: "check_on"; \
283 signal: "elm,state,check,on"; \
286 set_int(check_state, CHECK_STATE_VISIBLE); \
287 if (get_int(check_visible) == CHECK_SHOW) \
289 run_program(PROGRAM:"check_show_effect"); \
290 run_program(PROGRAM:"check_draw_effect"); \
294 set_state(PART:"check", "visible", 0.0); \
295 set_state(PART:"sequence_clip", "visible", 0.0); \
299 program { name: "check_off"; \
300 signal: "elm,state,check,off"; \
302 action: STATE_SET "default" 0.0; \
305 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
307 set_int(check_state, CHECK_STATE_DEFAULT); \
308 set_state(PART:"check", "default", 0.0); \
309 set_state(PART:"sequence_clip", "default", 0.0); \
313 program { name: "check_show_effect"; \
314 action: STATE_SET "visible" 0.0; \
315 transition: LINEAR 0.233; \
318 program { name: "check_draw_effect"; \
319 action: STATE_SET "visible" 0.0; \
320 transition: LINEAR 0.267; \
321 target: "sequence_clip"; \
323 program { name: "text_show"; \
324 signal: "elm,state,text,visible"; \
326 action: STATE_SET "visible" 0.0; \
327 target: "elm.text"; \
329 program { name: "text_hide"; \
330 signal: "elm,state,text,hidden"; \
332 action: STATE_SET "default" 0.0; \
333 target: "elm.text"; \
335 program { name: "icon_show"; \
336 signal: "elm,state,icon,visible"; \
338 action: STATE_SET "visible" 0.0; \
339 target: "elm.swallow.content"; \
341 program { name: "icon_hide"; \
342 signal: "elm,state,icon,hidden"; \
344 action: STATE_SET "default" 0.0; \
345 target: "elm.swallow.content"; \
347 program { name: "disable"; \
348 signal: "elm,state,disabled"; \
350 action: STATE_SET "disabled" 0.0; \
351 target: "disabler"; \
354 after: "disable_text"; \
356 program { name: "disable_text"; \
360 get_state(PART:"elm.text", st, 30, vl); \
361 if (!strcmp(st, "visible")) \
362 set_state(PART:"elm.text", "disabled_visible", 0.0); \
364 set_state(PART:"elm.text", "disabled", 0.0); \
365 get_state(PART:"elm.swallow.content", st, 30, vl); \
366 if (!strcmp(st, "visible")) \
367 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
369 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
370 get_state(PART:"check", st, 30, vl); \
371 if (!strcmp(st, "visible")) \
373 set_state(PART:"check", "disabled_visible", 0.0); \
374 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
378 program { name: "enable"; \
379 signal: "elm,state,enabled"; \
381 action: STATE_SET "default" 0.0; \
382 target: "disabler"; \
385 after: "enable_text"; \
387 program { name: "enable_text"; \
391 get_state(PART:"elm.text", st, 30, vl); \
392 if (!strcmp(st, "disabled_visible")) \
393 set_state(PART:"elm.text", "visible", 0.0); \
395 set_state(PART:"elm.text", "default", 0.0); \
396 get_state(PART:"elm.swallow.content", st, 30, vl); \
397 if (!strcmp(st, "visible")) \
398 set_state(PART:"elm.swallow.content", "visible", 0.0); \
400 set_state(PART:"elm.swallow.content", "default", 0.0); \
401 get_state(PART:"check", st, 30, vl); \
402 if (!strcmp(st, "disabled_visible")) \
404 set_state(PART:"check", "visible", 0.0); \
405 set_state(PART:"sequence_clip", "visible", 0.0); \
406 set_int(check_state, CHECK_STATE_VISIBLE); \
409 set_int(check_state, CHECK_STATE_DEFAULT); \
414 ////////////////////////////////////////////////////////////////////////////////
415 CHECK_STYLE_DEFAULT("default", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
416 ////////////////////////////////////////////////////////////////////////////////
417 CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
418 ////////////////////////////////////////////////////////////////////////////////
420 #define CHECK_STYLE_DEFAULT_GENLIST_EDITMODE(style_name, min_width, min_height) \
421 group { name: "elm/check/base/"style_name; \
423 image: "00_check_bg.png" COMP; \
424 image: "00_check_dim_bg.png" COMP; \
425 image: "00_check_activated_dim.png" COMP; \
426 image: "00_check_activated.png" COMP; \
429 public check_state = CHECK_STATE_DEFAULT; \
430 public check_visible = CHECK_HIDE; \
433 part { name: "back_bg"; \
436 description { state: "default" 0.0; \
437 rel2.relative: 0.0 1.0; \
439 min: min_width min_height; \
447 description { state: "default" 0.0; \
448 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
449 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
451 rel1.to: "back_bg"; \
452 rel2.to: "back_bg"; \
453 image.normal: "00_check_bg.png"; \
456 description { state: "visible" 0.0; \
457 inherit: "default" 0.0; \
459 description { state: "pressed" 0.0; \
460 inherit: "default" 0.0; \
461 image.normal: "00_check_press_bg.png"; \
463 description { state: "disabled" 0.0; \
464 inherit: "default" 0.0; \
465 image.normal: "00_check_dim_bg.png"; \
468 part { name: "check"; \
469 clip_to: "sequence_clip"; \
472 description { state: "default" 0.0; \
476 image.normal: "00_check_activated.png"; \
477 color: 255 255 255 0; \
479 description { state: "visible" 0.0; \
480 inherit: "default" 0.0; \
482 color: 255 255 255 255; \
484 description { state: "disabled_visible" 0.0; \
485 inherit: "default" 0.0; \
487 image.normal: "00_check_activated_dim.png"; \
488 color: 255 255 255 255; \
490 description { state: "pressed" 0.0; \
491 inherit: "default" 0.0; \
493 image.normal: "00_check_press.png"; \
494 color: 255 255 255 255; \
497 part { name: "sequence_clip"; \
500 description { state: "default" 0.0; \
501 rel2.relative: 0.0 1.0; \
502 color: 255 255 255 255; \
504 description { state: "visible" 0.0; \
505 inherit: "default" 0.0; \
506 rel2.relative: 1.0 1.0; \
509 part { name: "elm.swallow.content"; \
511 clip_to: "disclip"; \
512 description { state: "default" 0.0; \
527 description { state: "visible" 0.0; \
528 inherit: "default" 0.0; \
532 aspect_preference: VERTICAL; \
534 description { state: "disabled" 0.0; \
535 inherit: "default" 0.0; \
537 description { state: "disabled_visible" 0.0; \
538 inherit: "default" 0.0; \
544 part { name: "elm.text"; \
547 clip_to: "disclip"; \
549 description { state: "default" 0.0; \
555 to_x: "elm.swallow.content"; \
563 style: "check_label_textblock_style"; \
566 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
568 description { state: "visible" 0.0; \
569 inherit: "default" 0.0; \
573 description { state: "disabled" 0.0; \
574 inherit: "default" 0.0; \
576 description { state: "disabled_visible" 0.0; \
577 inherit: "default" 0.0; \
580 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
583 part { name: "disclip"; \
586 description { state: "default" 0.0; \
587 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
589 description { state: "disabled" 0.0; \
590 inherit: "default" 0.0; \
591 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
594 part { name: "disabler"; \
596 description { state: "default" 0.0; \
600 description { state: "disabled" 0.0; \
601 inherit: "default" 0.0; \
607 program { name: "show"; \
610 set_int(check_visible, CHECK_SHOW); \
613 program { name: "hide"; \
616 set_int(check_visible, CHECK_HIDE); \
619 program { name: "bg_normal"; \
620 signal: "elm,state,mouse,up"; \
622 action: STATE_SET "default" 0.0; \
626 program { name: "pressed"; \
627 signal: "elm,state,mouse,down"; \
629 action: STATE_SET "pressed" 0.0; \
633 program { name: "mouse,out"; \
634 signal: "mouse,out"; \
637 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
639 set_state(PART:"check", "visible", 0.0); \
640 set_state(PART:"sequence_clip", "visible", 0.0); \
644 set_state(PART:"check", "default", 0.0); \
645 set_state(PART:"sequence_clip", "default", 0.0); \
649 program { name: "check_on"; \
650 signal: "elm,state,check,on"; \
653 set_int(check_state, CHECK_STATE_VISIBLE); \
654 if (get_int(check_visible) == CHECK_SHOW) \
656 run_program(PROGRAM:"check_show_effect"); \
657 run_program(PROGRAM:"check_draw_effect"); \
661 set_state(PART:"check", "visible", 0.0); \
662 set_state(PART:"sequence_clip", "visible", 0.0); \
666 program { name: "check_off"; \
667 signal: "elm,state,check,off"; \
669 action: STATE_SET "default" 0.0; \
672 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
674 set_int(check_state, CHECK_STATE_DEFAULT); \
675 set_state(PART:"check", "default", 0.0); \
676 set_state(PART:"sequence_clip", "default", 0.0); \
680 program { name: "check_show_effect"; \
681 action: STATE_SET "visible" 0.0; \
682 transition: LINEAR 0.233; \
685 program { name: "check_draw_effect"; \
686 action: STATE_SET "visible" 0.0; \
687 transition: LINEAR 0.267; \
688 target: "sequence_clip"; \
690 program { name: "text_show"; \
691 signal: "elm,state,text,visible"; \
693 action: STATE_SET "visible" 0.0; \
694 target: "elm.text"; \
696 program { name: "text_hide"; \
697 signal: "elm,state,text,hidden"; \
699 action: STATE_SET "default" 0.0; \
700 target: "elm.text"; \
702 program { name: "icon_show"; \
703 signal: "elm,state,icon,visible"; \
705 action: STATE_SET "visible" 0.0; \
706 target: "elm.swallow.content"; \
708 program { name: "icon_hide"; \
709 signal: "elm,state,icon,hidden"; \
711 action: STATE_SET "default" 0.0; \
712 target: "elm.swallow.content"; \
714 program { name: "disable"; \
715 signal: "elm,state,disabled"; \
717 action: STATE_SET "disabled" 0.0; \
718 target: "disabler"; \
721 after: "disable_text"; \
723 program { name: "disable_text"; \
727 get_state(PART:"elm.text", st, 30, vl); \
728 if (!strcmp(st, "visible")) \
729 set_state(PART:"elm.text", "disabled_visible", 0.0); \
731 set_state(PART:"elm.text", "disabled", 0.0); \
732 get_state(PART:"elm.swallow.content", st, 30, vl); \
733 if (!strcmp(st, "visible")) \
734 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
736 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
737 get_state(PART:"check", st, 30, vl); \
738 if (!strcmp(st, "visible")) \
740 set_state(PART:"check", "disabled_visible", 0.0); \
741 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
745 program { name: "enable"; \
746 signal: "elm,state,enabled"; \
748 action: STATE_SET "default" 0.0; \
749 target: "disabler"; \
752 after: "enable_text"; \
754 program { name: "enable_text"; \
758 get_state(PART:"elm.text", st, 30, vl); \
759 if (!strcmp(st, "disabled_visible")) \
760 set_state(PART:"elm.text", "visible", 0.0); \
762 set_state(PART:"elm.text", "default", 0.0); \
763 get_state(PART:"elm.swallow.content", st, 30, vl); \
764 if (!strcmp(st, "visible")) \
765 set_state(PART:"elm.swallow.content", "visible", 0.0); \
767 set_state(PART:"elm.swallow.content", "default", 0.0); \
768 get_state(PART:"check", st, 30, vl); \
769 if (!strcmp(st, "disabled_visible")) \
771 set_state(PART:"check", "visible", 0.0); \
772 set_state(PART:"sequence_clip", "visible", 0.0); \
773 set_int(check_state, CHECK_STATE_VISIBLE); \
776 set_int(check_state, CHECK_STATE_DEFAULT); \
781 ////////////////////////////////////////////////////////////////////////////////
782 CHECK_STYLE_DEFAULT_GENLIST_EDITMODE("default/genlist_editmode", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
783 CHECK_STYLE_DEFAULT_GENLIST_EDITMODE("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
784 ////////////////////////////////////////////////////////////////////////////////
786 #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \
787 group { name: "elm/check/base/"style_name; \
789 image: "00_check_bg.png" COMP; \
790 image: "00_check_dim_bg.png" COMP; \
791 image: "00_check_activated_dim.png" COMP; \
792 image: "00_check_activated.png" COMP; \
795 public check_state = CHECK_STATE_DEFAULT; \
798 part { name: "back_bg"; \
801 description { state: "default" 0.0; \
802 min: min_width min_height; \
810 description { state: "default" 0.0; \
811 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
812 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
814 rel1.to: "back_bg"; \
815 rel2.to: "back_bg"; \
816 image.normal: "00_check_bg.png"; \
819 description { state: "disabled" 0.0; \
820 inherit: "default" 0.0; \
821 image.normal: "00_check_dim_bg.png"; \
824 part { name: "check"; \
827 description { state: "default" 0.0; \
831 image.normal: "00_check_activated.png"; \
833 description { state: "visible" 0.0; \
834 inherit: "default" 0.0; \
837 description { state: "disabled_visible" 0.0; \
838 inherit: "default" 0.0; \
840 image.normal: "00_check_activated_dim.png"; \
843 part { name: "elm.swallow.content"; \
845 clip_to: "disclip"; \
846 description { state: "default" 0.0; \
861 description { state: "visible" 0.0; \
862 inherit: "default" 0.0; \
866 aspect_preference: VERTICAL; \
868 description { state: "disabled" 0.0; \
869 inherit: "default" 0.0; \
871 description { state: "disabled_visible" 0.0; \
872 inherit: "default" 0.0; \
878 part { name: "elm.text"; \
881 clip_to: "disclip"; \
883 description { state: "default" 0.0; \
889 to_x: "elm.swallow.content"; \
897 style: "check_label_textblock_style"; \
900 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
902 description { state: "visible" 0.0; \
903 inherit: "default" 0.0; \
907 description { state: "disabled" 0.0; \
908 inherit: "default" 0.0; \
910 description { state: "disabled_visible" 0.0; \
911 inherit: "default" 0.0; \
914 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
917 part { name: "events1"; \
919 ignore_flags: ON_HOLD; \
920 description { state: "default" 0.0; \
924 part { name: "events2"; \
927 description { state: "default" 0.0; \
931 part { name: "disclip"; \
934 description { state: "default" 0.0; \
935 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
937 description { state: "disabled" 0.0; \
938 inherit: "default" 0.0; \
939 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
942 part { name: "disabler"; \
944 description { state: "default" 0.0; \
948 description { state: "disabled" 0.0; \
949 inherit: "default" 0.0; \
955 program { name: "click"; \
956 signal: "mouse,clicked,1"; \
958 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
959 after: "touch_sound"; \
961 program { name: "touch_sound"; \
962 action: PLAY_SAMPLE "touch_sound" 1.0; \
964 program { name: "check_on"; \
965 signal: "elm,state,check,on"; \
968 set_int(check_state, CHECK_STATE_VISIBLE); \
969 set_state(PART:"check", "visible", 0.0); \
972 program { name: "check_off"; \
973 signal: "elm,state,check,off"; \
975 action: STATE_SET "default" 0.0; \
978 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
980 set_int(check_state, CHECK_STATE_DEFAULT); \
981 set_state(PART:"check", "default", 0.0); \
985 program { name: "text_show"; \
986 signal: "elm,state,text,visible"; \
988 action: STATE_SET "visible" 0.0; \
989 target: "elm.text"; \
991 program { name: "text_hide"; \
992 signal: "elm,state,text,hidden"; \
994 action: STATE_SET "default" 0.0; \
995 target: "elm.text"; \
997 program { name: "icon_show"; \
998 signal: "elm,state,icon,visible"; \
1000 action: STATE_SET "visible" 0.0; \
1001 target: "elm.swallow.content"; \
1003 program { name: "icon_hide"; \
1004 signal: "elm,state,icon,hidden"; \
1006 action: STATE_SET "default" 0.0; \
1007 target: "elm.swallow.content"; \
1009 program { name: "disable"; \
1010 signal: "elm,state,disabled"; \
1012 action: STATE_SET "disabled" 0.0; \
1013 target: "disabler"; \
1014 target: "disclip"; \
1016 after: "disable_text"; \
1018 program { name: "disable_text"; \
1022 get_state(PART:"elm.text", st, 30, vl); \
1023 if (!strcmp(st, "visible")) \
1024 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1026 set_state(PART:"elm.text", "disabled", 0.0); \
1027 get_state(PART:"elm.swallow.content", st, 30, vl); \
1028 if (!strcmp(st, "visible")) \
1029 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1031 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1032 get_state(PART:"check", st, 30, vl); \
1033 if (!strcmp(st, "visible")) \
1035 set_state(PART:"check", "disabled_visible", 0.0); \
1036 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
1040 program { name: "enable"; \
1041 signal: "elm,state,enabled"; \
1043 action: STATE_SET "default" 0.0; \
1044 target: "disabler"; \
1045 target: "disclip"; \
1047 after: "enable_text"; \
1049 program { name: "enable_text"; \
1053 get_state(PART:"elm.text", st, 30, vl); \
1054 if (!strcmp(st, "disabled_visible")) \
1055 set_state(PART:"elm.text", "visible", 0.0); \
1057 set_state(PART:"elm.text", "default", 0.0); \
1058 get_state(PART:"elm.swallow.content", st, 30, vl); \
1059 if (!strcmp(st, "visible")) \
1060 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1062 set_state(PART:"elm.swallow.content", "default", 0.0); \
1063 get_state(PART:"check", st, 30, vl); \
1064 if (!strcmp(st, "disabled_visible")) \
1066 set_state(PART:"check", "visible", 0.0); \
1067 set_int(check_state, CHECK_STATE_VISIBLE); \
1070 set_int(check_state, CHECK_STATE_DEFAULT); \
1075 ////////////////////////////////////////////////////////////////////////////////
1076 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)
1077 ////////////////////////////////////////////////////////////////////////////////
1079 style { name: "check_label_textblock_style";
1080 base: "font=Tizen:style=Roman font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color=#ffffff wrap=char text_class=tizen";
1083 tag: "hilight" "+ font=Tizen:style=Bold";
1084 tag: "b" "+ font=Tizen:style=Bold";
1085 tag: "whitecolor" "+ color=#ffffff";
1090 group { name: "elm/check/base/on&off";
1092 image: "00_button_on.png" COMP;
1093 image: "00_button_on_dim.png" COMP;
1094 image: "00_button_off.png" COMP;
1095 image: "00_button_off_dim.png" COMP;
1096 image: "00_button_on_off_handler.png" COMP;
1097 image: "00_button_on_off_handler_dim.png" COMP;
1102 public was_drag = 0;
1103 public check_on = 0;
1110 description { state: "default" 0.0;
1111 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1112 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1113 rel2.relative: 0.0 1.0;
1119 part { name: "padding_left";
1123 description { state: "default" 0.0;
1125 rel1{ relative: 0.0 0.0; to: "bg"; }
1126 rel2{ relative: 0.0 1.0; to: "bg"; }
1132 part { name: "padding_right";
1136 description { state: "default" 0.0;
1151 part { name: "padding_top";
1155 description { state: "default" 0.0;
1167 part { name: "padding_bottom";
1171 description { state: "default" 0.0;
1186 part { name: "bg_image";
1189 description { state: "default" 0.0;
1194 to_y: "padding_top";
1199 to_y: "padding_bottom";
1201 image.normal: "00_button_off.png";
1203 description { state: "visible" 0.0;
1204 inherit: "default" 0.0;
1205 image.normal: "00_button_on.png";
1207 description { state: "pressed" 0.0;
1208 inherit: "default" 0.0;
1209 image.normal: "00_button_off.png";
1211 description { state: "visible_pressed" 0.0;
1212 inherit: "default" 0.0;
1213 image.normal: "00_button_on.png";
1215 description { state: "visible_disable" 0.0;
1216 inherit: "default" 0.0;
1217 image.normal: "00_button_on_dim.png";
1219 description { state: "off_disable" 0.0;
1220 inherit: "default" 0.0;
1221 image.normal: "00_button_off_dim.png";
1224 part { name: "drag_container";
1228 description { state: "default" 0.0;
1231 to_x: "padding_left";
1236 to_x: "padding_right";
1242 part { name: "clipper";
1245 description { state: "default" 0.0;
1248 color: 255 255 255 255;
1251 part { name: "clipper_inner";
1254 description { state: "default" 0.0;
1255 rel1.to: "bg_image";
1256 rel2.to: "bg_image";
1257 color: 255 255 255 255;
1260 part { name: "button";
1267 confine: "drag_container";
1269 description { state: "default" 0.0;
1270 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1271 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1276 image.normal: "00_button_on_off_handler.png";
1278 description { state: "disabled" 0.0;
1279 inherit: "default" 0.0;
1280 image.normal: "00_button_on_off_handler_dim.png";
1283 part { name: "button_events";
1288 description { state: "default" 0.0;
1294 part { name: "onrect";
1299 description { state: "default" 0.0;
1312 part { name: "offrect";
1317 description { state: "default" 0.0;
1329 part { name: "elm.offtext";
1333 clip_to: "clipper_inner";
1334 description { state: "default" 0.0;
1337 color: 255 255 255 255;
1339 font: "Tizen:style=Medium";
1342 text_class: "tizen";
1345 description { state: "disabled" 0.0;
1346 inherit: "default" 0.0;
1347 color: 128 128 128 128;
1350 part { name: "elm.ontext";
1354 clip_to: "clipper_inner";
1355 description { state: "default" 0.0;
1358 color: 255 255 255 255;
1360 font: "Tizen:style=Medium";
1363 text_class: "tizen";
1366 description { state: "disabled" 0.0;
1367 inherit: "default" 0.0;
1368 color: 128 128 128 128;
1371 part { name: "elm.swallow.content";
1374 description { state: "default" 0.0;
1387 description { state: "visible" 0.0;
1388 inherit: "default" 0.0;
1392 aspect_preference: VERTICAL;
1394 description { state: "disabled" 0.0;
1395 inherit: "default" 0.0;
1397 description { state: "disabled_visible" 0.0;
1398 inherit: "default" 0.0;
1404 part { name: "elm.text";
1409 description { state: "default" 0.0;
1415 to_x: "elm.swallow.content";
1423 style: "check_label_textblock_style";
1426 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1428 description { state: "visible" 0.0;
1429 inherit: "default" 0.0;
1433 description { state: "disabled" 0.0;
1434 inherit: "default" 0.0;
1436 description { state: "disabled_visible" 0.0;
1437 inherit: "default" 0.0;
1442 part { name: "disclip";
1445 description { state: "default" 0.0;
1446 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1448 description { state: "disabled" 0.0;
1449 inherit: "default" 0.0;
1450 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1453 part { name: "disabler";
1455 description { state: "default" 0.0;
1459 description { state: "disabled" 0.0;
1460 inherit: "default" 0.0;
1467 signal: "mouse,clicked,1";
1470 new Float:dx, Float:dy;
1471 get_drag(PART:"button", dx, dy);
1472 if (!get_int(was_drag)) {
1474 set_drag(PART:"button", 0.0, 0.0);
1476 set_drag(PART:"button", 1.0, 0.0);
1477 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1478 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1479 if (get_int(check_on)) {
1480 emit("elm,action,check,off", "");
1481 emit("elm,action,touch,sound", "");
1485 if (!get_int(check_on)) {
1486 emit("elm,action,check,on", "");
1487 emit("elm,action,touch,sound", "");
1493 program { name: "touch_sound";
1494 signal: "elm,action,touch,sound";
1496 action: PLAY_SAMPLE "touch_sound" 1.0;
1502 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1503 set_int(is_drag, 1);
1507 signal: "mouse,down,1";
1510 set_int(was_drag, 0);
1511 set_int(is_drag, 0);
1514 program { name: "drag_end";
1515 signal: "mouse,up,1";
1518 new Float:dx, Float:dy;
1519 get_drag(PART:"button", dx, dy);
1520 if (get_int(is_drag)) {
1522 set_drag(PART:"button", 1.0, 0.0);
1524 set_drag(PART:"button", 0.0, 0.0);
1525 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1526 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1527 if (!get_int(check_on)) {
1528 emit("elm,action,check,on", "");
1529 emit("elm,action,touch,sound", "");
1533 if (get_int(check_on)) {
1534 emit("elm,action,check,off", "");
1535 emit("elm,action,touch,sound", "");
1538 set_int(was_drag, get_int(is_drag));
1539 set_int(is_drag, 0);
1540 emit("elm,action,check,drag,stop", "");
1544 program { name: "check_on";
1545 signal: "elm,state,check,on";
1549 if (get_int(is_rtl) == 0) {
1555 set_drag(PART:"button", drag, 0.0);
1556 set_state(PART:"bg_image", "visible", 0.0);
1557 set_int(check_on, 1);
1560 program { name: "check_off";
1561 signal: "elm,state,check,off";
1565 if (get_int(is_rtl) == 0) {
1571 set_drag(PART:"button", drag, 0.0);
1572 set_state(PART:"bg_image", "default", 0.0);
1573 set_int(check_on, 0);
1576 program { name: "text_show";
1577 signal: "elm,state,text,visible";
1579 action: STATE_SET "visible" 0.0;
1582 program { name: "text_hide";
1583 signal: "elm,state,text,hidden";
1585 action: STATE_SET "default" 0.0;
1588 program { name: "icon_show";
1589 signal: "elm,state,icon,visible";
1591 action: STATE_SET "visible" 0.0;
1592 target: "elm.swallow.content";
1594 program { name: "icon_hide";
1595 signal: "elm,state,icon,hidden";
1597 action: STATE_SET "default" 0.0;
1598 target: "elm.swallow.content";
1600 program { name: "disable";
1601 signal: "elm,state,disabled";
1603 action: STATE_SET "disabled" 0.0;
1604 target: "elm.offtext";
1605 target: "elm.ontext";
1609 after: "disable_text";
1611 program { name: "disable_text";
1615 get_state(PART:"elm.text", st, 30, vl);
1616 if (!strcmp(st, "visible"))
1617 set_state(PART:"elm.text", "disabled_visible", 0.0);
1619 set_state(PART:"elm.text", "disabled", 0.0);
1620 get_state(PART:"bg_image", st, 30, vl);
1621 if (!strcmp(st, "visible"))
1622 set_state(PART:"bg_image", "visible_disable", 0.0);
1624 set_state(PART:"bg_image", "off_disable", 0.0);
1625 get_state(PART:"elm.swallow.content", st, 30, vl);
1626 if (!strcmp(st, "visible"))
1627 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1629 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1630 set_state(PART:"button", "disabled", 0.0);
1633 program { name: "enable";
1634 signal: "elm,state,enabled";
1636 action: STATE_SET "default" 0.0;
1640 after: "enable_text";
1642 program { name: "enable_text";
1646 get_state(PART:"elm.text", st, 30, vl);
1647 if (!strcmp(st, "disabled_visible"))
1648 set_state(PART:"elm.text", "visible", 0.0);
1650 set_state(PART:"elm.text", "default", 0.0);
1651 get_state(PART:"bg_image", st, 30, vl);
1652 if (!strcmp(st, "visible_disable"))
1653 set_state(PART:"bg_image", "visible", 0.0);
1655 set_state(PART:"bg_image", "default", 0.0);
1656 get_state(PART:"elm.swallow.content", st, 30, vl);
1657 if (!strcmp(st, "visible"))
1658 set_state(PART:"elm.swallow.content", "visible", 0.0);
1660 set_state(PART:"elm.swallow.content", "default", 0.0);
1661 set_state(PART:"button", "default", 0.0);
1664 program { name: "to_rtl";
1665 signal: "edje,state,rtl";
1671 program { name: "to_ltr";
1672 signal: "edje,state,ltr";
1680 ///////////////////////////////////////////////////////////////////////////////////////
1682 #define CHECK_STYLE_FAVORITE(style_name, on_image, on_dim_image, off_image, off_dim_image, min_width, min_height) \
1683 group { name: "elm/check/base/"style_name; \
1685 image: on_image COMP; \
1686 image: on_dim_image COMP; \
1687 image: off_image COMP; \
1688 image: off_dim_image COMP; \
1691 part { name: "back_bg"; \
1694 description { state: "default" 0.0; \
1696 rel2.relative: 0.0 1.0; \
1698 min: min_width min_height; \
1702 part { name: "bg"; \
1704 clip_to: "disclip"; \
1706 description { state: "default" 0.0; \
1708 rel1.to: "back_bg"; \
1709 rel2.to: "back_bg"; \
1710 min: min_width min_height; \
1711 max: min_width min_height; \
1715 part { name: "check"; \
1717 clip_to: "disclip"; \
1719 description { state: "default" 0.0; \
1722 image.normal: off_image; \
1724 description { state: "visible" 0.0; \
1725 inherit: "default" 0.0; \
1726 image.normal: on_image; \
1728 description { state: "disabled" 0.0; \
1729 inherit: "default" 0.0; \
1730 image.normal: off_dim_image; \
1732 description { state: "disabled_visible" 0.0; \
1733 inherit: "default" 0.0; \
1734 image.normal: on_dim_image; \
1737 part { name: "elm.swallow.content"; \
1739 clip_to: "disclip"; \
1740 description { state: "default" 0.0; \
1746 relative: 1.0 0.0; \
1751 relative: 1.0 1.0; \
1755 description { state: "visible" 0.0; \
1756 inherit: "default" 0.0; \
1760 aspect_preference: VERTICAL; \
1762 description { state: "disabled" 0.0; \
1763 inherit: "default" 0.0; \
1765 description { state: "disabled_visible" 0.0; \
1766 inherit: "default" 0.0; \
1772 part { name: "elm.text"; \
1774 clip_to: "disclip"; \
1777 description { state: "default" 0.0; \
1781 relative: 1.0 0.5; \
1783 to_x: "elm.swallow.content"; \
1786 relative: 1.0 0.5; \
1791 style: "check_label_textblock_style"; \
1794 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1796 description { state: "visible" 0.0; \
1797 inherit: "default" 0.0; \
1801 description { state: "disabled" 0.0; \
1802 inherit: "default" 0.0; \
1804 description { state: "disabled_visible" 0.0; \
1805 inherit: "default" 0.0; \
1808 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1811 part { name: "disclip"; \
1814 description { state: "default" 0.0; \
1815 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1818 part { name: "events"; \
1820 ignore_flags: ON_HOLD; \
1821 description { state: "default" 0.0; \
1825 part { name: "disabler"; \
1827 description { state: "default" 0.0; \
1831 description { state: "disabled" 0.0; \
1832 inherit: "default" 0.0; \
1838 program { name: "click"; \
1839 signal: "mouse,clicked,1"; \
1841 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1842 after: "touch_sound"; \
1844 program { name: "touch_sound"; \
1845 action: PLAY_SAMPLE "touch_sound" 1.0; \
1847 program { name: "check_on"; \
1848 signal: "elm,state,check,on"; \
1850 action: STATE_SET "visible" 0.0; \
1853 program { name: "check_off"; \
1854 signal: "elm,state,check,off"; \
1856 action: STATE_SET "default" 0.0; \
1859 program { name: "text_show"; \
1860 signal: "elm,state,text,visible"; \
1862 action: STATE_SET "visible" 0.0; \
1863 target: "elm.text"; \
1865 program { name: "text_hide"; \
1866 signal: "elm,state,text,hidden"; \
1868 action: STATE_SET "default" 0.0; \
1869 target: "elm.text"; \
1871 program { name: "icon_show"; \
1872 signal: "elm,state,icon,visible"; \
1874 action: STATE_SET "visible" 0.0; \
1875 target: "elm.swallow.content"; \
1877 program { name: "icon_hide"; \
1878 signal: "elm,state,icon,hidden"; \
1880 action: STATE_SET "default" 0.0; \
1881 target: "elm.swallow.content"; \
1883 program { name: "disable"; \
1884 signal: "elm,state,disabled"; \
1886 action: STATE_SET "disabled" 0.0; \
1887 target: "disabler"; \
1888 after: "disable_text"; \
1890 program { name: "disable_text"; \
1894 get_state(PART:"elm.text", st, 30, vl); \
1895 if (!strcmp(st, "visible")) \
1896 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1898 set_state(PART:"elm.text", "disabled", 0.0); \
1899 get_state(PART:"elm.swallow.content", st, 30, vl); \
1900 if (!strcmp(st, "visible")) \
1901 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1903 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1904 get_state(PART:"check", st, 30, vl); \
1905 if (!strcmp(st, "visible")) \
1906 set_state(PART:"check", "disabled_visible", 0.0); \
1908 set_state(PART:"check", "disabled", 0.0); \
1911 program { name: "enable"; \
1912 signal: "elm,state,enabled"; \
1914 action: STATE_SET "default" 0.0; \
1915 target: "disabler"; \
1916 after: "enable_text"; \
1918 program { name: "enable_text"; \
1922 get_state(PART:"elm.text", st, 30, vl); \
1923 if (!strcmp(st, "disabled_visible")) \
1924 set_state(PART:"elm.text", "visible", 0.0); \
1926 set_state(PART:"elm.text", "default", 0.0); \
1927 get_state(PART:"elm.swallow.content", st, 30, vl); \
1928 if (!strcmp(st, "visible")) \
1929 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1931 set_state(PART:"elm.swallow.content", "default", 0.0); \
1932 get_state(PART:"check", st, 30, vl); \
1933 if (!strcmp(st, "disabled_visible")) \
1934 set_state(PART:"check", "visible", 0.0); \
1936 set_state(PART:"check", "default", 0.0); \
1941 ////////////////////////////////////////////////////////////////////////////////
1942 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)
1943 ////////////////////////////////////////////////////////////////////////////////
1944 CHECK_STYLE_FAVORITE("favorite_small", "00_icon_favorite_on_45x45.png", "00_icon_favorite_on_45x45.png", "00_icon_favorite_off_45x45.png", "00_icon_favorite_off_45x45.png", CHECK_STYLE_FAVORITE_SMALL_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_SMALL_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1945 ////////////////////////////////////////////////////////////////////////////////
1946 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)
1947 ////////////////////////////////////////////////////////////////////////////////
1949 group { name: "elm/check/base/grid";
1950 images.image: "00_check_bg.png" COMP;
1951 images.image: "00_check_dim_bg.png" COMP;
1952 images.image: "00_check_activated_dim.png" COMP;
1953 images.image: "00_check_activated.png" COMP;
1955 public check_state = CHECK_STATE_DEFAULT;
1956 public check_visible = CHECK_HIDE;
1962 description { state: "default" 0.0;
1966 part { name: "top_left_padding";
1970 description { state: "default" 0.0;
1972 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
1988 description { state: "default" 0.0;
1989 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
1994 to: "top_left_padding";
1998 to: "top_left_padding";
2000 image.normal: "00_check_bg.png";
2002 description { state: "visible" 0.0;
2003 inherit: "default" 0.0;
2005 description { state: "disabled" 0.0;
2006 inherit: "default" 0.0;
2007 image.normal: "00_check_dim_bg.png";
2010 part { name: "check";
2012 clip_to: "sequence_clip";
2014 description { state: "default" 0.0;
2018 image.normal: "00_check_activated.png";
2019 color: 255 255 255 0;
2021 description { state: "visible" 0.0;
2022 inherit: "default" 0.0;
2024 color: 255 255 255 255;
2026 description { state: "pressed" 0.0;
2027 inherit: "visible" 0.0;
2029 description { state: "disabled_visible" 0.0;
2030 inherit: "default" 0.0;
2032 image.normal: "00_check_activated_dim.png";
2035 part { name: "sequence_clip";
2038 description { state: "default" 0.0;
2041 rel2.relative: 0.0 1.0;
2042 color: 255 255 255 255;
2044 description { state: "visible" 0.0;
2045 inherit: "default" 0.0;
2046 rel2.relative: 1.0 1.0;
2049 part { name: "elm.swallow.content";
2052 state: "default" 0.0;
2055 color: 255 255 255 255;
2068 description { state: "visible" 0.0;
2069 inherit: "default" 0.0;
2073 aspect_preference: VERTICAL;
2075 description { state: "disabled" 0.0;
2076 inherit: "default" 0.0;
2077 color: 128 128 128 128;
2079 description { state: "disabled_visible" 0.0;
2080 inherit: "default" 0.0;
2081 color: 128 128 128 128;
2087 part { name: "elm.text";
2091 description { state: "default" 0.0;
2097 to_x: "elm.swallow.content";
2103 color: 255 255 255 255;
2106 style: "check_label_textblock_style";
2109 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2111 description { state: "visible" 0.0;
2112 inherit: "default" 0.0;
2116 description { state: "disabled" 0.0;
2117 inherit: "default" 0.0;
2119 description { state: "disabled_visible" 0.0;
2120 inherit: "default" 0.0;
2123 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2126 part { name: "events";
2128 ignore_flags: ON_HOLD;
2129 description { state: "default" 0.0;
2133 part { name: "disabler";
2135 description { state: "default" 0.0;
2139 description { state: "disabled" 0.0;
2140 inherit: "default" 0.0;
2146 program { name: "show";
2149 set_int(check_visible, CHECK_SHOW);
2152 program { name: "hide";
2155 set_int(check_visible, CHECK_HIDE);
2158 program { name: "click";
2159 signal: "mouse,clicked,1";
2161 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2164 program { name: "bg_normal";
2166 set_state(PART:"bg2", "default", 0.0);
2169 program { name: "pressed";
2170 signal: "mouse,down,1";
2175 get_state(PART:"check", st, 30, vl);
2176 if (!strcmp(st, "visible"))
2178 set_state(PART:"check", "pressed", 0.0);
2179 set_state(PART:"bg2", "visible", 0.0);
2183 program { name: "mouse,out";
2184 signal: "mouse,out";
2187 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2189 set_state(PART:"check", "visible", 0.0);
2190 set_state(PART:"sequence_clip", "visible", 0.0);
2191 set_state(PART:"bg2", "visible", 0.0);
2195 set_state(PART:"check", "default", 0.0);
2196 set_state(PART:"sequence_clip", "default", 0.0);
2197 set_state(PART:"bg2", "default", 0.0);
2201 program { name: "check_on";
2202 signal: "elm,state,check,on";
2205 set_int(check_state, CHECK_STATE_VISIBLE);
2206 if (get_int(check_visible) == CHECK_SHOW)
2208 run_program(PROGRAM:"check_show_effect");
2209 run_program(PROGRAM:"check_draw_effect");
2213 set_state(PART:"check", "visible", 0.0);
2214 set_state(PART:"sequence_clip", "visible", 0.0);
2216 set_state(PART:"bg2", "visible", 0.0);
2219 program { name: "check_off";
2220 signal: "elm,state,check,off";
2222 action: STATE_SET "default" 0.0;
2225 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2227 set_int(check_state, CHECK_STATE_DEFAULT);
2228 set_state(PART:"check", "default", 0.0);
2229 set_state(PART:"sequence_clip", "default", 0.0);
2231 set_state(PART:"bg2", "default", 0.0);
2234 program { name: "check_show_effect";
2235 action: STATE_SET "visible" 0.0;
2236 transition: LINEAR 0.233;
2239 program { name: "check_draw_effect";
2240 action: STATE_SET "visible" 0.0;
2241 transition: LINEAR 0.267;
2242 target: "sequence_clip";
2244 program { name: "text_show";
2245 signal: "elm,state,text,visible";
2247 action: STATE_SET "visible" 0.0;
2250 program { name: "text_hide";
2251 signal: "elm,state,text,hidden";
2253 action: STATE_SET "default" 0.0;
2256 program { name: "icon_show";
2257 signal: "elm,state,icon,visible";
2259 action: STATE_SET "visible" 0.0;
2260 target: "elm.swallow.content";
2262 program { name: "icon_hide";
2263 signal: "elm,state,icon,hidden";
2265 action: STATE_SET "default" 0.0;
2266 target: "elm.swallow.content";
2268 program { name: "disable";
2269 signal: "elm,state,disabled";
2271 action: STATE_SET "disabled" 0.0;
2274 after: "disable_text";
2276 program { name: "disable_text";
2280 get_state(PART:"elm.text", st, 30, vl);
2281 if (!strcmp(st, "visible"))
2282 set_state(PART:"elm.text", "disabled_visible", 0.0);
2284 set_state(PART:"elm.text", "disabled", 0.0);
2285 get_state(PART:"elm.swallow.content", st, 30, vl);
2286 if (!strcmp(st, "visible"))
2287 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2289 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2290 get_state(PART:"check", st, 30, vl);
2291 if (!strcmp(st, "visible"))
2293 set_state(PART:"check", "disabled_visible", 0.0);
2294 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2298 program { name: "enable";
2299 signal: "elm,state,enabled";
2301 action: STATE_SET "default" 0.0;
2304 after: "enable_text";
2306 program { name: "enable_text";
2310 get_state(PART:"elm.text", st, 30, vl);
2311 if (!strcmp(st, "disabled_visible"))
2312 set_state(PART:"elm.text", "visible", 0.0);
2314 set_state(PART:"elm.text", "default", 0.0);
2315 get_state(PART:"elm.swallow.content", st, 30, vl);
2316 if (!strcmp(st, "visible"))
2317 set_state(PART:"elm.swallow.content", "visible", 0.0);
2319 set_state(PART:"elm.swallow.content", "default", 0.0);
2320 get_state(PART:"check", st, 30, vl);
2321 if (!strcmp(st, "disabled_visible"))
2323 set_state(PART:"check", "visible", 0.0);
2324 set_state(PART:"sequence_clip", "visible", 0.0);
2325 set_int(check_state, CHECK_STATE_VISIBLE);
2328 set_int(check_state, CHECK_STATE_DEFAULT);
2334 #undef CHECK_STATE_DEFAULT
2335 #undef CHECK_STATE_VISIBLE
2336 #undef CHECK_STATE_DISABLED_VISIBLE
2337 #undef CHECK_STATE_DISABLED