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/on&off";
700 image: "00_button_on.png" COMP;
701 image: "00_button_on_dim.png" COMP;
702 image: "00_button_off.png" COMP;
703 image: "00_button_off_dim.png" COMP;
704 image: "00_button_on_off_handler.png" COMP;
705 image: "00_button_on_off_handler_dim.png" COMP;
718 description { state: "default" 0.0;
719 min: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
720 max: CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC;
721 rel2.relative: 0.0 1.0;
727 part { name: "padding_left";
731 description { state: "default" 0.0;
733 rel1{ relative: 0.0 0.0; to: "bg"; }
734 rel2{ relative: 0.0 1.0; to: "bg"; }
740 part { name: "padding_right";
744 description { state: "default" 0.0;
759 part { name: "padding_top";
763 description { state: "default" 0.0;
775 part { name: "padding_bottom";
779 description { state: "default" 0.0;
794 part { name: "bg_image";
797 description { state: "default" 0.0;
807 to_y: "padding_bottom";
809 image.normal: "00_button_off.png";
811 description { state: "visible" 0.0;
812 inherit: "default" 0.0;
813 image.normal: "00_button_on.png";
815 description { state: "pressed" 0.0;
816 inherit: "default" 0.0;
817 image.normal: "00_button_off.png";
819 description { state: "visible_pressed" 0.0;
820 inherit: "default" 0.0;
821 image.normal: "00_button_on.png";
823 description { state: "visible_disable" 0.0;
824 inherit: "default" 0.0;
825 image.normal: "00_button_on_dim.png";
827 description { state: "off_disable" 0.0;
828 inherit: "default" 0.0;
829 image.normal: "00_button_off_dim.png";
832 part { name: "drag_container";
836 description { state: "default" 0.0;
839 to_x: "padding_left";
844 to_x: "padding_right";
850 part { name: "clipper";
853 description { state: "default" 0.0;
856 color: 255 255 255 255;
859 part { name: "clipper_inner";
862 description { state: "default" 0.0;
865 color: 255 255 255 255;
868 part { name: "button";
875 confine: "drag_container";
877 description { state: "default" 0.0;
878 min: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
879 max: CHECK_ONOFF_HANDLER_MIN_MAX_INC;
884 image.normal: "00_button_on_off_handler.png";
886 description { state: "disabled" 0.0;
887 inherit: "default" 0.0;
888 image.normal: "00_button_on_off_handler_dim.png";
891 part { name: "button_events";
896 description { state: "default" 0.0;
902 part { name: "onrect";
907 description { state: "default" 0.0;
920 part { name: "offrect";
925 description { state: "default" 0.0;
937 part { name: "elm.offtext";
941 clip_to: "clipper_inner";
942 description { state: "default" 0.0;
945 color: 255 255 255 255;
947 font: "Tizen:style=Medium";
953 description { state: "disabled" 0.0;
954 inherit: "default" 0.0;
955 color: 128 128 128 128;
958 part { name: "elm.ontext";
962 clip_to: "clipper_inner";
963 description { state: "default" 0.0;
966 color: 255 255 255 255;
968 font: "Tizen:style=Medium";
974 description { state: "disabled" 0.0;
975 inherit: "default" 0.0;
976 color: 128 128 128 128;
979 part { name: "elm.swallow.content";
982 description { state: "default" 0.0;
995 description { state: "visible" 0.0;
996 inherit: "default" 0.0;
1000 aspect_preference: VERTICAL;
1002 description { state: "disabled" 0.0;
1003 inherit: "default" 0.0;
1005 description { state: "disabled_visible" 0.0;
1006 inherit: "default" 0.0;
1012 part { name: "elm.text";
1017 description { state: "default" 0.0;
1023 to_x: "elm.swallow.content";
1031 style: "check_label_textblock_style";
1034 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1036 description { state: "visible" 0.0;
1037 inherit: "default" 0.0;
1041 description { state: "disabled" 0.0;
1042 inherit: "default" 0.0;
1044 description { state: "disabled_visible" 0.0;
1045 inherit: "default" 0.0;
1050 part { name: "disclip";
1053 description { state: "default" 0.0;
1054 color: CHECK_DISCLIP_NORMAL_COLOR_INC;
1056 description { state: "disabled" 0.0;
1057 inherit: "default" 0.0;
1058 color: CHECK_DISCLIP_DISABLED_COLOR_INC;
1061 part { name: "disabler";
1063 description { state: "default" 0.0;
1067 description { state: "disabled" 0.0;
1068 inherit: "default" 0.0;
1075 signal: "mouse,clicked,1";
1078 new Float:dx, Float:dy;
1079 get_drag(PART:"button", dx, dy);
1080 if (!get_int(was_drag)) {
1082 set_drag(PART:"button", 0.0, 0.0);
1084 set_drag(PART:"button", 1.0, 0.0);
1085 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1086 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1087 if (get_int(check_on)) {
1088 emit("elm,action,check,off", "");
1089 emit("elm,action,touch,sound", "");
1093 if (!get_int(check_on)) {
1094 emit("elm,action,check,on", "");
1095 emit("elm,action,touch,sound", "");
1101 program { name: "touch_sound";
1102 signal: "elm,action,touch,sound";
1104 action: PLAY_SAMPLE "touch_sound" 1.0;
1110 if (!get_int(is_drag)) emit("elm,action,check,drag,start", "");
1111 set_int(is_drag, 1);
1115 signal: "mouse,down,1";
1118 set_int(was_drag, 0);
1119 set_int(is_drag, 0);
1122 program { name: "drag_end";
1123 signal: "mouse,up,1";
1126 new Float:dx, Float:dy;
1127 get_drag(PART:"button", dx, dy);
1128 if (get_int(is_drag)) {
1130 set_drag(PART:"button", 1.0, 0.0);
1132 set_drag(PART:"button", 0.0, 0.0);
1133 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
1134 (get_int(is_rtl) == 0) && (dx > 0.5)) {
1135 if (!get_int(check_on)) {
1136 emit("elm,action,check,on", "");
1137 emit("elm,action,touch,sound", "");
1141 if (get_int(check_on)) {
1142 emit("elm,action,check,off", "");
1143 emit("elm,action,touch,sound", "");
1146 set_int(was_drag, get_int(is_drag));
1147 set_int(is_drag, 0);
1148 emit("elm,action,check,drag,stop", "");
1152 program { name: "check_on";
1153 signal: "elm,state,check,on";
1157 if (get_int(is_rtl) == 0) {
1163 set_drag(PART:"button", drag, 0.0);
1164 set_state(PART:"bg_image", "visible", 0.0);
1165 set_int(check_on, 1);
1168 program { name: "check_off";
1169 signal: "elm,state,check,off";
1173 if (get_int(is_rtl) == 0) {
1179 set_drag(PART:"button", drag, 0.0);
1180 set_state(PART:"bg_image", "default", 0.0);
1181 set_int(check_on, 0);
1184 program { name: "text_show";
1185 signal: "elm,state,text,visible";
1187 action: STATE_SET "visible" 0.0;
1190 program { name: "text_hide";
1191 signal: "elm,state,text,hidden";
1193 action: STATE_SET "default" 0.0;
1196 program { name: "icon_show";
1197 signal: "elm,state,icon,visible";
1199 action: STATE_SET "visible" 0.0;
1200 target: "elm.swallow.content";
1202 program { name: "icon_hide";
1203 signal: "elm,state,icon,hidden";
1205 action: STATE_SET "default" 0.0;
1206 target: "elm.swallow.content";
1208 program { name: "disable";
1209 signal: "elm,state,disabled";
1211 action: STATE_SET "disabled" 0.0;
1212 target: "elm.offtext";
1213 target: "elm.ontext";
1217 after: "disable_text";
1219 program { name: "disable_text";
1223 get_state(PART:"elm.text", st, 30, vl);
1224 if (!strcmp(st, "visible"))
1225 set_state(PART:"elm.text", "disabled_visible", 0.0);
1227 set_state(PART:"elm.text", "disabled", 0.0);
1228 get_state(PART:"bg_image", st, 30, vl);
1229 if (!strcmp(st, "visible"))
1230 set_state(PART:"bg_image", "visible_disable", 0.0);
1232 set_state(PART:"bg_image", "off_disable", 0.0);
1233 get_state(PART:"elm.swallow.content", st, 30, vl);
1234 if (!strcmp(st, "visible"))
1235 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1237 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1238 set_state(PART:"button", "disabled", 0.0);
1241 program { name: "enable";
1242 signal: "elm,state,enabled";
1244 action: STATE_SET "default" 0.0;
1248 after: "enable_text";
1250 program { name: "enable_text";
1254 get_state(PART:"elm.text", st, 30, vl);
1255 if (!strcmp(st, "disabled_visible"))
1256 set_state(PART:"elm.text", "visible", 0.0);
1258 set_state(PART:"elm.text", "default", 0.0);
1259 get_state(PART:"bg_image", st, 30, vl);
1260 if (!strcmp(st, "visible_disable"))
1261 set_state(PART:"bg_image", "visible", 0.0);
1263 set_state(PART:"bg_image", "default", 0.0);
1264 get_state(PART:"elm.swallow.content", st, 30, vl);
1265 if (!strcmp(st, "visible"))
1266 set_state(PART:"elm.swallow.content", "visible", 0.0);
1268 set_state(PART:"elm.swallow.content", "default", 0.0);
1269 set_state(PART:"button", "default", 0.0);
1272 program { name: "to_rtl";
1273 signal: "edje,state,rtl";
1279 program { name: "to_ltr";
1280 signal: "edje,state,ltr";
1288 ///////////////////////////////////////////////////////////////////////////////////////
1290 #define CHECK_STYLE_FAVORITE(style_name, min_width, min_height) \
1291 group { name: "elm/check/base/"style_name; \
1293 image: "00_icon_favorite_on_72x72.png" COMP; \
1294 image: "00_icon_favorite_on_72x72_dim.png" COMP; \
1295 image: "00_icon_favorite_off_72x72.png" COMP; \
1296 image: "00_icon_favorite_off_72x72_dim.png" COMP; \
1299 part { name: "back_bg"; \
1302 description { state: "default" 0.0; \
1304 rel2.relative: 0.0 1.0; \
1306 min: min_width min_height; \
1310 part { name: "bg"; \
1312 clip_to: "disclip"; \
1314 description { state: "default" 0.0; \
1316 rel1.to: "back_bg"; \
1317 rel2.to: "back_bg"; \
1318 min: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1319 max: CHECK_STYLE_FAVORITE_BG_NORMAL_MIN_MAX_INC; \
1323 part { name: "check"; \
1325 clip_to: "disclip"; \
1327 description { state: "default" 0.0; \
1330 image.normal: "00_icon_favorite_off_72x72.png"; \
1332 description { state: "visible" 0.0; \
1333 inherit: "default" 0.0; \
1334 image.normal: "00_icon_favorite_on_72x72.png"; \
1336 description { state: "disabled" 0.0; \
1337 inherit: "default" 0.0; \
1338 image.normal: "00_icon_favorite_off_72x72_dim.png"; \
1340 description { state: "disabled_visible" 0.0; \
1341 inherit: "default" 0.0; \
1342 image.normal: "00_icon_favorite_on_72x72_dim.png"; \
1345 part { name: "elm.swallow.content"; \
1347 clip_to: "disclip"; \
1348 description { state: "default" 0.0; \
1354 relative: 1.0 0.0; \
1359 relative: 1.0 1.0; \
1363 description { state: "visible" 0.0; \
1364 inherit: "default" 0.0; \
1368 aspect_preference: VERTICAL; \
1370 description { state: "disabled" 0.0; \
1371 inherit: "default" 0.0; \
1373 description { state: "disabled_visible" 0.0; \
1374 inherit: "default" 0.0; \
1380 part { name: "elm.text"; \
1382 clip_to: "disclip"; \
1385 description { state: "default" 0.0; \
1389 relative: 1.0 0.5; \
1391 to_x: "elm.swallow.content"; \
1394 relative: 1.0 0.5; \
1399 style: "check_label_textblock_style"; \
1402 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
1404 description { state: "visible" 0.0; \
1405 inherit: "default" 0.0; \
1409 description { state: "disabled" 0.0; \
1410 inherit: "default" 0.0; \
1412 description { state: "disabled_visible" 0.0; \
1413 inherit: "default" 0.0; \
1416 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
1419 part { name: "disclip"; \
1422 description { state: "default" 0.0; \
1423 color: CHECK_DISCLIP_NORMAL_COLOR_INC; \
1426 part { name: "events"; \
1428 ignore_flags: ON_HOLD; \
1429 description { state: "default" 0.0; \
1433 part { name: "disabler"; \
1435 description { state: "default" 0.0; \
1439 description { state: "disabled" 0.0; \
1440 inherit: "default" 0.0; \
1446 program { name: "click"; \
1447 signal: "mouse,clicked,1"; \
1449 action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
1450 after: "touch_sound"; \
1452 program { name: "touch_sound"; \
1453 action: PLAY_SAMPLE "touch_sound" 1.0; \
1455 program { name: "check_on"; \
1456 signal: "elm,state,check,on"; \
1458 action: STATE_SET "visible" 0.0; \
1461 program { name: "check_off"; \
1462 signal: "elm,state,check,off"; \
1464 action: STATE_SET "default" 0.0; \
1467 program { name: "text_show"; \
1468 signal: "elm,state,text,visible"; \
1470 action: STATE_SET "visible" 0.0; \
1471 target: "elm.text"; \
1473 program { name: "text_hide"; \
1474 signal: "elm,state,text,hidden"; \
1476 action: STATE_SET "default" 0.0; \
1477 target: "elm.text"; \
1479 program { name: "icon_show"; \
1480 signal: "elm,state,icon,visible"; \
1482 action: STATE_SET "visible" 0.0; \
1483 target: "elm.swallow.content"; \
1485 program { name: "icon_hide"; \
1486 signal: "elm,state,icon,hidden"; \
1488 action: STATE_SET "default" 0.0; \
1489 target: "elm.swallow.content"; \
1491 program { name: "disable"; \
1492 signal: "elm,state,disabled"; \
1494 action: STATE_SET "disabled" 0.0; \
1495 target: "disabler"; \
1496 after: "disable_text"; \
1498 program { name: "disable_text"; \
1502 get_state(PART:"elm.text", st, 30, vl); \
1503 if (!strcmp(st, "visible")) \
1504 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1506 set_state(PART:"elm.text", "disabled", 0.0); \
1507 get_state(PART:"elm.swallow.content", st, 30, vl); \
1508 if (!strcmp(st, "visible")) \
1509 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
1511 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
1512 get_state(PART:"check", st, 30, vl); \
1513 if (!strcmp(st, "visible")) \
1514 set_state(PART:"check", "disabled_visible", 0.0); \
1516 set_state(PART:"check", "disabled", 0.0); \
1519 program { name: "enable"; \
1520 signal: "elm,state,enabled"; \
1522 action: STATE_SET "default" 0.0; \
1523 target: "disabler"; \
1524 after: "enable_text"; \
1526 program { name: "enable_text"; \
1530 get_state(PART:"elm.text", st, 30, vl); \
1531 if (!strcmp(st, "disabled_visible")) \
1532 set_state(PART:"elm.text", "visible", 0.0); \
1534 set_state(PART:"elm.text", "default", 0.0); \
1535 get_state(PART:"elm.swallow.content", st, 30, vl); \
1536 if (!strcmp(st, "visible")) \
1537 set_state(PART:"elm.swallow.content", "visible", 0.0); \
1539 set_state(PART:"elm.swallow.content", "default", 0.0); \
1540 get_state(PART:"check", st, 30, vl); \
1541 if (!strcmp(st, "disabled_visible")) \
1542 set_state(PART:"check", "visible", 0.0); \
1544 set_state(PART:"check", "default", 0.0); \
1549 ////////////////////////////////////////////////////////////////////////////////
1550 CHECK_STYLE_FAVORITE("favorite", CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
1551 ////////////////////////////////////////////////////////////////////////////////
1552 CHECK_STYLE_FAVORITE("favorite/extended", CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE_MIN_HEIGHT_INC)
1553 ////////////////////////////////////////////////////////////////////////////////
1555 group { name: "elm/check/base/grid";
1556 images.image: "00_check_bg.png" COMP;
1557 images.image: "00_check_dim_bg.png" COMP;
1558 images.image: "00_check_dim.png" COMP;
1559 images.image: "00_check_Activated.png" COMP;
1561 public check_state = CHECK_STATE_DEFAULT;
1562 public check_visible = CHECK_HIDE;
1568 description { state: "default" 0.0;
1572 part { name: "top_left_padding";
1576 description { state: "default" 0.0;
1578 min: GENGRID_ITEM_CHECK_TOP_RIGHT_PADDING_INC;
1594 description { state: "default" 0.0;
1595 min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
1600 to: "top_left_padding";
1604 to: "top_left_padding";
1606 image.normal: "00_check_bg.png";
1608 description { state: "visible" 0.0;
1609 inherit: "default" 0.0;
1611 description { state: "disabled" 0.0;
1612 inherit: "default" 0.0;
1613 image.normal: "00_check_dim_bg.png";
1616 part { name: "check";
1618 clip_to: "sequence_clip";
1620 description { state: "default" 0.0;
1624 image.normal: "00_check_Activated.png";
1625 color: 255 255 255 0;
1627 description { state: "visible" 0.0;
1628 inherit: "default" 0.0;
1630 color: 255 255 255 255;
1632 description { state: "pressed" 0.0;
1633 inherit: "visible" 0.0;
1635 description { state: "disabled_visible" 0.0;
1636 inherit: "default" 0.0;
1638 image.normal: "00_check_dim.png";
1641 part { name: "sequence_clip";
1644 description { state: "default" 0.0;
1647 rel2.relative: 0.0 1.0;
1648 color: 255 255 255 255;
1650 description { state: "visible" 0.0;
1651 inherit: "default" 0.0;
1652 rel2.relative: 1.0 1.0;
1655 part { name: "elm.swallow.content";
1658 state: "default" 0.0;
1661 color: 255 255 255 255;
1674 description { state: "visible" 0.0;
1675 inherit: "default" 0.0;
1679 aspect_preference: VERTICAL;
1681 description { state: "disabled" 0.0;
1682 inherit: "default" 0.0;
1683 color: 128 128 128 128;
1685 description { state: "disabled_visible" 0.0;
1686 inherit: "default" 0.0;
1687 color: 128 128 128 128;
1693 part { name: "elm.text";
1697 description { state: "default" 0.0;
1703 to_x: "elm.swallow.content";
1709 color: 255 255 255 255;
1712 style: "check_label_textblock_style";
1715 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
1717 description { state: "visible" 0.0;
1718 inherit: "default" 0.0;
1722 description { state: "disabled" 0.0;
1723 inherit: "default" 0.0;
1725 description { state: "disabled_visible" 0.0;
1726 inherit: "default" 0.0;
1729 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
1732 part { name: "events";
1734 ignore_flags: ON_HOLD;
1735 description { state: "default" 0.0;
1739 part { name: "disabler";
1741 description { state: "default" 0.0;
1745 description { state: "disabled" 0.0;
1746 inherit: "default" 0.0;
1752 program { name: "show";
1755 set_int(check_visible, CHECK_SHOW);
1758 program { name: "hide";
1761 set_int(check_visible, CHECK_HIDE);
1764 program { name: "click";
1765 signal: "mouse,clicked,1";
1767 action: SIGNAL_EMIT "elm,action,check,toggle" "";
1770 program { name: "bg_normal";
1772 set_state(PART:"bg2", "default", 0.0);
1775 program { name: "pressed";
1776 signal: "mouse,down,1";
1781 get_state(PART:"check", st, 30, vl);
1782 if (!strcmp(st, "visible"))
1784 set_state(PART:"check", "pressed", 0.0);
1785 set_state(PART:"bg2", "visible", 0.0);
1789 program { name: "mouse,out";
1790 signal: "mouse,out";
1793 if (get_int(check_state) == CHECK_STATE_VISIBLE)
1795 set_state(PART:"check", "visible", 0.0);
1796 set_state(PART:"sequence_clip", "visible", 0.0);
1797 set_state(PART:"bg2", "visible", 0.0);
1801 set_state(PART:"check", "default", 0.0);
1802 set_state(PART:"sequence_clip", "default", 0.0);
1803 set_state(PART:"bg2", "default", 0.0);
1807 program { name: "check_on";
1808 signal: "elm,state,check,on";
1811 set_int(check_state, CHECK_STATE_VISIBLE);
1812 if (get_int(check_visible) == CHECK_SHOW)
1814 run_program(PROGRAM:"check_show_effect");
1815 run_program(PROGRAM:"check_draw_effect");
1819 set_state(PART:"check", "visible", 0.0);
1820 set_state(PART:"sequence_clip", "visible", 0.0);
1822 set_state(PART:"bg2", "visible", 0.0);
1825 program { name: "check_off";
1826 signal: "elm,state,check,off";
1828 action: STATE_SET "default" 0.0;
1831 if (get_int(check_state) == CHECK_STATE_VISIBLE)
1833 set_int(check_state, CHECK_STATE_DEFAULT);
1834 set_state(PART:"check", "default", 0.0);
1835 set_state(PART:"sequence_clip", "default", 0.0);
1837 set_state(PART:"bg2", "default", 0.0);
1840 program { name: "check_show_effect";
1841 action: STATE_SET "visible" 0.0;
1842 transition: LINEAR 0.233;
1845 program { name: "check_draw_effect";
1846 action: STATE_SET "visible" 0.0;
1847 transition: LINEAR 0.267;
1848 target: "sequence_clip";
1850 program { name: "text_show";
1851 signal: "elm,state,text,visible";
1853 action: STATE_SET "visible" 0.0;
1856 program { name: "text_hide";
1857 signal: "elm,state,text,hidden";
1859 action: STATE_SET "default" 0.0;
1862 program { name: "icon_show";
1863 signal: "elm,state,icon,visible";
1865 action: STATE_SET "visible" 0.0;
1866 target: "elm.swallow.content";
1868 program { name: "icon_hide";
1869 signal: "elm,state,icon,hidden";
1871 action: STATE_SET "default" 0.0;
1872 target: "elm.swallow.content";
1874 program { name: "disable";
1875 signal: "elm,state,disabled";
1877 action: STATE_SET "disabled" 0.0;
1880 after: "disable_text";
1882 program { name: "disable_text";
1886 get_state(PART:"elm.text", st, 30, vl);
1887 if (!strcmp(st, "visible"))
1888 set_state(PART:"elm.text", "disabled_visible", 0.0);
1890 set_state(PART:"elm.text", "disabled", 0.0);
1891 get_state(PART:"elm.swallow.content", st, 30, vl);
1892 if (!strcmp(st, "visible"))
1893 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
1895 set_state(PART:"elm.swallow.content", "disabled", 0.0);
1896 get_state(PART:"check", st, 30, vl);
1897 if (!strcmp(st, "visible"))
1899 set_state(PART:"check", "disabled_visible", 0.0);
1900 set_int(check_state, CHECK_STATE_DISABLED_VISIBLE);
1904 program { name: "enable";
1905 signal: "elm,state,enabled";
1907 action: STATE_SET "default" 0.0;
1910 after: "enable_text";
1912 program { name: "enable_text";
1916 get_state(PART:"elm.text", st, 30, vl);
1917 if (!strcmp(st, "disabled_visible"))
1918 set_state(PART:"elm.text", "visible", 0.0);
1920 set_state(PART:"elm.text", "default", 0.0);
1921 get_state(PART:"elm.swallow.content", st, 30, vl);
1922 if (!strcmp(st, "visible"))
1923 set_state(PART:"elm.swallow.content", "visible", 0.0);
1925 set_state(PART:"elm.swallow.content", "default", 0.0);
1926 get_state(PART:"check", st, 30, vl);
1927 if (!strcmp(st, "disabled_visible"))
1929 set_state(PART:"check", "visible", 0.0);
1930 set_state(PART:"sequence_clip", "visible", 0.0);
1931 set_int(check_state, CHECK_STATE_VISIBLE);
1934 set_int(check_state, CHECK_STATE_DEFAULT);
1940 /////////////////////////////////////////////////////////////////////////////
1942 group { name: "elm/check/base/delete";
1944 image: "00_button_minus.png" COMP;
1945 image: "00_button_minus_press.png" COMP;
1946 image: "00_button_edit_Delete.png" COMP;
1947 image: "00_button_edit_Delete_press.png" COMP;
1948 image: "00_button_edit_dim.png" COMP;
1949 image: "00_button_edit_focus.png" COMP;
1952 public button_state = 0; //0:enabled, 1: disabled
1957 description { state: "default" 0.0;
1962 normal: "00_button_edit_Delete.png";
1963 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
1967 description { state: "clicked" 0.0;
1968 inherit: "default" 0.0;
1969 image.normal: "00_button_edit_Delete_press.png";
1971 description { state: "intermediate" 0.0;
1972 inherit: "default" 0.0;
1975 description { state: "on" 0.0;
1976 inherit: "default" 0.0;
1979 description { state: "disabled" 0.0;
1980 inherit: "default" 0.0;
1981 image.normal: "00_button_edit_dim.png";
1983 description { state: "focused" 0.0;
1984 inherit: "default" 0.0;
1985 image.normal: "00_button_edit_focus.png";
1990 description { state: "default" 0.0;
1992 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
1993 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
1994 rel1.relative: 1.0 0.0;
1996 image.normal: "00_button_minus.png";
1998 description { state: "clicked" 0.0;
1999 inherit: "default" 0.0;
2000 image.normal: "00_button_minus_press.png";
2002 description { state: "intermediate" 0.0;
2003 inherit: "default" 0.0;
2006 description { state: "on" 0.0;
2007 inherit: "default" 0.0;
2010 description { state: "disabled" 0.0;
2011 inherit: "default" 0.0;
2012 image.normal: "00_button_minus.png";
2015 part { name: "clipper";
2019 description { state: "default" 0.0;
2021 min: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2022 max: CHECK_STYLE_DELETE_BUTTON_BG_IMAGE_MIN_MAX_WIDTH_INC;
2023 color: 255 255 255 255;
2025 description { state: "on" 0.0;
2027 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2028 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2029 color: 255 255 255 255;
2032 part { name: "bg_expand";
2036 description { state: "default" 0.0;
2038 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2039 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2041 normal: "00_button_edit_Delete.png";
2042 border: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_BORDER_INC;
2052 description { state: "clicked" 0.0;
2053 inherit: "default" 0.0;
2055 image.normal: "00_button_edit_Delete_press.png";
2057 description { state: "intermediate" 0.0;
2058 inherit: "default" 0.0;
2068 description { state: "on" 0.0;
2069 inherit: "default" 0.0;
2073 part { name: "check";
2077 description { state: "default" 0.0;
2082 font: "Tizen:style=Medium";
2083 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2086 text_class: "tizen";
2089 description { state: "visible" 0.0;
2091 min: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2092 max: CHECK_STYLE_DELETE_BUTTON_BG_EXPAND_IMAGE_MIN_MAX_WIDTH_INC;
2093 color: CHECK_DELETE_TEXT_DELETE_NORMAL_COLOR_INC;
2095 font: "Tizen:style=Medium";
2096 size: CHECK_STYLE_DELETE_BUTTON_TEXT_FONT_SIZE_INC;
2099 text_class: "tizen";
2102 description { state: "visible_pressed" 0.0;
2103 inherit: "visible" 0.0;
2104 color: CHECK_DELETE_TEXT_DELETE_PRESS_COLOR_INC;
2107 part { name: "elm.swallow.content";
2109 description { state: "default" 0.0;
2112 color: 255 255 255 255;
2125 description { state: "visible" 0.0;
2126 inherit: "default" 0.0;
2130 aspect_preference: VERTICAL;
2132 description { state: "disabled" 0.0;
2133 inherit: "default" 0.0;
2134 color: 128 128 128 128;
2136 description { state: "disabled_visible" 0.0;
2137 inherit: "default" 0.0;
2138 color: 128 128 128 128;
2144 part { name: "elm.text";
2148 description { state: "default" 0.0;
2154 to_x: "elm.swallow.content";
2160 color: 255 255 255 255;
2163 style: "check_label_textblock_style";
2166 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2168 description { state: "visible" 0.0;
2169 inherit: "default" 0.0;
2173 description { state: "disabled" 0.0;
2174 inherit: "default" 0.0;
2176 description { state: "disabled_visible" 0.0;
2177 inherit: "default" 0.0;
2180 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2183 part { name: "events1";
2185 ignore_flags: ON_HOLD;
2186 description { state: "default" 0.0;
2189 rel2.to_x: "elm.text";
2192 description { state: "visible" 0.0;
2194 rel1.to: "bg_expand";
2195 rel2.to_x: "elm.text";
2199 part { name: "events2";
2202 description { state: "default" 0.0;
2205 rel2.to_x: "elm.text";
2208 description { state: "visible" 0.0;
2210 rel1.to: "bg_expand";
2211 rel2.to_x: "elm.text";
2215 part { name: "disabler";
2217 description { state: "default" 0.0;
2218 rel2.to_x: "elm.text";
2222 description { state: "disabled" 0.0;
2223 inherit: "default" 0.0;
2229 program { name: "click";
2230 signal: "mouse,clicked,1";
2235 get_state(PART:"check", st, 30, vl);
2236 if (!strcmp(st, "visible_pressed"))
2237 set_state(PART:"check", "visible", 0.0);
2241 program { name: "toggle";
2242 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2243 after: "touch_sound";
2245 program { name: "touch_sound";
2246 action: PLAY_SAMPLE "touch_sound" 1.0;
2248 program { name: "unfocused";
2249 signal: "elm,action,unfocus";
2254 get_state(PART:"bg2", st, 30, vl);
2255 if (!strcmp(st, "on"))
2256 emit("elm,action,check,toggle", "");
2259 program { name: "click_down";
2260 signal: "mouse,down,1";
2265 get_state(PART:"check", st, 30, vl);
2266 if (!strcmp(st, "visible"))
2268 set_state(PART:"bg_expand", "clicked", 0.0);
2269 set_state(PART:"check", "visible_pressed", 0.0);
2273 set_state(PART:"bg2", "clicked", 0.0);
2274 set_state(PART:"bg1", "clicked", 0.0);
2278 program { name: "check_normal";
2279 signal: "mouse,up,1";
2284 get_state(PART:"check", st, 30, vl);
2285 if (!strcmp(st, "visible_pressed"))
2287 set_state(PART:"bg_expand", "on", 0.0);
2288 set_state(PART:"check", "visible", 0.0);
2290 get_state(PART:"bg_expand", st, 30, vl);
2291 if (!strcmp(st, "default"))
2293 set_state(PART:"bg2", "default", 0.0);
2294 set_state(PART:"bg1", "default", 0.0);
2298 program { name: "check_on";
2299 signal: "elm,state,check,on";
2301 action: STATE_SET "on" 0.0;
2303 after: "start_expand";
2305 program { name: "start_expand";
2306 action: STATE_SET "intermediate" 0.0;
2309 target: "bg_expand";
2312 program { name: "expand";
2313 action: STATE_SET "on" 0.0;
2314 target: "bg_expand";
2317 transition: ACCELERATE 0.1;
2318 after: "check_visible";
2320 program { name: "check_visible";
2321 action: STATE_SET "visible" 0.0;
2326 program { name: "check_off";
2327 signal: "elm,state,check,off";
2329 action: STATE_SET "default" 0.0;
2333 program { name: "contract";
2334 action: STATE_SET "intermediate" 0.0;
2335 target: "bg_expand";
2336 transition: ACCELERATE 0.1;
2339 program { name: "normal_bg";
2341 if (get_int(button_state) !=1)
2343 set_state(PART:"bg2", "default", 0.0);
2344 set_state(PART:"bg1", "default", 0.0);
2348 set_state(PART:"bg2", "disabled", 0.0);
2349 set_state(PART:"bg1", "disabled", 0.0);
2352 after: "bg_default";
2354 program { name: "bg_default";
2355 action: STATE_SET "default" 0.0;
2356 target: "bg_expand";
2361 program { name: "text_show";
2362 signal: "elm,state,text,visible";
2364 action: STATE_SET "visible" 0.0;
2367 program { name: "text_hide";
2368 signal: "elm,state,text,hidden";
2370 action: STATE_SET "default" 0.0;
2373 program { name: "icon_show";
2374 signal: "elm,state,icon,visible";
2376 action: STATE_SET "visible" 0.0;
2377 target: "elm.swallow.content";
2379 program { name: "icon_hide";
2380 signal: "elm,state,icon,hidden";
2382 action: STATE_SET "default" 0.0;
2383 target: "elm.swallow.content";
2385 program { name: "disable";
2386 signal: "elm,state,disabled";
2388 action: STATE_SET "disabled" 0.0;
2392 after: "disable_text";
2394 program { name: "disable_text";
2398 get_state(PART:"elm.text", st, 30, vl);
2399 if (!strcmp(st, "visible"))
2400 set_state(PART:"elm.text", "disabled_visible", 0.0);
2402 set_state(PART:"elm.text", "disabled", 0.0);
2403 get_state(PART:"elm.swallow.content", st, 30, vl);
2404 if (!strcmp(st, "visible"))
2405 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2407 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2408 set_int(button_state, 1);
2411 program { name: "enable";
2412 signal: "elm,state,enabled";
2414 action: STATE_SET "default" 0.0;
2418 after: "enable_text";
2420 program { name: "enable_text";
2424 get_state(PART:"elm.text", st, 30, vl);
2425 if (!strcmp(st, "disabled_visible"))
2426 set_state(PART:"elm.text", "visible", 0.0);
2428 set_state(PART:"elm.text", "default", 0.0);
2429 get_state(PART:"elm.swallow.content", st, 30, vl);
2430 if (!strcmp(st, "visible"))
2431 set_state(PART:"elm.swallow.content", "visible", 0.0);
2433 set_state(PART:"elm.swallow.content", "default", 0.0);
2434 set_int(button_state, 0);
2440 ////////////////////////////////////////////////////////////////////////////////////
2441 group { name: "elm/check/base/multicheck";
2443 image: "00_check_bg.png" COMP;
2444 image: "00_check_bg_press.png" COMP;
2445 image: "multicheck_0001.png" COMP;
2446 image: "multicheck_0002.png" COMP;
2447 image: "multicheck_0003.png" COMP;
2448 image: "multicheck_0004.png" COMP;
2449 image: "multicheck_0005.png" COMP;
2450 image: "multicheck_0006.png" COMP;
2451 image: "00_check_checking.png" COMP;
2454 public check_state = 0; //0:default, 1: visible, 2: disabled_visible
2460 description { state: "default" 0.0;
2461 rel2.relative: 0.0 1.0;
2466 aspect_preference: VERTICAL;
2467 image.normal: "00_check_bg.png";
2470 description { state: "pressed" 0.0;
2471 inherit: "default" 0.0;
2472 image.normal: "00_check_bg_press.png";
2475 description { state: "disabled" 0.0;
2476 inherit: "default" 0.0;
2479 part { name: "check";
2483 description { state: "default" 0.0;
2488 description { state: "visible_1" 0.0;
2489 inherit: "default" 0.0;
2491 image.normal: "multicheck_0001.png";
2493 description { state: "visible_2" 0.0;
2494 inherit: "default" 0.0;
2496 image.normal: "multicheck_0002.png";
2498 description { state: "visible_3" 0.0;
2499 inherit: "default" 0.0;
2501 image.normal: "multicheck_0003.png";
2503 description { state: "visible_4" 0.0;
2504 inherit: "default" 0.0;
2506 image.normal: "multicheck_0004.png";
2508 description { state: "visible_5" 0.0;
2509 inherit: "default" 0.0;
2511 image.normal: "multicheck_0005.png";
2513 description { state: "visible" 0.0;
2514 inherit: "default" 0.0;
2516 image.normal: "multicheck_0006.png";
2518 description { state: "pressed" 0.0;
2519 inherit: "default" 0.0;
2521 image.normal: "multicheck_0006.png";
2523 description { state: "disabled_visible" 0.0;
2524 inherit: "default" 0.0;
2525 image.normal: "00_check_checking.png";
2529 part { name: "elm.swallow.content";
2532 description { state: "default" 0.0;
2535 color: 255 255 255 255;
2548 description { state: "visible" 0.0;
2549 inherit: "default" 0.0;
2553 aspect_preference: VERTICAL;
2555 description { state: "disabled" 0.0;
2556 inherit: "default" 0.0;
2557 color: 128 128 128 128;
2559 description { state: "disabled_visible" 0.0;
2560 inherit: "default" 0.0;
2561 color: 128 128 128 128;
2567 part { name: "elm.text";
2572 description { state: "default" 0.0;
2578 to_x: "elm.swallow.content";
2586 style: "check_label_textblock_style";
2589 color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
2591 description { state: "visible" 0.0;
2592 inherit: "default" 0.0;
2596 description { state: "disabled" 0.0;
2597 inherit: "default" 0.0;
2599 description { state: "disabled_visible" 0.0;
2600 inherit: "default" 0.0;
2603 color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
2606 part { name: "events1";
2608 ignore_flags: ON_HOLD;
2609 description { state: "default" 0.0;
2613 part { name: "disclip";
2616 description { state: "default" 0.0;
2617 color: 255 255 255 255;
2619 description { state: "disabled" 0.0;
2620 inherit: "default" 0.0;
2621 color: 255 255 255 102;
2624 part { name: "events2";
2627 description { state: "default" 0.0;
2631 part { name: "disabler";
2633 description { state: "default" 0.0;
2637 description { state: "disabled" 0.0;
2638 inherit: "default" 0.0;
2644 program { name: "click";
2645 signal: "mouse,clicked,1";
2647 action: SIGNAL_EMIT "elm,action,check,toggle" "";
2648 after: "touch_sound";
2650 program { name: "touch_sound";
2651 action: PLAY_SAMPLE "touch_sound" 1.0;
2653 program { name: "bg_normal";
2654 signal: "mouse,up,1";
2659 get_state(PART:"check", st, 30, vl);
2660 if (!strcmp(st, "pressed"))
2661 set_state(PART:"check", "visible", 0.0);
2662 set_state(PART:"bg", "default", 0.0);
2665 program { name: "pressed";
2666 signal: "mouse,down,1";
2671 get_state(PART:"check", st, 30, vl);
2672 if (!strcmp(st, "default"))
2673 set_state(PART:"check", "pressed", 0.0);
2675 set_state(PART:"check", "default", 0.0);
2676 set_state(PART:"bg", "pressed", 0.0);
2679 program { name: "mouse,out";
2680 signal: "mouse,out";
2683 if (get_int(check_state) == 1)
2684 set_state(PART:"check", "visible", 0.0);
2686 set_state(PART:"check", "default", 0.0);
2689 program { name: "check_on";
2690 signal: "elm,state,check,on";
2693 set_int(check_state, 1);
2695 after: "check_on_1";
2697 program { name: "check_on_1";
2700 if (get_int(check_state) == 1)
2701 set_state(PART:"check", "visible_1", 0.0);
2703 after: "check_on_2";
2705 program { name: "check_on_2";
2708 if (get_int(check_state) == 1)
2709 set_state(PART:"check", "visible_2", 0.0);
2711 after: "check_on_3";
2713 program { name: "check_on_3";
2716 if (get_int(check_state) == 1)
2717 set_state(PART:"check", "visible_3", 0.0);
2719 after: "check_on_4";
2721 program { name: "check_on_4";
2724 if (get_int(check_state) == 1)
2725 set_state(PART:"check", "visible_4", 0.0);
2727 after: "check_on_5";
2729 program { name: "check_on_5";
2732 if (get_int(check_state) == 1)
2733 set_state(PART:"check", "visible_5", 0.0);
2735 after: "check_on_6";
2737 program { name: "check_on_6";
2740 if (get_int(check_state) == 1)
2741 set_state(PART:"check", "visible", 0.0);
2744 program { name: "check_off";
2745 signal: "elm,state,check,off";
2747 action: STATE_SET "default" 0.0;
2750 if (get_int(check_state) == 1)
2752 set_int(check_state, 0);
2753 set_state(PART:"check", "default", 0.0);
2757 program { name: "text_show";
2758 signal: "elm,state,text,visible";
2760 action: STATE_SET "visible" 0.0;
2763 program { name: "text_hide";
2764 signal: "elm,state,text,hidden";
2766 action: STATE_SET "default" 0.0;
2769 program { name: "icon_show";
2770 signal: "elm,state,icon,visible";
2772 action: STATE_SET "visible" 0.0;
2773 target: "elm.swallow.content";
2775 program { name: "icon_hide";
2776 signal: "elm,state,icon,hidden";
2778 action: STATE_SET "default" 0.0;
2779 target: "elm.swallow.content";
2781 program { name: "disable";
2782 signal: "elm,state,disabled";
2784 action: STATE_SET "disabled" 0.0;
2788 after: "disable_text";
2790 program { name: "disable_text";
2794 get_state(PART:"elm.text", st, 30, vl);
2795 if (!strcmp(st, "visible"))
2796 set_state(PART:"elm.text", "disabled_visible", 0.0);
2798 set_state(PART:"elm.text", "disabled", 0.0);
2799 get_state(PART:"elm.swallow.content", st, 30, vl);
2800 if (!strcmp(st, "visible"))
2801 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
2803 set_state(PART:"elm.swallow.content", "disabled", 0.0);
2804 get_state(PART:"check", st, 30, vl);
2805 if (!strcmp(st, "visible"))
2806 set_state(PART:"check", "disabled_visible", 0.0);
2807 set_int(check_state, 2);
2810 program { name: "enable";
2811 signal: "elm,state,enabled";
2813 action: STATE_SET "default" 0.0;
2817 after: "enable_text";
2819 program { name: "enable_text";
2823 get_state(PART:"elm.text", st, 30, vl);
2824 if (!strcmp(st, "disabled_visible"))
2825 set_state(PART:"elm.text", "visible", 0.0);
2827 set_state(PART:"elm.text", "default", 0.0);
2828 get_state(PART:"elm.swallow.content", st, 30, vl);
2829 if (!strcmp(st, "visible"))
2830 set_state(PART:"elm.swallow.content", "visible", 0.0);
2832 set_state(PART:"elm.swallow.content", "default", 0.0);
2833 get_state(PART:"check", st, 30, vl);
2834 if (!strcmp(st, "disabled_visible"))
2836 set_state(PART:"check", "visible", 0.0);
2837 set_int(check_state, 1);
2840 set_int(check_state, 0);
2847 #undef CHECK_STATE_DEFAULT
2848 #undef CHECK_STATE_VISIBLE
2849 #undef CHECK_STATE_DISABLED_VISIBLE
2850 #undef CHECK_STATE_DISABLED