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_bg_press.png" COMP; \
33 image: "00_check_bg_dim.png" COMP; \
34 image: "00_check_checking.png" COMP; \
35 image: "00_check_checking_dim.png" COMP; \
38 public check_state = CHECK_STATE_DEFAULT; \
39 public check_visible = CHECK_HIDE; \
42 part { name: "back_bg"; \
45 description { state: "default" 0.0; \
46 rel2.relative: 0.0 1.0; \
48 min: min_width min_height; \
56 description { state: "default" 0.0; \
57 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
58 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
62 image.normal: "00_check_bg.png"; \
65 description { state: "visible" 0.0; \
66 inherit: "default" 0.0; \
68 description { state: "pressed" 0.0; \
69 inherit: "default" 0.0; \
70 image.normal: "00_check_bg_press.png"; \
72 description { state: "disabled" 0.0; \
73 inherit: "default" 0.0; \
74 image.normal: "00_check_bg_dim.png"; \
77 part { name: "check"; \
78 clip_to: "sequence_clip"; \
81 description { state: "default" 0.0; \
85 image.normal: "00_check_checking.png"; \
86 color: 255 255 255 0; \
88 description { state: "visible" 0.0; \
89 inherit: "default" 0.0; \
91 color: 255 255 255 255; \
93 description { state: "disabled_visible" 0.0; \
94 inherit: "default" 0.0; \
96 image.normal: "00_check_checking_dim.png"; \
99 part { name: "sequence_clip"; \
102 description { state: "default" 0.0; \
103 rel2.relative: 0.0 1.0; \
104 color: 255 255 255 255; \
106 description { state: "visible" 0.0; \
107 inherit: "default" 0.0; \
108 rel2.relative: 1.0 1.0; \
111 part { name: "elm.swallow.content"; \
113 clip_to: "disclip"; \
114 description { state: "default" 0.0; \
129 description { state: "visible" 0.0; \
130 inherit: "default" 0.0; \
134 aspect_preference: VERTICAL; \
136 description { state: "disabled" 0.0; \
137 inherit: "default" 0.0; \
139 description { state: "disabled_visible" 0.0; \
140 inherit: "default" 0.0; \
146 part { name: "elm.text"; \
149 clip_to: "disclip"; \
151 description { state: "default" 0.0; \
157 to_x: "elm.swallow.content"; \
165 style: "check_label_textblock_style"; \
168 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
170 description { state: "visible" 0.0; \
171 inherit: "default" 0.0; \
175 description { state: "disabled" 0.0; \
176 inherit: "default" 0.0; \
178 description { state: "disabled_visible" 0.0; \
179 inherit: "default" 0.0; \
182 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
185 part { name: "events1"; \
187 ignore_flags: ON_HOLD; \
188 description { state: "default" 0.0; \
192 part { name: "events2"; \
195 description { state: "default" 0.0; \
199 part { name: "disclip"; \
202 description { state: "default" 0.0; \
203 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
205 description { state: "disabled" 0.0; \
206 inherit: "default" 0.0; \
207 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
210 part { name: "disabler"; \
212 description { state: "default" 0.0; \
216 description { state: "disabled" 0.0; \
217 inherit: "default" 0.0; \
223 program { name: "show"; \
226 set_int(check_visible, CHECK_SHOW); \
229 program { name: "hide"; \
232 set_int(check_visible, CHECK_HIDE); \
235 program { name: "click"; \
236 signal: "mouse,clicked,1"; \
238 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
239 after: "touch_sound"; \
241 program { name: "touch_sound"; \
242 action: PLAY_SAMPLE "touch_sound" 1.0; \
244 program { name: "bg_normal"; \
245 signal: "mouse,up,1"; \
247 action: STATE_SET "default" 0.0; \
250 program { name: "pressed"; \
251 signal: "mouse,down,1"; \
253 action: STATE_SET "pressed" 0.0; \
256 program { name: "mouse,out"; \
257 signal: "mouse,out"; \
260 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
262 set_state(PART:"check", "visible", 0.0); \
263 set_state(PART:"sequence_clip", "visible", 0.0); \
267 set_state(PART:"check", "default", 0.0); \
268 set_state(PART:"sequence_clip", "default", 0.0); \
272 program { name: "check_on"; \
273 signal: "elm,state,check,on"; \
276 set_int(check_state, CHECK_STATE_VISIBLE); \
277 if (get_int(check_visible) == CHECK_SHOW) \
279 run_program(PROGRAM:"check_show_effect"); \
280 run_program(PROGRAM:"check_draw_effect"); \
284 set_state(PART:"check", "visible", 0.0); \
285 set_state(PART:"sequence_clip", "visible", 0.0); \
289 program { name: "check_off"; \
290 signal: "elm,state,check,off"; \
292 action: STATE_SET "default" 0.0; \
295 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
297 set_int(check_state, CHECK_STATE_DEFAULT); \
298 set_state(PART:"check", "default", 0.0); \
299 set_state(PART:"sequence_clip", "default", 0.0); \
303 program { name: "check_show_effect"; \
304 action: STATE_SET "visible" 0.0; \
305 transition: LINEAR 0.233; \
308 program { name: "check_draw_effect"; \
309 action: STATE_SET "visible" 0.0; \
310 transition: LINEAR 0.267; \
311 target: "sequence_clip"; \
313 program { name: "text_show"; \
314 signal: "elm,state,text,visible"; \
316 action: STATE_SET "visible" 0.0; \
317 target: "elm.text"; \
319 program { name: "text_hide"; \
320 signal: "elm,state,text,hidden"; \
322 action: STATE_SET "default" 0.0; \
323 target: "elm.text"; \
325 program { name: "icon_show"; \
326 signal: "elm,state,icon,visible"; \
328 action: STATE_SET "visible" 0.0; \
329 target: "elm.swallow.content"; \
331 program { name: "icon_hide"; \
332 signal: "elm,state,icon,hidden"; \
334 action: STATE_SET "default" 0.0; \
335 target: "elm.swallow.content"; \
337 program { name: "disable"; \
338 signal: "elm,state,disabled"; \
340 action: STATE_SET "disabled" 0.0; \
341 target: "disabler"; \
344 after: "disable_text"; \
346 program { name: "disable_text"; \
350 get_state(PART:"elm.text", st, 30, vl); \
351 if (!strcmp(st, "visible")) \
352 set_state(PART:"elm.text", "disabled_visible", 0.0); \
354 set_state(PART:"elm.text", "disabled", 0.0); \
355 get_state(PART:"elm.swallow.content", st, 30, vl); \
356 if (!strcmp(st, "visible")) \
357 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
359 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
360 get_state(PART:"check", st, 30, vl); \
361 if (!strcmp(st, "visible")) \
363 set_state(PART:"check", "disabled_visible", 0.0); \
364 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
368 program { name: "enable"; \
369 signal: "elm,state,enabled"; \
371 action: STATE_SET "default" 0.0; \
372 target: "disabler"; \
375 after: "enable_text"; \
377 program { name: "enable_text"; \
381 get_state(PART:"elm.text", st, 30, vl); \
382 if (!strcmp(st, "disabled_visible")) \
383 set_state(PART:"elm.text", "visible", 0.0); \
385 set_state(PART:"elm.text", "default", 0.0); \
386 get_state(PART:"elm.swallow.content", st, 30, vl); \
387 if (!strcmp(st, "visible")) \
388 set_state(PART:"elm.swallow.content", "visible", 0.0); \
390 set_state(PART:"elm.swallow.content", "default", 0.0); \
391 get_state(PART:"check", st, 30, vl); \
392 if (!strcmp(st, "disabled_visible")) \
394 set_state(PART:"check", "visible", 0.0); \
395 set_state(PART:"sequence_clip", "visible", 0.0); \
396 set_int(check_state, CHECK_STATE_VISIBLE); \
399 set_int(check_state, CHECK_STATE_DEFAULT); \
404 ////////////////////////////////////////////////////////////////////////////////
405 CHECK_STYLE_DEFAULT("default", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
406 ////////////////////////////////////////////////////////////////////////////////
407 CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
408 ////////////////////////////////////////////////////////////////////////////////
410 #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \
411 group { name: "elm/check/base/"style_name; \
413 image: "00_check_bg.png" COMP; \
414 image: "00_check_bg_dim.png" COMP; \
415 image: "00_check_checking.png" COMP; \
416 image: "00_check_checking_dim.png" COMP; \
419 public check_state = CHECK_STATE_DEFAULT; \
422 part { name: "back_bg"; \
425 description { state: "default" 0.0; \
426 min: min_width min_height; \
434 description { state: "default" 0.0; \
435 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
436 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
438 rel1.to: "back_bg"; \
439 rel2.to: "back_bg"; \
440 image.normal: "00_check_bg.png"; \
443 description { state: "disabled" 0.0; \
444 inherit: "default" 0.0; \
445 image.normal: "00_check_bg_dim.png"; \
448 part { name: "check"; \
451 description { state: "default" 0.0; \
455 image.normal: "00_check_checking.png"; \
457 description { state: "visible" 0.0; \
458 inherit: "default" 0.0; \
461 description { state: "disabled_visible" 0.0; \
462 inherit: "default" 0.0; \
464 image.normal: "00_check_checking_dim.png"; \
467 part { name: "elm.swallow.content"; \
469 clip_to: "disclip"; \
470 description { state: "default" 0.0; \
485 description { state: "visible" 0.0; \
486 inherit: "default" 0.0; \
490 aspect_preference: VERTICAL; \
492 description { state: "disabled" 0.0; \
493 inherit: "default" 0.0; \
495 description { state: "disabled_visible" 0.0; \
496 inherit: "default" 0.0; \
502 part { name: "elm.text"; \
505 clip_to: "disclip"; \
507 description { state: "default" 0.0; \
513 to_x: "elm.swallow.content"; \
521 style: "check_label_textblock_style"; \
524 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
526 description { state: "visible" 0.0; \
527 inherit: "default" 0.0; \
531 description { state: "disabled" 0.0; \
532 inherit: "default" 0.0; \
534 description { state: "disabled_visible" 0.0; \
535 inherit: "default" 0.0; \
538 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
541 part { name: "events1"; \
543 ignore_flags: ON_HOLD; \
544 description { state: "default" 0.0; \
548 part { name: "events2"; \
551 description { state: "default" 0.0; \
555 part { name: "disclip"; \
558 description { state: "default" 0.0; \
559 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
561 description { state: "disabled" 0.0; \
562 inherit: "default" 0.0; \
563 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
566 part { name: "disabler"; \
568 description { state: "default" 0.0; \
572 description { state: "disabled" 0.0; \
573 inherit: "default" 0.0; \
579 program { name: "click"; \
580 signal: "mouse,clicked,1"; \
582 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
583 after: "touch_sound"; \
585 program { name: "touch_sound"; \
586 action: PLAY_SAMPLE "touch_sound" 1.0; \
588 program { name: "check_on"; \
589 signal: "elm,state,check,on"; \
592 set_int(check_state, CHECK_STATE_VISIBLE); \
593 set_state(PART:"check", "visible", 0.0); \
596 program { name: "check_off"; \
597 signal: "elm,state,check,off"; \
599 action: STATE_SET "default" 0.0; \
602 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
604 set_int(check_state, CHECK_STATE_DEFAULT); \
605 set_state(PART:"check", "default", 0.0); \
609 program { name: "text_show"; \
610 signal: "elm,state,text,visible"; \
612 action: STATE_SET "visible" 0.0; \
613 target: "elm.text"; \
615 program { name: "text_hide"; \
616 signal: "elm,state,text,hidden"; \
618 action: STATE_SET "default" 0.0; \
619 target: "elm.text"; \
621 program { name: "icon_show"; \
622 signal: "elm,state,icon,visible"; \
624 action: STATE_SET "visible" 0.0; \
625 target: "elm.swallow.content"; \
627 program { name: "icon_hide"; \
628 signal: "elm,state,icon,hidden"; \
630 action: STATE_SET "default" 0.0; \
631 target: "elm.swallow.content"; \
633 program { name: "disable"; \
634 signal: "elm,state,disabled"; \
636 action: STATE_SET "disabled" 0.0; \
637 target: "disabler"; \
640 after: "disable_text"; \
642 program { name: "disable_text"; \
646 get_state(PART:"elm.text", st, 30, vl); \
647 if (!strcmp(st, "visible")) \
648 set_state(PART:"elm.text", "disabled_visible", 0.0); \
650 set_state(PART:"elm.text", "disabled", 0.0); \
651 get_state(PART:"elm.swallow.content", st, 30, vl); \
652 if (!strcmp(st, "visible")) \
653 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
655 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
656 get_state(PART:"check", st, 30, vl); \
657 if (!strcmp(st, "visible")) \
659 set_state(PART:"check", "disabled_visible", 0.0); \
660 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
664 program { name: "enable"; \
665 signal: "elm,state,enabled"; \
667 action: STATE_SET "default" 0.0; \
668 target: "disabler"; \
671 after: "enable_text"; \
673 program { name: "enable_text"; \
677 get_state(PART:"elm.text", st, 30, vl); \
678 if (!strcmp(st, "disabled_visible")) \
679 set_state(PART:"elm.text", "visible", 0.0); \
681 set_state(PART:"elm.text", "default", 0.0); \
682 get_state(PART:"elm.swallow.content", st, 30, vl); \
683 if (!strcmp(st, "visible")) \
684 set_state(PART:"elm.swallow.content", "visible", 0.0); \
686 set_state(PART:"elm.swallow.content", "default", 0.0); \
687 get_state(PART:"check", st, 30, vl); \
688 if (!strcmp(st, "disabled_visible")) \
690 set_state(PART:"check", "visible", 0.0); \
691 set_int(check_state, CHECK_STATE_VISIBLE); \
694 set_int(check_state, CHECK_STATE_DEFAULT); \
699 ////////////////////////////////////////////////////////////////////////////////
700 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)
701 ////////////////////////////////////////////////////////////////////////////////
703 style { name: "check_label_textblock_style";
704 base: "font=Tizen:style=Roman font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color=#ffffff wrap=char text_class=tizen";
707 tag: "hilight" "+ font=Tizen:style=Bold";
708 tag: "b" "+ font=Tizen:style=Bold";
709 tag: "whitecolor" "+ color=#ffffff";
714 group { name: "elm/check/base/multicheck";
716 image: "00_check_bg.png" COMP;
717 image: "00_check_bg_press.png" COMP;
718 image: "multicheck_0001.png" COMP;
719 image: "multicheck_0002.png" COMP;
720 image: "multicheck_0003.png" COMP;
721 image: "multicheck_0004.png" COMP;
722 image: "multicheck_0005.png" COMP;
723 image: "multicheck_0006.png" COMP;
724 image: "00_check_checking.png" COMP;
727 public check_state = 0; //0:default, 1: visible, 2: disabled_visible
733 description { state: "default" 0.0;
734 rel2.relative: 0.0 1.0;
739 aspect_preference: VERTICAL;
740 image.normal: "00_check_bg.png";
743 description { state: "pressed" 0.0;
744 inherit: "default" 0.0;
745 image.normal: "00_check_bg_press.png";
748 description { state: "disabled" 0.0;
749 inherit: "default" 0.0;
752 part { name: "check";
756 description { state: "default" 0.0;
761 description { state: "visible_1" 0.0;
762 inherit: "default" 0.0;
764 image.normal: "multicheck_0001.png";
766 description { state: "visible_2" 0.0;
767 inherit: "default" 0.0;
769 image.normal: "multicheck_0002.png";
771 description { state: "visible_3" 0.0;
772 inherit: "default" 0.0;
774 image.normal: "multicheck_0003.png";
776 description { state: "visible_4" 0.0;
777 inherit: "default" 0.0;
779 image.normal: "multicheck_0004.png";
781 description { state: "visible_5" 0.0;
782 inherit: "default" 0.0;
784 image.normal: "multicheck_0005.png";
786 description { state: "visible" 0.0;
787 inherit: "default" 0.0;
789 image.normal: "multicheck_0006.png";
791 description { state: "pressed" 0.0;
792 inherit: "default" 0.0;
794 image.normal: "multicheck_0006.png";
796 description { state: "disabled_visible" 0.0;
797 inherit: "default" 0.0;
798 image.normal: "00_check_checking.png";
802 part { name: "elm.swallow.content";
805 description { state: "default" 0.0;
808 color: 255 255 255 255;
821 description { state: "visible" 0.0;
822 inherit: "default" 0.0;
826 aspect_preference: VERTICAL;
828 description { state: "disabled" 0.0;
829 inherit: "default" 0.0;
830 color: 128 128 128 128;
832 description { state: "disabled_visible" 0.0;
833 inherit: "default" 0.0;
834 color: 128 128 128 128;
840 part { name: "elm.text";
845 description { state: "default" 0.0;
851 to_x: "elm.swallow.content";
859 style: "check_label_textblock_style";
862 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
864 description { state: "visible" 0.0;
865 inherit: "default" 0.0;
869 description { state: "disabled" 0.0;
870 inherit: "default" 0.0;
872 description { state: "disabled_visible" 0.0;
873 inherit: "default" 0.0;
876 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
879 part { name: "events1";
881 ignore_flags: ON_HOLD;
882 description { state: "default" 0.0;
886 part { name: "disclip";
889 description { state: "default" 0.0;
890 color: 255 255 255 255;
892 description { state: "disabled" 0.0;
893 inherit: "default" 0.0;
894 color: 255 255 255 102;
897 part { name: "events2";
900 description { state: "default" 0.0;
904 part { name: "disabler";
906 description { state: "default" 0.0;
910 description { state: "disabled" 0.0;
911 inherit: "default" 0.0;
917 program { name: "click";
918 signal: "mouse,clicked,1";
920 action: SIGNAL_EMIT "elm,action,check,toggle" "";
921 after: "touch_sound";
923 program { name: "touch_sound";
924 action: PLAY_SAMPLE "touch_sound" 1.0;
926 program { name: "bg_normal";
927 signal: "mouse,up,1";
932 get_state(PART:"check", st, 30, vl);
933 if (!strcmp(st, "pressed"))
934 set_state(PART:"check", "visible", 0.0);
935 set_state(PART:"bg", "default", 0.0);
938 program { name: "pressed";
939 signal: "mouse,down,1";
944 get_state(PART:"check", st, 30, vl);
945 if (!strcmp(st, "default"))
946 set_state(PART:"check", "pressed", 0.0);
948 set_state(PART:"check", "default", 0.0);
949 set_state(PART:"bg", "pressed", 0.0);
952 program { name: "mouse,out";
956 if (get_int(check_state) == 1)
957 set_state(PART:"check", "visible", 0.0);
959 set_state(PART:"check", "default", 0.0);
962 program { name: "check_on";
963 signal: "elm,state,check,on";
966 set_int(check_state, 1);
970 program { name: "check_on_1";
973 if (get_int(check_state) == 1)
974 set_state(PART:"check", "visible_1", 0.0);
978 program { name: "check_on_2";
981 if (get_int(check_state) == 1)
982 set_state(PART:"check", "visible_2", 0.0);
986 program { name: "check_on_3";
989 if (get_int(check_state) == 1)
990 set_state(PART:"check", "visible_3", 0.0);
994 program { name: "check_on_4";
997 if (get_int(check_state) == 1)
998 set_state(PART:"check", "visible_4", 0.0);
1000 after: "check_on_5";
1002 program { name: "check_on_5";
1005 if (get_int(check_state) == 1)
1006 set_state(PART:"check", "visible_5", 0.0);
1008 after: "check_on_6";
1010 program { name: "check_on_6";
1013 if (get_int(check_state) == 1)
1014 set_state(PART:"check", "visible", 0.0);
1017 program { name: "check_off";
1018 signal: "elm,state,check,off";
1020 action: STATE_SET "default" 0.0;
1023 if (get_int(check_state) == 1)
1025 set_int(check_state, 0);
1026 set_state(PART:"check", "default", 0.0);
1030 program { name: "text_show";
1031 signal: "elm,state,text,visible";
1033 action: STATE_SET "visible" 0.0;
1036 program { name: "text_hide";
1037 signal: "elm,state,text,hidden";
1039 action: STATE_SET "default" 0.0;
1042 program { name: "icon_show";
1043 signal: "elm,state,icon,visible";
1045 action: STATE_SET "visible" 0.0;
1046 target: "elm.swallow.content";
1048 program { name: "icon_hide";
1049 signal: "elm,state,icon,hidden";
1051 action: STATE_SET "default" 0.0;
1052 target: "elm.swallow.content";
1054 program { name: "disable";
1055 signal: "elm,state,disabled";
1057 action: STATE_SET "disabled" 0.0;
1061 after: "disable_text";
1063 program { name: "disable_text";
1067 get_state(PART:"elm.text", st, 30, vl);
1068 if (!strcmp(st, "visible"))
1069 set_state(PART:"elm.text", "disabled_visible", 0.0);
1071 set_state(PART:"elm.text", "disabled", 0.0);
1072 get_state(PART:"elm.swallow.content", st, 30, vl);
1073 if (!strcmp(st, "visible"))
1074 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1076 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1077 get_state(PART:"check", st, 30, vl);
1078 if (!strcmp(st, "visible"))
1079 set_state(PART:"check", "disabled_visible", 0.0);
1080 set_int(check_state, 2);
1083 program { name: "enable";
1084 signal: "elm,state,enabled";
1086 action: STATE_SET "default" 0.0;
1090 after: "enable_text";
1092 program { name: "enable_text";
1096 get_state(PART:"elm.text", st, 30, vl);
1097 if (!strcmp(st, "disabled_visible"))
1098 set_state(PART:"elm.text", "visible", 0.0);
1100 set_state(PART:"elm.text", "default", 0.0);
1101 get_state(PART:"elm.swallow.content", st, 30, vl);
1102 if (!strcmp(st, "visible"))
1103 set_state(PART:"elm.swallow.content", "visible", 0.0);
1105 set_state(PART:"elm.swallow.content", "default", 0.0);
1106 get_state(PART:"check", st, 30, vl);
1107 if (!strcmp(st, "disabled_visible"))
1109 set_state(PART:"check", "visible", 0.0);
1110 set_int(check_state, 1);
1113 set_int(check_state, 0);
1119 //////////////////////////////////////////////////////////////////////////////
1120 group { name: "elm/check/base/on&off";
1122 image: "00_button_on.png" COMP;
1123 image: "00_button_on_dim.png" COMP;
1124 image: "00_button_off.png" COMP;
1125 image: "00_button_off_dim.png" COMP;
1126 image: "00_button_on_off_handler.png" COMP;
1127 image: "00_button_on_off_handler_dim.png" COMP;
1132 public was_drag = 0;
1133 public check_on = 0;
1140 description { state: "default" 0.0;
1141 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1142 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1143 rel2.relative: 0.0 1.0;
1149 part { name: "padding_left";
1153 description { state: "default" 0.0;
1155 rel1{ relative: 0.0 0.0; to: "bg"; }
1156 rel2{ relative: 0.0 1.0; to: "bg"; }
1162 part { name: "padding_right";
1166 description { state: "default" 0.0;
1181 part { name: "padding_top";
1185 description { state: "default" 0.0;
1197 part { name: "padding_bottom";
1201 description { state: "default" 0.0;
1216 part { name: "bg_image";
1219 description { state: "default" 0.0;
1224 to_y: "padding_top";
1229 to_y: "padding_bottom";
1231 image.normal: "00_button_off.png";
1233 description { state: "visible" 0.0;
1234 inherit: "default" 0.0;
1235 image.normal: "00_button_on.png";
1237 description { state: "pressed" 0.0;
1238 inherit: "default" 0.0;
1239 image.normal: "00_button_off.png";
1241 description { state: "visible_pressed" 0.0;
1242 inherit: "default" 0.0;
1243 image.normal: "00_button_on.png";
1245 description { state: "visible_disable" 0.0;
1246 inherit: "default" 0.0;
1247 image.normal: "00_button_on_dim.png";
1249 description { state: "off_disable" 0.0;
1250 inherit: "default" 0.0;
1251 image.normal: "00_button_off_dim.png";
1254 part { name: "drag_container";
1258 description { state: "default" 0.0;
1261 to_x: "padding_left";
1266 to_x: "padding_right";
1272 part { name: "clipper";
1275 description { state: "default" 0.0;
1278 color: 255 255 255 255;
1281 part { name: "clipper_inner";
1284 description { state: "default" 0.0;
1285 rel1.to: "bg_image";
1286 rel2.to: "bg_image";
1287 color: 255 255 255 255;
1290 part { name: "button";
1297 confine: "drag_container";
1299 description { state: "default" 0.0;
1300 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1301 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1306 image.normal: "00_button_on_off_handler.png";
1308 description { state: "disabled" 0.0;
1309 inherit: "default" 0.0;
1310 image.normal: "00_button_on_off_handler_dim.png";
1313 part { name: "button_events";
1318 description { state: "default" 0.0;
1324 part { name: "onrect";
1329 description { state: "default" 0.0;
1342 part { name: "offrect";
1347 description { state: "default" 0.0;
1359 part { name: "elm.offtext";
1363 clip_to: "clipper_inner";
1364 description { state: "default" 0.0;
1367 color: 255 255 255 255;
1369 font: "Tizen:style=Medium";
1372 text_class: "tizen";
1375 description { state: "disabled" 0.0;
1376 inherit: "default" 0.0;
1377 color: 128 128 128 128;
1380 part { name: "elm.ontext";
1384 clip_to: "clipper_inner";
1385 description { state: "default" 0.0;
1388 color: 255 255 255 255;
1390 font: "Tizen:style=Medium";
1393 text_class: "tizen";
1396 description { state: "disabled" 0.0;
1397 inherit: "default" 0.0;
1398 color: 128 128 128 128;
1401 part { name: "elm.swallow.content";
1404 description { state: "default" 0.0;
1417 description { state: "visible" 0.0;
1418 inherit: "default" 0.0;
1422 aspect_preference: VERTICAL;
1424 description { state: "disabled" 0.0;
1425 inherit: "default" 0.0;
1427 description { state: "disabled_visible" 0.0;
1428 inherit: "default" 0.0;
1434 part { name: "elm.text";
1439 description { state: "default" 0.0;
1445 to_x: "elm.swallow.content";
1453 style: "check_label_textblock_style";
1456 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1458 description { state: "visible" 0.0;
1459 inherit: "default" 0.0;
1463 description { state: "disabled" 0.0;
1464 inherit: "default" 0.0;
1466 description { state: "disabled_visible" 0.0;
1467 inherit: "default" 0.0;
1472 part { name: "disclip";
1475 description { state: "default" 0.0;
1476 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1478 description { state: "disabled" 0.0;
1479 inherit: "default" 0.0;
1480 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1483 part { name: "disabler";
1485 description { state: "default" 0.0;
1489 description { state: "disabled" 0.0;
1490 inherit: "default" 0.0;
1497 signal: "mouse,clicked,1";
1500 new Float:dx, Float:dy;
1501 get_drag(PART:"button", dx, dy);
1502 if (!get_int(was_drag)) {
1504 set_drag(PART:"button", 0.0, 0.0);
1506 set_drag(PART:"button", 1.0, 0.0);
1507 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1508 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1509 if (get_int(check_on)) {
1510 emit("elm,action,check,off", "");
1511 emit("elm,action,touch,sound", "");
1515 if (!get_int(check_on)) {
1516 emit("elm,action,check,on", "");
1517 emit("elm,action,touch,sound", "");
1523 program { name: "touch_sound";
1524 signal: "elm,action,touch,sound";
1526 action: PLAY_SAMPLE "touch_sound" 1.0;
1532 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1533 set_int(is_drag, 1);
1537 signal: "mouse,down,1";
1540 set_int(was_drag, 0);
1541 set_int(is_drag, 0);
1544 program { name: "drag_end";
1545 signal: "mouse,up,1";
1548 new Float:dx, Float:dy;
1549 get_drag(PART:"button", dx, dy);
1550 if (get_int(is_drag)) {
1552 set_drag(PART:"button", 1.0, 0.0);
1554 set_drag(PART:"button", 0.0, 0.0);
1555 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1556 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1557 if (!get_int(check_on)) {
1558 emit("elm,action,check,on", "");
1559 emit("elm,action,touch,sound", "");
1563 if (get_int(check_on)) {
1564 emit("elm,action,check,off", "");
1565 emit("elm,action,touch,sound", "");
1568 set_int(was_drag, get_int(is_drag));
1569 set_int(is_drag, 0);
1570 emit("elm,action,check,drag,stop", "");
1574 program { name: "check_on";
1575 signal: "elm,state,check,on";
1579 if (get_int(is_rtl) == 0) {
1585 set_drag(PART:"button", drag, 0.0);
1586 set_state(PART:"bg_image", "visible", 0.0);
1587 set_int(check_on, 1);
1590 program { name: "check_off";
1591 signal: "elm,state,check,off";
1595 if (get_int(is_rtl) == 0) {
1601 set_drag(PART:"button", drag, 0.0);
1602 set_state(PART:"bg_image", "default", 0.0);
1603 set_int(check_on, 0);
1606 program { name: "text_show";
1607 signal: "elm,state,text,visible";
1609 action: STATE_SET "visible" 0.0;
1612 program { name: "text_hide";
1613 signal: "elm,state,text,hidden";
1615 action: STATE_SET "default" 0.0;
1618 program { name: "icon_show";
1619 signal: "elm,state,icon,visible";
1621 action: STATE_SET "visible" 0.0;
1622 target: "elm.swallow.content";
1624 program { name: "icon_hide";
1625 signal: "elm,state,icon,hidden";
1627 action: STATE_SET "default" 0.0;
1628 target: "elm.swallow.content";
1630 program { name: "disable";
1631 signal: "elm,state,disabled";
1633 action: STATE_SET "disabled" 0.0;
1634 target: "elm.offtext";
1635 target: "elm.ontext";
1639 after: "disable_text";
1641 program { name: "disable_text";
1645 get_state(PART:"elm.text", st, 30, vl);
1646 if (!strcmp(st, "visible"))
1647 set_state(PART:"elm.text", "disabled_visible", 0.0);
1649 set_state(PART:"elm.text", "disabled", 0.0);
1650 get_state(PART:"bg_image", st, 30, vl);
1651 if (!strcmp(st, "visible"))
1652 set_state(PART:"bg_image", "visible_disable", 0.0);
1654 set_state(PART:"bg_image", "off_disable", 0.0);
1655 get_state(PART:"elm.swallow.content", st, 30, vl);
1656 if (!strcmp(st, "visible"))
1657 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1659 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1660 set_state(PART:"button", "disabled", 0.0);
1663 program { name: "enable";
1664 signal: "elm,state,enabled";
1666 action: STATE_SET "default" 0.0;
1670 after: "enable_text";
1672 program { name: "enable_text";
1676 get_state(PART:"elm.text", st, 30, vl);
1677 if (!strcmp(st, "disabled_visible"))
1678 set_state(PART:"elm.text", "visible", 0.0);
1680 set_state(PART:"elm.text", "default", 0.0);
1681 get_state(PART:"bg_image", st, 30, vl);
1682 if (!strcmp(st, "visible_disable"))
1683 set_state(PART:"bg_image", "visible", 0.0);
1685 set_state(PART:"bg_image", "default", 0.0);
1686 get_state(PART:"elm.swallow.content", st, 30, vl);
1687 if (!strcmp(st, "visible"))
1688 set_state(PART:"elm.swallow.content", "visible", 0.0);
1690 set_state(PART:"elm.swallow.content", "default", 0.0);
1691 set_state(PART:"button", "default", 0.0);
1694 program { name: "to_rtl";
1695 signal: "edje,state,rtl";
1701 program { name: "to_ltr";
1702 signal: "edje,state,ltr";
1710 ///////////////////////////////////////////////////////////////////////////////////////
1712 #define CHECK_STYLE_FAVORITE(style_name, min_width, min_height) \
1713 group { name: "elm/check/base/"style_name; \
1715 image: "00_icon_favorite_on_72x72.png" COMP; \
1716 image: "00_icon_favorite_on_72x72_dim.png" COMP; \
1717 image: "00_icon_favorite_off_72x72.png" COMP; \
1718 image: "00_icon_favorite_off_72x72_dim.png" COMP; \
1721 part { name: "back_bg"; \
1724 description { state: "default" 0.0; \
1726 rel2.relative: 0.0 1.0; \
1728 min: min_width min_height; \
1732 part { name: "bg"; \
1734 clip_to: "disclip"; \
1736 description { state: "default" 0.0; \
1738 rel1.to: "back_bg"; \
1739 rel2.to: "back_bg"; \
1740 min: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1741 max: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1745 part { name: "check"; \
1747 clip_to: "disclip"; \
1749 description { state: "default" 0.0; \
1752 image.normal: "00_icon_favorite_off_72x72.png"; \
1754 description { state: "visible" 0.0; \
1755 inherit: "default" 0.0; \
1756 image.normal: "00_icon_favorite_on_72x72.png"; \
1758 description { state: "disabled" 0.0; \
1759 inherit: "default" 0.0; \
1760 image.normal: "00_icon_favorite_off_72x72_dim.png"; \
1762 description { state: "disabled_visible" 0.0; \
1763 inherit: "default" 0.0; \
1764 image.normal: "00_icon_favorite_on_72x72_dim.png"; \
1767 part { name: "elm.swallow.content"; \
1769 clip_to: "disclip"; \
1770 description { state: "default" 0.0; \
1776 relative: 1.0 0.0; \
1781 relative: 1.0 1.0; \
1785 description { state: "visible" 0.0; \
1786 inherit: "default" 0.0; \
1790 aspect_preference: VERTICAL; \
1792 description { state: "disabled" 0.0; \
1793 inherit: "default" 0.0; \
1795 description { state: "disabled_visible" 0.0; \
1796 inherit: "default" 0.0; \
1802 part { name: "elm.text"; \
1804 clip_to: "disclip"; \
1807 description { state: "default" 0.0; \
1811 relative: 1.0 0.5; \
1813 to_x: "elm.swallow.content"; \
1816 relative: 1.0 0.5; \
1821 style: "check_label_textblock_style"; \
1824 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1826 description { state: "visible" 0.0; \
1827 inherit: "default" 0.0; \
1831 description { state: "disabled" 0.0; \
1832 inherit: "default" 0.0; \
1834 description { state: "disabled_visible" 0.0; \
1835 inherit: "default" 0.0; \
1838 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1841 part { name: "disclip"; \
1844 description { state: "default" 0.0; \
1845 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1848 part { name: "events"; \
1850 ignore_flags: ON_HOLD; \
1851 description { state: "default" 0.0; \
1855 part { name: "disabler"; \
1857 description { state: "default" 0.0; \
1861 description { state: "disabled" 0.0; \
1862 inherit: "default" 0.0; \
1868 program { name: "click"; \
1869 signal: "mouse,clicked,1"; \
1871 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1872 after: "touch_sound"; \
1874 program { name: "touch_sound"; \
1875 action: PLAY_SAMPLE "touch_sound" 1.0; \
1877 program { name: "check_on"; \
1878 signal: "elm,state,check,on"; \
1880 action: STATE_SET "visible" 0.0; \
1883 program { name: "check_off"; \
1884 signal: "elm,state,check,off"; \
1886 action: STATE_SET "default" 0.0; \
1889 program { name: "text_show"; \
1890 signal: "elm,state,text,visible"; \
1892 action: STATE_SET "visible" 0.0; \
1893 target: "elm.text"; \
1895 program { name: "text_hide"; \
1896 signal: "elm,state,text,hidden"; \
1898 action: STATE_SET "default" 0.0; \
1899 target: "elm.text"; \
1901 program { name: "icon_show"; \
1902 signal: "elm,state,icon,visible"; \
1904 action: STATE_SET "visible" 0.0; \
1905 target: "elm.swallow.content"; \
1907 program { name: "icon_hide"; \
1908 signal: "elm,state,icon,hidden"; \
1910 action: STATE_SET "default" 0.0; \
1911 target: "elm.swallow.content"; \
1913 program { name: "disable"; \
1914 signal: "elm,state,disabled"; \
1916 action: STATE_SET "disabled" 0.0; \
1917 target: "disabler"; \
1918 after: "disable_text"; \
1920 program { name: "disable_text"; \
1924 get_state(PART:"elm.text", st, 30, vl); \
1925 if (!strcmp(st, "visible")) \
1926 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1928 set_state(PART:"elm.text", "disabled", 0.0); \
1929 get_state(PART:"elm.swallow.content", st, 30, vl); \
1930 if (!strcmp(st, "visible")) \
1931 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1933 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1934 get_state(PART:"check", st, 30, vl); \
1935 if (!strcmp(st, "visible")) \
1936 set_state(PART:"check", "disabled_visible", 0.0); \
1938 set_state(PART:"check", "disabled", 0.0); \
1941 program { name: "enable"; \
1942 signal: "elm,state,enabled"; \
1944 action: STATE_SET "default" 0.0; \
1945 target: "disabler"; \
1946 after: "enable_text"; \
1948 program { name: "enable_text"; \
1952 get_state(PART:"elm.text", st, 30, vl); \
1953 if (!strcmp(st, "disabled_visible")) \
1954 set_state(PART:"elm.text", "visible", 0.0); \
1956 set_state(PART:"elm.text", "default", 0.0); \
1957 get_state(PART:"elm.swallow.content", st, 30, vl); \
1958 if (!strcmp(st, "visible")) \
1959 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1961 set_state(PART:"elm.swallow.content", "default", 0.0); \
1962 get_state(PART:"check", st, 30, vl); \
1963 if (!strcmp(st, "disabled_visible")) \
1964 set_state(PART:"check", "visible", 0.0); \
1966 set_state(PART:"check", "default", 0.0); \
1971 ////////////////////////////////////////////////////////////////////////////////
1972 CHECK_STYLE_FAVORITE("favorite", CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1973 ////////////////////////////////////////////////////////////////////////////////
1974 CHECK_STYLE_FAVORITE("favorite/extended", CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
1975 ////////////////////////////////////////////////////////////////////////////////
1977 group { name: "elm/check/base/delete";
1979 image: "00_button_minus.png" COMP;
1980 image: "00_button_minus_press.png" COMP;
1981 image: "00_button_edit_Delete.png" COMP;
1982 image: "00_button_edit_Delete_press.png" COMP;
1983 image: "00_button_edit_dim.png" COMP;
1984 image: "00_button_edit_focus.png" COMP;
1987 public button_state = 0; //0:enabled, 1: disabled
1992 description { state: "default" 0.0;
1997 normal: "00_button_edit_Delete.png";
1998 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
2002 description { state: "clicked" 0.0;
2003 inherit: "default" 0.0;
2004 image.normal: "00_button_edit_Delete_press.png";
2006 description { state: "intermediate" 0.0;
2007 inherit: "default" 0.0;
2010 description { state: "on" 0.0;
2011 inherit: "default" 0.0;
2014 description { state: "disabled" 0.0;
2015 inherit: "default" 0.0;
2016 image.normal: "00_button_edit_dim.png";
2018 description { state: "focused" 0.0;
2019 inherit: "default" 0.0;
2020 image.normal: "00_button_edit_focus.png";
2025 description { state: "default" 0.0;
2027 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2028 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2029 rel1.relative: 1.0 0.0;
2031 image.normal: "00_button_minus.png";
2033 description { state: "clicked" 0.0;
2034 inherit: "default" 0.0;
2035 image.normal: "00_button_minus_press.png";
2037 description { state: "intermediate" 0.0;
2038 inherit: "default" 0.0;
2041 description { state: "on" 0.0;
2042 inherit: "default" 0.0;
2045 description { state: "disabled" 0.0;
2046 inherit: "default" 0.0;
2047 image.normal: "00_button_minus.png";
2050 part { name: "clipper";
2054 description { state: "default" 0.0;
2056 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2057 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2058 color: 255 255 255 255;
2060 description { state: "on" 0.0;
2062 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2063 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2064 color: 255 255 255 255;
2067 part { name: "bg_expand";
2071 description { state: "default" 0.0;
2073 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2074 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2076 normal: "00_button_edit_Delete.png";
2077 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
2087 description { state: "clicked" 0.0;
2088 inherit: "default" 0.0;
2090 image.normal: "00_button_edit_Delete_press.png";
2092 description { state: "intermediate" 0.0;
2093 inherit: "default" 0.0;
2103 description { state: "on" 0.0;
2104 inherit: "default" 0.0;
2108 part { name: "check";
2112 description { state: "default" 0.0;
2117 font: "Tizen:style=Medium";
2118 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2121 text_class: "tizen";
2124 description { state: "visible" 0.0;
2126 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2127 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2128 color: CHECK_DELETE_TEXT_DELETE_NORMAL_COLOR_INC;
2130 font: "Tizen:style=Medium";
2131 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2134 text_class: "tizen";
2137 description { state: "visible_pressed" 0.0;
2138 inherit: "visible" 0.0;
2139 color: CHECK_DELETE_TEXT_DELETE_PRESS_COLOR_INC;
2142 part { name: "elm.swallow.content";
2144 description { state: "default" 0.0;
2147 color: 255 255 255 255;
2160 description { state: "visible" 0.0;
2161 inherit: "default" 0.0;
2165 aspect_preference: VERTICAL;
2167 description { state: "disabled" 0.0;
2168 inherit: "default" 0.0;
2169 color: 128 128 128 128;
2171 description { state: "disabled_visible" 0.0;
2172 inherit: "default" 0.0;
2173 color: 128 128 128 128;
2179 part { name: "elm.text";
2183 description { state: "default" 0.0;
2189 to_x: "elm.swallow.content";
2195 color: 255 255 255 255;
2198 style: "check_label_textblock_style";
2201 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2203 description { state: "visible" 0.0;
2204 inherit: "default" 0.0;
2208 description { state: "disabled" 0.0;
2209 inherit: "default" 0.0;
2211 description { state: "disabled_visible" 0.0;
2212 inherit: "default" 0.0;
2215 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2218 part { name: "events1";
2220 ignore_flags: ON_HOLD;
2221 description { state: "default" 0.0;
2224 rel2.to_x: "elm.text";
2227 description { state: "visible" 0.0;
2229 rel1.to: "bg_expand";
2230 rel2.to_x: "elm.text";
2234 part { name: "events2";
2237 description { state: "default" 0.0;
2240 rel2.to_x: "elm.text";
2243 description { state: "visible" 0.0;
2245 rel1.to: "bg_expand";
2246 rel2.to_x: "elm.text";
2250 part { name: "disabler";
2252 description { state: "default" 0.0;
2253 rel2.to_x: "elm.text";
2257 description { state: "disabled" 0.0;
2258 inherit: "default" 0.0;
2264 program { name: "click";
2265 signal: "mouse,clicked,1";
2270 get_state(PART:"check", st, 30, vl);
2271 if (!strcmp(st, "visible_pressed"))
2272 set_state(PART:"check", "visible", 0.0);
2276 program { name: "toggle";
2277 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2278 after: "touch_sound";
2280 program { name: "touch_sound";
2281 action: PLAY_SAMPLE "touch_sound" 1.0;
2283 program { name: "unfocused";
2284 signal: "elm,action,unfocus";
2289 get_state(PART:"bg2", st, 30, vl);
2290 if (!strcmp(st, "on"))
2291 emit("elm,action,check,toggle", "");
2294 program { name: "click_down";
2295 signal: "mouse,down,1";
2300 get_state(PART:"check", st, 30, vl);
2301 if (!strcmp(st, "visible"))
2303 set_state(PART:"bg_expand", "clicked", 0.0);
2304 set_state(PART:"check", "visible_pressed", 0.0);
2308 set_state(PART:"bg2", "clicked", 0.0);
2309 set_state(PART:"bg1", "clicked", 0.0);
2313 program { name: "check_normal";
2314 signal: "mouse,up,1";
2319 get_state(PART:"check", st, 30, vl);
2320 if (!strcmp(st, "visible_pressed"))
2322 set_state(PART:"bg_expand", "on", 0.0);
2323 set_state(PART:"check", "visible", 0.0);
2325 get_state(PART:"bg_expand", st, 30, vl);
2326 if (!strcmp(st, "default"))
2328 set_state(PART:"bg2", "default", 0.0);
2329 set_state(PART:"bg1", "default", 0.0);
2333 program { name: "check_on";
2334 signal: "elm,state,check,on";
2336 action: STATE_SET "on" 0.0;
2338 after: "start_expand";
2340 program { name: "start_expand";
2341 action: STATE_SET "intermediate" 0.0;
2344 target: "bg_expand";
2347 program { name: "expand";
2348 action: STATE_SET "on" 0.0;
2349 target: "bg_expand";
2352 transition: ACCELERATE 0.1;
2353 after: "check_visible";
2355 program { name: "check_visible";
2356 action: STATE_SET "visible" 0.0;
2361 program { name: "check_off";
2362 signal: "elm,state,check,off";
2364 action: STATE_SET "default" 0.0;
2368 program { name: "contract";
2369 action: STATE_SET "intermediate" 0.0;
2370 target: "bg_expand";
2371 transition: ACCELERATE 0.1;
2374 program { name: "normal_bg";
2376 if (get_int(button_state) !=1)
2378 set_state(PART:"bg2", "default", 0.0);
2379 set_state(PART:"bg1", "default", 0.0);
2383 set_state(PART:"bg2", "disabled", 0.0);
2384 set_state(PART:"bg1", "disabled", 0.0);
2387 after: "bg_default";
2389 program { name: "bg_default";
2390 action: STATE_SET "default" 0.0;
2391 target: "bg_expand";
2396 program { name: "text_show";
2397 signal: "elm,state,text,visible";
2399 action: STATE_SET "visible" 0.0;
2402 program { name: "text_hide";
2403 signal: "elm,state,text,hidden";
2405 action: STATE_SET "default" 0.0;
2408 program { name: "icon_show";
2409 signal: "elm,state,icon,visible";
2411 action: STATE_SET "visible" 0.0;
2412 target: "elm.swallow.content";
2414 program { name: "icon_hide";
2415 signal: "elm,state,icon,hidden";
2417 action: STATE_SET "default" 0.0;
2418 target: "elm.swallow.content";
2420 program { name: "disable";
2421 signal: "elm,state,disabled";
2423 action: STATE_SET "disabled" 0.0;
2427 after: "disable_text";
2429 program { name: "disable_text";
2433 get_state(PART:"elm.text", st, 30, vl);
2434 if (!strcmp(st, "visible"))
2435 set_state(PART:"elm.text", "disabled_visible", 0.0);
2437 set_state(PART:"elm.text", "disabled", 0.0);
2438 get_state(PART:"elm.swallow.content", st, 30, vl);
2439 if (!strcmp(st, "visible"))
2440 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2442 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2443 set_int(button_state, 1);
2446 program { name: "enable";
2447 signal: "elm,state,enabled";
2449 action: STATE_SET "default" 0.0;
2453 after: "enable_text";
2455 program { name: "enable_text";
2459 get_state(PART:"elm.text", st, 30, vl);
2460 if (!strcmp(st, "disabled_visible"))
2461 set_state(PART:"elm.text", "visible", 0.0);
2463 set_state(PART:"elm.text", "default", 0.0);
2464 get_state(PART:"elm.swallow.content", st, 30, vl);
2465 if (!strcmp(st, "visible"))
2466 set_state(PART:"elm.swallow.content", "visible", 0.0);
2468 set_state(PART:"elm.swallow.content", "default", 0.0);
2469 set_int(button_state, 0);
2475 ////////////////////////////////////////////////////////////////////////////////
2477 group { name: "elm/check/base/grid";
2478 images.image: "00_grid_select_check.png" COMP;
2479 images.image: "00_grid_select_check_bg.png" COMP;
2480 images.image: "00_grid_select_check_bg_press.png" COMP;
2482 public check_state = CHECK_STATE_DEFAULT;
2483 public check_visible = CHECK_HIDE;
2489 description { state: "default" 0.0;
2493 part { name: "top_right_padding";
2497 description { state: "default" 0.0;
2499 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
2512 part { name: "selected_bg";
2515 description { state: "default" 0.0;
2520 description { state: "visible" 0.0;
2521 inherit: "default" 0.0;
2523 color: GENGRID_EDIT_MODE_CHECK_BG_COLOR_INC;
2529 description { state: "default" 0.0;
2530 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
2535 to: "top_right_padding";
2539 to: "top_right_padding";
2541 image.normal: "00_grid_select_check_bg.png";
2543 description { state: "visible" 0.0;
2544 inherit: "default" 0.0;
2545 image.normal: "00_grid_select_check_bg_press.png";
2547 description { state: "disabled" 0.0;
2548 inherit: "default" 0.0;
2551 part { name: "check";
2553 clip_to: "sequence_clip";
2555 description { state: "default" 0.0;
2559 image.normal: "00_grid_select_check.png";
2560 color: 255 255 255 0;
2562 description { state: "visible" 0.0;
2563 inherit: "default" 0.0;
2565 color: 255 255 255 255;
2567 description { state: "pressed" 0.0;
2568 inherit: "visible" 0.0;
2570 description { state: "disabled_visible" 0.0;
2571 inherit: "default" 0.0;
2575 part { name: "sequence_clip";
2578 description { state: "default" 0.0;
2581 rel2.relative: 0.0 1.0;
2582 color: 255 255 255 255;
2584 description { state: "visible" 0.0;
2585 inherit: "default" 0.0;
2586 rel2.relative: 1.0 1.0;
2589 part { name: "elm.swallow.content";
2592 state: "default" 0.0;
2595 color: 255 255 255 255;
2608 description { state: "visible" 0.0;
2609 inherit: "default" 0.0;
2613 aspect_preference: VERTICAL;
2615 description { state: "disabled" 0.0;
2616 inherit: "default" 0.0;
2617 color: 128 128 128 128;
2619 description { state: "disabled_visible" 0.0;
2620 inherit: "default" 0.0;
2621 color: 128 128 128 128;
2627 part { name: "elm.text";
2631 description { state: "default" 0.0;
2637 to_x: "elm.swallow.content";
2643 color: 255 255 255 255;
2646 style: "check_label_textblock_style";
2649 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2651 description { state: "visible" 0.0;
2652 inherit: "default" 0.0;
2656 description { state: "disabled" 0.0;
2657 inherit: "default" 0.0;
2659 description { state: "disabled_visible" 0.0;
2660 inherit: "default" 0.0;
2663 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2666 part { name: "events";
2668 ignore_flags: ON_HOLD;
2669 description { state: "default" 0.0;
2673 part { name: "disabler";
2675 description { state: "default" 0.0;
2679 description { state: "disabled" 0.0;
2680 inherit: "default" 0.0;
2686 program { name: "show";
2689 set_int(check_visible, CHECK_SHOW);
2692 program { name: "hide";
2695 set_int(check_visible, CHECK_HIDE);
2698 program { name: "click";
2699 signal: "mouse,clicked,1";
2701 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2702 after: "touch_sound";
2704 program { name: "touch_sound";
2705 action: PLAY_SAMPLE "touch_sound" 1.0;
2708 program { name: "bg_normal";
2710 set_state(PART:"bg2", "default", 0.0);
2713 program { name: "pressed";
2714 signal: "mouse,down,1";
2719 get_state(PART:"check", st, 30, vl);
2720 if (!strcmp(st, "visible"))
2722 set_state(PART:"check", "pressed", 0.0);
2723 set_state(PART:"bg2", "visible", 0.0);
2727 program { name: "mouse,out";
2728 signal: "mouse,out";
2731 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2733 set_state(PART:"check", "visible", 0.0);
2734 set_state(PART:"sequence_clip", "visible", 0.0);
2735 set_state(PART:"bg2", "visible", 0.0);
2739 set_state(PART:"check", "default", 0.0);
2740 set_state(PART:"sequence_clip", "default", 0.0);
2741 set_state(PART:"bg2", "default", 0.0);
2745 program { name: "check_on";
2746 signal: "elm,state,check,on";
2749 set_int(check_state, CHECK_STATE_VISIBLE);
2750 if (get_int(check_visible) == CHECK_SHOW)
2752 run_program(PROGRAM:"check_show_effect");
2753 run_program(PROGRAM:"check_draw_effect");
2757 set_state(PART:"check", "visible", 0.0);
2758 set_state(PART:"sequence_clip", "visible", 0.0);
2760 set_state(PART:"bg2", "visible", 0.0);
2761 set_state(PART:"selected_bg", "visible", 0.0);
2764 program { name: "check_off";
2765 signal: "elm,state,check,off";
2767 action: STATE_SET "default" 0.0;
2770 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2772 set_int(check_state, CHECK_STATE_DEFAULT);
2773 set_state(PART:"check", "default", 0.0);
2774 set_state(PART:"sequence_clip", "default", 0.0);
2776 set_state(PART:"bg2", "default", 0.0);
2777 set_state(PART:"selected_bg", "default", 0.0);
2780 program { name: "check_show_effect";
2781 action: STATE_SET "visible" 0.0;
2782 transition: LINEAR 0.233;
2785 program { name: "check_draw_effect";
2786 action: STATE_SET "visible" 0.0;
2787 transition: LINEAR 0.267;
2788 target: "sequence_clip";
2790 program { name: "text_show";
2791 signal: "elm,state,text,visible";
2793 action: STATE_SET "visible" 0.0;
2796 program { name: "text_hide";
2797 signal: "elm,state,text,hidden";
2799 action: STATE_SET "default" 0.0;
2802 program { name: "icon_show";
2803 signal: "elm,state,icon,visible";
2805 action: STATE_SET "visible" 0.0;
2806 target: "elm.swallow.content";
2808 program { name: "icon_hide";
2809 signal: "elm,state,icon,hidden";
2811 action: STATE_SET "default" 0.0;
2812 target: "elm.swallow.content";
2814 program { name: "disable";
2815 signal: "elm,state,disabled";
2817 action: STATE_SET "disabled" 0.0;
2820 after: "disable_text";
2822 program { name: "disable_text";
2826 get_state(PART:"elm.text", st, 30, vl);
2827 if (!strcmp(st, "visible"))
2828 set_state(PART:"elm.text", "disabled_visible", 0.0);
2830 set_state(PART:"elm.text", "disabled", 0.0);
2831 get_state(PART:"elm.swallow.content", st, 30, vl);
2832 if (!strcmp(st, "visible"))
2833 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2835 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2836 get_state(PART:"check", st, 30, vl);
2837 if (!strcmp(st, "visible"))
2839 set_state(PART:"check", "disabled_visible", 0.0);
2840 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2844 program { name: "enable";
2845 signal: "elm,state,enabled";
2847 action: STATE_SET "default" 0.0;
2850 after: "enable_text";
2852 program { name: "enable_text";
2856 get_state(PART:"elm.text", st, 30, vl);
2857 if (!strcmp(st, "disabled_visible"))
2858 set_state(PART:"elm.text", "visible", 0.0);
2860 set_state(PART:"elm.text", "default", 0.0);
2861 get_state(PART:"elm.swallow.content", st, 30, vl);
2862 if (!strcmp(st, "visible"))
2863 set_state(PART:"elm.swallow.content", "visible", 0.0);
2865 set_state(PART:"elm.swallow.content", "default", 0.0);
2866 get_state(PART:"check", st, 30, vl);
2867 if (!strcmp(st, "disabled_visible"))
2869 set_state(PART:"check", "visible", 0.0);
2870 set_state(PART:"sequence_clip", "visible", 0.0);
2871 set_int(check_state, CHECK_STATE_VISIBLE);
2874 set_int(check_state, CHECK_STATE_DEFAULT);
2880 #undef CHECK_STATE_DEFAULT
2881 #undef CHECK_STATE_VISIBLE
2882 #undef CHECK_STATE_DISABLED_VISIBLE
2883 #undef CHECK_STATE_DISABLED