6 #define R_X (480.0/720.0)
7 #define R_Y (800.0/1280.0)
10 #define HEIGHT_OF_WDAY (47.0*R_Y)
11 #define HEIGHT_OF_WDAY_LINE (3.0*R_Y)
12 #define HEIGHT_OF_DAY_BLOCK (107.0*R_Y)
13 #define WIDTH_OF_DAY_BLOCK (103.0*R_X)
14 #define HEIGHT_OF_DAY_CHECK (32.0*R_Y)
15 #define WIDTH_OF_DAY_CHECK (32.0*R_X)
17 #define WIDTH_OF_DAY (102*R_X)
18 #define WDAY_LEFT_OFFSET (8*R_X)
19 #define DAY_LEFT_OFFSET (10*R_X)
22 part { name, "wday/"#_pos"/base"; \
25 state, "default" 0.0; \
27 relative: (_pos % 7 / 7) 0; \
31 relative: (_pos % 7 / 7 + 1 / 7) 1; \
37 part { name, "wday/"#_pos"/text"; \
42 state, "default" 0.0; \
43 rel1.to, "wday/"#_pos"/base"; \
44 rel2.to, "wday/"#_pos"/base"; \
45 color, COLOR_OF_WEEK_DAY_TEXT_FOR_MONTH_CAL; \
47 font, "SLP:style=Medium"; \
49 align, (WDAY_LEFT_OFFSET/WIDTH_OF_DAY) 0.5; \
53 state, "sunday" 0.0; \
54 inherit, "default" 0.0; \
55 color, COLOR_OF_SUNDAY_TEXT_FOR_MONTH_CAL; \
58 state, "satday" 0.0; \
59 inherit, "default" 0.0; \
60 color, COLOR_OF_SATDAY_TEXT_FOR_MONTH_CAL; \
64 program { name, "wday/"#_pos"/weekday"; \
65 signal, "weekday,"#_pos; \
67 action, STATE_SET "default" 0.0; \
68 target, "wday/"#_pos"/text"; \
70 program { name, "wday/"#_pos"/sunday"; \
71 signal, "sunday,"#_pos; \
73 action, STATE_SET "sunday" 0.0; \
74 target, "wday/"#_pos"/text"; \
76 program { name, "wday/"#_pos"/satday"; \
77 signal, "satday,"#_pos; \
79 action, STATE_SET "satday" 0.0; \
80 target, "wday/"#_pos"/text"; \
86 #define DB(_line, _pos, _vert) \
87 part { name, "db/"#_pos"/base"; \
89 ignore_flags, ON_HOLD; \
91 state, "default" 0.0; \
93 relative, (_pos % 7 / 7) \
100 (_line / 6 + 1 / 6); \
107 part { name, "db/"#_pos"/today"; \
111 state, "default" 0.0; \
112 rel1.to, "db/"#_pos"/base"; \
116 to_y, "db/"#_pos"/base"; \
121 state, "today" 0.0; \
122 inherit, "default" 0.0; \
123 color, COLOR_OF_TODAY_FOR_MONTH_CAL; \
127 part { name, "db/"#_pos"/sel"; \
131 state, "default" 0.0; \
132 rel1.to, "db/"#_pos"/base"; \
135 to, "db/"#_pos"/base"; \
138 normal, CALENDAR_SELSECTED; \
145 state, "selected" 0.0; \
146 inherit, "default" 0.0; \
150 part { name, "db/"#_pos"/bg"; \
154 state, "default" 0.0; \
155 rel1.to, "db/"#_pos"/base"; \
158 to, "db/"#_pos"/base"; \
160 image.normal, CALENDAR_WEEK_VIEW_PRESS; \
164 state, "selected" 0.0; \
165 inherit, "default" 0.0; \
169 part { name, "db/"#_pos"/text"; \
174 state, "default" 0.0; \
175 rel1.to, "db/"#_pos"/base"; \
176 rel2.to, "db/"#_pos"/base"; \
178 font, "SLP:style=Medium"; \
180 align, (DAY_LEFT_OFFSET/WIDTH_OF_DAY) 0.0; \
182 color, COLOR_OF_BLOCK_DEFAULT_TEXT_FOR_MONTH_CAL; \
185 state, "sunday" 0.0; \
186 inherit, "default" 0.0; \
187 color, COLOR_OF_BLOCK_SUNDAY_TEXT_FOR_MONTH_CAL; \
190 state, "satday" 0.0; \
191 inherit, "default" 0.0; \
192 color, COLOR_OF_BLOCK_SATDAY_TEXT_FOR_MONTH_CAL; \
195 state, "disabled" 0.0; \
196 inherit, "default" 0.0; \
197 color, COLOR_OF_BLOCK_DISABLEDAY_TEXT_FOR_MONTH_CAL; \
200 state, "selected" 0.0; \
201 inherit, "default" 0.0; \
202 color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
205 part { name, "db/"#_pos"/count"; \
210 state, "default" 0.0; \
211 rel1.to, "db/"#_pos"/base"; \
212 rel2.to, "db/"#_pos"/base"; \
214 font, "SLP:style=Medium"; \
218 color, COLOR_OF_BLOCK_MORE_TEXT_FOR_MONTH_CAL; \
222 state, "selected" 0.0; \
223 inherit, "default" 0.0; \
224 color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
228 inherit, "default" 0.0; \
232 part { name, "db/"#_pos"/block"; \
234 state, "default" 0.0; \
235 rel1.to, "db/"#_pos"/base"; \
236 rel2.to, "db/"#_pos"/base"; \
241 state, "disabled" 0.0; \
242 inherit, "default" 0.0; \
247 program { name, "db/"#_pos"/go_down"; \
250 action, STATE_SET "selected" 0.0; \
251 target, "db/"#_pos"/bg"; \
252 target, "db/"#_pos"/count"; \
253 target, "db/"#_pos"/text"; \
255 program { name, "db/"#_pos"/go_up"; \
258 action, STATE_SET "default" 0.0; \
259 target, "db/"#_pos"/bg"; \
261 program { name, "db/"#_pos"/down"; \
262 signal, "mouse,down,1"; \
263 source, "db/"#_pos"/base"; \
264 action, SIGNAL_EMIT "dn,"_pos "cal"; \
266 program { name, "db/"#_pos"/up"; \
267 signal, "mouse,up,1"; \
268 source, "db/"#_pos"/base"; \
269 action, SIGNAL_EMIT "up,"_pos "cal"; \
271 program { name, "db/"#_pos"/select"; \
272 signal, "select,"#_pos; \
274 action, STATE_SET "selected" 0.0; \
275 target, "db/"#_pos"/sel"; \
276 target, "db/"#_pos"/count"; \
277 target, "db/"#_pos"/text"; \
279 program { name, "db/"#_pos"/unselect"; \
280 signal, "unselect,"#_pos; \
282 action, STATE_SET "default" 0.0; \
283 target, "db/"#_pos"/sel"; \
284 target, "db/"#_pos"/count"; \
286 program { name, "db/"#_pos"/set_today"; \
287 signal, "today,"#_pos; \
289 action, STATE_SET "today" 0.0; \
290 target, "db/"#_pos"/today"; \
292 program { name, "db/"#_pos"/unset_today"; \
293 signal, "notoday,"#_pos; \
295 action, STATE_SET "default" 0.0; \
296 target, "db/"#_pos"/today"; \
298 program { name, "db/"#_pos"/weekday"; \
299 signal, "weekday,"#_pos; \
301 action, STATE_SET "default" 0.0; \
302 target, "db/"#_pos"/text"; \
304 program { name, "db/"#_pos"/sunday"; \
305 signal, "sunday,"#_pos; \
307 action, STATE_SET "sunday" 0.0; \
308 target, "db/"#_pos"/text"; \
310 program { name, "db/"#_pos"/satday"; \
311 signal, "satday,"#_pos; \
313 action, STATE_SET "satday" 0.0; \
314 target, "db/"#_pos"/text"; \
316 program { name, "db/"#_pos"/disable"; \
317 signal, "disable,"#_pos; \
319 action, STATE_SET "disabled" 0.0; \
320 target, "db/"#_pos"/text"; \
321 target, "db/"#_pos"/block"; \
323 program { name, "db/"#_pos"/enable"; \
324 signal, "enable,"#_pos; \
326 action, STATE_SET "default" 0.0; \
327 target, "db/"#_pos"/block"; \
329 program { name, "db/"#_pos"/show_count"; \
330 signal, "show_count,"#_pos; \
332 action, STATE_SET "default" 0.0; \
333 target, "db/"#_pos"/count"; \
335 program { name, "db/"#_pos"/hide_count"; \
336 signal, "hide_count,"#_pos; \
338 action, STATE_SET "hide" 0.0; \
339 target, "db/"#_pos"/count"; \
345 part { name, "vl/"#_pos; \
348 state, "default" 0.0; \
350 relative, (_pos / 7) 0; \
355 relative, (_pos / 7) 1; \
359 color, COLOR_OF_LINE_FOR_MONTH_CAL; \
365 part { name, "hl/"#_pos; \
368 state, "default" 0.0; \
370 relative, 0 (_pos / 6); \
374 relative, 1 (_pos / 6); \
378 color, COLOR_OF_LINE_FOR_MONTH_CAL; \
383 part { name, "weeknumber/hl/"#_pos; \
386 state, "default" 0.0; \
388 relative, 0 (_pos / 6); \
389 to, "weeknumber/day/base"; \
392 relative, 1 (_pos / 6); \
394 to, "weeknumber/day/base"; \
396 color, COLOR_OF_LINE_FOR_MONTH_CAL; \
400 #define WNUMBER(_line) \
401 part { name, "wn/"#_line"/base"; \
403 ignore_flags, ON_HOLD; \
405 state, "default" 0.0; \
409 to_x, "weeknumber/day/base"; \
410 to_y, "weeknumber/day/base"; \
414 (_line / 6 + 1 / 6); \
415 to_x, "weeknumber/day/base"; \
416 to_y, "weeknumber/day/base"; \
421 part { name, "wn/"#_line"/text_rect"; \
425 state, "default" 0.0; \
426 rel1.to, "wn/"#_line"/base"; \
429 to, "wn/"#_line"/base"; \
434 part { name, "wn/"#_line"/text"; \
439 state, "default" 0.0; \
440 rel1.to, "wn/"#_line"/text_rect"; \
441 rel2.to, "wn/"#_line"/text_rect"; \
443 font, "SLP:style=Medium"; \
447 color, COLOR_OF_WEEK_NUMBER_TEXT_FOR_MONTH_CAL; \
451 group { name, "main/month/cal";
454 image, CALENDAR_SELSECTED COMP;
455 image, CALENDAR_WEEK_VIEW_PRESS COMP;
456 image, CALENDAR_MONTH_VIEW_BG_1 COMP;
457 image, CALENDAR_TODAY_ICON COMP;
465 state, "default" 0.0;
469 part { name, "weeknumber/wday/base";
472 state, "default" 0.0;
473 rel1 { relative, 0.0 0.0; to, "base"; }
474 rel2 { relative, 0.0 0.0; to, "base"; }
478 state, "default" 0.1;
479 rel1 { relative, 0.0 (0/HEIGHT_OF_CALENDAR_SW); to, "base"; }
480 rel2 { relative, (1/21) (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW; to, "base"; }
484 part { name, "weeknumber/day/base";
487 state, "default" 0.0;
488 rel1 { relative, 0.0 0.0; to, "base"; }
489 rel2 { relative, 0.0 0.0; to, "base"; }
493 state, "default" 0.1;
494 rel1 { relative, 0.0 (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW; to, "base"; }
495 rel2 { relative, (1/21) HEIGHT_OF_CALENDAR_SW/HEIGHT_OF_CALENDAR_SW; to, "base"; }
499 part { name, "weeknumber/wday/line";
502 state, "default" 0.0;
503 rel1 { relative, 0.0 1.0; offset, 0 (-1.0*HEIGHT_OF_WDAY_LINE); to, "weeknumber/wday/base"; }
504 rel2 { relative, 1.0 1.0; to, "weeknumber/wday/base"; }
505 color, COLOR_OF_LINE_FOR_MONTH_CAL;
508 part { name, "weeknumber/vl";
511 state, "default" 0.0;
515 to, "weeknumber/day/base";
520 to, "weeknumber/day/base";
522 color, COLOR_OF_LINE_FOR_MONTH_CAL;
526 part { name, "wday/weeknumber/base";
529 state, "default" 0.0;
532 to, "weeknumber/wday/base";
536 to, "weeknumber/wday/base";
542 part { name, "wday/weeknumber/text";
547 state, "default" 0.0;
548 rel1.to, "wday/weeknumber/base";
549 rel2.to, "wday/weeknumber/base";
550 color, COLOR_OF_WEEK_NUMBER_WDAY_FOR_MONTH_CAL;
552 font, "SLP:style=Medium";
559 WNUMBER(0) WNUMBER(1) WNUMBER(2) WNUMBER(3) WNUMBER(4) WNUMBER(5)
561 WNHL(0) WNHL(1) WNHL(2) WNHL(3) WNHL(4) WNHL(5) WNHL(6)
564 program { name, "display_week_number";
565 signal, "display_week_number";
567 action, STATE_SET "default" 0.1;
568 target, "weeknumber/wday/base";
569 target, "weeknumber/day/base";
572 part { name, "wday/base";
575 state, "default" 0.0;
576 rel1 { relative, 1.0 (0/HEIGHT_OF_CALENDAR_SW); to_x, "weeknumber/wday/base"; to_y, "base"; }
577 rel2 { relative, 1.0 (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW; to, "base"; }
581 part { name, "day/base";
584 state, "default" 0.0;
585 rel1 { relative, 1.0 (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW; to_x, "weeknumber/day/base"; to_y, "base";}
586 rel2 { relative, 1.0 HEIGHT_OF_CALENDAR_SW/HEIGHT_OF_CALENDAR_SW; to, "base"; }
590 part { name, "wday/line";
593 state, "default" 0.0;
594 rel1 { relative, 0.0 1.0; offset, 0 (-1.0*HEIGHT_OF_WDAY_LINE); to, "wday/base"; }
595 rel2 { relative, 1.0 1.0; to, "wday/base"; }
596 color, COLOR_OF_LINE_FOR_MONTH_CAL;
600 WD(0) WD(1) WD(2) WD(3) WD(4) WD(5) WD(6)
602 DB(0, 0, 1) DB(0, 1, 2) DB(0, 2, 3) DB(0, 3, 4) DB(0, 4, 5) DB(0, 5, 6) DB(0, 6, 7)
603 DB(1, 7, 1) DB(1, 8, 2) DB(1, 9, 3) DB(1, 10, 4) DB(1, 11, 5) DB(1, 12, 6) DB(1, 13, 7)
604 DB(2, 14, 1) DB(2, 15, 2) DB(2, 16, 3) DB(2, 17, 4) DB(2, 18, 5) DB(2, 19, 6) DB(2, 20, 7)
605 DB(3, 21, 1) DB(3, 22, 2) DB(3, 23, 3) DB(3, 24, 4) DB(3, 25, 5) DB(3, 26, 6) DB(3, 27, 7)
606 DB(4, 28, 1) DB(4, 29, 2) DB(4, 30, 3) DB(4, 31, 4) DB(4, 32, 5) DB(4, 33, 6) DB(4, 34, 7)
607 DB(5, 35, 1) DB(5, 36, 2) DB(5, 37, 3) DB(5, 38, 4) DB(5, 39, 5) DB(5, 40, 6) DB(5, 41, 7)
609 VL( 1) VL( 2) VL( 3) VL( 4) VL( 5) VL( 6) VL(7)
610 HL( 0) HL( 1) HL( 2) HL( 3) HL( 4) HL( 5) HL(6)