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"; \
174 description { state: "visible" 0.0; \
175 inherit: "default" 0.0; \
179 description { state: "disabled" 0.0; \
180 inherit: "default" 0.0; \
182 description { state: "disabled_visible" 0.0; \
183 inherit: "default" 0.0; \
186 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
189 part { name: "events1"; \
191 ignore_flags: ON_HOLD; \
192 description { state: "default" 0.0; \
196 part { name: "events2"; \
199 description { state: "default" 0.0; \
203 part { name: "disclip"; \
206 description { state: "default" 0.0; \
207 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
209 description { state: "disabled" 0.0; \
210 inherit: "default" 0.0; \
211 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
214 part { name: "disabler"; \
216 description { state: "default" 0.0; \
220 description { state: "disabled" 0.0; \
221 inherit: "default" 0.0; \
227 program { name: "show"; \
230 set_int(check_visible, CHECK_SHOW); \
233 program { name: "hide"; \
236 set_int(check_visible, CHECK_HIDE); \
239 program { name: "click"; \
240 signal: "mouse,clicked,1"; \
242 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
243 after: "touch_sound"; \
245 program { name: "touch_sound"; \
246 action: PLAY_SAMPLE "touch_sound" 1.0; \
248 program { name: "bg_normal"; \
249 signal: "mouse,up,1"; \
251 action: STATE_SET "default" 0.0; \
255 program { name: "pressed"; \
256 signal: "mouse,down,1"; \
258 action: STATE_SET "pressed" 0.0; \
262 program { name: "mouse,out"; \
263 signal: "mouse,out"; \
266 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
268 set_state(PART:"check", "visible", 0.0); \
269 set_state(PART:"sequence_clip", "visible", 0.0); \
273 set_state(PART:"check", "default", 0.0); \
274 set_state(PART:"sequence_clip", "default", 0.0); \
278 program { name: "check_on"; \
279 signal: "elm,state,check,on"; \
282 set_int(check_state, CHECK_STATE_VISIBLE); \
283 if (get_int(check_visible) == CHECK_SHOW) \
285 run_program(PROGRAM:"check_show_effect"); \
286 run_program(PROGRAM:"check_draw_effect"); \
290 set_state(PART:"check", "visible", 0.0); \
291 set_state(PART:"sequence_clip", "visible", 0.0); \
295 program { name: "check_off"; \
296 signal: "elm,state,check,off"; \
298 action: STATE_SET "default" 0.0; \
301 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
303 set_int(check_state, CHECK_STATE_DEFAULT); \
304 set_state(PART:"check", "default", 0.0); \
305 set_state(PART:"sequence_clip", "default", 0.0); \
309 program { name: "check_show_effect"; \
310 action: STATE_SET "visible" 0.0; \
311 transition: LINEAR 0.233; \
314 program { name: "check_draw_effect"; \
315 action: STATE_SET "visible" 0.0; \
316 transition: LINEAR 0.267; \
317 target: "sequence_clip"; \
319 program { name: "text_show"; \
320 signal: "elm,state,text,visible"; \
322 action: STATE_SET "visible" 0.0; \
323 target: "elm.text"; \
325 program { name: "text_hide"; \
326 signal: "elm,state,text,hidden"; \
328 action: STATE_SET "default" 0.0; \
329 target: "elm.text"; \
331 program { name: "icon_show"; \
332 signal: "elm,state,icon,visible"; \
334 action: STATE_SET "visible" 0.0; \
335 target: "elm.swallow.content"; \
337 program { name: "icon_hide"; \
338 signal: "elm,state,icon,hidden"; \
340 action: STATE_SET "default" 0.0; \
341 target: "elm.swallow.content"; \
343 program { name: "disable"; \
344 signal: "elm,state,disabled"; \
346 action: STATE_SET "disabled" 0.0; \
347 target: "disabler"; \
350 after: "disable_text"; \
352 program { name: "disable_text"; \
356 get_state(PART:"elm.text", st, 30, vl); \
357 if (!strcmp(st, "visible")) \
358 set_state(PART:"elm.text", "disabled_visible", 0.0); \
360 set_state(PART:"elm.text", "disabled", 0.0); \
361 get_state(PART:"elm.swallow.content", st, 30, vl); \
362 if (!strcmp(st, "visible")) \
363 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
365 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
366 get_state(PART:"check", st, 30, vl); \
367 if (!strcmp(st, "visible")) \
369 set_state(PART:"check", "disabled_visible", 0.0); \
370 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
374 program { name: "enable"; \
375 signal: "elm,state,enabled"; \
377 action: STATE_SET "default" 0.0; \
378 target: "disabler"; \
381 after: "enable_text"; \
383 program { name: "enable_text"; \
387 get_state(PART:"elm.text", st, 30, vl); \
388 if (!strcmp(st, "disabled_visible")) \
389 set_state(PART:"elm.text", "visible", 0.0); \
391 set_state(PART:"elm.text", "default", 0.0); \
392 get_state(PART:"elm.swallow.content", st, 30, vl); \
393 if (!strcmp(st, "visible")) \
394 set_state(PART:"elm.swallow.content", "visible", 0.0); \
396 set_state(PART:"elm.swallow.content", "default", 0.0); \
397 get_state(PART:"check", st, 30, vl); \
398 if (!strcmp(st, "disabled_visible")) \
400 set_state(PART:"check", "visible", 0.0); \
401 set_state(PART:"sequence_clip", "visible", 0.0); \
402 set_int(check_state, CHECK_STATE_VISIBLE); \
405 set_int(check_state, CHECK_STATE_DEFAULT); \
410 ////////////////////////////////////////////////////////////////////////////////
411 CHECK_STYLE_DEFAULT("default", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
412 ////////////////////////////////////////////////////////////////////////////////
413 CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
414 ////////////////////////////////////////////////////////////////////////////////
416 #define CHECK_STYLE_DEFAULT_GENLIST(style_name, min_width, min_height) \
417 group { name: "elm/check/base/"style_name; \
419 image: "00_check_bg.png" COMP; \
420 image: "00_check_dim_bg.png" COMP; \
421 image: "00_check_activated_dim.png" COMP; \
422 image: "00_check_activated.png" COMP; \
425 public check_state = CHECK_STATE_DEFAULT; \
426 public check_visible = CHECK_HIDE; \
429 part { name: "back_bg"; \
432 description { state: "default" 0.0; \
433 rel2.relative: 0.0 1.0; \
435 min: min_width min_height; \
443 description { state: "default" 0.0; \
444 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
445 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
447 rel1.to: "back_bg"; \
448 rel2.to: "back_bg"; \
449 image.normal: "00_check_bg.png"; \
452 description { state: "visible" 0.0; \
453 inherit: "default" 0.0; \
455 description { state: "pressed" 0.0; \
456 inherit: "default" 0.0; \
457 image.normal: "00_check_press_bg.png"; \
459 description { state: "disabled" 0.0; \
460 inherit: "default" 0.0; \
461 image.normal: "00_check_dim_bg.png"; \
464 part { name: "check"; \
465 clip_to: "sequence_clip"; \
468 description { state: "default" 0.0; \
472 image.normal: "00_check_activated.png"; \
473 color: 255 255 255 0; \
475 description { state: "visible" 0.0; \
476 inherit: "default" 0.0; \
478 color: 255 255 255 255; \
480 description { state: "disabled_visible" 0.0; \
481 inherit: "default" 0.0; \
483 image.normal: "00_check_activated_dim.png"; \
484 color: 255 255 255 255; \
486 description { state: "pressed" 0.0; \
487 inherit: "visible" 0.0; \
490 part { name: "sequence_clip"; \
493 description { state: "default" 0.0; \
494 rel2.relative: 0.0 1.0; \
495 color: 255 255 255 255; \
497 description { state: "visible" 0.0; \
498 inherit: "default" 0.0; \
499 rel2.relative: 1.0 1.0; \
502 part { name: "elm.swallow.content"; \
504 clip_to: "disclip"; \
505 description { state: "default" 0.0; \
520 description { state: "visible" 0.0; \
521 inherit: "default" 0.0; \
525 aspect_preference: VERTICAL; \
527 description { state: "disabled" 0.0; \
528 inherit: "default" 0.0; \
530 description { state: "disabled_visible" 0.0; \
531 inherit: "default" 0.0; \
537 part { name: "elm.text"; \
540 clip_to: "disclip"; \
542 description { state: "default" 0.0; \
548 to_x: "elm.swallow.content"; \
556 style: "check_label_textblock_style"; \
560 description { state: "visible" 0.0; \
561 inherit: "default" 0.0; \
565 description { state: "disabled" 0.0; \
566 inherit: "default" 0.0; \
568 description { state: "disabled_visible" 0.0; \
569 inherit: "default" 0.0; \
572 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
575 part { name: "disclip"; \
578 description { state: "default" 0.0; \
579 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
581 description { state: "disabled" 0.0; \
582 inherit: "default" 0.0; \
583 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
586 part { name: "disabler"; \
588 description { state: "default" 0.0; \
592 description { state: "disabled" 0.0; \
593 inherit: "default" 0.0; \
599 program { name: "show"; \
602 set_int(check_visible, CHECK_SHOW); \
605 program { name: "hide"; \
608 set_int(check_visible, CHECK_HIDE); \
611 program { name: "bg_normal"; \
612 signal: "elm,state,mouse,up"; \
615 if (CHECK_SHOW == get_int(check_visible)) \
617 set_state(PART:"check", "visible", 0.0); \
621 set_state(PART:"check", "default", 0.0); \
623 set_state(PART:"bg", "default", 0.0); \
626 program { name: "pressed"; \
627 signal: "elm,state,mouse,down"; \
629 action: STATE_SET "pressed" 0.0; \
631 if (CHECK_SHOW == get_int(check_visible)) \
633 set_state(PART:"check", "pressed", 0.0); \
635 set_state(PART:"bg", "pressed", 0.0); \
638 program { name: "mouse,out"; \
639 signal: "mouse,out"; \
642 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
644 set_state(PART:"check", "visible", 0.0); \
645 set_state(PART:"sequence_clip", "visible", 0.0); \
649 set_state(PART:"check", "default", 0.0); \
650 set_state(PART:"sequence_clip", "default", 0.0); \
654 program { name: "check_on"; \
655 signal: "elm,state,check,on"; \
658 set_int(check_state, CHECK_STATE_VISIBLE); \
659 if (get_int(check_visible) == CHECK_SHOW) \
661 run_program(PROGRAM:"check_show_effect"); \
662 run_program(PROGRAM:"check_draw_effect"); \
666 set_state(PART:"check", "visible", 0.0); \
667 set_state(PART:"sequence_clip", "visible", 0.0); \
671 program { name: "check_off"; \
672 signal: "elm,state,check,off"; \
674 action: STATE_SET "default" 0.0; \
677 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
679 set_int(check_state, CHECK_STATE_DEFAULT); \
680 set_state(PART:"check", "default", 0.0); \
681 set_state(PART:"sequence_clip", "default", 0.0); \
685 program { name: "check_show_effect"; \
686 action: STATE_SET "visible" 0.0; \
687 transition: LINEAR 0.233; \
690 program { name: "check_draw_effect"; \
691 action: STATE_SET "visible" 0.0; \
692 transition: LINEAR 0.267; \
693 target: "sequence_clip"; \
695 program { name: "text_show"; \
696 signal: "elm,state,text,visible"; \
698 action: STATE_SET "visible" 0.0; \
699 target: "elm.text"; \
701 program { name: "text_hide"; \
702 signal: "elm,state,text,hidden"; \
704 action: STATE_SET "default" 0.0; \
705 target: "elm.text"; \
707 program { name: "icon_show"; \
708 signal: "elm,state,icon,visible"; \
710 action: STATE_SET "visible" 0.0; \
711 target: "elm.swallow.content"; \
713 program { name: "icon_hide"; \
714 signal: "elm,state,icon,hidden"; \
716 action: STATE_SET "default" 0.0; \
717 target: "elm.swallow.content"; \
719 program { name: "disable"; \
720 signal: "elm,state,disabled"; \
722 action: STATE_SET "disabled" 0.0; \
723 target: "disabler"; \
726 after: "disable_text"; \
728 program { name: "disable_text"; \
732 get_state(PART:"elm.text", st, 30, vl); \
733 if (!strcmp(st, "visible")) \
734 set_state(PART:"elm.text", "disabled_visible", 0.0); \
736 set_state(PART:"elm.text", "disabled", 0.0); \
737 get_state(PART:"elm.swallow.content", st, 30, vl); \
738 if (!strcmp(st, "visible")) \
739 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
741 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
742 get_state(PART:"check", st, 30, vl); \
743 if (!strcmp(st, "visible")) \
745 set_state(PART:"check", "disabled_visible", 0.0); \
746 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
750 program { name: "enable"; \
751 signal: "elm,state,enabled"; \
753 action: STATE_SET "default" 0.0; \
754 target: "disabler"; \
757 after: "enable_text"; \
759 program { name: "enable_text"; \
763 get_state(PART:"elm.text", st, 30, vl); \
764 if (!strcmp(st, "disabled_visible")) \
765 set_state(PART:"elm.text", "visible", 0.0); \
767 set_state(PART:"elm.text", "default", 0.0); \
768 get_state(PART:"elm.swallow.content", st, 30, vl); \
769 if (!strcmp(st, "visible")) \
770 set_state(PART:"elm.swallow.content", "visible", 0.0); \
772 set_state(PART:"elm.swallow.content", "default", 0.0); \
773 get_state(PART:"check", st, 30, vl); \
774 if (!strcmp(st, "disabled_visible")) \
776 set_state(PART:"check", "visible", 0.0); \
777 set_state(PART:"sequence_clip", "visible", 0.0); \
778 set_int(check_state, CHECK_STATE_VISIBLE); \
781 set_int(check_state, CHECK_STATE_DEFAULT); \
786 ////////////////////////////////////////////////////////////////////////////////
787 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)
788 CHECK_STYLE_DEFAULT_GENLIST("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
789 ////////////////////////////////////////////////////////////////////////////////
791 #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \
792 group { name: "elm/check/base/"style_name; \
794 image: "00_check_bg.png" COMP; \
795 image: "00_check_dim_bg.png" COMP; \
796 image: "00_check_activated_dim.png" COMP; \
797 image: "00_check_activated.png" COMP; \
800 public check_state = CHECK_STATE_DEFAULT; \
803 part { name: "back_bg"; \
806 description { state: "default" 0.0; \
807 min: min_width min_height; \
815 description { state: "default" 0.0; \
816 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
817 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
819 rel1.to: "back_bg"; \
820 rel2.to: "back_bg"; \
821 image.normal: "00_check_bg.png"; \
824 description { state: "disabled" 0.0; \
825 inherit: "default" 0.0; \
826 image.normal: "00_check_dim_bg.png"; \
829 part { name: "check"; \
832 description { state: "default" 0.0; \
836 image.normal: "00_check_activated.png"; \
838 description { state: "visible" 0.0; \
839 inherit: "default" 0.0; \
842 description { state: "disabled_visible" 0.0; \
843 inherit: "default" 0.0; \
845 image.normal: "00_check_activated_dim.png"; \
848 part { name: "elm.swallow.content"; \
850 clip_to: "disclip"; \
851 description { state: "default" 0.0; \
866 description { state: "visible" 0.0; \
867 inherit: "default" 0.0; \
871 aspect_preference: VERTICAL; \
873 description { state: "disabled" 0.0; \
874 inherit: "default" 0.0; \
876 description { state: "disabled_visible" 0.0; \
877 inherit: "default" 0.0; \
883 part { name: "elm.text"; \
886 clip_to: "disclip"; \
888 description { state: "default" 0.0; \
894 to_x: "elm.swallow.content"; \
902 style: "check_label_textblock_style"; \
906 description { state: "visible" 0.0; \
907 inherit: "default" 0.0; \
911 description { state: "disabled" 0.0; \
912 inherit: "default" 0.0; \
914 description { state: "disabled_visible" 0.0; \
915 inherit: "default" 0.0; \
918 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
921 part { name: "events1"; \
923 ignore_flags: ON_HOLD; \
924 description { state: "default" 0.0; \
928 part { name: "events2"; \
931 description { state: "default" 0.0; \
935 part { name: "disclip"; \
938 description { state: "default" 0.0; \
939 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
941 description { state: "disabled" 0.0; \
942 inherit: "default" 0.0; \
943 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
946 part { name: "disabler"; \
948 description { state: "default" 0.0; \
952 description { state: "disabled" 0.0; \
953 inherit: "default" 0.0; \
959 program { name: "click"; \
960 signal: "mouse,clicked,1"; \
962 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
963 after: "touch_sound"; \
965 program { name: "touch_sound"; \
966 action: PLAY_SAMPLE "touch_sound" 1.0; \
968 program { name: "check_on"; \
969 signal: "elm,state,check,on"; \
972 set_int(check_state, CHECK_STATE_VISIBLE); \
973 set_state(PART:"check", "visible", 0.0); \
976 program { name: "check_off"; \
977 signal: "elm,state,check,off"; \
979 action: STATE_SET "default" 0.0; \
982 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
984 set_int(check_state, CHECK_STATE_DEFAULT); \
985 set_state(PART:"check", "default", 0.0); \
989 program { name: "text_show"; \
990 signal: "elm,state,text,visible"; \
992 action: STATE_SET "visible" 0.0; \
993 target: "elm.text"; \
995 program { name: "text_hide"; \
996 signal: "elm,state,text,hidden"; \
998 action: STATE_SET "default" 0.0; \
999 target: "elm.text"; \
1001 program { name: "icon_show"; \
1002 signal: "elm,state,icon,visible"; \
1004 action: STATE_SET "visible" 0.0; \
1005 target: "elm.swallow.content"; \
1007 program { name: "icon_hide"; \
1008 signal: "elm,state,icon,hidden"; \
1010 action: STATE_SET "default" 0.0; \
1011 target: "elm.swallow.content"; \
1013 program { name: "disable"; \
1014 signal: "elm,state,disabled"; \
1016 action: STATE_SET "disabled" 0.0; \
1017 target: "disabler"; \
1018 target: "disclip"; \
1020 after: "disable_text"; \
1022 program { name: "disable_text"; \
1026 get_state(PART:"elm.text", st, 30, vl); \
1027 if (!strcmp(st, "visible")) \
1028 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1030 set_state(PART:"elm.text", "disabled", 0.0); \
1031 get_state(PART:"elm.swallow.content", st, 30, vl); \
1032 if (!strcmp(st, "visible")) \
1033 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1035 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1036 get_state(PART:"check", st, 30, vl); \
1037 if (!strcmp(st, "visible")) \
1039 set_state(PART:"check", "disabled_visible", 0.0); \
1040 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
1044 program { name: "enable"; \
1045 signal: "elm,state,enabled"; \
1047 action: STATE_SET "default" 0.0; \
1048 target: "disabler"; \
1049 target: "disclip"; \
1051 after: "enable_text"; \
1053 program { name: "enable_text"; \
1057 get_state(PART:"elm.text", st, 30, vl); \
1058 if (!strcmp(st, "disabled_visible")) \
1059 set_state(PART:"elm.text", "visible", 0.0); \
1061 set_state(PART:"elm.text", "default", 0.0); \
1062 get_state(PART:"elm.swallow.content", st, 30, vl); \
1063 if (!strcmp(st, "visible")) \
1064 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1066 set_state(PART:"elm.swallow.content", "default", 0.0); \
1067 get_state(PART:"check", st, 30, vl); \
1068 if (!strcmp(st, "disabled_visible")) \
1070 set_state(PART:"check", "visible", 0.0); \
1071 set_int(check_state, CHECK_STATE_VISIBLE); \
1074 set_int(check_state, CHECK_STATE_DEFAULT); \
1079 ////////////////////////////////////////////////////////////////////////////////
1080 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)
1081 ////////////////////////////////////////////////////////////////////////////////
1083 style { name: "check_label_textblock_style";
1084 base: "font=Tizen:style=Roman font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color="CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC" wrap=char text_class=tizen";
1087 tag: "hilight" "+ font=Tizen:style=Bold";
1088 tag: "b" "+ font=Tizen:style=Bold";
1089 tag: "whitecolor" "+ color=#ffffff";
1094 group { name: "elm/check/base/on&off";
1096 image: "00_button_on_handler.png" COMP;
1097 image: "00_button_on_handler_dim.png" COMP;
1098 image: "00_button_off_handler.png" COMP;
1099 image: "00_button_off_handler_dim.png" COMP;
1100 image: "00_button_on_off_bg.png" COMP;
1101 image: "00_button_on_off_bg_dim.png" COMP;
1102 image: "00_button_handler_focus.png" COMP;
1107 public was_drag = 0;
1108 public check_on = 0;
1115 description { state: "default" 0.0;
1116 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1117 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1118 rel2.relative: 0.0 1.0;
1124 part { name: "padding_left";
1128 description { state: "default" 0.0;
1130 rel1{ relative: 0.0 0.0; to: "bg"; }
1131 rel2{ relative: 0.0 1.0; to: "bg"; }
1137 part { name: "padding_right";
1141 description { state: "default" 0.0;
1156 part { name: "padding_top";
1160 description { state: "default" 0.0;
1172 part { name: "padding_bottom";
1176 description { state: "default" 0.0;
1191 part { name: "bg_image";
1194 description { state: "default" 0.0;
1199 to_y: "padding_top";
1204 to_y: "padding_bottom";
1206 image.normal: "00_button_on_off_bg.png";
1208 description { state: "visible" 0.0;
1209 inherit: "default" 0.0;
1210 image.normal: "00_button_on_off_bg.png";
1212 description { state: "pressed" 0.0;
1213 inherit: "default" 0.0;
1214 image.normal: "00_button_on_off_bg.png";
1216 description { state: "visible_pressed" 0.0;
1217 inherit: "default" 0.0;
1218 image.normal: "00_button_on_off_bg.png";
1220 description { state: "visible_disable" 0.0;
1221 inherit: "default" 0.0;
1222 image.normal: "00_button_on_off_bg_dim.png";
1224 description { state: "off_disable" 0.0;
1225 inherit: "default" 0.0;
1226 image.normal: "00_button_on_off_bg_dim.png";
1229 part { name: "drag_container";
1233 description { state: "default" 0.0;
1236 to_x: "padding_left";
1241 to_x: "padding_right";
1247 part { name: "clipper";
1250 description { state: "default" 0.0;
1253 color: 255 255 255 255;
1256 part { name: "clipper_inner";
1259 description { state: "default" 0.0;
1260 rel1.to: "bg_image";
1261 rel2.to: "bg_image";
1262 color: 255 255 255 255;
1265 part { name: "button";
1272 confine: "drag_container";
1274 description { state: "default" 0.0;
1275 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1276 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1281 image.normal: "00_button_off_handler.png";
1283 description { state: "on" 0.0;
1284 inherit: "default" 0.0;
1285 image.normal: "00_button_on_handler.png";
1287 description { state: "on_disabled" 0.0;
1288 inherit: "default" 0.0;
1289 image.normal: "00_button_on_handler_dim.png";
1291 description { state: "off_disabled" 0.0;
1292 inherit: "default" 0.0;
1293 image.normal: "00_button_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";
1440 description { state: "visible" 0.0;
1441 inherit: "default" 0.0;
1445 description { state: "disabled" 0.0;
1446 inherit: "default" 0.0;
1448 description { state: "disabled_visible" 0.0;
1449 inherit: "default" 0.0;
1454 part { name: "disclip";
1457 description { state: "default" 0.0;
1458 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1460 description { state: "disabled" 0.0;
1461 inherit: "default" 0.0;
1462 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1465 part { name: "disabler";
1467 description { state: "default" 0.0;
1471 description { state: "disabled" 0.0;
1472 inherit: "default" 0.0;
1479 signal: "mouse,clicked,1";
1482 new Float:dx, Float:dy;
1483 get_drag(PART:"button", dx, dy);
1484 if (!get_int(was_drag)) {
1486 set_drag(PART:"button", 0.0, 0.0);
1488 set_drag(PART:"button", 1.0, 0.0);
1489 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1490 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1491 if (get_int(check_on)) {
1492 emit("elm,action,check,off", "");
1493 emit("elm,action,touch,sound", "");
1497 if (!get_int(check_on)) {
1498 emit("elm,action,check,on", "");
1499 emit("elm,action,touch,sound", "");
1505 program { name: "touch_sound";
1506 signal: "elm,action,touch,sound";
1508 action: PLAY_SAMPLE "touch_sound" 1.0;
1514 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1515 set_int(is_drag, 1);
1519 signal: "mouse,down,1";
1522 set_int(was_drag, 0);
1523 set_int(is_drag, 0);
1526 program { name: "drag_end";
1527 signal: "mouse,up,1";
1530 new Float:dx, Float:dy;
1531 get_drag(PART:"button", dx, dy);
1532 if (get_int(is_drag)) {
1534 set_drag(PART:"button", 1.0, 0.0);
1536 set_drag(PART:"button", 0.0, 0.0);
1537 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1538 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1539 if (!get_int(check_on)) {
1540 emit("elm,action,check,on", "");
1541 emit("elm,action,touch,sound", "");
1545 if (get_int(check_on)) {
1546 emit("elm,action,check,off", "");
1547 emit("elm,action,touch,sound", "");
1550 set_int(was_drag, get_int(is_drag));
1551 set_int(is_drag, 0);
1552 emit("elm,action,check,drag,stop", "");
1556 program { name: "check_on";
1557 signal: "elm,state,check,on";
1561 if (get_int(is_rtl) == 0) {
1567 set_drag(PART:"button", drag, 0.0);
1568 set_state(PART:"bg_image", "visible", 0.0);
1569 set_state(PART:"button", "on", 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_state(PART:"button", "default", 0.0);
1587 set_int(check_on, 0);
1590 program { name: "text_show";
1591 signal: "elm,state,text,visible";
1593 action: STATE_SET "visible" 0.0;
1596 program { name: "text_hide";
1597 signal: "elm,state,text,hidden";
1599 action: STATE_SET "default" 0.0;
1602 program { name: "icon_show";
1603 signal: "elm,state,icon,visible";
1605 action: STATE_SET "visible" 0.0;
1606 target: "elm.swallow.content";
1608 program { name: "icon_hide";
1609 signal: "elm,state,icon,hidden";
1611 action: STATE_SET "default" 0.0;
1612 target: "elm.swallow.content";
1614 program { name: "disable";
1615 signal: "elm,state,disabled";
1617 action: STATE_SET "disabled" 0.0;
1618 target: "elm.offtext";
1619 target: "elm.ontext";
1623 after: "disable_text";
1625 program { name: "disable_text";
1629 get_state(PART:"elm.text", st, 30, vl);
1630 if (!strcmp(st, "visible"))
1631 set_state(PART:"elm.text", "disabled_visible", 0.0);
1633 set_state(PART:"elm.text", "disabled", 0.0);
1634 get_state(PART:"bg_image", st, 30, vl);
1635 if (!strcmp(st, "visible")) {
1636 set_state(PART:"bg_image", "visible_disable", 0.0);
1637 set_state(PART:"button", "on_disabled", 0.0);
1639 set_state(PART:"bg_image", "off_disable", 0.0);
1640 set_state(PART:"button", "off_disabled", 0.0);
1642 get_state(PART:"elm.swallow.content", st, 30, vl);
1643 if (!strcmp(st, "visible"))
1644 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1646 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1649 program { name: "enable";
1650 signal: "elm,state,enabled";
1652 action: STATE_SET "default" 0.0;
1656 after: "enable_text";
1658 program { name: "enable_text";
1662 get_state(PART:"elm.text", st, 30, vl);
1663 if (!strcmp(st, "disabled_visible"))
1664 set_state(PART:"elm.text", "visible", 0.0);
1666 set_state(PART:"elm.text", "default", 0.0);
1667 get_state(PART:"bg_image", st, 30, vl);
1668 if (!strcmp(st, "visible_disable"))
1669 set_state(PART:"bg_image", "visible", 0.0);
1671 set_state(PART:"bg_image", "default", 0.0);
1672 get_state(PART:"elm.swallow.content", st, 30, vl);
1673 if (!strcmp(st, "visible"))
1674 set_state(PART:"elm.swallow.content", "visible", 0.0);
1676 set_state(PART:"elm.swallow.content", "default", 0.0);
1677 set_state(PART:"button", "default", 0.0);
1680 program { name: "to_rtl";
1681 signal: "edje,state,rtl";
1687 program { name: "to_ltr";
1688 signal: "edje,state,ltr";
1696 ///////////////////////////////////////////////////////////////////////////////////////
1698 #define CHECK_STYLE_FAVORITE(style_name, on_image, on_dim_image, off_image, off_dim_image, min_width, min_height) \
1699 group { name: "elm/check/base/"style_name; \
1701 image: on_image COMP; \
1702 image: on_dim_image COMP; \
1703 image: off_image COMP; \
1704 image: off_dim_image COMP; \
1707 part { name: "back_bg"; \
1710 description { state: "default" 0.0; \
1712 rel2.relative: 0.0 1.0; \
1714 min: min_width min_height; \
1718 part { name: "bg"; \
1720 clip_to: "disclip"; \
1722 description { state: "default" 0.0; \
1724 rel1.to: "back_bg"; \
1725 rel2.to: "back_bg"; \
1726 min: min_width min_height; \
1727 max: min_width min_height; \
1731 part { name: "check"; \
1733 clip_to: "disclip"; \
1735 description { state: "default" 0.0; \
1738 image.normal: off_image; \
1740 description { state: "visible" 0.0; \
1741 inherit: "default" 0.0; \
1742 image.normal: on_image; \
1744 description { state: "disabled" 0.0; \
1745 inherit: "default" 0.0; \
1746 image.normal: off_dim_image; \
1748 description { state: "disabled_visible" 0.0; \
1749 inherit: "default" 0.0; \
1750 image.normal: on_dim_image; \
1753 part { name: "elm.swallow.content"; \
1755 clip_to: "disclip"; \
1756 description { state: "default" 0.0; \
1762 relative: 1.0 0.0; \
1767 relative: 1.0 1.0; \
1771 description { state: "visible" 0.0; \
1772 inherit: "default" 0.0; \
1776 aspect_preference: VERTICAL; \
1778 description { state: "disabled" 0.0; \
1779 inherit: "default" 0.0; \
1781 description { state: "disabled_visible" 0.0; \
1782 inherit: "default" 0.0; \
1788 part { name: "elm.text"; \
1790 clip_to: "disclip"; \
1793 description { state: "default" 0.0; \
1797 relative: 1.0 0.5; \
1799 to_x: "elm.swallow.content"; \
1802 relative: 1.0 0.5; \
1807 style: "check_label_textblock_style"; \
1811 description { state: "visible" 0.0; \
1812 inherit: "default" 0.0; \
1816 description { state: "disabled" 0.0; \
1817 inherit: "default" 0.0; \
1819 description { state: "disabled_visible" 0.0; \
1820 inherit: "default" 0.0; \
1823 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1826 part { name: "disclip"; \
1829 description { state: "default" 0.0; \
1830 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1833 part { name: "events"; \
1835 ignore_flags: ON_HOLD; \
1836 description { state: "default" 0.0; \
1840 part { name: "disabler"; \
1842 description { state: "default" 0.0; \
1846 description { state: "disabled" 0.0; \
1847 inherit: "default" 0.0; \
1853 program { name: "click"; \
1854 signal: "mouse,clicked,1"; \
1856 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1857 after: "touch_sound"; \
1859 program { name: "touch_sound"; \
1860 action: PLAY_SAMPLE "touch_sound" 1.0; \
1862 program { name: "check_on"; \
1863 signal: "elm,state,check,on"; \
1865 action: STATE_SET "visible" 0.0; \
1868 program { name: "check_off"; \
1869 signal: "elm,state,check,off"; \
1871 action: STATE_SET "default" 0.0; \
1874 program { name: "text_show"; \
1875 signal: "elm,state,text,visible"; \
1877 action: STATE_SET "visible" 0.0; \
1878 target: "elm.text"; \
1880 program { name: "text_hide"; \
1881 signal: "elm,state,text,hidden"; \
1883 action: STATE_SET "default" 0.0; \
1884 target: "elm.text"; \
1886 program { name: "icon_show"; \
1887 signal: "elm,state,icon,visible"; \
1889 action: STATE_SET "visible" 0.0; \
1890 target: "elm.swallow.content"; \
1892 program { name: "icon_hide"; \
1893 signal: "elm,state,icon,hidden"; \
1895 action: STATE_SET "default" 0.0; \
1896 target: "elm.swallow.content"; \
1898 program { name: "disable"; \
1899 signal: "elm,state,disabled"; \
1901 action: STATE_SET "disabled" 0.0; \
1902 target: "disabler"; \
1903 after: "disable_text"; \
1905 program { name: "disable_text"; \
1909 get_state(PART:"elm.text", st, 30, vl); \
1910 if (!strcmp(st, "visible")) \
1911 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1913 set_state(PART:"elm.text", "disabled", 0.0); \
1914 get_state(PART:"elm.swallow.content", st, 30, vl); \
1915 if (!strcmp(st, "visible")) \
1916 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1918 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1919 get_state(PART:"check", st, 30, vl); \
1920 if (!strcmp(st, "visible")) \
1921 set_state(PART:"check", "disabled_visible", 0.0); \
1923 set_state(PART:"check", "disabled", 0.0); \
1926 program { name: "enable"; \
1927 signal: "elm,state,enabled"; \
1929 action: STATE_SET "default" 0.0; \
1930 target: "disabler"; \
1931 after: "enable_text"; \
1933 program { name: "enable_text"; \
1937 get_state(PART:"elm.text", st, 30, vl); \
1938 if (!strcmp(st, "disabled_visible")) \
1939 set_state(PART:"elm.text", "visible", 0.0); \
1941 set_state(PART:"elm.text", "default", 0.0); \
1942 get_state(PART:"elm.swallow.content", st, 30, vl); \
1943 if (!strcmp(st, "visible")) \
1944 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1946 set_state(PART:"elm.swallow.content", "default", 0.0); \
1947 get_state(PART:"check", st, 30, vl); \
1948 if (!strcmp(st, "disabled_visible")) \
1949 set_state(PART:"check", "visible", 0.0); \
1951 set_state(PART:"check", "default", 0.0); \
1956 ////////////////////////////////////////////////////////////////////////////////
1957 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)
1958 ////////////////////////////////////////////////////////////////////////////////
1959 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)
1960 ////////////////////////////////////////////////////////////////////////////////
1961 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)
1962 ////////////////////////////////////////////////////////////////////////////////
1964 group { name: "elm/check/base/grid";
1965 images.image: "00_check_bg.png" COMP;
1966 images.image: "00_check_dim_bg.png" COMP;
1967 images.image: "00_check_activated_dim.png" COMP;
1968 images.image: "00_check_activated.png" COMP;
1970 public check_state = CHECK_STATE_DEFAULT;
1971 public check_visible = CHECK_HIDE;
1977 description { state: "default" 0.0;
1981 part { name: "top_left_padding";
1985 description { state: "default" 0.0;
1987 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
2003 description { state: "default" 0.0;
2004 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
2009 to: "top_left_padding";
2013 to: "top_left_padding";
2015 image.normal: "00_check_bg.png";
2017 description { state: "visible" 0.0;
2018 inherit: "default" 0.0;
2020 description { state: "disabled" 0.0;
2021 inherit: "default" 0.0;
2022 image.normal: "00_check_dim_bg.png";
2025 part { name: "check";
2027 clip_to: "sequence_clip";
2029 description { state: "default" 0.0;
2033 image.normal: "00_check_activated.png";
2034 color: 255 255 255 0;
2036 description { state: "visible" 0.0;
2037 inherit: "default" 0.0;
2039 color: 255 255 255 255;
2041 description { state: "pressed" 0.0;
2042 inherit: "visible" 0.0;
2044 description { state: "disabled_visible" 0.0;
2045 inherit: "default" 0.0;
2047 image.normal: "00_check_activated_dim.png";
2050 part { name: "sequence_clip";
2053 description { state: "default" 0.0;
2056 rel2.relative: 0.0 1.0;
2057 color: 255 255 255 255;
2059 description { state: "visible" 0.0;
2060 inherit: "default" 0.0;
2061 rel2.relative: 1.0 1.0;
2064 part { name: "elm.swallow.content";
2067 state: "default" 0.0;
2070 color: 255 255 255 255;
2083 description { state: "visible" 0.0;
2084 inherit: "default" 0.0;
2088 aspect_preference: VERTICAL;
2090 description { state: "disabled" 0.0;
2091 inherit: "default" 0.0;
2092 color: 128 128 128 128;
2094 description { state: "disabled_visible" 0.0;
2095 inherit: "default" 0.0;
2096 color: 128 128 128 128;
2102 part { name: "elm.text";
2106 description { state: "default" 0.0;
2112 to_x: "elm.swallow.content";
2118 color: 255 255 255 255;
2121 style: "check_label_textblock_style";
2125 description { state: "visible" 0.0;
2126 inherit: "default" 0.0;
2130 description { state: "disabled" 0.0;
2131 inherit: "default" 0.0;
2133 description { state: "disabled_visible" 0.0;
2134 inherit: "default" 0.0;
2137 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2140 part { name: "events";
2142 ignore_flags: ON_HOLD;
2143 description { state: "default" 0.0;
2147 part { name: "disabler";
2149 description { state: "default" 0.0;
2153 description { state: "disabled" 0.0;
2154 inherit: "default" 0.0;
2160 program { name: "show";
2163 set_int(check_visible, CHECK_SHOW);
2166 program { name: "hide";
2169 set_int(check_visible, CHECK_HIDE);
2172 program { name: "click";
2173 signal: "mouse,clicked,1";
2175 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2178 program { name: "bg_normal";
2180 set_state(PART:"bg2", "default", 0.0);
2183 program { name: "pressed";
2184 signal: "mouse,down,1";
2189 get_state(PART:"check", st, 30, vl);
2190 if (!strcmp(st, "visible"))
2192 set_state(PART:"check", "pressed", 0.0);
2193 set_state(PART:"bg2", "visible", 0.0);
2197 program { name: "mouse,out";
2198 signal: "mouse,out";
2201 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2203 set_state(PART:"check", "visible", 0.0);
2204 set_state(PART:"sequence_clip", "visible", 0.0);
2205 set_state(PART:"bg2", "visible", 0.0);
2209 set_state(PART:"check", "default", 0.0);
2210 set_state(PART:"sequence_clip", "default", 0.0);
2211 set_state(PART:"bg2", "default", 0.0);
2215 program { name: "check_on";
2216 signal: "elm,state,check,on";
2219 set_int(check_state, CHECK_STATE_VISIBLE);
2220 if (get_int(check_visible) == CHECK_SHOW)
2222 run_program(PROGRAM:"check_show_effect");
2223 run_program(PROGRAM:"check_draw_effect");
2227 set_state(PART:"check", "visible", 0.0);
2228 set_state(PART:"sequence_clip", "visible", 0.0);
2230 set_state(PART:"bg2", "visible", 0.0);
2233 program { name: "check_off";
2234 signal: "elm,state,check,off";
2236 action: STATE_SET "default" 0.0;
2239 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2241 set_int(check_state, CHECK_STATE_DEFAULT);
2242 set_state(PART:"check", "default", 0.0);
2243 set_state(PART:"sequence_clip", "default", 0.0);
2245 set_state(PART:"bg2", "default", 0.0);
2248 program { name: "check_show_effect";
2249 action: STATE_SET "visible" 0.0;
2250 transition: LINEAR 0.233;
2253 program { name: "check_draw_effect";
2254 action: STATE_SET "visible" 0.0;
2255 transition: LINEAR 0.267;
2256 target: "sequence_clip";
2258 program { name: "text_show";
2259 signal: "elm,state,text,visible";
2261 action: STATE_SET "visible" 0.0;
2264 program { name: "text_hide";
2265 signal: "elm,state,text,hidden";
2267 action: STATE_SET "default" 0.0;
2270 program { name: "icon_show";
2271 signal: "elm,state,icon,visible";
2273 action: STATE_SET "visible" 0.0;
2274 target: "elm.swallow.content";
2276 program { name: "icon_hide";
2277 signal: "elm,state,icon,hidden";
2279 action: STATE_SET "default" 0.0;
2280 target: "elm.swallow.content";
2282 program { name: "disable";
2283 signal: "elm,state,disabled";
2285 action: STATE_SET "disabled" 0.0;
2288 after: "disable_text";
2290 program { name: "disable_text";
2294 get_state(PART:"elm.text", st, 30, vl);
2295 if (!strcmp(st, "visible"))
2296 set_state(PART:"elm.text", "disabled_visible", 0.0);
2298 set_state(PART:"elm.text", "disabled", 0.0);
2299 get_state(PART:"elm.swallow.content", st, 30, vl);
2300 if (!strcmp(st, "visible"))
2301 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2303 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2304 get_state(PART:"check", st, 30, vl);
2305 if (!strcmp(st, "visible"))
2307 set_state(PART:"check", "disabled_visible", 0.0);
2308 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2312 program { name: "enable";
2313 signal: "elm,state,enabled";
2315 action: STATE_SET "default" 0.0;
2318 after: "enable_text";
2320 program { name: "enable_text";
2324 get_state(PART:"elm.text", st, 30, vl);
2325 if (!strcmp(st, "disabled_visible"))
2326 set_state(PART:"elm.text", "visible", 0.0);
2328 set_state(PART:"elm.text", "default", 0.0);
2329 get_state(PART:"elm.swallow.content", st, 30, vl);
2330 if (!strcmp(st, "visible"))
2331 set_state(PART:"elm.swallow.content", "visible", 0.0);
2333 set_state(PART:"elm.swallow.content", "default", 0.0);
2334 get_state(PART:"check", st, 30, vl);
2335 if (!strcmp(st, "disabled_visible"))
2337 set_state(PART:"check", "visible", 0.0);
2338 set_state(PART:"sequence_clip", "visible", 0.0);
2339 set_int(check_state, CHECK_STATE_VISIBLE);
2342 set_int(check_state, CHECK_STATE_DEFAULT);
2348 #undef CHECK_STATE_DEFAULT
2349 #undef CHECK_STATE_VISIBLE
2350 #undef CHECK_STATE_DISABLED_VISIBLE
2351 #undef CHECK_STATE_DISABLED