3 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an AS IS BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 #define CHECK_STATE_DEFAULT 0
21 #define CHECK_STATE_VISIBLE 1
22 #define CHECK_STATE_DISABLED_VISIBLE 2
23 #define CHECK_STATE_DISABLED 3
27 ////////////////////////////////////////////////////////////////////////////////
28 #define CHECK_STYLE_DEFAULT(style_name, min_width, min_height) \
29 group { name: "elm/check/base/"style_name; \
31 image: "00_check_bg.png" COMP; \
32 image: "00_check_dim_bg.png" COMP; \
33 image: "00_check_dim.png" COMP; \
34 image: "00_check_Activated.png" COMP; \
37 public check_state = CHECK_STATE_DEFAULT; \
38 public check_visible = CHECK_HIDE; \
41 part { name: "back_bg"; \
44 description { state: "default" 0.0; \
45 rel2.relative: 0.0 1.0; \
47 min: min_width min_height; \
55 description { state: "default" 0.0; \
56 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
57 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
61 image.normal: "00_check_bg.png"; \
64 description { state: "visible" 0.0; \
65 inherit: "default" 0.0; \
67 description { state: "disabled" 0.0; \
68 inherit: "default" 0.0; \
69 image.normal: "00_check_dim_bg.png"; \
72 part { name: "check"; \
73 clip_to: "sequence_clip"; \
76 description { state: "default" 0.0; \
80 image.normal: "00_check_Activated.png"; \
81 color: 255 255 255 0; \
83 description { state: "visible" 0.0; \
84 inherit: "default" 0.0; \
86 color: 255 255 255 255; \
88 description { state: "disabled_visible" 0.0; \
89 inherit: "default" 0.0; \
91 image.normal: "00_check_dim.png"; \
92 color: 255 255 255 255; \
95 part { name: "sequence_clip"; \
98 description { state: "default" 0.0; \
99 rel2.relative: 0.0 1.0; \
100 color: 255 255 255 255; \
102 description { state: "visible" 0.0; \
103 inherit: "default" 0.0; \
104 rel2.relative: 1.0 1.0; \
107 part { name: "elm.swallow.content"; \
109 clip_to: "disclip"; \
110 description { state: "default" 0.0; \
125 description { state: "visible" 0.0; \
126 inherit: "default" 0.0; \
130 aspect_preference: VERTICAL; \
132 description { state: "disabled" 0.0; \
133 inherit: "default" 0.0; \
135 description { state: "disabled_visible" 0.0; \
136 inherit: "default" 0.0; \
142 part { name: "elm.text"; \
145 clip_to: "disclip"; \
147 description { state: "default" 0.0; \
153 to_x: "elm.swallow.content"; \
161 style: "check_label_textblock_style"; \
164 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
166 description { state: "visible" 0.0; \
167 inherit: "default" 0.0; \
171 description { state: "disabled" 0.0; \
172 inherit: "default" 0.0; \
174 description { state: "disabled_visible" 0.0; \
175 inherit: "default" 0.0; \
178 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
181 part { name: "events1"; \
183 ignore_flags: ON_HOLD; \
184 description { state: "default" 0.0; \
188 part { name: "events2"; \
191 description { state: "default" 0.0; \
195 part { name: "disclip"; \
198 description { state: "default" 0.0; \
199 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
201 description { state: "disabled" 0.0; \
202 inherit: "default" 0.0; \
203 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
206 part { name: "disabler"; \
208 description { state: "default" 0.0; \
212 description { state: "disabled" 0.0; \
213 inherit: "default" 0.0; \
219 program { name: "show"; \
222 set_int(check_visible, CHECK_SHOW); \
225 program { name: "hide"; \
228 set_int(check_visible, CHECK_HIDE); \
231 program { name: "click"; \
232 signal: "mouse,clicked,1"; \
234 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
235 after: "touch_sound"; \
237 program { name: "touch_sound"; \
238 action: PLAY_SAMPLE "touch_sound" 1.0; \
240 program { name: "mouse,out"; \
241 signal: "mouse,out"; \
244 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
246 set_state(PART:"check", "visible", 0.0); \
247 set_state(PART:"sequence_clip", "visible", 0.0); \
251 set_state(PART:"check", "default", 0.0); \
252 set_state(PART:"sequence_clip", "default", 0.0); \
256 program { name: "check_on"; \
257 signal: "elm,state,check,on"; \
260 set_int(check_state, CHECK_STATE_VISIBLE); \
261 if (get_int(check_visible) == CHECK_SHOW) \
263 run_program(PROGRAM:"check_show_effect"); \
264 run_program(PROGRAM:"check_draw_effect"); \
268 set_state(PART:"check", "visible", 0.0); \
269 set_state(PART:"sequence_clip", "visible", 0.0); \
273 program { name: "check_off"; \
274 signal: "elm,state,check,off"; \
276 action: STATE_SET "default" 0.0; \
279 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
281 set_int(check_state, CHECK_STATE_DEFAULT); \
282 set_state(PART:"check", "default", 0.0); \
283 set_state(PART:"sequence_clip", "default", 0.0); \
287 program { name: "check_show_effect"; \
288 action: STATE_SET "visible" 0.0; \
289 transition: LINEAR 0.233; \
292 program { name: "check_draw_effect"; \
293 action: STATE_SET "visible" 0.0; \
294 transition: LINEAR 0.267; \
295 target: "sequence_clip"; \
297 program { name: "text_show"; \
298 signal: "elm,state,text,visible"; \
300 action: STATE_SET "visible" 0.0; \
301 target: "elm.text"; \
303 program { name: "text_hide"; \
304 signal: "elm,state,text,hidden"; \
306 action: STATE_SET "default" 0.0; \
307 target: "elm.text"; \
309 program { name: "icon_show"; \
310 signal: "elm,state,icon,visible"; \
312 action: STATE_SET "visible" 0.0; \
313 target: "elm.swallow.content"; \
315 program { name: "icon_hide"; \
316 signal: "elm,state,icon,hidden"; \
318 action: STATE_SET "default" 0.0; \
319 target: "elm.swallow.content"; \
321 program { name: "disable"; \
322 signal: "elm,state,disabled"; \
324 action: STATE_SET "disabled" 0.0; \
325 target: "disabler"; \
328 after: "disable_text"; \
330 program { name: "disable_text"; \
334 get_state(PART:"elm.text", st, 30, vl); \
335 if (!strcmp(st, "visible")) \
336 set_state(PART:"elm.text", "disabled_visible", 0.0); \
338 set_state(PART:"elm.text", "disabled", 0.0); \
339 get_state(PART:"elm.swallow.content", st, 30, vl); \
340 if (!strcmp(st, "visible")) \
341 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
343 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
344 get_state(PART:"check", st, 30, vl); \
345 if (!strcmp(st, "visible")) \
347 set_state(PART:"check", "disabled_visible", 0.0); \
348 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
352 program { name: "enable"; \
353 signal: "elm,state,enabled"; \
355 action: STATE_SET "default" 0.0; \
356 target: "disabler"; \
359 after: "enable_text"; \
361 program { name: "enable_text"; \
365 get_state(PART:"elm.text", st, 30, vl); \
366 if (!strcmp(st, "disabled_visible")) \
367 set_state(PART:"elm.text", "visible", 0.0); \
369 set_state(PART:"elm.text", "default", 0.0); \
370 get_state(PART:"elm.swallow.content", st, 30, vl); \
371 if (!strcmp(st, "visible")) \
372 set_state(PART:"elm.swallow.content", "visible", 0.0); \
374 set_state(PART:"elm.swallow.content", "default", 0.0); \
375 get_state(PART:"check", st, 30, vl); \
376 if (!strcmp(st, "disabled_visible")) \
378 set_state(PART:"check", "visible", 0.0); \
379 set_state(PART:"sequence_clip", "visible", 0.0); \
380 set_int(check_state, CHECK_STATE_VISIBLE); \
383 set_int(check_state, CHECK_STATE_DEFAULT); \
388 ////////////////////////////////////////////////////////////////////////////////
389 CHECK_STYLE_DEFAULT("default", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
390 ////////////////////////////////////////////////////////////////////////////////
391 CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
392 ////////////////////////////////////////////////////////////////////////////////
394 #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \
395 group { name: "elm/check/base/"style_name; \
397 image: "00_check_bg.png" COMP; \
398 image: "00_check_dim_bg.png" COMP; \
399 image: "00_check_dim.png" COMP; \
400 image: "00_check_Activated.png" COMP; \
403 public check_state = CHECK_STATE_DEFAULT; \
406 part { name: "back_bg"; \
409 description { state: "default" 0.0; \
410 min: min_width min_height; \
418 description { state: "default" 0.0; \
419 min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
420 max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
422 rel1.to: "back_bg"; \
423 rel2.to: "back_bg"; \
424 image.normal: "00_check_bg.png"; \
427 description { state: "disabled" 0.0; \
428 inherit: "default" 0.0; \
429 image.normal: "00_check_dim_bg.png"; \
432 part { name: "check"; \
435 description { state: "default" 0.0; \
439 image.normal: "00_check_Activated.png"; \
441 description { state: "visible" 0.0; \
442 inherit: "default" 0.0; \
445 description { state: "disabled_visible" 0.0; \
446 inherit: "default" 0.0; \
448 image.normal: "00_check_dim.png"; \
451 part { name: "elm.swallow.content"; \
453 clip_to: "disclip"; \
454 description { state: "default" 0.0; \
469 description { state: "visible" 0.0; \
470 inherit: "default" 0.0; \
474 aspect_preference: VERTICAL; \
476 description { state: "disabled" 0.0; \
477 inherit: "default" 0.0; \
479 description { state: "disabled_visible" 0.0; \
480 inherit: "default" 0.0; \
486 part { name: "elm.text"; \
489 clip_to: "disclip"; \
491 description { state: "default" 0.0; \
497 to_x: "elm.swallow.content"; \
505 style: "check_label_textblock_style"; \
508 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
510 description { state: "visible" 0.0; \
511 inherit: "default" 0.0; \
515 description { state: "disabled" 0.0; \
516 inherit: "default" 0.0; \
518 description { state: "disabled_visible" 0.0; \
519 inherit: "default" 0.0; \
522 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
525 part { name: "events1"; \
527 ignore_flags: ON_HOLD; \
528 description { state: "default" 0.0; \
532 part { name: "events2"; \
535 description { state: "default" 0.0; \
539 part { name: "disclip"; \
542 description { state: "default" 0.0; \
543 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
545 description { state: "disabled" 0.0; \
546 inherit: "default" 0.0; \
547 color: CHECK_DISCLIP_DISABLED_COLOR_INC; \
550 part { name: "disabler"; \
552 description { state: "default" 0.0; \
556 description { state: "disabled" 0.0; \
557 inherit: "default" 0.0; \
563 program { name: "click"; \
564 signal: "mouse,clicked,1"; \
566 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
567 after: "touch_sound"; \
569 program { name: "touch_sound"; \
570 action: PLAY_SAMPLE "touch_sound" 1.0; \
572 program { name: "check_on"; \
573 signal: "elm,state,check,on"; \
576 set_int(check_state, CHECK_STATE_VISIBLE); \
577 set_state(PART:"check", "visible", 0.0); \
580 program { name: "check_off"; \
581 signal: "elm,state,check,off"; \
583 action: STATE_SET "default" 0.0; \
586 if (get_int(check_state) == CHECK_STATE_VISIBLE) \
588 set_int(check_state, CHECK_STATE_DEFAULT); \
589 set_state(PART:"check", "default", 0.0); \
593 program { name: "text_show"; \
594 signal: "elm,state,text,visible"; \
596 action: STATE_SET "visible" 0.0; \
597 target: "elm.text"; \
599 program { name: "text_hide"; \
600 signal: "elm,state,text,hidden"; \
602 action: STATE_SET "default" 0.0; \
603 target: "elm.text"; \
605 program { name: "icon_show"; \
606 signal: "elm,state,icon,visible"; \
608 action: STATE_SET "visible" 0.0; \
609 target: "elm.swallow.content"; \
611 program { name: "icon_hide"; \
612 signal: "elm,state,icon,hidden"; \
614 action: STATE_SET "default" 0.0; \
615 target: "elm.swallow.content"; \
617 program { name: "disable"; \
618 signal: "elm,state,disabled"; \
620 action: STATE_SET "disabled" 0.0; \
621 target: "disabler"; \
624 after: "disable_text"; \
626 program { name: "disable_text"; \
630 get_state(PART:"elm.text", st, 30, vl); \
631 if (!strcmp(st, "visible")) \
632 set_state(PART:"elm.text", "disabled_visible", 0.0); \
634 set_state(PART:"elm.text", "disabled", 0.0); \
635 get_state(PART:"elm.swallow.content", st, 30, vl); \
636 if (!strcmp(st, "visible")) \
637 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
639 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
640 get_state(PART:"check", st, 30, vl); \
641 if (!strcmp(st, "visible")) \
643 set_state(PART:"check", "disabled_visible", 0.0); \
644 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
648 program { name: "enable"; \
649 signal: "elm,state,enabled"; \
651 action: STATE_SET "default" 0.0; \
652 target: "disabler"; \
655 after: "enable_text"; \
657 program { name: "enable_text"; \
661 get_state(PART:"elm.text", st, 30, vl); \
662 if (!strcmp(st, "disabled_visible")) \
663 set_state(PART:"elm.text", "visible", 0.0); \
665 set_state(PART:"elm.text", "default", 0.0); \
666 get_state(PART:"elm.swallow.content", st, 30, vl); \
667 if (!strcmp(st, "visible")) \
668 set_state(PART:"elm.swallow.content", "visible", 0.0); \
670 set_state(PART:"elm.swallow.content", "default", 0.0); \
671 get_state(PART:"check", st, 30, vl); \
672 if (!strcmp(st, "disabled_visible")) \
674 set_state(PART:"check", "visible", 0.0); \
675 set_int(check_state, CHECK_STATE_VISIBLE); \
678 set_int(check_state, CHECK_STATE_DEFAULT); \
683 ////////////////////////////////////////////////////////////////////////////////
684 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)
685 ////////////////////////////////////////////////////////////////////////////////
687 style { name: "check_label_textblock_style";
688 base: "font=Tizen:style=Roman font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color=#ffffff wrap=char text_class=tizen";
691 tag: "hilight" "+ font=Tizen:style=Bold";
692 tag: "b" "+ font=Tizen:style=Bold";
693 tag: "whitecolor" "+ color=#ffffff";
698 group { name: "elm/check/base/multicheck";
700 image: "00_check_bg.png" COMP;
701 image: "00_check_bg_press.png" COMP;
702 image: "multicheck_0001.png" COMP;
703 image: "multicheck_0002.png" COMP;
704 image: "multicheck_0003.png" COMP;
705 image: "multicheck_0004.png" COMP;
706 image: "multicheck_0005.png" COMP;
707 image: "multicheck_0006.png" COMP;
708 image: "00_check_checking.png" COMP;
711 public check_state = 0; //0:default, 1: visible, 2: disabled_visible
717 description { state: "default" 0.0;
718 rel2.relative: 0.0 1.0;
723 aspect_preference: VERTICAL;
724 image.normal: "00_check_bg.png";
727 description { state: "pressed" 0.0;
728 inherit: "default" 0.0;
729 image.normal: "00_check_bg_press.png";
732 description { state: "disabled" 0.0;
733 inherit: "default" 0.0;
736 part { name: "check";
740 description { state: "default" 0.0;
745 description { state: "visible_1" 0.0;
746 inherit: "default" 0.0;
748 image.normal: "multicheck_0001.png";
750 description { state: "visible_2" 0.0;
751 inherit: "default" 0.0;
753 image.normal: "multicheck_0002.png";
755 description { state: "visible_3" 0.0;
756 inherit: "default" 0.0;
758 image.normal: "multicheck_0003.png";
760 description { state: "visible_4" 0.0;
761 inherit: "default" 0.0;
763 image.normal: "multicheck_0004.png";
765 description { state: "visible_5" 0.0;
766 inherit: "default" 0.0;
768 image.normal: "multicheck_0005.png";
770 description { state: "visible" 0.0;
771 inherit: "default" 0.0;
773 image.normal: "multicheck_0006.png";
775 description { state: "pressed" 0.0;
776 inherit: "default" 0.0;
778 image.normal: "multicheck_0006.png";
780 description { state: "disabled_visible" 0.0;
781 inherit: "default" 0.0;
782 image.normal: "00_check_checking.png";
786 part { name: "elm.swallow.content";
789 description { state: "default" 0.0;
792 color: 255 255 255 255;
805 description { state: "visible" 0.0;
806 inherit: "default" 0.0;
810 aspect_preference: VERTICAL;
812 description { state: "disabled" 0.0;
813 inherit: "default" 0.0;
814 color: 128 128 128 128;
816 description { state: "disabled_visible" 0.0;
817 inherit: "default" 0.0;
818 color: 128 128 128 128;
824 part { name: "elm.text";
829 description { state: "default" 0.0;
835 to_x: "elm.swallow.content";
843 style: "check_label_textblock_style";
846 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
848 description { state: "visible" 0.0;
849 inherit: "default" 0.0;
853 description { state: "disabled" 0.0;
854 inherit: "default" 0.0;
856 description { state: "disabled_visible" 0.0;
857 inherit: "default" 0.0;
860 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
863 part { name: "events1";
865 ignore_flags: ON_HOLD;
866 description { state: "default" 0.0;
870 part { name: "disclip";
873 description { state: "default" 0.0;
874 color: 255 255 255 255;
876 description { state: "disabled" 0.0;
877 inherit: "default" 0.0;
878 color: 255 255 255 102;
881 part { name: "events2";
884 description { state: "default" 0.0;
888 part { name: "disabler";
890 description { state: "default" 0.0;
894 description { state: "disabled" 0.0;
895 inherit: "default" 0.0;
901 program { name: "click";
902 signal: "mouse,clicked,1";
904 action: SIGNAL_EMIT "elm,action,check,toggle" "";
905 after: "touch_sound";
907 program { name: "touch_sound";
908 action: PLAY_SAMPLE "touch_sound" 1.0;
910 program { name: "bg_normal";
911 signal: "mouse,up,1";
916 get_state(PART:"check", st, 30, vl);
917 if (!strcmp(st, "pressed"))
918 set_state(PART:"check", "visible", 0.0);
919 set_state(PART:"bg", "default", 0.0);
922 program { name: "pressed";
923 signal: "mouse,down,1";
928 get_state(PART:"check", st, 30, vl);
929 if (!strcmp(st, "default"))
930 set_state(PART:"check", "pressed", 0.0);
932 set_state(PART:"check", "default", 0.0);
933 set_state(PART:"bg", "pressed", 0.0);
936 program { name: "mouse,out";
940 if (get_int(check_state) == 1)
941 set_state(PART:"check", "visible", 0.0);
943 set_state(PART:"check", "default", 0.0);
946 program { name: "check_on";
947 signal: "elm,state,check,on";
950 set_int(check_state, 1);
954 program { name: "check_on_1";
957 if (get_int(check_state) == 1)
958 set_state(PART:"check", "visible_1", 0.0);
962 program { name: "check_on_2";
965 if (get_int(check_state) == 1)
966 set_state(PART:"check", "visible_2", 0.0);
970 program { name: "check_on_3";
973 if (get_int(check_state) == 1)
974 set_state(PART:"check", "visible_3", 0.0);
978 program { name: "check_on_4";
981 if (get_int(check_state) == 1)
982 set_state(PART:"check", "visible_4", 0.0);
986 program { name: "check_on_5";
989 if (get_int(check_state) == 1)
990 set_state(PART:"check", "visible_5", 0.0);
994 program { name: "check_on_6";
997 if (get_int(check_state) == 1)
998 set_state(PART:"check", "visible", 0.0);
1001 program { name: "check_off";
1002 signal: "elm,state,check,off";
1004 action: STATE_SET "default" 0.0;
1007 if (get_int(check_state) == 1)
1009 set_int(check_state, 0);
1010 set_state(PART:"check", "default", 0.0);
1014 program { name: "text_show";
1015 signal: "elm,state,text,visible";
1017 action: STATE_SET "visible" 0.0;
1020 program { name: "text_hide";
1021 signal: "elm,state,text,hidden";
1023 action: STATE_SET "default" 0.0;
1026 program { name: "icon_show";
1027 signal: "elm,state,icon,visible";
1029 action: STATE_SET "visible" 0.0;
1030 target: "elm.swallow.content";
1032 program { name: "icon_hide";
1033 signal: "elm,state,icon,hidden";
1035 action: STATE_SET "default" 0.0;
1036 target: "elm.swallow.content";
1038 program { name: "disable";
1039 signal: "elm,state,disabled";
1041 action: STATE_SET "disabled" 0.0;
1045 after: "disable_text";
1047 program { name: "disable_text";
1051 get_state(PART:"elm.text", st, 30, vl);
1052 if (!strcmp(st, "visible"))
1053 set_state(PART:"elm.text", "disabled_visible", 0.0);
1055 set_state(PART:"elm.text", "disabled", 0.0);
1056 get_state(PART:"elm.swallow.content", st, 30, vl);
1057 if (!strcmp(st, "visible"))
1058 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1060 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1061 get_state(PART:"check", st, 30, vl);
1062 if (!strcmp(st, "visible"))
1063 set_state(PART:"check", "disabled_visible", 0.0);
1064 set_int(check_state, 2);
1067 program { name: "enable";
1068 signal: "elm,state,enabled";
1070 action: STATE_SET "default" 0.0;
1074 after: "enable_text";
1076 program { name: "enable_text";
1080 get_state(PART:"elm.text", st, 30, vl);
1081 if (!strcmp(st, "disabled_visible"))
1082 set_state(PART:"elm.text", "visible", 0.0);
1084 set_state(PART:"elm.text", "default", 0.0);
1085 get_state(PART:"elm.swallow.content", st, 30, vl);
1086 if (!strcmp(st, "visible"))
1087 set_state(PART:"elm.swallow.content", "visible", 0.0);
1089 set_state(PART:"elm.swallow.content", "default", 0.0);
1090 get_state(PART:"check", st, 30, vl);
1091 if (!strcmp(st, "disabled_visible"))
1093 set_state(PART:"check", "visible", 0.0);
1094 set_int(check_state, 1);
1097 set_int(check_state, 0);
1103 //////////////////////////////////////////////////////////////////////////////
1104 group { name: "elm/check/base/on&off";
1106 image: "00_button_on.png" COMP;
1107 image: "00_button_on_dim.png" COMP;
1108 image: "00_button_off.png" COMP;
1109 image: "00_button_off_dim.png" COMP;
1110 image: "00_button_on_off_handler.png" COMP;
1111 image: "00_button_on_off_handler_dim.png" COMP;
1116 public was_drag = 0;
1117 public check_on = 0;
1124 description { state: "default" 0.0;
1125 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1126 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
1127 rel2.relative: 0.0 1.0;
1133 part { name: "padding_left";
1137 description { state: "default" 0.0;
1139 rel1{ relative: 0.0 0.0; to: "bg"; }
1140 rel2{ relative: 0.0 1.0; to: "bg"; }
1146 part { name: "padding_right";
1150 description { state: "default" 0.0;
1165 part { name: "padding_top";
1169 description { state: "default" 0.0;
1181 part { name: "padding_bottom";
1185 description { state: "default" 0.0;
1200 part { name: "bg_image";
1203 description { state: "default" 0.0;
1208 to_y: "padding_top";
1213 to_y: "padding_bottom";
1215 image.normal: "00_button_off.png";
1217 description { state: "visible" 0.0;
1218 inherit: "default" 0.0;
1219 image.normal: "00_button_on.png";
1221 description { state: "pressed" 0.0;
1222 inherit: "default" 0.0;
1223 image.normal: "00_button_off.png";
1225 description { state: "visible_pressed" 0.0;
1226 inherit: "default" 0.0;
1227 image.normal: "00_button_on.png";
1229 description { state: "visible_disable" 0.0;
1230 inherit: "default" 0.0;
1231 image.normal: "00_button_on_dim.png";
1233 description { state: "off_disable" 0.0;
1234 inherit: "default" 0.0;
1235 image.normal: "00_button_off_dim.png";
1238 part { name: "drag_container";
1242 description { state: "default" 0.0;
1245 to_x: "padding_left";
1250 to_x: "padding_right";
1256 part { name: "clipper";
1259 description { state: "default" 0.0;
1262 color: 255 255 255 255;
1265 part { name: "clipper_inner";
1268 description { state: "default" 0.0;
1269 rel1.to: "bg_image";
1270 rel2.to: "bg_image";
1271 color: 255 255 255 255;
1274 part { name: "button";
1281 confine: "drag_container";
1283 description { state: "default" 0.0;
1284 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1285 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
1290 image.normal: "00_button_on_off_handler.png";
1292 description { state: "disabled" 0.0;
1293 inherit: "default" 0.0;
1294 image.normal: "00_button_on_off_handler_dim.png";
1297 part { name: "button_events";
1302 description { state: "default" 0.0;
1308 part { name: "onrect";
1313 description { state: "default" 0.0;
1326 part { name: "offrect";
1331 description { state: "default" 0.0;
1343 part { name: "elm.offtext";
1347 clip_to: "clipper_inner";
1348 description { state: "default" 0.0;
1351 color: 255 255 255 255;
1353 font: "Tizen:style=Medium";
1356 text_class: "tizen";
1359 description { state: "disabled" 0.0;
1360 inherit: "default" 0.0;
1361 color: 128 128 128 128;
1364 part { name: "elm.ontext";
1368 clip_to: "clipper_inner";
1369 description { state: "default" 0.0;
1372 color: 255 255 255 255;
1374 font: "Tizen:style=Medium";
1377 text_class: "tizen";
1380 description { state: "disabled" 0.0;
1381 inherit: "default" 0.0;
1382 color: 128 128 128 128;
1385 part { name: "elm.swallow.content";
1388 description { state: "default" 0.0;
1401 description { state: "visible" 0.0;
1402 inherit: "default" 0.0;
1406 aspect_preference: VERTICAL;
1408 description { state: "disabled" 0.0;
1409 inherit: "default" 0.0;
1411 description { state: "disabled_visible" 0.0;
1412 inherit: "default" 0.0;
1418 part { name: "elm.text";
1423 description { state: "default" 0.0;
1429 to_x: "elm.swallow.content";
1437 style: "check_label_textblock_style";
1440 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1442 description { state: "visible" 0.0;
1443 inherit: "default" 0.0;
1447 description { state: "disabled" 0.0;
1448 inherit: "default" 0.0;
1450 description { state: "disabled_visible" 0.0;
1451 inherit: "default" 0.0;
1456 part { name: "disclip";
1459 description { state: "default" 0.0;
1460 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1462 description { state: "disabled" 0.0;
1463 inherit: "default" 0.0;
1464 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1467 part { name: "disabler";
1469 description { state: "default" 0.0;
1473 description { state: "disabled" 0.0;
1474 inherit: "default" 0.0;
1481 signal: "mouse,clicked,1";
1484 new Float:dx, Float:dy;
1485 get_drag(PART:"button", dx, dy);
1486 if (!get_int(was_drag)) {
1488 set_drag(PART:"button", 0.0, 0.0);
1490 set_drag(PART:"button", 1.0, 0.0);
1491 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1492 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1493 if (get_int(check_on)) {
1494 emit("elm,action,check,off", "");
1495 emit("elm,action,touch,sound", "");
1499 if (!get_int(check_on)) {
1500 emit("elm,action,check,on", "");
1501 emit("elm,action,touch,sound", "");
1507 program { name: "touch_sound";
1508 signal: "elm,action,touch,sound";
1510 action: PLAY_SAMPLE "touch_sound" 1.0;
1516 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1517 set_int(is_drag, 1);
1521 signal: "mouse,down,1";
1524 set_int(was_drag, 0);
1525 set_int(is_drag, 0);
1528 program { name: "drag_end";
1529 signal: "mouse,up,1";
1532 new Float:dx, Float:dy;
1533 get_drag(PART:"button", dx, dy);
1534 if (get_int(is_drag)) {
1536 set_drag(PART:"button", 1.0, 0.0);
1538 set_drag(PART:"button", 0.0, 0.0);
1539 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1540 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1541 if (!get_int(check_on)) {
1542 emit("elm,action,check,on", "");
1543 emit("elm,action,touch,sound", "");
1547 if (get_int(check_on)) {
1548 emit("elm,action,check,off", "");
1549 emit("elm,action,touch,sound", "");
1552 set_int(was_drag, get_int(is_drag));
1553 set_int(is_drag, 0);
1554 emit("elm,action,check,drag,stop", "");
1558 program { name: "check_on";
1559 signal: "elm,state,check,on";
1563 if (get_int(is_rtl) == 0) {
1569 set_drag(PART:"button", drag, 0.0);
1570 set_state(PART:"bg_image", "visible", 0.0);
1571 set_int(check_on, 1);
1574 program { name: "check_off";
1575 signal: "elm,state,check,off";
1579 if (get_int(is_rtl) == 0) {
1585 set_drag(PART:"button", drag, 0.0);
1586 set_state(PART:"bg_image", "default", 0.0);
1587 set_int(check_on, 0);
1590 program { name: "text_show";
1591 signal: "elm,state,text,visible";
1593 action: STATE_SET "visible" 0.0;
1596 program { name: "text_hide";
1597 signal: "elm,state,text,hidden";
1599 action: STATE_SET "default" 0.0;
1602 program { name: "icon_show";
1603 signal: "elm,state,icon,visible";
1605 action: STATE_SET "visible" 0.0;
1606 target: "elm.swallow.content";
1608 program { name: "icon_hide";
1609 signal: "elm,state,icon,hidden";
1611 action: STATE_SET "default" 0.0;
1612 target: "elm.swallow.content";
1614 program { name: "disable";
1615 signal: "elm,state,disabled";
1617 action: STATE_SET "disabled" 0.0;
1618 target: "elm.offtext";
1619 target: "elm.ontext";
1623 after: "disable_text";
1625 program { name: "disable_text";
1629 get_state(PART:"elm.text", st, 30, vl);
1630 if (!strcmp(st, "visible"))
1631 set_state(PART:"elm.text", "disabled_visible", 0.0);
1633 set_state(PART:"elm.text", "disabled", 0.0);
1634 get_state(PART:"bg_image", st, 30, vl);
1635 if (!strcmp(st, "visible"))
1636 set_state(PART:"bg_image", "visible_disable", 0.0);
1638 set_state(PART:"bg_image", "off_disable", 0.0);
1639 get_state(PART:"elm.swallow.content", st, 30, vl);
1640 if (!strcmp(st, "visible"))
1641 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1643 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1644 set_state(PART:"button", "disabled", 0.0);
1647 program { name: "enable";
1648 signal: "elm,state,enabled";
1650 action: STATE_SET "default" 0.0;
1654 after: "enable_text";
1656 program { name: "enable_text";
1660 get_state(PART:"elm.text", st, 30, vl);
1661 if (!strcmp(st, "disabled_visible"))
1662 set_state(PART:"elm.text", "visible", 0.0);
1664 set_state(PART:"elm.text", "default", 0.0);
1665 get_state(PART:"bg_image", st, 30, vl);
1666 if (!strcmp(st, "visible_disable"))
1667 set_state(PART:"bg_image", "visible", 0.0);
1669 set_state(PART:"bg_image", "default", 0.0);
1670 get_state(PART:"elm.swallow.content", st, 30, vl);
1671 if (!strcmp(st, "visible"))
1672 set_state(PART:"elm.swallow.content", "visible", 0.0);
1674 set_state(PART:"elm.swallow.content", "default", 0.0);
1675 set_state(PART:"button", "default", 0.0);
1678 program { name: "to_rtl";
1679 signal: "edje,state,rtl";
1685 program { name: "to_ltr";
1686 signal: "edje,state,ltr";
1694 ///////////////////////////////////////////////////////////////////////////////////////
1696 #define CHECK_STYLE_FAVORITE(style_name, min_width, min_height) \
1697 group { name: "elm/check/base/"style_name; \
1699 image: "00_icon_favorite_on_72x72.png" COMP; \
1700 image: "00_icon_favorite_on_72x72_dim.png" COMP; \
1701 image: "00_icon_favorite_off_72x72.png" COMP; \
1702 image: "00_icon_favorite_off_72x72_dim.png" COMP; \
1705 part { name: "back_bg"; \
1708 description { state: "default" 0.0; \
1710 rel2.relative: 0.0 1.0; \
1712 min: min_width min_height; \
1716 part { name: "bg"; \
1718 clip_to: "disclip"; \
1720 description { state: "default" 0.0; \
1722 rel1.to: "back_bg"; \
1723 rel2.to: "back_bg"; \
1724 min: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1725 max: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1729 part { name: "check"; \
1731 clip_to: "disclip"; \
1733 description { state: "default" 0.0; \
1736 image.normal: "00_icon_favorite_off_72x72.png"; \
1738 description { state: "visible" 0.0; \
1739 inherit: "default" 0.0; \
1740 image.normal: "00_icon_favorite_on_72x72.png"; \
1742 description { state: "disabled" 0.0; \
1743 inherit: "default" 0.0; \
1744 image.normal: "00_icon_favorite_off_72x72_dim.png"; \
1746 description { state: "disabled_visible" 0.0; \
1747 inherit: "default" 0.0; \
1748 image.normal: "00_icon_favorite_on_72x72_dim.png"; \
1751 part { name: "elm.swallow.content"; \
1753 clip_to: "disclip"; \
1754 description { state: "default" 0.0; \
1760 relative: 1.0 0.0; \
1765 relative: 1.0 1.0; \
1769 description { state: "visible" 0.0; \
1770 inherit: "default" 0.0; \
1774 aspect_preference: VERTICAL; \
1776 description { state: "disabled" 0.0; \
1777 inherit: "default" 0.0; \
1779 description { state: "disabled_visible" 0.0; \
1780 inherit: "default" 0.0; \
1786 part { name: "elm.text"; \
1788 clip_to: "disclip"; \
1791 description { state: "default" 0.0; \
1795 relative: 1.0 0.5; \
1797 to_x: "elm.swallow.content"; \
1800 relative: 1.0 0.5; \
1805 style: "check_label_textblock_style"; \
1808 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1810 description { state: "visible" 0.0; \
1811 inherit: "default" 0.0; \
1815 description { state: "disabled" 0.0; \
1816 inherit: "default" 0.0; \
1818 description { state: "disabled_visible" 0.0; \
1819 inherit: "default" 0.0; \
1822 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1825 part { name: "disclip"; \
1828 description { state: "default" 0.0; \
1829 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1832 part { name: "events"; \
1834 ignore_flags: ON_HOLD; \
1835 description { state: "default" 0.0; \
1839 part { name: "disabler"; \
1841 description { state: "default" 0.0; \
1845 description { state: "disabled" 0.0; \
1846 inherit: "default" 0.0; \
1852 program { name: "click"; \
1853 signal: "mouse,clicked,1"; \
1855 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1856 after: "touch_sound"; \
1858 program { name: "touch_sound"; \
1859 action: PLAY_SAMPLE "touch_sound" 1.0; \
1861 program { name: "check_on"; \
1862 signal: "elm,state,check,on"; \
1864 action: STATE_SET "visible" 0.0; \
1867 program { name: "check_off"; \
1868 signal: "elm,state,check,off"; \
1870 action: STATE_SET "default" 0.0; \
1873 program { name: "text_show"; \
1874 signal: "elm,state,text,visible"; \
1876 action: STATE_SET "visible" 0.0; \
1877 target: "elm.text"; \
1879 program { name: "text_hide"; \
1880 signal: "elm,state,text,hidden"; \
1882 action: STATE_SET "default" 0.0; \
1883 target: "elm.text"; \
1885 program { name: "icon_show"; \
1886 signal: "elm,state,icon,visible"; \
1888 action: STATE_SET "visible" 0.0; \
1889 target: "elm.swallow.content"; \
1891 program { name: "icon_hide"; \
1892 signal: "elm,state,icon,hidden"; \
1894 action: STATE_SET "default" 0.0; \
1895 target: "elm.swallow.content"; \
1897 program { name: "disable"; \
1898 signal: "elm,state,disabled"; \
1900 action: STATE_SET "disabled" 0.0; \
1901 target: "disabler"; \
1902 after: "disable_text"; \
1904 program { name: "disable_text"; \
1908 get_state(PART:"elm.text", st, 30, vl); \
1909 if (!strcmp(st, "visible")) \
1910 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1912 set_state(PART:"elm.text", "disabled", 0.0); \
1913 get_state(PART:"elm.swallow.content", st, 30, vl); \
1914 if (!strcmp(st, "visible")) \
1915 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1917 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1918 get_state(PART:"check", st, 30, vl); \
1919 if (!strcmp(st, "visible")) \
1920 set_state(PART:"check", "disabled_visible", 0.0); \
1922 set_state(PART:"check", "disabled", 0.0); \
1925 program { name: "enable"; \
1926 signal: "elm,state,enabled"; \
1928 action: STATE_SET "default" 0.0; \
1929 target: "disabler"; \
1930 after: "enable_text"; \
1932 program { name: "enable_text"; \
1936 get_state(PART:"elm.text", st, 30, vl); \
1937 if (!strcmp(st, "disabled_visible")) \
1938 set_state(PART:"elm.text", "visible", 0.0); \
1940 set_state(PART:"elm.text", "default", 0.0); \
1941 get_state(PART:"elm.swallow.content", st, 30, vl); \
1942 if (!strcmp(st, "visible")) \
1943 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1945 set_state(PART:"elm.swallow.content", "default", 0.0); \
1946 get_state(PART:"check", st, 30, vl); \
1947 if (!strcmp(st, "disabled_visible")) \
1948 set_state(PART:"check", "visible", 0.0); \
1950 set_state(PART:"check", "default", 0.0); \
1955 ////////////////////////////////////////////////////////////////////////////////
1956 CHECK_STYLE_FAVORITE("favorite", CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1957 ////////////////////////////////////////////////////////////////////////////////
1958 CHECK_STYLE_FAVORITE("favorite/extended", CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
1959 ////////////////////////////////////////////////////////////////////////////////
1961 group { name: "elm/check/base/delete";
1963 image: "00_button_minus.png" COMP;
1964 image: "00_button_minus_press.png" COMP;
1965 image: "00_button_edit_Delete.png" COMP;
1966 image: "00_button_edit_Delete_press.png" COMP;
1967 image: "00_button_edit_dim.png" COMP;
1968 image: "00_button_edit_focus.png" COMP;
1971 public button_state = 0; //0:enabled, 1: disabled
1976 description { state: "default" 0.0;
1981 normal: "00_button_edit_Delete.png";
1982 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
1986 description { state: "clicked" 0.0;
1987 inherit: "default" 0.0;
1988 image.normal: "00_button_edit_Delete_press.png";
1990 description { state: "intermediate" 0.0;
1991 inherit: "default" 0.0;
1994 description { state: "on" 0.0;
1995 inherit: "default" 0.0;
1998 description { state: "disabled" 0.0;
1999 inherit: "default" 0.0;
2000 image.normal: "00_button_edit_dim.png";
2002 description { state: "focused" 0.0;
2003 inherit: "default" 0.0;
2004 image.normal: "00_button_edit_focus.png";
2009 description { state: "default" 0.0;
2011 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2012 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2013 rel1.relative: 1.0 0.0;
2015 image.normal: "00_button_minus.png";
2017 description { state: "clicked" 0.0;
2018 inherit: "default" 0.0;
2019 image.normal: "00_button_minus_press.png";
2021 description { state: "intermediate" 0.0;
2022 inherit: "default" 0.0;
2025 description { state: "on" 0.0;
2026 inherit: "default" 0.0;
2029 description { state: "disabled" 0.0;
2030 inherit: "default" 0.0;
2031 image.normal: "00_button_minus.png";
2034 part { name: "clipper";
2038 description { state: "default" 0.0;
2040 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2041 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2042 color: 255 255 255 255;
2044 description { state: "on" 0.0;
2046 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2047 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2048 color: 255 255 255 255;
2051 part { name: "bg_expand";
2055 description { state: "default" 0.0;
2057 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2058 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2060 normal: "00_button_edit_Delete.png";
2061 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
2071 description { state: "clicked" 0.0;
2072 inherit: "default" 0.0;
2074 image.normal: "00_button_edit_Delete_press.png";
2076 description { state: "intermediate" 0.0;
2077 inherit: "default" 0.0;
2087 description { state: "on" 0.0;
2088 inherit: "default" 0.0;
2092 part { name: "check";
2096 description { state: "default" 0.0;
2101 font: "Tizen:style=Medium";
2102 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2105 text_class: "tizen";
2108 description { state: "visible" 0.0;
2110 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2111 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2112 color: CHECK_DELETE_TEXT_DELETE_NORMAL_COLOR_INC;
2114 font: "Tizen:style=Medium";
2115 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2118 text_class: "tizen";
2121 description { state: "visible_pressed" 0.0;
2122 inherit: "visible" 0.0;
2123 color: CHECK_DELETE_TEXT_DELETE_PRESS_COLOR_INC;
2126 part { name: "elm.swallow.content";
2128 description { state: "default" 0.0;
2131 color: 255 255 255 255;
2144 description { state: "visible" 0.0;
2145 inherit: "default" 0.0;
2149 aspect_preference: VERTICAL;
2151 description { state: "disabled" 0.0;
2152 inherit: "default" 0.0;
2153 color: 128 128 128 128;
2155 description { state: "disabled_visible" 0.0;
2156 inherit: "default" 0.0;
2157 color: 128 128 128 128;
2163 part { name: "elm.text";
2167 description { state: "default" 0.0;
2173 to_x: "elm.swallow.content";
2179 color: 255 255 255 255;
2182 style: "check_label_textblock_style";
2185 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2187 description { state: "visible" 0.0;
2188 inherit: "default" 0.0;
2192 description { state: "disabled" 0.0;
2193 inherit: "default" 0.0;
2195 description { state: "disabled_visible" 0.0;
2196 inherit: "default" 0.0;
2199 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2202 part { name: "events1";
2204 ignore_flags: ON_HOLD;
2205 description { state: "default" 0.0;
2208 rel2.to_x: "elm.text";
2211 description { state: "visible" 0.0;
2213 rel1.to: "bg_expand";
2214 rel2.to_x: "elm.text";
2218 part { name: "events2";
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: "disabler";
2236 description { state: "default" 0.0;
2237 rel2.to_x: "elm.text";
2241 description { state: "disabled" 0.0;
2242 inherit: "default" 0.0;
2248 program { name: "click";
2249 signal: "mouse,clicked,1";
2254 get_state(PART:"check", st, 30, vl);
2255 if (!strcmp(st, "visible_pressed"))
2256 set_state(PART:"check", "visible", 0.0);
2260 program { name: "toggle";
2261 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2262 after: "touch_sound";
2264 program { name: "touch_sound";
2265 action: PLAY_SAMPLE "touch_sound" 1.0;
2267 program { name: "unfocused";
2268 signal: "elm,action,unfocus";
2273 get_state(PART:"bg2", st, 30, vl);
2274 if (!strcmp(st, "on"))
2275 emit("elm,action,check,toggle", "");
2278 program { name: "click_down";
2279 signal: "mouse,down,1";
2284 get_state(PART:"check", st, 30, vl);
2285 if (!strcmp(st, "visible"))
2287 set_state(PART:"bg_expand", "clicked", 0.0);
2288 set_state(PART:"check", "visible_pressed", 0.0);
2292 set_state(PART:"bg2", "clicked", 0.0);
2293 set_state(PART:"bg1", "clicked", 0.0);
2297 program { name: "check_normal";
2298 signal: "mouse,up,1";
2303 get_state(PART:"check", st, 30, vl);
2304 if (!strcmp(st, "visible_pressed"))
2306 set_state(PART:"bg_expand", "on", 0.0);
2307 set_state(PART:"check", "visible", 0.0);
2309 get_state(PART:"bg_expand", st, 30, vl);
2310 if (!strcmp(st, "default"))
2312 set_state(PART:"bg2", "default", 0.0);
2313 set_state(PART:"bg1", "default", 0.0);
2317 program { name: "check_on";
2318 signal: "elm,state,check,on";
2320 action: STATE_SET "on" 0.0;
2322 after: "start_expand";
2324 program { name: "start_expand";
2325 action: STATE_SET "intermediate" 0.0;
2328 target: "bg_expand";
2331 program { name: "expand";
2332 action: STATE_SET "on" 0.0;
2333 target: "bg_expand";
2336 transition: ACCELERATE 0.1;
2337 after: "check_visible";
2339 program { name: "check_visible";
2340 action: STATE_SET "visible" 0.0;
2345 program { name: "check_off";
2346 signal: "elm,state,check,off";
2348 action: STATE_SET "default" 0.0;
2352 program { name: "contract";
2353 action: STATE_SET "intermediate" 0.0;
2354 target: "bg_expand";
2355 transition: ACCELERATE 0.1;
2358 program { name: "normal_bg";
2360 if (get_int(button_state) !=1)
2362 set_state(PART:"bg2", "default", 0.0);
2363 set_state(PART:"bg1", "default", 0.0);
2367 set_state(PART:"bg2", "disabled", 0.0);
2368 set_state(PART:"bg1", "disabled", 0.0);
2371 after: "bg_default";
2373 program { name: "bg_default";
2374 action: STATE_SET "default" 0.0;
2375 target: "bg_expand";
2380 program { name: "text_show";
2381 signal: "elm,state,text,visible";
2383 action: STATE_SET "visible" 0.0;
2386 program { name: "text_hide";
2387 signal: "elm,state,text,hidden";
2389 action: STATE_SET "default" 0.0;
2392 program { name: "icon_show";
2393 signal: "elm,state,icon,visible";
2395 action: STATE_SET "visible" 0.0;
2396 target: "elm.swallow.content";
2398 program { name: "icon_hide";
2399 signal: "elm,state,icon,hidden";
2401 action: STATE_SET "default" 0.0;
2402 target: "elm.swallow.content";
2404 program { name: "disable";
2405 signal: "elm,state,disabled";
2407 action: STATE_SET "disabled" 0.0;
2411 after: "disable_text";
2413 program { name: "disable_text";
2417 get_state(PART:"elm.text", st, 30, vl);
2418 if (!strcmp(st, "visible"))
2419 set_state(PART:"elm.text", "disabled_visible", 0.0);
2421 set_state(PART:"elm.text", "disabled", 0.0);
2422 get_state(PART:"elm.swallow.content", st, 30, vl);
2423 if (!strcmp(st, "visible"))
2424 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2426 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2427 set_int(button_state, 1);
2430 program { name: "enable";
2431 signal: "elm,state,enabled";
2433 action: STATE_SET "default" 0.0;
2437 after: "enable_text";
2439 program { name: "enable_text";
2443 get_state(PART:"elm.text", st, 30, vl);
2444 if (!strcmp(st, "disabled_visible"))
2445 set_state(PART:"elm.text", "visible", 0.0);
2447 set_state(PART:"elm.text", "default", 0.0);
2448 get_state(PART:"elm.swallow.content", st, 30, vl);
2449 if (!strcmp(st, "visible"))
2450 set_state(PART:"elm.swallow.content", "visible", 0.0);
2452 set_state(PART:"elm.swallow.content", "default", 0.0);
2453 set_int(button_state, 0);
2459 ////////////////////////////////////////////////////////////////////////////////
2461 group { name: "elm/check/base/grid";
2462 images.image: "00_grid_select_check.png" COMP;
2463 images.image: "00_grid_select_check_bg.png" COMP;
2464 images.image: "00_grid_select_check_bg_press.png" COMP;
2466 public check_state = CHECK_STATE_DEFAULT;
2467 public check_visible = CHECK_HIDE;
2473 description { state: "default" 0.0;
2477 part { name: "top_right_padding";
2481 description { state: "default" 0.0;
2483 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
2496 part { name: "selected_bg";
2499 description { state: "default" 0.0;
2504 description { state: "visible" 0.0;
2505 inherit: "default" 0.0;
2507 color: GENGRID_EDIT_MODE_CHECK_BG_COLOR_INC;
2513 description { state: "default" 0.0;
2514 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
2519 to: "top_right_padding";
2523 to: "top_right_padding";
2525 image.normal: "00_grid_select_check_bg.png";
2527 description { state: "visible" 0.0;
2528 inherit: "default" 0.0;
2529 image.normal: "00_grid_select_check_bg_press.png";
2531 description { state: "disabled" 0.0;
2532 inherit: "default" 0.0;
2535 part { name: "check";
2537 clip_to: "sequence_clip";
2539 description { state: "default" 0.0;
2543 image.normal: "00_grid_select_check.png";
2544 color: 255 255 255 0;
2546 description { state: "visible" 0.0;
2547 inherit: "default" 0.0;
2549 color: 255 255 255 255;
2551 description { state: "pressed" 0.0;
2552 inherit: "visible" 0.0;
2554 description { state: "disabled_visible" 0.0;
2555 inherit: "default" 0.0;
2559 part { name: "sequence_clip";
2562 description { state: "default" 0.0;
2565 rel2.relative: 0.0 1.0;
2566 color: 255 255 255 255;
2568 description { state: "visible" 0.0;
2569 inherit: "default" 0.0;
2570 rel2.relative: 1.0 1.0;
2573 part { name: "elm.swallow.content";
2576 state: "default" 0.0;
2579 color: 255 255 255 255;
2592 description { state: "visible" 0.0;
2593 inherit: "default" 0.0;
2597 aspect_preference: VERTICAL;
2599 description { state: "disabled" 0.0;
2600 inherit: "default" 0.0;
2601 color: 128 128 128 128;
2603 description { state: "disabled_visible" 0.0;
2604 inherit: "default" 0.0;
2605 color: 128 128 128 128;
2611 part { name: "elm.text";
2615 description { state: "default" 0.0;
2621 to_x: "elm.swallow.content";
2627 color: 255 255 255 255;
2630 style: "check_label_textblock_style";
2633 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2635 description { state: "visible" 0.0;
2636 inherit: "default" 0.0;
2640 description { state: "disabled" 0.0;
2641 inherit: "default" 0.0;
2643 description { state: "disabled_visible" 0.0;
2644 inherit: "default" 0.0;
2647 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2650 part { name: "events";
2652 ignore_flags: ON_HOLD;
2653 description { state: "default" 0.0;
2657 part { name: "disabler";
2659 description { state: "default" 0.0;
2663 description { state: "disabled" 0.0;
2664 inherit: "default" 0.0;
2670 program { name: "show";
2673 set_int(check_visible, CHECK_SHOW);
2676 program { name: "hide";
2679 set_int(check_visible, CHECK_HIDE);
2682 program { name: "click";
2683 signal: "mouse,clicked,1";
2685 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2686 after: "touch_sound";
2688 program { name: "touch_sound";
2689 action: PLAY_SAMPLE "touch_sound" 1.0;
2692 program { name: "bg_normal";
2694 set_state(PART:"bg2", "default", 0.0);
2697 program { name: "pressed";
2698 signal: "mouse,down,1";
2703 get_state(PART:"check", st, 30, vl);
2704 if (!strcmp(st, "visible"))
2706 set_state(PART:"check", "pressed", 0.0);
2707 set_state(PART:"bg2", "visible", 0.0);
2711 program { name: "mouse,out";
2712 signal: "mouse,out";
2715 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2717 set_state(PART:"check", "visible", 0.0);
2718 set_state(PART:"sequence_clip", "visible", 0.0);
2719 set_state(PART:"bg2", "visible", 0.0);
2723 set_state(PART:"check", "default", 0.0);
2724 set_state(PART:"sequence_clip", "default", 0.0);
2725 set_state(PART:"bg2", "default", 0.0);
2729 program { name: "check_on";
2730 signal: "elm,state,check,on";
2733 set_int(check_state, CHECK_STATE_VISIBLE);
2734 if (get_int(check_visible) == CHECK_SHOW)
2736 run_program(PROGRAM:"check_show_effect");
2737 run_program(PROGRAM:"check_draw_effect");
2741 set_state(PART:"check", "visible", 0.0);
2742 set_state(PART:"sequence_clip", "visible", 0.0);
2744 set_state(PART:"bg2", "visible", 0.0);
2745 set_state(PART:"selected_bg", "visible", 0.0);
2748 program { name: "check_off";
2749 signal: "elm,state,check,off";
2751 action: STATE_SET "default" 0.0;
2754 if (get_int(check_state) == CHECK_STATE_VISIBLE)
2756 set_int(check_state, CHECK_STATE_DEFAULT);
2757 set_state(PART:"check", "default", 0.0);
2758 set_state(PART:"sequence_clip", "default", 0.0);
2760 set_state(PART:"bg2", "default", 0.0);
2761 set_state(PART:"selected_bg", "default", 0.0);
2764 program { name: "check_show_effect";
2765 action: STATE_SET "visible" 0.0;
2766 transition: LINEAR 0.233;
2769 program { name: "check_draw_effect";
2770 action: STATE_SET "visible" 0.0;
2771 transition: LINEAR 0.267;
2772 target: "sequence_clip";
2774 program { name: "text_show";
2775 signal: "elm,state,text,visible";
2777 action: STATE_SET "visible" 0.0;
2780 program { name: "text_hide";
2781 signal: "elm,state,text,hidden";
2783 action: STATE_SET "default" 0.0;
2786 program { name: "icon_show";
2787 signal: "elm,state,icon,visible";
2789 action: STATE_SET "visible" 0.0;
2790 target: "elm.swallow.content";
2792 program { name: "icon_hide";
2793 signal: "elm,state,icon,hidden";
2795 action: STATE_SET "default" 0.0;
2796 target: "elm.swallow.content";
2798 program { name: "disable";
2799 signal: "elm,state,disabled";
2801 action: STATE_SET "disabled" 0.0;
2804 after: "disable_text";
2806 program { name: "disable_text";
2810 get_state(PART:"elm.text", st, 30, vl);
2811 if (!strcmp(st, "visible"))
2812 set_state(PART:"elm.text", "disabled_visible", 0.0);
2814 set_state(PART:"elm.text", "disabled", 0.0);
2815 get_state(PART:"elm.swallow.content", st, 30, vl);
2816 if (!strcmp(st, "visible"))
2817 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2819 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2820 get_state(PART:"check", st, 30, vl);
2821 if (!strcmp(st, "visible"))
2823 set_state(PART:"check", "disabled_visible", 0.0);
2824 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
2828 program { name: "enable";
2829 signal: "elm,state,enabled";
2831 action: STATE_SET "default" 0.0;
2834 after: "enable_text";
2836 program { name: "enable_text";
2840 get_state(PART:"elm.text", st, 30, vl);
2841 if (!strcmp(st, "disabled_visible"))
2842 set_state(PART:"elm.text", "visible", 0.0);
2844 set_state(PART:"elm.text", "default", 0.0);
2845 get_state(PART:"elm.swallow.content", st, 30, vl);
2846 if (!strcmp(st, "visible"))
2847 set_state(PART:"elm.swallow.content", "visible", 0.0);
2849 set_state(PART:"elm.swallow.content", "default", 0.0);
2850 get_state(PART:"check", st, 30, vl);
2851 if (!strcmp(st, "disabled_visible"))
2853 set_state(PART:"check", "visible", 0.0);
2854 set_state(PART:"sequence_clip", "visible", 0.0);
2855 set_int(check_state, CHECK_STATE_VISIBLE);
2858 set_int(check_state, CHECK_STATE_DEFAULT);
2864 #undef CHECK_STATE_DEFAULT
2865 #undef CHECK_STATE_VISIBLE
2866 #undef CHECK_STATE_DISABLED_VISIBLE
2867 #undef CHECK_STATE_DISABLED