2 * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
4 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
9 * 1. Redistributions of source code must retain the above copyright notice, this
10 * list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 group { name: "elm/radio/base/default";
29 image: "tw_btn_radiobox_holo_dark.png" COMP;
30 image: "tw_btn_radio_holo_dark.png" COMP;
31 image: "tw_btn_radiobox_line.png" COMP;
35 public radio_disabled;
37 public is_transition_finished = 0;
42 description { state: "default" 0.0;
45 image.normal: "tw_btn_radiobox_holo_dark.png";
46 color: 0 13 25 255; /*(Changeable UI) color_class: "W013L1";*/
48 description { state: "pressed" 0.0;
49 inherit: "default" 0.0;
50 color: 0 72 132 102; /*(Changeable UI) color_class: "W013L1P";*/
52 description { state: "disabled" 0.0;
53 inherit: "default" 0.0;
54 color: 35 35 35 255; /*(Changeable UI) color_class: "W013L1D";*/
58 clip_to: "opacity_clip";
60 description { state: "default" 0.0;
63 image.normal: "tw_btn_radio_holo_dark.png";
65 description { state: "on" 0.0;
66 inherit: "default" 0.0;
69 color: 115 191 15 255; /*(Changeable UI) color_class: "W013L2";*/
71 description { state: "pressed" 0.0;
73 color: 249 249 249 255; /*(Changeable UI) color_class: "W013L2P";*/
75 description { state: "disabled" 0.0;
77 color: 58 58 58 255; /*(Changeable UI) color_class: "W013L2D";*/
80 part { name: "outline";
82 description { state: "default" 0.0;
85 image.normal: "tw_btn_radiobox_line.png";
86 color: 249 249 249 76; /*(Changeable UI) color_class: "W241";*/
88 description { state: "pressed" 0.0;
89 inherit: "default" 0.0;
90 color: 249 249 249 76; /*(Changeable UI) color_class: "W241P";*/
92 description { state: "disabled" 0.0;
93 inherit: "default" 0.0;
94 color: 249 249 249 76; /*(Changeable UI) color_class: "W241D";*/
96 description { state: "focused" 0.0;
97 inherit: "default" 0.0;
98 color: 0 110 255 255; /*(Changeable UI) color_class: "W201";*/
101 part { name: "opacity_clip";
104 description { state: "default" 0.0;
107 color: 255 255 255 0;
109 description { state: "on" 0.0;
110 inherit: "default" 0.0;
111 color: 255 255 255 255;
114 part { name: "event";
117 description { state: "default" 0.0;
123 program { name: "show";
126 set_int(radio_show,1);
129 program { name: "hide";
132 set_int(radio_show,0);
135 program { name: "click";
136 signal: "mouse,clicked,1";
139 if (get_int(radio_disabled) == 1) return;
140 emit("elm,action,radio,toggle", "");
141 run_program(PROGRAM:"play_sample");
146 action: RUN_PLUGIN "touch_sound";
148 program { name: "unpressed";
149 signal: "mouse,up,1";
152 if (get_int(radio_disabled) == 1) return;
153 if (get_int(radio_state) == 1) {
154 if (get_int(is_transition_finished) == 1)
155 set_state(PART:"radio", "on", 0.0);
158 set_state(PART:"radio", "default", 0.0);
159 set_state(PART:"bg", "default", 0.0);
160 set_state(PART:"outline", "default", 0.0);
163 program { name: "pressed";
164 signal: "mouse,down,1";
167 if (get_int(radio_disabled) == 1) return;
168 if (get_int(radio_state) == 1) {
169 if (get_int(is_transition_finished) == 1)
170 set_state(PART:"radio", "pressed", 0.0);
173 set_state(PART:"radio", "default", 0.0);
174 set_state(PART:"bg", "pressed", 0.0);
175 set_state(PART:"outline", "pressed", 0.0);
178 program { name: "radio_on";
179 signal: "elm,state,radio,on";
182 set_int(radio_state, 1);
183 if (get_int(radio_disabled) == 1) {
184 set_state(PART:"bg", "disabled", 0.0);
185 set_state(PART:"outline", "disabled", 0.0);
186 set_state(PART:"radio", "disabled", 0.0);
189 if (get_int(radio_show) == 1) {
190 set_int(is_transition_finished, 0);
191 run_program(PROGRAM:"radio_show_effect");
192 run_program(PROGRAM:"radio_draw_effect");
195 set_int(is_transition_finished, 1);
196 set_state(PART:"radio", "on", 0.0);
197 set_state(PART:"opacity_clip", "on", 0.0);
199 set_state(PART:"bg", "default", 0.0);
200 set_state(PART:"outline", "default", 0.0);
204 program { name: "radio_off";
205 signal: "elm,state,radio,off";
208 if (get_int(radio_disabled) == 1) {
209 set_state(PART:"bg", "disabled", 0.0);
210 set_state(PART:"outline", "disabled", 0.0);
213 if (get_int(radio_state) == 1) {
214 set_state(PART:"bg", "default", 0.0);
215 set_state(PART:"outline", "default", 0.0);
216 set_state(PART:"radio", "default", 0.0);
217 set_state(PART:"opacity_clip", "default", 0.0);
218 set_int(radio_state, 0);
223 program { name: "radio_show_effect";
224 action: STATE_SET "on" 0.0;
225 transition: LINEAR 0.233;
226 target: "opacity_clip";
228 program { name: "radio_draw_effect";
229 action: STATE_SET "on" 0.0;
230 transition: LINEAR 0.267;
232 after: "radio_on_signal";
234 program { name: "radio_on_signal";
236 set_int(is_transition_finished, 1);
237 emit("elm,action,show,finished", "elm");
240 program { name: "focus";
241 signal: "elm,action,focus_highlight,show";
243 action: STATE_SET "focused" 0.0;
246 program { name: "unfocus";
247 signal: "elm,action,focus_highlight,hide";
249 action: STATE_SET "default" 0.0;
252 program { name: "disable";
253 signal: "elm,state,disabled";
256 if (get_int(radio_state) == 1)
257 set_state(PART:"radio", "disabled", 0.0);
259 set_state(PART:"radio", "default", 0.0);
260 set_state(PART:"bg", "disabled", 0.0);
261 set_state(PART:"outline", "disabled", 0.0);
262 set_int(radio_disabled, 1);
265 program { name: "enable";
266 signal: "elm,state,enabled";
269 if (get_int(radio_state) == 1)
270 set_state(PART:"radio", "on", 0.0);
272 set_state(PART:"radio", "default", 0.0);
273 set_state(PART:"bg", "default", 0.0);
274 set_state(PART:"outline", "default", 0.0);
275 set_int(radio_disabled, 0);
281 group { name: "elm/radio/base/datetime/style1";
282 alias: "elm/radio/base/datetime";
284 image: "tw_timepicker_num_bg_new.#.png" COMP;
288 public radio_disabled;
294 description { state: "default" 0.0;
295 min: 0 DATETIME_FIELD_HEIGHT;
296 max: -1 DATETIME_FIELD_HEIGHT;
302 description { state: "default" 0.0;
303 image.normal: "tw_timepicker_num_bg_new.#.png";
304 color: 9 37 63 255; /*(Changeable UI) color_class: "W0811";*/
305 min: 0 DATETIME_FIELD_HEIGHT;
306 max: -1 DATETIME_FIELD_HEIGHT;
311 description { state: "pressed" 0.0;
312 inherit: "default" 0.0;
313 color: 0 110 255 255; /*(Changeable UI) color_class: "W0812";*/
315 description { state: "disabled" 0.0;
316 inherit: "default" 0.0;
317 color: 25 38 51 255; /*(Changeable UI) color_class: "W262D";*/
320 part { name: "elm.text";
324 description { state: "default" 0.0;
328 font: "Tizen:style=Bold"; size: "50"; /*(Changeable UI) text_class: "T051";*/
333 size_range: DATETIME_TEXT_DIGIT_SIZE_INC;
335 color: 249 249 249 255; /*(Changeable UI) color_class: "T051";*/
337 description { state: "pressed" 0.0;
338 inherit: "default" 0.0;
339 text.font: "Tizen:style=Bold"; text.size: "50"; /*(Changeable UI) text_class: "T051";*/
340 text.text_class: "tizen";
341 color: 249 249 249 255; /*(Changeable UI) color_class: "T051";*/
343 description { state: "disabled" 0.0;
344 inherit: "default" 0.0;
345 text.font: "Tizen:style=Bold"; text.size: "50"; /*(Changeable UI) text_class: "T051D";*/
346 text.text_class: "tizen";
347 color: 96 96 96 255; /*(Changeable UI) color_class: "T051D";*/
352 program { name: "click";
353 signal: "mouse,clicked,1";
356 if (get_int(radio_disabled) == 1) return;
357 run_program(PROGRAM:"play_sample");
358 emit("elm,action,radio,toggle", "");
359 emit("elm,action,radio,clicked", "");
364 action: RUN_PLUGIN "touch_sound";
366 program { name: "radio_on";
367 signal: "elm,state,radio,on";
370 if (get_int(radio_disabled) == 1) {
371 set_state(PART:"bg", "disabled", 0.0);
372 set_state(PART:"elm.text", "disabled", 0.0);
375 set_state(PART:"bg", "pressed", 0.0);
376 set_state(PART:"elm.text", "pressed", 0.0);
380 program { name: "radio_off";
381 signal: "elm,state,radio,off";
384 if (get_int(radio_disabled) == 1) {
385 set_state(PART:"bg", "disabled", 0.0);
386 set_state(PART:"elm.text", "default", 0.0);
389 set_state(PART:"bg", "default", 0.0);
390 set_state(PART:"elm.text", "default", 0.0);
394 program { name: "disable";
395 signal: "elm,state,disabled";
398 set_state(PART:"bg", "disabled", 0.0);
399 set_state(PART:"elm.text", "disabled", 0.0);
400 set_int(radio_disabled, 1);
403 program { name: "enable";
404 signal: "elm,state,enabled";
407 set_state(PART:"bg", "default", 0.0);
408 set_state(PART:"elm.text", "default", 0.0);
409 set_int(radio_disabled, 0);
415 group { name: "elm/radio/base/datetime/style2";
416 inherit: "elm/radio/base/datetime/style1";
418 part { name: "elm.text";
422 description { state: "default" 0.0;
426 font: "Tizen:style=Bold"; size: "46"; /*(Changeable UI) text_class: "T052";*/
428 size_range: DATETIME_TEXT_STRING_SIZE_INC;
430 color: 249 249 249 255; /*(Changeable UI) color_class: "T052";*/
432 description { state: "pressed" 0.0;
433 inherit: "default" 0.0;
434 text.font: "Tizen:style=Bold"; text.size: "46"; /*(Changeable UI) text_class: "T052";*/
435 text.text_class: "tizen";
436 color: 249 249 249 255; /*(Changeable UI) color_class: "T052";*/
438 description { state: "disabled" 0.0;
439 inherit: "default" 0.0;
440 text.font: "Tizen:style=Bold"; text.size: "46"; /*(Changeable UI) text_class: "T052D";*/
441 text.text_class: "tizen";
442 color: 96 96 96 255; /*(Changeable UI) color_class: "T052D";*/
448 group { name: "elm/radio/base/datetime/style3";
449 inherit: "elm/radio/base/datetime/style2";
451 image: "tw_timepicker_num_bg_new.#.png" COMP;
456 description { state: "default" 0.0;
457 image.normal: "tw_timepicker_num_bg_new.#.png";
458 color: 9 37 63 255; /*(Changeable UI) color_class: "W0811";*/
459 min: 0 DATETIME_FIELD_HEIGHT;
460 max: -1 DATETIME_FIELD_HEIGHT;
465 description { state: "pressed" 0.0;
466 inherit: "default" 0.0;
467 color: 0 110 255 255; /*(Changeable UI) color_class: "W0812";*/
469 description { state: "disabled" 0.0;
470 inherit: "default" 0.0;
471 color: 25 38 51 255; /*(Changeable UI) color_class: "W262D";*/
478 group { name: "elm/radio/base/list";
480 image: "tw_btn_radiobox_holo_dark.png" COMP;
481 image: "tw_btn_radio_holo_dark.png" COMP;
482 image: "tw_btn_radiobox_line.png" COMP;
486 public radio_disabled;
488 public is_transition_finished = 0;
493 description { state: "default" 0.0;
496 image.normal: "tw_btn_radiobox_holo_dark.png";
497 color: 0 13 25 255; /*(Changeable UI) color_class: "W013L1";*/
499 description { state: "pressed" 0.0;
500 inherit: "default" 0.0;
501 color: 0 72 132 102; /*(Changeable UI) color_class: "W013L1P";*/
503 description { state: "disabled" 0.0;
504 inherit: "default" 0.0;
505 color: 35 35 35 255; /*(Changeable UI) color_class: "W013L1D";*/
508 part { name: "radio";
509 clip_to: "opacity_clip";
511 description { state: "default" 0.0;
514 image.normal: "tw_btn_radio_holo_dark.png";
516 description { state: "on" 0.0;
517 inherit: "default" 0.0;
520 color: 115 191 15 255; /*(Changeable UI) color_class: "W013L2";*/
522 description { state: "pressed" 0.0;
524 color: 249 249 249 255; /*(Changeable UI) color_class: "W013L2P";*/
526 description { state: "disabled" 0.0;
528 color: 58 58 58 255; /*(Changeable UI) color_class: "W013L2D";*/
531 part { name: "outline";
533 description { state: "default" 0.0;
536 image.normal: "tw_btn_radiobox_line.png";
537 color: 249 249 249 76; /*(Changeable UI) color_class: "W241";*/
539 description { state: "pressed" 0.0;
540 inherit: "default" 0.0;
541 color: 249 249 249 76; /*(Changeable UI) color_class: "W241P";*/
543 description { state: "disabled" 0.0;
544 inherit: "default" 0.0;
545 color: 249 249 249 76; /*(Changeable UI) color_class: "W241D";*/
547 description { state: "focused" 0.0;
548 inherit: "default" 0.0;
549 color: 0 110 255 255; /*(Changeable UI) color_class: "W201";*/
552 part { name: "opacity_clip";
555 description { state: "default" 0.0;
558 color: 255 255 255 0;
560 description { state: "on" 0.0;
561 inherit: "default" 0.0;
562 color: 255 255 255 255;
565 part { name: "event";
568 description { state: "default" 0.0;
574 program { name: "show";
577 set_int(radio_show,1);
580 program { name: "hide";
583 set_int(radio_show,0);
586 program { name: "click";
587 signal: "mouse,clicked,1";
590 if (get_int(radio_disabled) == 1) return;
591 emit("elm,action,radio,toggle", "");
594 program { name: "unpressed";
595 signal: "mouse,up,1";
598 if (get_int(radio_disabled) == 1) return;
599 if (get_int(radio_state) == 1) {
600 if (get_int(is_transition_finished) == 1)
601 set_state(PART:"radio", "on", 0.0);
604 set_state(PART:"radio", "default", 0.0);
605 set_state(PART:"bg", "default", 0.0);
606 set_state(PART:"outline", "default", 0.0);
609 program { name: "pressed";
610 signal: "mouse,down,1";
613 if (get_int(radio_disabled) == 1) return;
614 if (get_int(radio_state) == 1) {
615 if (get_int(is_transition_finished) == 1)
616 set_state(PART:"radio", "pressed", 0.0);
619 set_state(PART:"radio", "default", 0.0);
620 set_state(PART:"bg", "pressed", 0.0);
621 set_state(PART:"outline", "pressed", 0.0);
624 program { name: "radio_on";
625 signal: "elm,state,radio,on";
628 set_int(radio_state, 1);
629 if (get_int(radio_disabled) == 1) {
630 set_state(PART:"bg", "disabled", 0.0);
631 set_state(PART:"outline", "disabled", 0.0);
632 set_state(PART:"radio", "disabled", 0.0);
635 if (get_int(radio_show) == 1) {
636 set_int(is_transition_finished, 0);
637 run_program(PROGRAM:"radio_show_effect");
638 run_program(PROGRAM:"radio_draw_effect");
641 set_int(is_transition_finished, 1);
642 set_state(PART:"radio", "on", 0.0);
643 set_state(PART:"opacity_clip", "on", 0.0);
645 set_state(PART:"bg", "default", 0.0);
646 set_state(PART:"outline", "default", 0.0);
650 program { name: "radio_off";
651 signal: "elm,state,radio,off";
654 if (get_int(radio_disabled) == 1) {
655 set_state(PART:"bg", "disabled", 0.0);
656 set_state(PART:"outline", "disabled", 0.0);
659 if (get_int(radio_state) == 1) {
660 set_state(PART:"bg", "default", 0.0);
661 set_state(PART:"outline", "default", 0.0);
662 set_state(PART:"radio", "default", 0.0);
663 set_state(PART:"opacity_clip", "default", 0.0);
664 set_int(radio_state, 0);
669 program { name: "radio_show_effect";
670 action: STATE_SET "on" 0.0;
671 transition: LINEAR 0.233;
672 target: "opacity_clip";
674 program { name: "radio_draw_effect";
675 action: STATE_SET "on" 0.0;
676 transition: LINEAR 0.267;
678 after: "radio_on_signal";
680 program { name: "radio_on_signal";
682 set_int(is_transition_finished, 1);
683 emit("elm,action,show,finished", "elm");
686 program { name: "focus";
687 signal: "elm,action,focus_highlight,show";
689 action: STATE_SET "focused" 0.0;
692 program { name: "unfocus";
693 signal: "elm,action,focus_highlight,hide";
695 action: STATE_SET "default" 0.0;
698 program { name: "disable";
699 signal: "elm,state,disabled";
702 if (get_int(radio_state) == 1)
703 set_state(PART:"radio", "disabled", 0.0);
705 set_state(PART:"radio", "default", 0.0);
706 set_state(PART:"bg", "disabled", 0.0);
707 set_state(PART:"outline", "disabled", 0.0);
708 set_int(radio_disabled, 1);
711 program { name: "enable";
712 signal: "elm,state,enabled";
715 if (get_int(radio_state) == 1)
716 set_state(PART:"radio", "on", 0.0);
718 set_state(PART:"radio", "default", 0.0);
719 set_state(PART:"bg", "default", 0.0);
720 set_state(PART:"outline", "default", 0.0);
721 set_int(radio_disabled, 0);