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(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"; \
623 if (CHECK_SHOW == get_int(check_visible)) \
625 set_state(PART:"check", "visible", 0.0); \
629 set_state(PART:"check", "default", 0.0); \
631 set_state(PART:"bg", "default", 0.0); \
634 program { name: "pressed"; \
635 signal: "elm,state,mouse,down"; \
637 action: STATE_SET "pressed" 0.0; \
639 if (CHECK_SHOW == get_int(check_visible)) \
641 set_state(PART:"check", "pressed", 0.0); \
643 set_state(PART:"bg", "pressed", 0.0); \
646 program { name: "mouse,out"; \
647 signal: "mouse,out"; \
650 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
652 set_state(PART:"check", "visible", 0.0); \
653 set_state(PART:"sequence_clip", "visible", 0.0); \
657 set_state(PART:"check", "default", 0.0); \
658 set_state(PART:"sequence_clip", "default", 0.0); \
662 program { name: "check_on"; \
663 signal: "elm,state,check,on"; \
666 set_int(check_state, CHECK_STATE_VISIBLE); \
667 if (get_int(check_visible) == CHECK_SHOW) \
669 run_program(PROGRAM:"check_show_effect"); \
670 run_program(PROGRAM:"check_draw_effect"); \
674 set_state(PART:"check", "visible", 0.0); \
675 set_state(PART:"sequence_clip", "visible", 0.0); \
679 program { name: "check_off"; \
680 signal: "elm,state,check,off"; \
682 action: STATE_SET "default" 0.0; \
685 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
687 set_int(check_state, CHECK_STATE_DEFAULT); \
688 set_state(PART:"check", "default", 0.0); \
689 set_state(PART:"sequence_clip", "default", 0.0); \
693 program { name: "check_show_effect"; \
694 action: STATE_SET "visible" 0.0; \
695 transition: LINEAR 0.233; \
698 program { name: "check_draw_effect"; \
699 action: STATE_SET "visible" 0.0; \
700 transition: LINEAR 0.267; \
701 target: "sequence_clip"; \
703 program { name: "text_show"; \
704 signal: "elm,state,text,visible"; \
706 action: STATE_SET "visible" 0.0; \
707 target: "elm.text"; \
709 program { name: "text_hide"; \
710 signal: "elm,state,text,hidden"; \
712 action: STATE_SET "default" 0.0; \
713 target: "elm.text"; \
715 program { name: "icon_show"; \
716 signal: "elm,state,icon,visible"; \
718 action: STATE_SET "visible" 0.0; \
719 target: "elm.swallow.content"; \
721 program { name: "icon_hide"; \
722 signal: "elm,state,icon,hidden"; \
724 action: STATE_SET "default" 0.0; \
725 target: "elm.swallow.content"; \
727 program { name: "disable"; \
728 signal: "elm,state,disabled"; \
730 action: STATE_SET "disabled" 0.0; \
731 target: "disabler"; \
734 after: "disable_text"; \
736 program { name: "disable_text"; \
740 get_state(PART:"elm.text", st, 30, vl); \
741 if (!strcmp(st, "visible")) \
742 set_state(PART:"elm.text", "disabled_visible", 0.0); \
744 set_state(PART:"elm.text", "disabled", 0.0); \
745 get_state(PART:"elm.swallow.content", st, 30, vl); \
746 if (!strcmp(st, "visible")) \
747 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
749 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
750 get_state(PART:"check", st, 30, vl); \
751 if (!strcmp(st, "visible")) \
753 set_state(PART:"check", "disabled_visible", 0.0); \
754 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
758 program { name: "enable"; \
759 signal: "elm,state,enabled"; \
761 action: STATE_SET "default" 0.0; \
762 target: "disabler"; \
765 after: "enable_text"; \
767 program { name: "enable_text"; \
771 get_state(PART:"elm.text", st, 30, vl); \
772 if (!strcmp(st, "disabled_visible")) \
773 set_state(PART:"elm.text", "visible", 0.0); \
775 set_state(PART:"elm.text", "default", 0.0); \
776 get_state(PART:"elm.swallow.content", st, 30, vl); \
777 if (!strcmp(st, "visible")) \
778 set_state(PART:"elm.swallow.content", "visible", 0.0); \
780 set_state(PART:"elm.swallow.content", "default", 0.0); \
781 get_state(PART:"check", st, 30, vl); \
782 if (!strcmp(st, "disabled_visible")) \
784 set_state(PART:"check", "visible", 0.0); \
785 set_state(PART:"sequence_clip", "visible", 0.0); \
786 set_int(check_state, CHECK_STATE_VISIBLE); \
789 set_int(check_state, CHECK_STATE_DEFAULT); \
794 ////////////////////////////////////////////////////////////////////////////////
795 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)
796 CHECK_STYLE_DEFAULT_GENLIST("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
797 ////////////////////////////////////////////////////////////////////////////////
799 #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \
800 group { name: "elm/check/base/"style_name; \
802 image: "00_check_bg.png" COMP; \
803 image: "00_check_dim_bg.png" COMP; \
804 image: "00_check_activated_dim.png" COMP; \
805 image: "00_check_activated.png" COMP; \
808 public check_state = CHECK_STATE_DEFAULT; \
811 part { name: "back_bg"; \
814 description { state: "default" 0.0; \
815 min: min_width min_height; \
823 description { state: "default" 0.0; \
824 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
825 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
827 rel1.to: "back_bg"; \
828 rel2.to: "back_bg"; \
829 image.normal: "00_check_bg.png"; \
832 description { state: "disabled" 0.0; \
833 inherit: "default" 0.0; \
834 image.normal: "00_check_dim_bg.png"; \
837 part { name: "check"; \
840 description { state: "default" 0.0; \
844 image.normal: "00_check_activated.png"; \
846 description { state: "visible" 0.0; \
847 inherit: "default" 0.0; \
850 description { state: "disabled_visible" 0.0; \
851 inherit: "default" 0.0; \
853 image.normal: "00_check_activated_dim.png"; \
856 part { name: "elm.swallow.content"; \
858 clip_to: "disclip"; \
859 description { state: "default" 0.0; \
874 description { state: "visible" 0.0; \
875 inherit: "default" 0.0; \
879 aspect_preference: VERTICAL; \
881 description { state: "disabled" 0.0; \
882 inherit: "default" 0.0; \
884 description { state: "disabled_visible" 0.0; \
885 inherit: "default" 0.0; \
891 part { name: "elm.text"; \
894 clip_to: "disclip"; \
896 description { state: "default" 0.0; \
902 to_x: "elm.swallow.content"; \
910 style: "check_label_textblock_style"; \
913 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
915 description { state: "visible" 0.0; \
916 inherit: "default" 0.0; \
920 description { state: "disabled" 0.0; \
921 inherit: "default" 0.0; \
923 description { state: "disabled_visible" 0.0; \
924 inherit: "default" 0.0; \
927 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
930 part { name: "events1"; \
932 ignore_flags: ON_HOLD; \
933 description { state: "default" 0.0; \
937 part { name: "events2"; \
940 description { state: "default" 0.0; \
944 part { name: "disclip"; \
947 description { state: "default" 0.0; \
948 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
950 description { state: "disabled" 0.0; \
951 inherit: "default" 0.0; \
952 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
955 part { name: "disabler"; \
957 description { state: "default" 0.0; \
961 description { state: "disabled" 0.0; \
962 inherit: "default" 0.0; \
968 program { name: "click"; \
969 signal: "mouse,clicked,1"; \
971 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
972 after: "touch_sound"; \
974 program { name: "touch_sound"; \
975 action: PLAY_SAMPLE "touch_sound" 1.0; \
977 program { name: "check_on"; \
978 signal: "elm,state,check,on"; \
981 set_int(check_state, CHECK_STATE_VISIBLE); \
982 set_state(PART:"check", "visible", 0.0); \
985 program { name: "check_off"; \
986 signal: "elm,state,check,off"; \
988 action: STATE_SET "default" 0.0; \
991 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
993 set_int(check_state, CHECK_STATE_DEFAULT); \
994 set_state(PART:"check", "default", 0.0); \
998 program { name: "text_show"; \
999 signal: "elm,state,text,visible"; \
1001 action: STATE_SET "visible" 0.0; \
1002 target: "elm.text"; \
1004 program { name: "text_hide"; \
1005 signal: "elm,state,text,hidden"; \
1007 action: STATE_SET "default" 0.0; \
1008 target: "elm.text"; \
1010 program { name: "icon_show"; \
1011 signal: "elm,state,icon,visible"; \
1013 action: STATE_SET "visible" 0.0; \
1014 target: "elm.swallow.content"; \
1016 program { name: "icon_hide"; \
1017 signal: "elm,state,icon,hidden"; \
1019 action: STATE_SET "default" 0.0; \
1020 target: "elm.swallow.content"; \
1022 program { name: "disable"; \
1023 signal: "elm,state,disabled"; \
1025 action: STATE_SET "disabled" 0.0; \
1026 target: "disabler"; \
1027 target: "disclip"; \
1029 after: "disable_text"; \
1031 program { name: "disable_text"; \
1035 get_state(PART:"elm.text", st, 30, vl); \
1036 if (!strcmp(st, "visible")) \
1037 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1039 set_state(PART:"elm.text", "disabled", 0.0); \
1040 get_state(PART:"elm.swallow.content", st, 30, vl); \
1041 if (!strcmp(st, "visible")) \
1042 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1044 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1045 get_state(PART:"check", st, 30, vl); \
1046 if (!strcmp(st, "visible")) \
1048 set_state(PART:"check", "disabled_visible", 0.0); \
1049 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
1053 program { name: "enable"; \
1054 signal: "elm,state,enabled"; \
1056 action: STATE_SET "default" 0.0; \
1057 target: "disabler"; \
1058 target: "disclip"; \
1060 after: "enable_text"; \
1062 program { name: "enable_text"; \
1066 get_state(PART:"elm.text", st, 30, vl); \
1067 if (!strcmp(st, "disabled_visible")) \
1068 set_state(PART:"elm.text", "visible", 0.0); \
1070 set_state(PART:"elm.text", "default", 0.0); \
1071 get_state(PART:"elm.swallow.content", st, 30, vl); \
1072 if (!strcmp(st, "visible")) \
1073 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1075 set_state(PART:"elm.swallow.content", "default", 0.0); \
1076 get_state(PART:"check", st, 30, vl); \
1077 if (!strcmp(st, "disabled_visible")) \
1079 set_state(PART:"check", "visible", 0.0); \
1080 set_int(check_state, CHECK_STATE_VISIBLE); \
1083 set_int(check_state, CHECK_STATE_DEFAULT); \
1088 ////////////////////////////////////////////////////////////////////////////////
1089 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)
1090 ////////////////////////////////////////////////////////////////////////////////
1092 style { name: "check_label_textblock_style";
1093 base: "font=Tizen:style=Roman font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color=#ffffff wrap=char text_class=tizen";
1096 tag: "hilight" "+ font=Tizen:style=Bold";
1097 tag: "b" "+ font=Tizen:style=Bold";
1098 tag: "whitecolor" "+ color=#ffffff";
1103 group { name: "elm/check/base/on&off";
1105 image: "00_button_on.png" COMP;
1106 image: "00_button_on_dim.png" COMP;
1107 image: "00_button_off.png" COMP;
1108 image: "00_button_off_dim.png" COMP;
1109 image: "00_button_on_off_handler.png" COMP;
1110 image: "00_button_on_off_handler_dim.png" COMP;
1115 public was_drag = 0;
1116 public check_on = 0;
1123 description { state: "default" 0.0;
1124 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1125 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1126 rel2.relative: 0.0 1.0;
1132 part { name: "padding_left";
1136 description { state: "default" 0.0;
1138 rel1{ relative: 0.0 0.0; to: "bg"; }
1139 rel2{ relative: 0.0 1.0; to: "bg"; }
1145 part { name: "padding_right";
1149 description { state: "default" 0.0;
1164 part { name: "padding_top";
1168 description { state: "default" 0.0;
1180 part { name: "padding_bottom";
1184 description { state: "default" 0.0;
1199 part { name: "bg_image";
1202 description { state: "default" 0.0;
1207 to_y: "padding_top";
1212 to_y: "padding_bottom";
1214 image.normal: "00_button_off.png";
1216 description { state: "visible" 0.0;
1217 inherit: "default" 0.0;
1218 image.normal: "00_button_on.png";
1220 description { state: "pressed" 0.0;
1221 inherit: "default" 0.0;
1222 image.normal: "00_button_off.png";
1224 description { state: "visible_pressed" 0.0;
1225 inherit: "default" 0.0;
1226 image.normal: "00_button_on.png";
1228 description { state: "visible_disable" 0.0;
1229 inherit: "default" 0.0;
1230 image.normal: "00_button_on_dim.png";
1232 description { state: "off_disable" 0.0;
1233 inherit: "default" 0.0;
1234 image.normal: "00_button_off_dim.png";
1237 part { name: "drag_container";
1241 description { state: "default" 0.0;
1244 to_x: "padding_left";
1249 to_x: "padding_right";
1255 part { name: "clipper";
1258 description { state: "default" 0.0;
1261 color: 255 255 255 255;
1264 part { name: "clipper_inner";
1267 description { state: "default" 0.0;
1268 rel1.to: "bg_image";
1269 rel2.to: "bg_image";
1270 color: 255 255 255 255;
1273 part { name: "button";
1280 confine: "drag_container";
1282 description { state: "default" 0.0;
1283 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1284 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1289 image.normal: "00_button_on_off_handler.png";
1291 description { state: "disabled" 0.0;
1292 inherit: "default" 0.0;
1293 image.normal: "00_button_on_off_handler_dim.png";
1296 part { name: "button_events";
1301 description { state: "default" 0.0;
1307 part { name: "onrect";
1312 description { state: "default" 0.0;
1325 part { name: "offrect";
1330 description { state: "default" 0.0;
1342 part { name: "elm.offtext";
1346 clip_to: "clipper_inner";
1347 description { state: "default" 0.0;
1350 color: 255 255 255 255;
1352 font: "Tizen:style=Medium";
1355 text_class: "tizen";
1358 description { state: "disabled" 0.0;
1359 inherit: "default" 0.0;
1360 color: 128 128 128 128;
1363 part { name: "elm.ontext";
1367 clip_to: "clipper_inner";
1368 description { state: "default" 0.0;
1371 color: 255 255 255 255;
1373 font: "Tizen:style=Medium";
1376 text_class: "tizen";
1379 description { state: "disabled" 0.0;
1380 inherit: "default" 0.0;
1381 color: 128 128 128 128;
1384 part { name: "elm.swallow.content";
1387 description { state: "default" 0.0;
1400 description { state: "visible" 0.0;
1401 inherit: "default" 0.0;
1405 aspect_preference: VERTICAL;
1407 description { state: "disabled" 0.0;
1408 inherit: "default" 0.0;
1410 description { state: "disabled_visible" 0.0;
1411 inherit: "default" 0.0;
1417 part { name: "elm.text";
1422 description { state: "default" 0.0;
1428 to_x: "elm.swallow.content";
1436 style: "check_label_textblock_style";
1439 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1441 description { state: "visible" 0.0;
1442 inherit: "default" 0.0;
1446 description { state: "disabled" 0.0;
1447 inherit: "default" 0.0;
1449 description { state: "disabled_visible" 0.0;
1450 inherit: "default" 0.0;
1455 part { name: "disclip";
1458 description { state: "default" 0.0;
1459 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1461 description { state: "disabled" 0.0;
1462 inherit: "default" 0.0;
1463 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1466 part { name: "disabler";
1468 description { state: "default" 0.0;
1472 description { state: "disabled" 0.0;
1473 inherit: "default" 0.0;
1480 signal: "mouse,clicked,1";
1483 new Float:dx, Float:dy;
1484 get_drag(PART:"button", dx, dy);
1485 if (!get_int(was_drag)) {
1487 set_drag(PART:"button", 0.0, 0.0);
1489 set_drag(PART:"button", 1.0, 0.0);
1490 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1491 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1492 if (get_int(check_on)) {
1493 emit("elm,action,check,off", "");
1494 emit("elm,action,touch,sound", "");
1498 if (!get_int(check_on)) {
1499 emit("elm,action,check,on", "");
1500 emit("elm,action,touch,sound", "");
1506 program { name: "touch_sound";
1507 signal: "elm,action,touch,sound";
1509 action: PLAY_SAMPLE "touch_sound" 1.0;
1515 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1516 set_int(is_drag, 1);
1520 signal: "mouse,down,1";
1523 set_int(was_drag, 0);
1524 set_int(is_drag, 0);
1527 program { name: "drag_end";
1528 signal: "mouse,up,1";
1531 new Float:dx, Float:dy;
1532 get_drag(PART:"button", dx, dy);
1533 if (get_int(is_drag)) {
1535 set_drag(PART:"button", 1.0, 0.0);
1537 set_drag(PART:"button", 0.0, 0.0);
1538 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1539 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1540 if (!get_int(check_on)) {
1541 emit("elm,action,check,on", "");
1542 emit("elm,action,touch,sound", "");
1546 if (get_int(check_on)) {
1547 emit("elm,action,check,off", "");
1548 emit("elm,action,touch,sound", "");
1551 set_int(was_drag, get_int(is_drag));
1552 set_int(is_drag, 0);
1553 emit("elm,action,check,drag,stop", "");
1557 program { name: "check_on";
1558 signal: "elm,state,check,on";
1562 if (get_int(is_rtl) == 0) {
1568 set_drag(PART:"button", drag, 0.0);
1569 set_state(PART:"bg_image", "visible", 0.0);
1570 set_int(check_on, 1);
1573 program { name: "check_off";
1574 signal: "elm,state,check,off";
1578 if (get_int(is_rtl) == 0) {
1584 set_drag(PART:"button", drag, 0.0);
1585 set_state(PART:"bg_image", "default", 0.0);
1586 set_int(check_on, 0);
1589 program { name: "text_show";
1590 signal: "elm,state,text,visible";
1592 action: STATE_SET "visible" 0.0;
1595 program { name: "text_hide";
1596 signal: "elm,state,text,hidden";
1598 action: STATE_SET "default" 0.0;
1601 program { name: "icon_show";
1602 signal: "elm,state,icon,visible";
1604 action: STATE_SET "visible" 0.0;
1605 target: "elm.swallow.content";
1607 program { name: "icon_hide";
1608 signal: "elm,state,icon,hidden";
1610 action: STATE_SET "default" 0.0;
1611 target: "elm.swallow.content";
1613 program { name: "disable";
1614 signal: "elm,state,disabled";
1616 action: STATE_SET "disabled" 0.0;
1617 target: "elm.offtext";
1618 target: "elm.ontext";
1622 after: "disable_text";
1624 program { name: "disable_text";
1628 get_state(PART:"elm.text", st, 30, vl);
1629 if (!strcmp(st, "visible"))
1630 set_state(PART:"elm.text", "disabled_visible", 0.0);
1632 set_state(PART:"elm.text", "disabled", 0.0);
1633 get_state(PART:"bg_image", st, 30, vl);
1634 if (!strcmp(st, "visible"))
1635 set_state(PART:"bg_image", "visible_disable", 0.0);
1637 set_state(PART:"bg_image", "off_disable", 0.0);
1638 get_state(PART:"elm.swallow.content", st, 30, vl);
1639 if (!strcmp(st, "visible"))
1640 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1642 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1643 set_state(PART:"button", "disabled", 0.0);
1646 program { name: "enable";
1647 signal: "elm,state,enabled";
1649 action: STATE_SET "default" 0.0;
1653 after: "enable_text";
1655 program { name: "enable_text";
1659 get_state(PART:"elm.text", st, 30, vl);
1660 if (!strcmp(st, "disabled_visible"))
1661 set_state(PART:"elm.text", "visible", 0.0);
1663 set_state(PART:"elm.text", "default", 0.0);
1664 get_state(PART:"bg_image", st, 30, vl);
1665 if (!strcmp(st, "visible_disable"))
1666 set_state(PART:"bg_image", "visible", 0.0);
1668 set_state(PART:"bg_image", "default", 0.0);
1669 get_state(PART:"elm.swallow.content", st, 30, vl);
1670 if (!strcmp(st, "visible"))
1671 set_state(PART:"elm.swallow.content", "visible", 0.0);
1673 set_state(PART:"elm.swallow.content", "default", 0.0);
1674 set_state(PART:"button", "default", 0.0);
1677 program { name: "to_rtl";
1678 signal: "edje,state,rtl";
1684 program { name: "to_ltr";
1685 signal: "edje,state,ltr";
1693 ///////////////////////////////////////////////////////////////////////////////////////
1695 #define CHECK_STYLE_FAVORITE(style_name, on_image, on_dim_image, off_image, off_dim_image, min_width, min_height) \
1696 group { name: "elm/check/base/"style_name; \
1698 image: on_image COMP; \
1699 image: on_dim_image COMP; \
1700 image: off_image COMP; \
1701 image: off_dim_image COMP; \
1704 part { name: "back_bg"; \
1707 description { state: "default" 0.0; \
1709 rel2.relative: 0.0 1.0; \
1711 min: min_width min_height; \
1715 part { name: "bg"; \
1717 clip_to: "disclip"; \
1719 description { state: "default" 0.0; \
1721 rel1.to: "back_bg"; \
1722 rel2.to: "back_bg"; \
1723 min: min_width min_height; \
1724 max: min_width min_height; \
1728 part { name: "check"; \
1730 clip_to: "disclip"; \
1732 description { state: "default" 0.0; \
1735 image.normal: off_image; \
1737 description { state: "visible" 0.0; \
1738 inherit: "default" 0.0; \
1739 image.normal: on_image; \
1741 description { state: "disabled" 0.0; \
1742 inherit: "default" 0.0; \
1743 image.normal: off_dim_image; \
1745 description { state: "disabled_visible" 0.0; \
1746 inherit: "default" 0.0; \
1747 image.normal: on_dim_image; \
1750 part { name: "elm.swallow.content"; \
1752 clip_to: "disclip"; \
1753 description { state: "default" 0.0; \
1759 relative: 1.0 0.0; \
1764 relative: 1.0 1.0; \
1768 description { state: "visible" 0.0; \
1769 inherit: "default" 0.0; \
1773 aspect_preference: VERTICAL; \
1775 description { state: "disabled" 0.0; \
1776 inherit: "default" 0.0; \
1778 description { state: "disabled_visible" 0.0; \
1779 inherit: "default" 0.0; \
1785 part { name: "elm.text"; \
1787 clip_to: "disclip"; \
1790 description { state: "default" 0.0; \
1794 relative: 1.0 0.5; \
1796 to_x: "elm.swallow.content"; \
1799 relative: 1.0 0.5; \
1804 style: "check_label_textblock_style"; \
1807 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1809 description { state: "visible" 0.0; \
1810 inherit: "default" 0.0; \
1814 description { state: "disabled" 0.0; \
1815 inherit: "default" 0.0; \
1817 description { state: "disabled_visible" 0.0; \
1818 inherit: "default" 0.0; \
1821 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1824 part { name: "disclip"; \
1827 description { state: "default" 0.0; \
1828 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1831 part { name: "events"; \
1833 ignore_flags: ON_HOLD; \
1834 description { state: "default" 0.0; \
1838 part { name: "disabler"; \
1840 description { state: "default" 0.0; \
1844 description { state: "disabled" 0.0; \
1845 inherit: "default" 0.0; \
1851 program { name: "click"; \
1852 signal: "mouse,clicked,1"; \
1854 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1855 after: "touch_sound"; \
1857 program { name: "touch_sound"; \
1858 action: PLAY_SAMPLE "touch_sound" 1.0; \
1860 program { name: "check_on"; \
1861 signal: "elm,state,check,on"; \
1863 action: STATE_SET "visible" 0.0; \
1866 program { name: "check_off"; \
1867 signal: "elm,state,check,off"; \
1869 action: STATE_SET "default" 0.0; \
1872 program { name: "text_show"; \
1873 signal: "elm,state,text,visible"; \
1875 action: STATE_SET "visible" 0.0; \
1876 target: "elm.text"; \
1878 program { name: "text_hide"; \
1879 signal: "elm,state,text,hidden"; \
1881 action: STATE_SET "default" 0.0; \
1882 target: "elm.text"; \
1884 program { name: "icon_show"; \
1885 signal: "elm,state,icon,visible"; \
1887 action: STATE_SET "visible" 0.0; \
1888 target: "elm.swallow.content"; \
1890 program { name: "icon_hide"; \
1891 signal: "elm,state,icon,hidden"; \
1893 action: STATE_SET "default" 0.0; \
1894 target: "elm.swallow.content"; \
1896 program { name: "disable"; \
1897 signal: "elm,state,disabled"; \
1899 action: STATE_SET "disabled" 0.0; \
1900 target: "disabler"; \
1901 after: "disable_text"; \
1903 program { name: "disable_text"; \
1907 get_state(PART:"elm.text", st, 30, vl); \
1908 if (!strcmp(st, "visible")) \
1909 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1911 set_state(PART:"elm.text", "disabled", 0.0); \
1912 get_state(PART:"elm.swallow.content", st, 30, vl); \
1913 if (!strcmp(st, "visible")) \
1914 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1916 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1917 get_state(PART:"check", st, 30, vl); \
1918 if (!strcmp(st, "visible")) \
1919 set_state(PART:"check", "disabled_visible", 0.0); \
1921 set_state(PART:"check", "disabled", 0.0); \
1924 program { name: "enable"; \
1925 signal: "elm,state,enabled"; \
1927 action: STATE_SET "default" 0.0; \
1928 target: "disabler"; \
1929 after: "enable_text"; \
1931 program { name: "enable_text"; \
1935 get_state(PART:"elm.text", st, 30, vl); \
1936 if (!strcmp(st, "disabled_visible")) \
1937 set_state(PART:"elm.text", "visible", 0.0); \
1939 set_state(PART:"elm.text", "default", 0.0); \
1940 get_state(PART:"elm.swallow.content", st, 30, vl); \
1941 if (!strcmp(st, "visible")) \
1942 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1944 set_state(PART:"elm.swallow.content", "default", 0.0); \
1945 get_state(PART:"check", st, 30, vl); \
1946 if (!strcmp(st, "disabled_visible")) \
1947 set_state(PART:"check", "visible", 0.0); \
1949 set_state(PART:"check", "default", 0.0); \
1954 ////////////////////////////////////////////////////////////////////////////////
1955 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)
1956 ////////////////////////////////////////////////////////////////////////////////
1957 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)
1958 ////////////////////////////////////////////////////////////////////////////////
1959 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)
1960 ////////////////////////////////////////////////////////////////////////////////
1962 group { name: "elm/check/base/grid";
1963 images.image: "00_check_bg.png" COMP;
1964 images.image: "00_check_dim_bg.png" COMP;
1965 images.image: "00_check_activated_dim.png" COMP;
1966 images.image: "00_check_activated.png" COMP;
1968 public check_state = CHECK_STATE_DEFAULT;
1969 public check_visible = CHECK_HIDE;
1975 description { state: "default" 0.0;
1979 part { name: "top_left_padding";
1983 description { state: "default" 0.0;
1985 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
2001 description { state: "default" 0.0;
2002 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
2007 to: "top_left_padding";
2011 to: "top_left_padding";
2013 image.normal: "00_check_bg.png";
2015 description { state: "visible" 0.0;
2016 inherit: "default" 0.0;
2018 description { state: "disabled" 0.0;
2019 inherit: "default" 0.0;
2020 image.normal: "00_check_dim_bg.png";
2023 part { name: "check";
2025 clip_to: "sequence_clip";
2027 description { state: "default" 0.0;
2031 image.normal: "00_check_activated.png";
2032 color: 255 255 255 0;
2034 description { state: "visible" 0.0;
2035 inherit: "default" 0.0;
2037 color: 255 255 255 255;
2039 description { state: "pressed" 0.0;
2040 inherit: "visible" 0.0;
2042 description { state: "disabled_visible" 0.0;
2043 inherit: "default" 0.0;
2045 image.normal: "00_check_activated_dim.png";
2048 part { name: "sequence_clip";
2051 description { state: "default" 0.0;
2054 rel2.relative: 0.0 1.0;
2055 color: 255 255 255 255;
2057 description { state: "visible" 0.0;
2058 inherit: "default" 0.0;
2059 rel2.relative: 1.0 1.0;
2062 part { name: "elm.swallow.content";
2065 state: "default" 0.0;
2068 color: 255 255 255 255;
2081 description { state: "visible" 0.0;
2082 inherit: "default" 0.0;
2086 aspect_preference: VERTICAL;
2088 description { state: "disabled" 0.0;
2089 inherit: "default" 0.0;
2090 color: 128 128 128 128;
2092 description { state: "disabled_visible" 0.0;
2093 inherit: "default" 0.0;
2094 color: 128 128 128 128;
2100 part { name: "elm.text";
2104 description { state: "default" 0.0;
2110 to_x: "elm.swallow.content";
2116 color: 255 255 255 255;
2119 style: "check_label_textblock_style";
2122 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2124 description { state: "visible" 0.0;
2125 inherit: "default" 0.0;
2129 description { state: "disabled" 0.0;
2130 inherit: "default" 0.0;
2132 description { state: "disabled_visible" 0.0;
2133 inherit: "default" 0.0;
2136 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2139 part { name: "events";
2141 ignore_flags: ON_HOLD;
2142 description { state: "default" 0.0;
2146 part { name: "disabler";
2148 description { state: "default" 0.0;
2152 description { state: "disabled" 0.0;
2153 inherit: "default" 0.0;
2159 program { name: "show";
2162 set_int(check_visible, CHECK_SHOW);
2165 program { name: "hide";
2168 set_int(check_visible, CHECK_HIDE);
2171 program { name: "click";
2172 signal: "mouse,clicked,1";
2174 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2177 program { name: "bg_normal";
2179 set_state(PART:"bg2", "default", 0.0);
2182 program { name: "pressed";
2183 signal: "mouse,down,1";
2188 get_state(PART:"check", st, 30, vl);
2189 if (!strcmp(st, "visible"))
2191 set_state(PART:"check", "pressed", 0.0);
2192 set_state(PART:"bg2", "visible", 0.0);
2196 program { name: "mouse,out";
2197 signal: "mouse,out";
2200 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2202 set_state(PART:"check", "visible", 0.0);
2203 set_state(PART:"sequence_clip", "visible", 0.0);
2204 set_state(PART:"bg2", "visible", 0.0);
2208 set_state(PART:"check", "default", 0.0);
2209 set_state(PART:"sequence_clip", "default", 0.0);
2210 set_state(PART:"bg2", "default", 0.0);
2214 program { name: "check_on";
2215 signal: "elm,state,check,on";
2218 set_int(check_state, CHECK_STATE_VISIBLE);
2219 if (get_int(check_visible) == CHECK_SHOW)
2221 run_program(PROGRAM:"check_show_effect");
2222 run_program(PROGRAM:"check_draw_effect");
2226 set_state(PART:"check", "visible", 0.0);
2227 set_state(PART:"sequence_clip", "visible", 0.0);
2229 set_state(PART:"bg2", "visible", 0.0);
2232 program { name: "check_off";
2233 signal: "elm,state,check,off";
2235 action: STATE_SET "default" 0.0;
2238 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2240 set_int(check_state, CHECK_STATE_DEFAULT);
2241 set_state(PART:"check", "default", 0.0);
2242 set_state(PART:"sequence_clip", "default", 0.0);
2244 set_state(PART:"bg2", "default", 0.0);
2247 program { name: "check_show_effect";
2248 action: STATE_SET "visible" 0.0;
2249 transition: LINEAR 0.233;
2252 program { name: "check_draw_effect";
2253 action: STATE_SET "visible" 0.0;
2254 transition: LINEAR 0.267;
2255 target: "sequence_clip";
2257 program { name: "text_show";
2258 signal: "elm,state,text,visible";
2260 action: STATE_SET "visible" 0.0;
2263 program { name: "text_hide";
2264 signal: "elm,state,text,hidden";
2266 action: STATE_SET "default" 0.0;
2269 program { name: "icon_show";
2270 signal: "elm,state,icon,visible";
2272 action: STATE_SET "visible" 0.0;
2273 target: "elm.swallow.content";
2275 program { name: "icon_hide";
2276 signal: "elm,state,icon,hidden";
2278 action: STATE_SET "default" 0.0;
2279 target: "elm.swallow.content";
2281 program { name: "disable";
2282 signal: "elm,state,disabled";
2284 action: STATE_SET "disabled" 0.0;
2287 after: "disable_text";
2289 program { name: "disable_text";
2293 get_state(PART:"elm.text", st, 30, vl);
2294 if (!strcmp(st, "visible"))
2295 set_state(PART:"elm.text", "disabled_visible", 0.0);
2297 set_state(PART:"elm.text", "disabled", 0.0);
2298 get_state(PART:"elm.swallow.content", st, 30, vl);
2299 if (!strcmp(st, "visible"))
2300 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2302 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2303 get_state(PART:"check", st, 30, vl);
2304 if (!strcmp(st, "visible"))
2306 set_state(PART:"check", "disabled_visible", 0.0);
2307 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2311 program { name: "enable";
2312 signal: "elm,state,enabled";
2314 action: STATE_SET "default" 0.0;
2317 after: "enable_text";
2319 program { name: "enable_text";
2323 get_state(PART:"elm.text", st, 30, vl);
2324 if (!strcmp(st, "disabled_visible"))
2325 set_state(PART:"elm.text", "visible", 0.0);
2327 set_state(PART:"elm.text", "default", 0.0);
2328 get_state(PART:"elm.swallow.content", st, 30, vl);
2329 if (!strcmp(st, "visible"))
2330 set_state(PART:"elm.swallow.content", "visible", 0.0);
2332 set_state(PART:"elm.swallow.content", "default", 0.0);
2333 get_state(PART:"check", st, 30, vl);
2334 if (!strcmp(st, "disabled_visible"))
2336 set_state(PART:"check", "visible", 0.0);
2337 set_state(PART:"sequence_clip", "visible", 0.0);
2338 set_int(check_state, CHECK_STATE_VISIBLE);
2341 set_int(check_state, CHECK_STATE_DEFAULT);
2347 #undef CHECK_STATE_DEFAULT
2348 #undef CHECK_STATE_VISIBLE
2349 #undef CHECK_STATE_DISABLED_VISIBLE
2350 #undef CHECK_STATE_DISABLED