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;
1419 description { state: "visible" 0.0;
1420 inherit: "default" 0.0;
1424 aspect_preference: VERTICAL;
1426 description { state: "disabled" 0.0;
1427 inherit: "default" 0.0;
1429 description { state: "disabled_visible" 0.0;
1430 inherit: "default" 0.0;
1436 part { name: "elm.text";
1441 description { state: "default" 0.0;
1447 to_x: "elm.swallow.content";
1455 style: "check_label_textblock_style";
1458 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1460 description { state: "visible" 0.0;
1461 inherit: "default" 0.0;
1465 description { state: "disabled" 0.0;
1466 inherit: "default" 0.0;
1468 description { state: "disabled_visible" 0.0;
1469 inherit: "default" 0.0;
1474 part { name: "disclip";
1477 description { state: "default" 0.0;
1478 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1480 description { state: "disabled" 0.0;
1481 inherit: "default" 0.0;
1482 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1485 part { name: "disabler";
1487 description { state: "default" 0.0;
1491 description { state: "disabled" 0.0;
1492 inherit: "default" 0.0;
1499 signal: "mouse,clicked,1";
1502 new Float:dx, Float:dy;
1503 get_drag(PART:"button", dx, dy);
1504 if (!get_int(was_drag)) {
1506 set_drag(PART:"button", 0.0, 0.0);
1508 set_drag(PART:"button", 1.0, 0.0);
1509 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1510 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1511 if (get_int(check_on)) {
1512 emit("elm,action,check,off", "");
1513 emit("elm,action,touch,sound", "");
1517 if (!get_int(check_on)) {
1518 emit("elm,action,check,on", "");
1519 emit("elm,action,touch,sound", "");
1525 program { name: "touch_sound";
1526 signal: "elm,action,touch,sound";
1528 action: PLAY_SAMPLE "touch_sound" 1.0;
1534 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1535 set_int(is_drag, 1);
1539 signal: "mouse,down,1";
1542 set_int(was_drag, 0);
1543 set_int(is_drag, 0);
1546 program { name: "drag_end";
1547 signal: "mouse,up,1";
1550 new Float:dx, Float:dy;
1551 get_drag(PART:"button", dx, dy);
1552 if (get_int(is_drag)) {
1554 set_drag(PART:"button", 1.0, 0.0);
1556 set_drag(PART:"button", 0.0, 0.0);
1557 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1558 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1559 if (!get_int(check_on)) {
1560 emit("elm,action,check,on", "");
1561 emit("elm,action,touch,sound", "");
1565 if (get_int(check_on)) {
1566 emit("elm,action,check,off", "");
1567 emit("elm,action,touch,sound", "");
1570 set_int(was_drag, get_int(is_drag));
1571 set_int(is_drag, 0);
1572 emit("elm,action,check,drag,stop", "");
1576 program { name: "check_on";
1577 signal: "elm,state,check,on";
1581 if (get_int(is_rtl) == 0) {
1587 set_drag(PART:"button", drag, 0.0);
1588 set_state(PART:"bg_image", "visible", 0.0);
1589 set_int(check_on, 1);
1592 program { name: "check_off";
1593 signal: "elm,state,check,off";
1597 if (get_int(is_rtl) == 0) {
1603 set_drag(PART:"button", drag, 0.0);
1604 set_state(PART:"bg_image", "default", 0.0);
1605 set_int(check_on, 0);
1608 program { name: "text_show";
1609 signal: "elm,state,text,visible";
1611 action: STATE_SET "visible" 0.0;
1614 program { name: "text_hide";
1615 signal: "elm,state,text,hidden";
1617 action: STATE_SET "default" 0.0;
1620 program { name: "icon_show";
1621 signal: "elm,state,icon,visible";
1623 action: STATE_SET "visible" 0.0;
1624 target: "elm.swallow.content";
1626 program { name: "icon_hide";
1627 signal: "elm,state,icon,hidden";
1629 action: STATE_SET "default" 0.0;
1630 target: "elm.swallow.content";
1632 program { name: "disable";
1633 signal: "elm,state,disabled";
1635 action: STATE_SET "disabled" 0.0;
1636 target: "elm.offtext";
1637 target: "elm.ontext";
1641 after: "disable_text";
1643 program { name: "disable_text";
1647 get_state(PART:"elm.text", st, 30, vl);
1648 if (!strcmp(st, "visible"))
1649 set_state(PART:"elm.text", "disabled_visible", 0.0);
1651 set_state(PART:"elm.text", "disabled", 0.0);
1652 get_state(PART:"bg_image", st, 30, vl);
1653 if (!strcmp(st, "visible"))
1654 set_state(PART:"bg_image", "visible_disable", 0.0);
1656 set_state(PART:"bg_image", "off_disable", 0.0);
1657 get_state(PART:"elm.swallow.content", st, 30, vl);
1658 if (!strcmp(st, "visible"))
1659 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1661 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1662 set_state(PART:"button", "disabled", 0.0);
1665 program { name: "enable";
1666 signal: "elm,state,enabled";
1668 action: STATE_SET "default" 0.0;
1672 after: "enable_text";
1674 program { name: "enable_text";
1678 get_state(PART:"elm.text", st, 30, vl);
1679 if (!strcmp(st, "disabled_visible"))
1680 set_state(PART:"elm.text", "visible", 0.0);
1682 set_state(PART:"elm.text", "default", 0.0);
1683 get_state(PART:"bg_image", st, 30, vl);
1684 if (!strcmp(st, "visible_disable"))
1685 set_state(PART:"bg_image", "visible", 0.0);
1687 set_state(PART:"bg_image", "default", 0.0);
1688 get_state(PART:"elm.swallow.content", st, 30, vl);
1689 if (!strcmp(st, "visible"))
1690 set_state(PART:"elm.swallow.content", "visible", 0.0);
1692 set_state(PART:"elm.swallow.content", "default", 0.0);
1693 set_state(PART:"button", "default", 0.0);
1696 program { name: "to_rtl";
1697 signal: "edje,state,rtl";
1703 program { name: "to_ltr";
1704 signal: "edje,state,ltr";
1712 ///////////////////////////////////////////////////////////////////////////////////////
1714 #define CHECK_STYLE_FAVORITE(style_name, min_width, min_height) \
1715 group { name: "elm/check/base/"style_name; \
1717 image: "00_icon_favorite_on_72x72.png" COMP; \
1718 image: "00_icon_favorite_on_72x72_dim.png" COMP; \
1719 image: "00_icon_favorite_off_72x72.png" COMP; \
1720 image: "00_icon_favorite_off_72x72_dim.png" COMP; \
1723 part { name: "back_bg"; \
1726 description { state: "default" 0.0; \
1728 rel2.relative: 0.0 1.0; \
1730 min: min_width min_height; \
1734 part { name: "bg"; \
1736 clip_to: "disclip"; \
1738 description { state: "default" 0.0; \
1740 rel1.to: "back_bg"; \
1741 rel2.to: "back_bg"; \
1742 min: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1743 max: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1747 part { name: "check"; \
1749 clip_to: "disclip"; \
1751 description { state: "default" 0.0; \
1754 image.normal: "00_icon_favorite_off_72x72.png"; \
1756 description { state: "visible" 0.0; \
1757 inherit: "default" 0.0; \
1758 image.normal: "00_icon_favorite_on_72x72.png"; \
1760 description { state: "disabled" 0.0; \
1761 inherit: "default" 0.0; \
1762 image.normal: "00_icon_favorite_off_72x72_dim.png"; \
1764 description { state: "disabled_visible" 0.0; \
1765 inherit: "default" 0.0; \
1766 image.normal: "00_icon_favorite_on_72x72_dim.png"; \
1769 part { name: "elm.swallow.content"; \
1771 clip_to: "disclip"; \
1772 description { state: "default" 0.0; \
1778 relative: 1.0 0.0; \
1783 relative: 1.0 1.0; \
1787 description { state: "visible" 0.0; \
1788 inherit: "default" 0.0; \
1792 aspect_preference: VERTICAL; \
1794 description { state: "disabled" 0.0; \
1795 inherit: "default" 0.0; \
1797 description { state: "disabled_visible" 0.0; \
1798 inherit: "default" 0.0; \
1804 part { name: "elm.text"; \
1806 clip_to: "disclip"; \
1809 description { state: "default" 0.0; \
1813 relative: 1.0 0.5; \
1815 to_x: "elm.swallow.content"; \
1818 relative: 1.0 0.5; \
1823 style: "check_label_textblock_style"; \
1826 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1828 description { state: "visible" 0.0; \
1829 inherit: "default" 0.0; \
1833 description { state: "disabled" 0.0; \
1834 inherit: "default" 0.0; \
1836 description { state: "disabled_visible" 0.0; \
1837 inherit: "default" 0.0; \
1840 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1843 part { name: "disclip"; \
1846 description { state: "default" 0.0; \
1847 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1850 part { name: "events"; \
1852 ignore_flags: ON_HOLD; \
1853 description { state: "default" 0.0; \
1857 part { name: "disabler"; \
1859 description { state: "default" 0.0; \
1863 description { state: "disabled" 0.0; \
1864 inherit: "default" 0.0; \
1870 program { name: "click"; \
1871 signal: "mouse,clicked,1"; \
1873 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1874 after: "touch_sound"; \
1876 program { name: "touch_sound"; \
1877 action: PLAY_SAMPLE "touch_sound" 1.0; \
1879 program { name: "check_on"; \
1880 signal: "elm,state,check,on"; \
1882 action: STATE_SET "visible" 0.0; \
1885 program { name: "check_off"; \
1886 signal: "elm,state,check,off"; \
1888 action: STATE_SET "default" 0.0; \
1891 program { name: "text_show"; \
1892 signal: "elm,state,text,visible"; \
1894 action: STATE_SET "visible" 0.0; \
1895 target: "elm.text"; \
1897 program { name: "text_hide"; \
1898 signal: "elm,state,text,hidden"; \
1900 action: STATE_SET "default" 0.0; \
1901 target: "elm.text"; \
1903 program { name: "icon_show"; \
1904 signal: "elm,state,icon,visible"; \
1906 action: STATE_SET "visible" 0.0; \
1907 target: "elm.swallow.content"; \
1909 program { name: "icon_hide"; \
1910 signal: "elm,state,icon,hidden"; \
1912 action: STATE_SET "default" 0.0; \
1913 target: "elm.swallow.content"; \
1915 program { name: "disable"; \
1916 signal: "elm,state,disabled"; \
1918 action: STATE_SET "disabled" 0.0; \
1919 target: "disabler"; \
1920 after: "disable_text"; \
1922 program { name: "disable_text"; \
1926 get_state(PART:"elm.text", st, 30, vl); \
1927 if (!strcmp(st, "visible")) \
1928 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1930 set_state(PART:"elm.text", "disabled", 0.0); \
1931 get_state(PART:"elm.swallow.content", st, 30, vl); \
1932 if (!strcmp(st, "visible")) \
1933 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1935 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1936 get_state(PART:"check", st, 30, vl); \
1937 if (!strcmp(st, "visible")) \
1938 set_state(PART:"check", "disabled_visible", 0.0); \
1940 set_state(PART:"check", "disabled", 0.0); \
1943 program { name: "enable"; \
1944 signal: "elm,state,enabled"; \
1946 action: STATE_SET "default" 0.0; \
1947 target: "disabler"; \
1948 after: "enable_text"; \
1950 program { name: "enable_text"; \
1954 get_state(PART:"elm.text", st, 30, vl); \
1955 if (!strcmp(st, "disabled_visible")) \
1956 set_state(PART:"elm.text", "visible", 0.0); \
1958 set_state(PART:"elm.text", "default", 0.0); \
1959 get_state(PART:"elm.swallow.content", st, 30, vl); \
1960 if (!strcmp(st, "visible")) \
1961 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1963 set_state(PART:"elm.swallow.content", "default", 0.0); \
1964 get_state(PART:"check", st, 30, vl); \
1965 if (!strcmp(st, "disabled_visible")) \
1966 set_state(PART:"check", "visible", 0.0); \
1968 set_state(PART:"check", "default", 0.0); \
1973 ////////////////////////////////////////////////////////////////////////////////
1974 CHECK_STYLE_FAVORITE("favorite", CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1975 ////////////////////////////////////////////////////////////////////////////////
1976 CHECK_STYLE_FAVORITE("favorite/extended", CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
1977 ////////////////////////////////////////////////////////////////////////////////
1979 group { name: "elm/check/base/delete";
1981 image: "00_button_minus.png" COMP;
1982 image: "00_button_minus_press.png" COMP;
1983 image: "00_button_edit_Delete.png" COMP;
1984 image: "00_button_edit_Delete_press.png" COMP;
1985 image: "00_button_edit_dim.png" COMP;
1986 image: "00_button_edit_focus.png" COMP;
1989 public button_state = 0; //0:enabled, 1: disabled
1994 description { state: "default" 0.0;
1999 normal: "00_button_edit_Delete.png";
2000 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
2004 description { state: "clicked" 0.0;
2005 inherit: "default" 0.0;
2006 image.normal: "00_button_edit_Delete_press.png";
2008 description { state: "intermediate" 0.0;
2009 inherit: "default" 0.0;
2012 description { state: "on" 0.0;
2013 inherit: "default" 0.0;
2016 description { state: "disabled" 0.0;
2017 inherit: "default" 0.0;
2018 image.normal: "00_button_edit_dim.png";
2020 description { state: "focused" 0.0;
2021 inherit: "default" 0.0;
2022 image.normal: "00_button_edit_focus.png";
2027 description { state: "default" 0.0;
2029 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2030 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2031 rel1.relative: 1.0 0.0;
2033 image.normal: "00_button_minus.png";
2035 description { state: "clicked" 0.0;
2036 inherit: "default" 0.0;
2037 image.normal: "00_button_minus_press.png";
2039 description { state: "intermediate" 0.0;
2040 inherit: "default" 0.0;
2043 description { state: "on" 0.0;
2044 inherit: "default" 0.0;
2047 description { state: "disabled" 0.0;
2048 inherit: "default" 0.0;
2049 image.normal: "00_button_minus.png";
2052 part { name: "clipper";
2056 description { state: "default" 0.0;
2058 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2059 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2060 color: 255 255 255 255;
2062 description { state: "on" 0.0;
2064 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2065 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2066 color: 255 255 255 255;
2069 part { name: "bg_expand";
2073 description { state: "default" 0.0;
2075 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2076 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2078 normal: "00_button_edit_Delete.png";
2079 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
2089 description { state: "clicked" 0.0;
2090 inherit: "default" 0.0;
2092 image.normal: "00_button_edit_Delete_press.png";
2094 description { state: "intermediate" 0.0;
2095 inherit: "default" 0.0;
2105 description { state: "on" 0.0;
2106 inherit: "default" 0.0;
2110 part { name: "check";
2114 description { state: "default" 0.0;
2119 font: "Tizen:style=Medium";
2120 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2123 text_class: "tizen";
2126 description { state: "visible" 0.0;
2128 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2129 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2130 color: CHECK_DELETE_TEXT_DELETE_NORMAL_COLOR_INC;
2132 font: "Tizen:style=Medium";
2133 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2136 text_class: "tizen";
2139 description { state: "visible_pressed" 0.0;
2140 inherit: "visible" 0.0;
2141 color: CHECK_DELETE_TEXT_DELETE_PRESS_COLOR_INC;
2144 part { name: "elm.swallow.content";
2146 description { state: "default" 0.0;
2149 color: 255 255 255 255;
2162 description { state: "visible" 0.0;
2163 inherit: "default" 0.0;
2167 aspect_preference: VERTICAL;
2169 description { state: "disabled" 0.0;
2170 inherit: "default" 0.0;
2171 color: 128 128 128 128;
2173 description { state: "disabled_visible" 0.0;
2174 inherit: "default" 0.0;
2175 color: 128 128 128 128;
2181 part { name: "elm.text";
2185 description { state: "default" 0.0;
2191 to_x: "elm.swallow.content";
2197 color: 255 255 255 255;
2200 style: "check_label_textblock_style";
2203 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2205 description { state: "visible" 0.0;
2206 inherit: "default" 0.0;
2210 description { state: "disabled" 0.0;
2211 inherit: "default" 0.0;
2213 description { state: "disabled_visible" 0.0;
2214 inherit: "default" 0.0;
2217 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2220 part { name: "events1";
2222 ignore_flags: ON_HOLD;
2223 description { state: "default" 0.0;
2226 rel2.to_x: "elm.text";
2229 description { state: "visible" 0.0;
2231 rel1.to: "bg_expand";
2232 rel2.to_x: "elm.text";
2236 part { name: "events2";
2239 description { state: "default" 0.0;
2242 rel2.to_x: "elm.text";
2245 description { state: "visible" 0.0;
2247 rel1.to: "bg_expand";
2248 rel2.to_x: "elm.text";
2252 part { name: "disabler";
2254 description { state: "default" 0.0;
2255 rel2.to_x: "elm.text";
2259 description { state: "disabled" 0.0;
2260 inherit: "default" 0.0;
2266 program { name: "click";
2267 signal: "mouse,clicked,1";
2272 get_state(PART:"check", st, 30, vl);
2273 if (!strcmp(st, "visible_pressed"))
2274 set_state(PART:"check", "visible", 0.0);
2278 program { name: "toggle";
2279 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2280 after: "touch_sound";
2282 program { name: "touch_sound";
2283 action: PLAY_SAMPLE "touch_sound" 1.0;
2285 program { name: "unfocused";
2286 signal: "elm,action,unfocus";
2291 get_state(PART:"bg2", st, 30, vl);
2292 if (!strcmp(st, "on"))
2293 emit("elm,action,check,toggle", "");
2296 program { name: "click_down";
2297 signal: "mouse,down,1";
2302 get_state(PART:"check", st, 30, vl);
2303 if (!strcmp(st, "visible"))
2305 set_state(PART:"bg_expand", "clicked", 0.0);
2306 set_state(PART:"check", "visible_pressed", 0.0);
2310 set_state(PART:"bg2", "clicked", 0.0);
2311 set_state(PART:"bg1", "clicked", 0.0);
2315 program { name: "check_normal";
2316 signal: "mouse,up,1";
2321 get_state(PART:"check", st, 30, vl);
2322 if (!strcmp(st, "visible_pressed"))
2324 set_state(PART:"bg_expand", "on", 0.0);
2325 set_state(PART:"check", "visible", 0.0);
2327 get_state(PART:"bg_expand", st, 30, vl);
2328 if (!strcmp(st, "default"))
2330 set_state(PART:"bg2", "default", 0.0);
2331 set_state(PART:"bg1", "default", 0.0);
2335 program { name: "check_on";
2336 signal: "elm,state,check,on";
2338 action: STATE_SET "on" 0.0;
2340 after: "start_expand";
2342 program { name: "start_expand";
2343 action: STATE_SET "intermediate" 0.0;
2346 target: "bg_expand";
2349 program { name: "expand";
2350 action: STATE_SET "on" 0.0;
2351 target: "bg_expand";
2354 transition: ACCELERATE 0.1;
2355 after: "check_visible";
2357 program { name: "check_visible";
2358 action: STATE_SET "visible" 0.0;
2363 program { name: "check_off";
2364 signal: "elm,state,check,off";
2366 action: STATE_SET "default" 0.0;
2370 program { name: "contract";
2371 action: STATE_SET "intermediate" 0.0;
2372 target: "bg_expand";
2373 transition: ACCELERATE 0.1;
2376 program { name: "normal_bg";
2378 if (get_int(button_state) !=1)
2380 set_state(PART:"bg2", "default", 0.0);
2381 set_state(PART:"bg1", "default", 0.0);
2385 set_state(PART:"bg2", "disabled", 0.0);
2386 set_state(PART:"bg1", "disabled", 0.0);
2389 after: "bg_default";
2391 program { name: "bg_default";
2392 action: STATE_SET "default" 0.0;
2393 target: "bg_expand";
2398 program { name: "text_show";
2399 signal: "elm,state,text,visible";
2401 action: STATE_SET "visible" 0.0;
2404 program { name: "text_hide";
2405 signal: "elm,state,text,hidden";
2407 action: STATE_SET "default" 0.0;
2410 program { name: "icon_show";
2411 signal: "elm,state,icon,visible";
2413 action: STATE_SET "visible" 0.0;
2414 target: "elm.swallow.content";
2416 program { name: "icon_hide";
2417 signal: "elm,state,icon,hidden";
2419 action: STATE_SET "default" 0.0;
2420 target: "elm.swallow.content";
2422 program { name: "disable";
2423 signal: "elm,state,disabled";
2425 action: STATE_SET "disabled" 0.0;
2429 after: "disable_text";
2431 program { name: "disable_text";
2435 get_state(PART:"elm.text", st, 30, vl);
2436 if (!strcmp(st, "visible"))
2437 set_state(PART:"elm.text", "disabled_visible", 0.0);
2439 set_state(PART:"elm.text", "disabled", 0.0);
2440 get_state(PART:"elm.swallow.content", st, 30, vl);
2441 if (!strcmp(st, "visible"))
2442 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2444 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2445 set_int(button_state, 1);
2448 program { name: "enable";
2449 signal: "elm,state,enabled";
2451 action: STATE_SET "default" 0.0;
2455 after: "enable_text";
2457 program { name: "enable_text";
2461 get_state(PART:"elm.text", st, 30, vl);
2462 if (!strcmp(st, "disabled_visible"))
2463 set_state(PART:"elm.text", "visible", 0.0);
2465 set_state(PART:"elm.text", "default", 0.0);
2466 get_state(PART:"elm.swallow.content", st, 30, vl);
2467 if (!strcmp(st, "visible"))
2468 set_state(PART:"elm.swallow.content", "visible", 0.0);
2470 set_state(PART:"elm.swallow.content", "default", 0.0);
2471 set_int(button_state, 0);
2477 ////////////////////////////////////////////////////////////////////////////////
2479 group { name: "elm/check/base/grid";
2480 images.image: "00_grid_select_check.png" COMP;
2481 images.image: "00_grid_select_check_bg.png" COMP;
2482 images.image: "00_grid_select_check_bg_press.png" COMP;
2484 public check_state = CHECK_STATE_DEFAULT;
2485 public check_visible = CHECK_HIDE;
2491 description { state: "default" 0.0;
2495 part { name: "top_right_padding";
2499 description { state: "default" 0.0;
2501 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
2514 part { name: "selected_bg";
2517 description { state: "default" 0.0;
2522 description { state: "visible" 0.0;
2523 inherit: "default" 0.0;
2525 color: GENGRID_EDIT_MODE_CHECK_BG_COLOR_INC;
2531 description { state: "default" 0.0;
2532 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
2537 to: "top_right_padding";
2541 to: "top_right_padding";
2543 image.normal: "00_grid_select_check_bg.png";
2545 description { state: "visible" 0.0;
2546 inherit: "default" 0.0;
2547 image.normal: "00_grid_select_check_bg_press.png";
2549 description { state: "disabled" 0.0;
2550 inherit: "default" 0.0;
2553 part { name: "check";
2555 clip_to: "sequence_clip";
2557 description { state: "default" 0.0;
2561 image.normal: "00_grid_select_check.png";
2562 color: 255 255 255 0;
2564 description { state: "visible" 0.0;
2565 inherit: "default" 0.0;
2567 color: 255 255 255 255;
2569 description { state: "pressed" 0.0;
2570 inherit: "visible" 0.0;
2572 description { state: "disabled_visible" 0.0;
2573 inherit: "default" 0.0;
2577 part { name: "sequence_clip";
2580 description { state: "default" 0.0;
2583 rel2.relative: 0.0 1.0;
2584 color: 255 255 255 255;
2586 description { state: "visible" 0.0;
2587 inherit: "default" 0.0;
2588 rel2.relative: 1.0 1.0;
2591 part { name: "elm.swallow.content";
2594 state: "default" 0.0;
2597 color: 255 255 255 255;
2610 description { state: "visible" 0.0;
2611 inherit: "default" 0.0;
2615 aspect_preference: VERTICAL;
2617 description { state: "disabled" 0.0;
2618 inherit: "default" 0.0;
2619 color: 128 128 128 128;
2621 description { state: "disabled_visible" 0.0;
2622 inherit: "default" 0.0;
2623 color: 128 128 128 128;
2629 part { name: "elm.text";
2633 description { state: "default" 0.0;
2639 to_x: "elm.swallow.content";
2645 color: 255 255 255 255;
2648 style: "check_label_textblock_style";
2651 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2653 description { state: "visible" 0.0;
2654 inherit: "default" 0.0;
2658 description { state: "disabled" 0.0;
2659 inherit: "default" 0.0;
2661 description { state: "disabled_visible" 0.0;
2662 inherit: "default" 0.0;
2665 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2668 part { name: "events";
2670 ignore_flags: ON_HOLD;
2671 description { state: "default" 0.0;
2675 part { name: "disabler";
2677 description { state: "default" 0.0;
2681 description { state: "disabled" 0.0;
2682 inherit: "default" 0.0;
2688 program { name: "show";
2691 set_int(check_visible, CHECK_SHOW);
2694 program { name: "hide";
2697 set_int(check_visible, CHECK_HIDE);
2700 program { name: "click";
2701 signal: "mouse,clicked,1";
2703 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2704 after: "touch_sound";
2706 program { name: "touch_sound";
2707 action: PLAY_SAMPLE "touch_sound" 1.0;
2710 program { name: "bg_normal";
2712 set_state(PART:"bg2", "default", 0.0);
2715 program { name: "pressed";
2716 signal: "mouse,down,1";
2721 get_state(PART:"check", st, 30, vl);
2722 if (!strcmp(st, "visible"))
2724 set_state(PART:"check", "pressed", 0.0);
2725 set_state(PART:"bg2", "visible", 0.0);
2729 program { name: "mouse,out";
2730 signal: "mouse,out";
2733 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2735 set_state(PART:"check", "visible", 0.0);
2736 set_state(PART:"sequence_clip", "visible", 0.0);
2737 set_state(PART:"bg2", "visible", 0.0);
2741 set_state(PART:"check", "default", 0.0);
2742 set_state(PART:"sequence_clip", "default", 0.0);
2743 set_state(PART:"bg2", "default", 0.0);
2747 program { name: "check_on";
2748 signal: "elm,state,check,on";
2751 set_int(check_state, CHECK_STATE_VISIBLE);
2752 if (get_int(check_visible) == CHECK_SHOW)
2754 run_program(PROGRAM:"check_show_effect");
2755 run_program(PROGRAM:"check_draw_effect");
2759 set_state(PART:"check", "visible", 0.0);
2760 set_state(PART:"sequence_clip", "visible", 0.0);
2762 set_state(PART:"bg2", "visible", 0.0);
2763 set_state(PART:"selected_bg", "visible", 0.0);
2766 program { name: "check_off";
2767 signal: "elm,state,check,off";
2769 action: STATE_SET "default" 0.0;
2772 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2774 set_int(check_state, CHECK_STATE_DEFAULT);
2775 set_state(PART:"check", "default", 0.0);
2776 set_state(PART:"sequence_clip", "default", 0.0);
2778 set_state(PART:"bg2", "default", 0.0);
2779 set_state(PART:"selected_bg", "default", 0.0);
2782 program { name: "check_show_effect";
2783 action: STATE_SET "visible" 0.0;
2784 transition: LINEAR 0.233;
2787 program { name: "check_draw_effect";
2788 action: STATE_SET "visible" 0.0;
2789 transition: LINEAR 0.267;
2790 target: "sequence_clip";
2792 program { name: "text_show";
2793 signal: "elm,state,text,visible";
2795 action: STATE_SET "visible" 0.0;
2798 program { name: "text_hide";
2799 signal: "elm,state,text,hidden";
2801 action: STATE_SET "default" 0.0;
2804 program { name: "icon_show";
2805 signal: "elm,state,icon,visible";
2807 action: STATE_SET "visible" 0.0;
2808 target: "elm.swallow.content";
2810 program { name: "icon_hide";
2811 signal: "elm,state,icon,hidden";
2813 action: STATE_SET "default" 0.0;
2814 target: "elm.swallow.content";
2816 program { name: "disable";
2817 signal: "elm,state,disabled";
2819 action: STATE_SET "disabled" 0.0;
2822 after: "disable_text";
2824 program { name: "disable_text";
2828 get_state(PART:"elm.text", st, 30, vl);
2829 if (!strcmp(st, "visible"))
2830 set_state(PART:"elm.text", "disabled_visible", 0.0);
2832 set_state(PART:"elm.text", "disabled", 0.0);
2833 get_state(PART:"elm.swallow.content", st, 30, vl);
2834 if (!strcmp(st, "visible"))
2835 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2837 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2838 get_state(PART:"check", st, 30, vl);
2839 if (!strcmp(st, "visible"))
2841 set_state(PART:"check", "disabled_visible", 0.0);
2842 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2846 program { name: "enable";
2847 signal: "elm,state,enabled";
2849 action: STATE_SET "default" 0.0;
2852 after: "enable_text";
2854 program { name: "enable_text";
2858 get_state(PART:"elm.text", st, 30, vl);
2859 if (!strcmp(st, "disabled_visible"))
2860 set_state(PART:"elm.text", "visible", 0.0);
2862 set_state(PART:"elm.text", "default", 0.0);
2863 get_state(PART:"elm.swallow.content", st, 30, vl);
2864 if (!strcmp(st, "visible"))
2865 set_state(PART:"elm.swallow.content", "visible", 0.0);
2867 set_state(PART:"elm.swallow.content", "default", 0.0);
2868 get_state(PART:"check", st, 30, vl);
2869 if (!strcmp(st, "disabled_visible"))
2871 set_state(PART:"check", "visible", 0.0);
2872 set_state(PART:"sequence_clip", "visible", 0.0);
2873 set_int(check_state, CHECK_STATE_VISIBLE);
2876 set_int(check_state, CHECK_STATE_DEFAULT);
2882 #undef CHECK_STATE_DEFAULT
2883 #undef CHECK_STATE_VISIBLE
2884 #undef CHECK_STATE_DISABLED_VISIBLE
2885 #undef CHECK_STATE_DISABLED