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.
21 part { name: "ch_"#_pos".base"; \
24 description { state: "default" 0.0; \
26 relative: (_pos % 7 / 7) 0; \
30 relative: (_pos % 7 / 7 + 1 / 7) 1; \
37 part { name: "ch_"#_pos".text"; \
41 clip_to: "ch_"#_pos".clipper"; \
43 state: "default" 0.0; \
44 rel1.to: "ch_"#_pos".base"; \
45 rel2.to: "ch_"#_pos".base"; \
46 color: CALENDAR_WEEKDAY_FONT_COLOR_INC; \
48 font: "Tizen:style=Roman"; \
49 size: CALENDAR_DAY_FONT_SIZE_INC; \
52 text_class: "tizen"; \
56 part { name: "ch_"#_pos".clipper"; \
59 description { state: "default" 0.0; \
60 rel1.to: "ch_"#_pos".base"; \
61 rel2.to: "ch_"#_pos".base"; \
66 part { name: "cit_"#_pos".rect"; \
68 description { state: "default" 0.0; \
70 relative: (_pos % 7 / 7) \
71 (_pos / 7 / 6 - _pos % 7 / 7 / 6); \
75 relative: (_pos % 7 / 7 + 1 / 7) \
76 (_pos / 7 / 6 - _pos % 7 / 7 / 6 + 1 / 6); \
81 normal: "00_picker_field_bg.png"; \
85 description { state: "selected" 0.0; \
86 inherit: "default" 0.0; \
88 normal: "00_picker_btn_press.png"; \
92 description { state: "expand" 0.0; \
93 inherit: "default" 0.0; \
95 relative: (_pos % 7 / 7) \
96 (_pos / 7 / 5 - _pos % 7 / 7 / 5); \
100 relative: (_pos % 7 / 7 + 1 / 7) \
101 (_pos / 7 / 5 - _pos % 7 / 7 / 5 + 1 / 5); \
106 description { state: "invisible" 0.0; \
107 inherit: "default" 0.0; \
111 description { state: "today_normal" 0.0; \
112 inherit: "default" 0.0; \
114 normal: "00_picker_btn_current.png"; \
118 description { state: "today_expand" 0.0; \
119 inherit: "expand" 0.0; \
121 normal: "00_picker_btn_current.png"; \
127 name: "cit_"#_pos".event"; \
132 rel1.to: "cit_"#_pos".rect"; \
133 rel2.to: "cit_"#_pos".rect"; \
134 state: "default" 0.0; \
139 name: "cit_"#_pos".bg"; \
142 description { state: "default" 0.0; \
144 color: 255 255 255 0; \
146 to: "cit_"#_pos".rect"; \
150 to: "cit_"#_pos".rect"; \
154 normal: "00_calend_picker_day_press.png"; \
156 image.middle: SOLID; \
158 description { state: "selected" 0.0; \
159 inherit: "default" 0.0; \
161 color: 255 255 255 255; \
164 part { name: "cit_"#_pos".text"; \
169 state: "default" 0.0; \
170 rel1.to: "cit_"#_pos".rect"; \
171 rel2.to: "cit_"#_pos".rect"; \
172 color: CALENDAR_WEEKDAY_FONT_COLOR_INC; \
174 font: "Tizen:style=Medium"; \
175 size: CALENDAR_DATE_FONT_SIZE_INC; \
178 text_class: "tizen"; \
181 description { state: "saturday" 0.0; \
182 inherit: "default" 0.0; \
183 color: CALENDAR_SATURDAY_FONT_COLOR_INC; \
185 description { state: "sunday" 0.0; \
186 inherit: "default" 0.0; \
187 color: CALENDAR_SUNDAY_FONT_COLOR_INC; \
189 description { state: "selected" 0.0; \
190 inherit: "default" 0.0; \
191 color: CALENDAR_SELECTED_DATE_FONT_COLOR_INC; \
193 description { state: "selected_saturday" 0.0; \
194 inherit: "default" 0.0; \
195 color: CALENDAR_SELECTED_DATE_FONT_COLOR_INC; \
197 description { state: "selected_sunday" 0.0; \
198 inherit: "default" 0.0; \
199 color: CALENDAR_SELECTED_DATE_FONT_COLOR_INC; \
202 part { name: "cit_"#_pos".check"; \
205 description { state: "default" 0.0; \
207 to: "cit_"#_pos".rect"; \
212 to: "cit_"#_pos".rect"; \
218 image.normal: "00_check_Activated.png"; \
220 description { state: "visible" 0.0; \
221 inherit: "default" 0.0; \
227 name: "cit_"#_pos".go_active"; \
228 signal: "cit_"#_pos",selected"; \
233 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
234 if (!strcmp(st, "saturday")) \
235 set_state(PART:"cit_"#_pos".text", "selected_saturday", 0.0); \
236 else if (!strcmp(st, "sunday")) \
237 set_state(PART:"cit_"#_pos".text", "selected_sunday", 0.0); \
239 set_state(PART:"cit_"#_pos".text", "selected", 0.0); \
240 set_state(PART:"cit_"#_pos".bg", "selected", 0.0); \
244 name: "cit_"#_pos".go_passive"; \
245 signal: "cit_"#_pos",unselected"; \
250 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
251 if (!strcmp(st, "selected_saturday")) \
252 set_state(PART:"cit_"#_pos".text", "saturday", 0.0); \
253 else if (!strcmp(st, "selected_sunday")) \
254 set_state(PART:"cit_"#_pos".text", "sunday", 0.0); \
256 set_state(PART:"cit_"#_pos".text", "default", 0.0); \
257 set_state(PART:"cit_"#_pos".bg", "default", 0.0); \
261 name: "cit_"#_pos".weekday"; \
262 signal: "cit_"#_pos",weekday"; \
264 action: STATE_SET "default" 0.0; \
265 target: "cit_"#_pos".text"; \
268 name: "cit_"#_pos".saturday"; \
269 signal: "cit_"#_pos",saturday"; \
271 action: STATE_SET "saturday" 0.0; \
272 target: "cit_"#_pos".text"; \
275 name: "cit_"#_pos".sunday"; \
276 signal: "cit_"#_pos",sunday"; \
278 action: STATE_SET "sunday" 0.0; \
279 target: "cit_"#_pos".text"; \
282 name: "cit_"#_pos".is_today"; \
283 signal: "cit_"#_pos",today"; \
288 get_state(PART:"cit_"#_pos".rect", st, 30, vl); \
289 if (!strcmp(st, "expand")) \
291 set_state(PART:"cit_"#_pos".rect", "today_expand", 0.0); \
295 set_state(PART:"cit_"#_pos".rect", "today_normal", 0.0); \
300 name: "cit_"#_pos".not_today"; \
301 signal: "cit_"#_pos",not_today"; \
303 action: STATE_SET "default" 0.0; \
304 target: "cit_"#_pos".rect"; \
307 source: "cit_"#_pos".clicked"; \
308 signal: "mouse,clicked,1"; \
309 source: "cit_"#_pos".event"; \
310 action: SIGNAL_EMIT "elm,action,selected" #_pos; \
313 name: "cit_"#_pos".clear"; \
314 signal: "cit_"#_pos",clear"; \
316 action: STATE_SET "default" 0.0; \
317 target: "cit_"#_pos".check"; \
320 name: "cit_"#_pos".checked"; \
321 signal: "cit_"#_pos",checked"; \
323 action: STATE_SET "visible" 0.0; \
324 target: "cit_"#_pos".check"; \
327 name: "cit_"#_pos".go_expanded"; \
328 signal: "cit_"#_pos",cell_expanded"; \
330 action: STATE_SET "expand" 0.0; \
331 target: "cit_"#_pos".rect"; \
334 name: "cit_"#_pos".go_default"; \
335 signal: "cit_"#_pos",cell_default"; \
337 action: STATE_SET "default" 0.0; \
338 target: "cit_"#_pos".rect"; \
341 name: "cit_"#_pos".go_invisible"; \
342 signal: "cit_"#_pos",cell_invisible"; \
344 action: STATE_SET "invisible" 0.0; \
345 target: "cit_"#_pos".rect"; \
349 #define CSEPV(_pos) \
350 part { name: "csep_"#_pos".vertical"; \
353 description { state: "default" 0.0; \
355 relative: (_pos / 7) 0; \
359 relative: (_pos / 7) 1; \
363 color: CALENDAR_SEPERATOR_FONT_COLOR_INC; \
368 #define CSEPH(_pos) \
369 part { name: "csep_"#_pos".horizontal"; \
372 description { state: "default" 0.0; \
374 relative: 0 (_pos / 6); \
378 relative: 1 (_pos / 6); \
382 color: CALENDAR_SEPERATOR_FONT_COLOR_INC; \
385 description { state: "expand" 0.0; \
386 inherit: "default" 0.0; \
388 relative: 0 (_pos / 5); \
392 relative: 1 (_pos / 5); \
397 description { state: "invisible" 0.0; \
398 inherit: "default" 0.0; \
404 name: "cseph_"_pos".go_show"; \
405 signal: "cseph_"#_pos",row_show"; \
407 action: STATE_SET "default" 0.0; \
408 target: "csep_"#_pos".horizontal"; \
411 name: "cseph_"_pos".go_hide"; \
412 signal: "cseph_"#_pos",row_hide"; \
414 action: STATE_SET "expand" 0.0; \
415 target: "csep_"#_pos".horizontal"; \
418 name: "cseph_"_pos".go_invisible"; \
419 signal: "cseph_"#_pos",row_invisible"; \
421 action: STATE_SET "invisible" 0.0; \
422 target: "csep_"#_pos".horizontal"; \
426 group { name: "elm/calendar/base/default";
428 image: "00_check_Activated.png" COMP;
429 image: "00_picker_arrow_left.png" COMP;
430 image: "00_picker_arrow_left_press.png" COMP;
431 image: "00_picker_arrow_right.png" COMP;
432 image: "00_picker_arrow_right_press.png" COMP;
433 image: "00_picker_btn_press.png" COMP;
434 image: "00_picker_btn_normal.png" COMP;
435 image: "00_calend_picker_day_press.png" COMP;
436 image: "00_picker_btn_current.png" COMP;
437 image: "00_picker_btn_press.png" COMP;
438 image: "00_picker_field_bg.png" COMP;
447 description { state: "default" 0.0;
449 color: CALENDAR_BACKGROUND_COLOR_INC;
453 part { name: "spinner-base";
457 description { state: "default" 0.0;
458 min: CALENDAR_HEADER_MIN_WIDTH_INC CALENDAR_HEADER_MIN_HEIGHT_INC;
459 max: 999999 CALENDAR_HEADER_MIN_HEIGHT_INC;
464 color: CALENDAR_BACKGROUND_COLOR_INC;
468 part { name: "table-base";
472 description { state: "default" 0.0;
473 min: CALENDAR_BASE_MIN_WIDTH_INC CALENDAR_BASE_MIN_HEIGHT_INC;
475 rel1.to_y: "spinner-base";
480 color: CALENDAR_BACKGROUND_COLOR_INC;
483 part { name: "header";
487 description { state: "default" 0.0;
488 rel1.to: "table-base";
490 rel2.to: "table-base";
491 rel2.relative: 1 0.1;
492 color: CALENDAR_BACKGROUND_COLOR_INC;
495 part { name: "sep_header";
499 description { state: "default" 0.0;
505 color: CALENDAR_SEPERATOR_FONT_COLOR_INC;
512 description { state: "default" 0.0;
513 rel1.to_x: "table-base";
514 rel1.to_y: "sep_header";
517 rel2.to: "table-base";
523 part { name: "sep_vertical1";
526 description { state: "default" 0.0;
528 rel1.relative: 1/7 0;
530 rel2.relative: 1/7 1;
532 color: CALENDAR_SEPERATOR_FONT_COLOR_INC;
535 part { name: "left_bt";
538 description { state: "default" 0.0;
539 rel1 { to: "spinner-base";
542 rel2 { to: "spinner-base";
546 min: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC;
547 max: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC;
550 normal: "00_picker_btn_normal.png";
556 description { state: "clicked" 0.0;
557 inherit: "default" 0.0;
558 image.normal: "00_picker_btn_press.png";
561 part { name: "left_arrow";
564 description { state: "default" 0.0;
565 rel1 { to: "left_bt"; }
566 rel2 { to: "left_bt"; }
568 min: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC;
569 max: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC;
572 normal: "00_picker_arrow_left.png";
575 description { state: "clicked" 0.0;
576 inherit: "default" 0.0;
577 image.normal: "00_picker_arrow_left_press.png";
580 part { name: "right_bt";
583 description { state: "default" 0.0;
584 rel1 { to: "spinner-base";
587 rel2 { to: "spinner-base";
591 min: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC;
592 max: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC;
595 normal: "00_picker_btn_normal.png";
601 description { state: "clicked" 0.0;
602 inherit: "default" 0.0;
603 image.normal: "00_picker_btn_press.png";
606 part { name: "right_arrow";
609 description { state: "default" 0.0;
610 rel1 { to: "right_bt"; }
611 rel2 { to: "right_bt"; }
614 min: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC;
615 max: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC;
617 normal: "00_picker_arrow_right.png";
620 description { state: "clicked" 0.0;
621 inherit: "default" 0.0;
622 image.normal: "00_picker_arrow_right_press.png";
625 part { name: "month_text";
629 description { state: "default" 0.0;
632 rel1 { relative: 1.0 0.0;
635 to_y: "spinner-base";
637 rel2 { relative: 0.0 1.0;
640 to_y: "spinner-base";
642 color: CALENDAR_MONTH_FONT_COLOR_INC;
644 font: "Tizen:style=Medium";
645 size: CALENDAR_MONTH_FONT_SIZE_INC;
652 CH(0) CH(1) CH(2) CH(3) CH(4) CH(5) CH(6)
653 CIT(0) CIT(1) CIT(2) CIT(3) CIT(4) CIT(5) CIT(6)
654 CIT(7) CIT(8) CIT(9) CIT(10) CIT(11) CIT(12) CIT(13)
655 CIT(14) CIT(15) CIT(16) CIT(17) CIT(18) CIT(19) CIT(20)
656 CIT(21) CIT(22) CIT(23) CIT(24) CIT(25) CIT(26) CIT(27)
657 CIT(28) CIT(29) CIT(30) CIT(31) CIT(32) CIT(33) CIT(34)
658 CIT(35) CIT(36) CIT(37) CIT(38) CIT(39) CIT(40) CIT(41)
659 CSEPV(1) CSEPV(2) CSEPV(3) CSEPV(4) CSEPV(5) CSEPV(6)
660 CSEPH(1) CSEPH(2) CSEPH(3) CSEPH(4) CSEPH(5) CSEPH(6)
663 program { name: "dec_start";
664 signal: "mouse,down,1";
666 action: SIGNAL_EMIT "elm,action,decrement,start" "";
668 program { name: "dec_stop";
669 signal: "mouse,up,1";
671 action: SIGNAL_EMIT "elm,action,stop" "";
673 program { name: "inc_start";
674 signal: "mouse,down,1";
676 action: SIGNAL_EMIT "elm,action,increment,start" "";
678 program { name: "inc_stop";
679 signal: "mouse,up,1";
681 action: SIGNAL_EMIT "elm,action,stop" "";
684 name: "left_bt_click";
685 signal: "mouse,down,1";
687 action: STATE_SET "clicked" 0.0;
689 target: "left_arrow";
692 name: "left_bt_unclick";
693 signal: "mouse,up,1";
695 action: STATE_SET "default" 0.0;
697 target: "left_arrow";
700 name: "right_bt_click";
701 signal: "mouse,down,1";
703 action: STATE_SET "clicked" 0.0;
705 target: "right_arrow";
708 name: "right_bt_unclick";
709 signal: "mouse,up,1";
711 action: STATE_SET "default" 0.0;
713 target: "right_arrow";