2.0 alpha
[apps/core/preloaded/calendar.git] / data / edc / layout / inc.main.month.cal.edc
1 //base 690x850
2 //HD size 720x1280
3
4 #ifndef _RATIO_
5 #define _RATIO_
6 #define R_X (480.0/720.0)
7 #define R_Y (800.0/1280.0)
8 #endif
9
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)
16
17 #define WIDTH_OF_DAY (102*R_X)
18 #define WDAY_LEFT_OFFSET (8*R_X)
19 #define DAY_LEFT_OFFSET (10*R_X)
20
21 #define WD(_pos) \
22         part { name, "wday/"#_pos"/base"; \
23                 type, RECT; \
24                 description { \
25                         state, "default" 0.0; \
26                         rel1 { \
27                                 relative: (_pos % 7 / 7) 0; \
28                                 to, "wday/base"; \
29                         } \
30                         rel2 { \
31                                 relative: (_pos % 7 / 7 + 1 / 7) 1; \
32                                 to, "wday/base"; \
33                         } \
34                         color, 0 0 0 0; \
35                 } \
36         } \
37         part { name, "wday/"#_pos"/text"; \
38                 type, TEXT; \
39                 mouse_events, 0; \
40                 scale, 1; \
41                 description { \
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; \
46                         text { \
47                                 font, "SLP:style=Medium"; \
48                                 size, 26; \
49                                 align, (WDAY_LEFT_OFFSET/WIDTH_OF_DAY) 0.5; \
50                         } \
51                 } \
52                 description { \
53                         state, "sunday" 0.0; \
54                         inherit, "default" 0.0; \
55                         color, COLOR_OF_SUNDAY_TEXT_FOR_MONTH_CAL; \
56                 } \
57                 description { \
58                         state, "satday" 0.0; \
59                         inherit, "default" 0.0; \
60                         color, COLOR_OF_SATDAY_TEXT_FOR_MONTH_CAL; \
61                 } \
62         } \
63         programs { \
64                 program { name, "wday/"#_pos"/weekday"; \
65                         signal, "weekday,"#_pos; \
66                         source, "prog"; \
67                         action, STATE_SET "default" 0.0; \
68                         target, "wday/"#_pos"/text"; \
69                 } \
70                 program { name, "wday/"#_pos"/sunday"; \
71                         signal, "sunday,"#_pos; \
72                         source, "prog"; \
73                         action, STATE_SET "sunday" 0.0; \
74                         target, "wday/"#_pos"/text"; \
75                 } \
76                 program { name, "wday/"#_pos"/satday"; \
77                         signal, "satday,"#_pos; \
78                         source, "prog"; \
79                         action, STATE_SET "satday" 0.0; \
80                         target, "wday/"#_pos"/text"; \
81                 } \
82         }
83
84
85 // day block
86 #define DB(_line, _pos, _vert) \
87         part { name, "db/"#_pos"/base"; \
88                 type, RECT; \
89                 ignore_flags, ON_HOLD; \
90                 description { \
91                         state, "default" 0.0; \
92                         rel1 { \
93                                 relative, (_pos % 7 / 7) \
94                                         (_line / 6); \
95                                 to_x, "day/base"; \
96                                 to_y, "day/base"; \
97                         } \
98                         rel2 { \
99                                 relative, 0 \
100                                         (_line / 6 + 1 / 6); \
101                                 to_x, "vl/"#_vert; \
102                                 to_y, "day/base"; \
103                         } \
104                         color, 0 0 0 0; \
105                 } \
106         } \
107         part { name, "db/"#_pos"/today"; \
108                 type, RECT; \
109                 mouse_events, 0; \
110                 description { \
111                         state, "default" 0.0; \
112                         rel1.to, "db/"#_pos"/base"; \
113                         rel2 { \
114                                 relative, 0 1; \
115                                 to_x, "vl/"#_vert; \
116                                 to_y, "db/"#_pos"/base"; \
117                         } \
118                         visible, 0; \
119                 } \
120                 description { \
121                         state, "today" 0.0; \
122                         inherit, "default" 0.0; \
123                         color, COLOR_OF_TODAY_FOR_MONTH_CAL; \
124                         visible, 1; \
125                 } \
126         } \
127         part { name, "db/"#_pos"/sel"; \
128                 mouse_events, 0; \
129                 scale, 1; \
130                 description { \
131                         state, "default" 0.0; \
132                         rel1.to, "db/"#_pos"/base"; \
133                         rel2 { \
134                                 offset, 0 0; \
135                                 to, "db/"#_pos"/base"; \
136                         } \
137                         image { \
138                                 normal, CALENDAR_SELSECTED; \
139                                 border, 3 3 3 3; \
140                                 border_scale,1 ; \
141                         } \
142                         visible, 0; \
143                 } \
144                 description { \
145                         state, "selected" 0.0; \
146                         inherit, "default" 0.0; \
147                         visible, 1; \
148                 } \
149         } \
150         part { name, "db/"#_pos"/bg"; \
151                 mouse_events, 0; \
152                 scale, 1; \
153                 description { \
154                         state, "default" 0.0; \
155                         rel1.to, "db/"#_pos"/base"; \
156                         rel2 { \
157                                 offset, 0 0; \
158                                 to, "db/"#_pos"/base"; \
159                         } \
160                         image.normal, CALENDAR_WEEK_VIEW_PRESS; \
161                         visible, 0; \
162                 } \
163                 description { \
164                         state, "selected" 0.0; \
165                         inherit, "default" 0.0; \
166                         visible, 1; \
167                 } \
168         } \
169         part { name, "db/"#_pos"/text"; \
170                 type, TEXT; \
171                 mouse_events, 0; \
172                 scale, 1; \
173                 description { \
174                         state, "default" 0.0; \
175                         rel1.to, "db/"#_pos"/base"; \
176                         rel2.to, "db/"#_pos"/base"; \
177                         text { \
178                                 font, "SLP:style=Medium"; \
179                                 size, 30; \
180                                 align, (DAY_LEFT_OFFSET/WIDTH_OF_DAY) 0.0; \
181                         } \
182                         color, COLOR_OF_BLOCK_DEFAULT_TEXT_FOR_MONTH_CAL; \
183                 } \
184                 description { \
185                         state, "sunday" 0.0; \
186                         inherit, "default" 0.0; \
187                         color, COLOR_OF_BLOCK_SUNDAY_TEXT_FOR_MONTH_CAL; \
188                 } \
189                 description { \
190                         state, "satday" 0.0; \
191                         inherit, "default" 0.0; \
192                         color, COLOR_OF_BLOCK_SATDAY_TEXT_FOR_MONTH_CAL; \
193                 } \
194                 description { \
195                         state, "disabled" 0.0; \
196                         inherit, "default" 0.0; \
197                         color, COLOR_OF_BLOCK_DISABLEDAY_TEXT_FOR_MONTH_CAL; \
198                 } \
199                 description { \
200                         state, "selected" 0.0; \
201                         inherit, "default" 0.0; \
202                         color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
203                 } \
204         } \
205         part { name, "db/"#_pos"/count"; \
206                 type, TEXT; \
207                 mouse_events, 0; \
208                 scale, 1; \
209                 description { \
210                         state, "default" 0.0; \
211                         rel1.to, "db/"#_pos"/base"; \
212                         rel2.to, "db/"#_pos"/base"; \
213                         text { \
214                                 font, "SLP:style=Medium"; \
215                                 size, 25; \
216                                 align, 1.0 0.0; \
217                         } \
218                         color, COLOR_OF_BLOCK_MORE_TEXT_FOR_MONTH_CAL; \
219                         visible, 1; \
220                 } \
221                 description { \
222                         state, "selected" 0.0; \
223                         inherit, "default" 0.0; \
224                         color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
225                 } \
226                 description { \
227                         state, "hide" 0.0; \
228                         inherit, "default" 0.0; \
229                         visible, 0; \
230                 } \
231         } \
232         part { name, "db/"#_pos"/block"; \
233                 description { \
234                         state, "default" 0.0; \
235                         rel1.to, "db/"#_pos"/base"; \
236                         rel2.to, "db/"#_pos"/base"; \
237                         color, 0 0 0 0; \
238                         visible, 0; \
239                 } \
240                 description { \
241                         state, "disabled" 0.0; \
242                         inherit, "default" 0.0; \
243                         visible, 1; \
244                 } \
245         } \
246         programs { \
247                 program { name, "db/"#_pos"/go_down"; \
248                         signal, "dn,"_pos; \
249                         source, "prog"; \
250                         action, STATE_SET "selected" 0.0; \
251                         target, "db/"#_pos"/bg"; \
252                         target, "db/"#_pos"/count"; \
253                         target, "db/"#_pos"/text"; \
254                 } \
255                 program { name, "db/"#_pos"/go_up"; \
256                         signal, "up,"_pos; \
257                         source, "prog"; \
258                         action, STATE_SET "default" 0.0; \
259                         target, "db/"#_pos"/bg"; \
260                 } \
261                 program { name, "db/"#_pos"/down"; \
262                         signal, "mouse,down,1"; \
263                         source, "db/"#_pos"/base"; \
264                         action, SIGNAL_EMIT "dn,"_pos "cal"; \
265                 } \
266                 program { name, "db/"#_pos"/up"; \
267                         signal, "mouse,up,1"; \
268                         source, "db/"#_pos"/base"; \
269                         action, SIGNAL_EMIT "up,"_pos "cal"; \
270                 } \
271                 program { name, "db/"#_pos"/select"; \
272                         signal, "select,"#_pos; \
273                         source, "prog"; \
274                         action, STATE_SET "selected" 0.0; \
275                         target, "db/"#_pos"/sel"; \
276                         target, "db/"#_pos"/count"; \
277                         target, "db/"#_pos"/text"; \
278                 } \
279                 program { name, "db/"#_pos"/unselect"; \
280                         signal, "unselect,"#_pos; \
281                         source, "prog"; \
282                         action, STATE_SET "default" 0.0; \
283                         target, "db/"#_pos"/sel"; \
284                         target, "db/"#_pos"/count"; \
285                 } \
286                 program { name, "db/"#_pos"/set_today"; \
287                         signal, "today,"#_pos; \
288                         source, "prog"; \
289                         action, STATE_SET "today" 0.0; \
290                         target, "db/"#_pos"/today"; \
291                 } \
292                 program { name, "db/"#_pos"/unset_today"; \
293                         signal, "notoday,"#_pos; \
294                         source, "prog"; \
295                         action, STATE_SET "default" 0.0; \
296                         target, "db/"#_pos"/today"; \
297                 } \
298                 program { name, "db/"#_pos"/weekday"; \
299                         signal, "weekday,"#_pos; \
300                         source, "prog"; \
301                         action, STATE_SET "default" 0.0; \
302                         target, "db/"#_pos"/text"; \
303                 } \
304                 program { name, "db/"#_pos"/sunday"; \
305                         signal, "sunday,"#_pos; \
306                         source, "prog"; \
307                         action, STATE_SET "sunday" 0.0; \
308                         target, "db/"#_pos"/text"; \
309                 } \
310                 program { name, "db/"#_pos"/satday"; \
311                         signal, "satday,"#_pos; \
312                         source, "prog"; \
313                         action, STATE_SET "satday" 0.0; \
314                         target, "db/"#_pos"/text"; \
315                 } \
316                 program { name, "db/"#_pos"/disable"; \
317                         signal, "disable,"#_pos; \
318                         source, "prog"; \
319                         action, STATE_SET "disabled" 0.0; \
320                         target, "db/"#_pos"/text"; \
321                         target, "db/"#_pos"/block"; \
322                 } \
323                 program { name, "db/"#_pos"/enable"; \
324                         signal, "enable,"#_pos; \
325                         source, "prog"; \
326                         action, STATE_SET "default" 0.0; \
327                         target, "db/"#_pos"/block"; \
328                 } \
329                 program { name, "db/"#_pos"/show_count"; \
330                         signal, "show_count,"#_pos; \
331                         source, "prog"; \
332                         action, STATE_SET "default" 0.0; \
333                         target, "db/"#_pos"/count"; \
334                 } \
335                 program { name, "db/"#_pos"/hide_count"; \
336                         signal, "hide_count,"#_pos; \
337                         source, "prog"; \
338                         action, STATE_SET "hide" 0.0; \
339                         target, "db/"#_pos"/count"; \
340                 } \
341         }
342
343 // vertical line
344 #define VL(_pos) \
345         part { name, "vl/"#_pos; \
346                 type, RECT; \
347                 description { \
348                         state, "default" 0.0; \
349                         rel1 { \
350                                 relative, (_pos / 7) 0; \
351                                 offset, 0 -1; \
352                                 to, "day/base"; \
353                         } \
354                         rel2 { \
355                                 relative, (_pos / 7) 1; \
356                                 offset, 0 -1; \
357                                 to, "day/base"; \
358                         } \
359                         color, COLOR_OF_LINE_FOR_MONTH_CAL; \
360                 } \
361         }
362
363 // horizontal line
364 #define HL(_pos) \
365         part { name, "hl/"#_pos; \
366                 type, RECT; \
367                 description { \
368                         state, "default" 0.0; \
369                         rel1 { \
370                                 relative, 0 (_pos / 6); \
371                                 to, "day/base"; \
372                         } \
373                         rel2 { \
374                                 relative, 1 (_pos / 6); \
375                                 offset, -1 0; \
376                                 to, "day/base"; \
377                         } \
378                         color, COLOR_OF_LINE_FOR_MONTH_CAL; \
379                 } \
380         }
381
382 #define WNHL(_pos) \
383         part { name, "weeknumber/hl/"#_pos; \
384                 type, RECT; \
385                 description { \
386                         state, "default" 0.0; \
387                         rel1 { \
388                                 relative, 0 (_pos / 6); \
389                                 to, "weeknumber/day/base"; \
390                         } \
391                         rel2 { \
392                                 relative, 1 (_pos / 6); \
393                                 offset, -1 0; \
394                                 to, "weeknumber/day/base"; \
395                         } \
396                         color, COLOR_OF_LINE_FOR_MONTH_CAL; \
397                 } \
398         }
399
400 #define WNUMBER(_line) \
401         part { name, "wn/"#_line"/base"; \
402                 type, RECT; \
403                 ignore_flags, ON_HOLD; \
404                 description { \
405                         state, "default" 0.0; \
406                         rel1 { \
407                                 relative, 0 \
408                                         (_line / 6); \
409                                 to_x, "weeknumber/day/base"; \
410                                 to_y, "weeknumber/day/base"; \
411                         } \
412                         rel2 { \
413                                 relative, 1 \
414                                         (_line / 6 + 1 / 6); \
415                                 to_x, "weeknumber/day/base"; \
416                                 to_y, "weeknumber/day/base"; \
417                         } \
418                         color, 0 0 0 0; \
419                 } \
420         } \
421         part { name, "wn/"#_line"/text_rect"; \
422                 type, RECT; \
423                 mouse_events, 0; \
424                 description { \
425                         state, "default" 0.0; \
426                         rel1.to, "wn/"#_line"/base"; \
427                         rel2 { \
428                                 relative, 1 1/4; \
429                                 to, "wn/"#_line"/base"; \
430                         } \
431                         visible, 0; \
432                 } \
433         } \
434         part { name, "wn/"#_line"/text"; \
435                 type, TEXT; \
436                 mouse_events, 0; \
437                 scale, 1; \
438                 description { \
439                         state, "default" 0.0; \
440                         rel1.to, "wn/"#_line"/text_rect"; \
441                         rel2.to, "wn/"#_line"/text_rect"; \
442                         text { \
443                                 font, "SLP:style=Medium"; \
444                                 size, 20; \
445                                 align, 0.2 0.0; \
446                         } \
447                         color, COLOR_OF_WEEK_NUMBER_TEXT_FOR_MONTH_CAL; \
448                 } \
449         }
450
451 group { name, "main/month/cal";
452
453         images {
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;
458                 image, EVENT COMP;
459         }
460
461         parts {
462                 part { name, "base";
463                         type, RECT;
464                         description {
465                                 state, "default" 0.0;
466                                 color, 0 0 0 0;
467                         }
468                 }
469                 part { name, "weeknumber/wday/base";
470                         type, RECT;
471                         description {
472                                 state, "default" 0.0;
473                                 rel1 { relative, 0.0 0.0; to, "base"; }
474                                 rel2 { relative, 0.0 0.0; to, "base"; }
475                                 color, 0 0 0 0;
476                         }
477                         description {
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"; }
481                                 color, 0 0 0 0;
482                         }
483                 }
484                 part { name, "weeknumber/day/base";
485                         type, RECT;
486                         description {
487                                 state, "default" 0.0;
488                                 rel1 { relative, 0.0 0.0; to, "base"; }
489                                 rel2 { relative, 0.0 0.0; to, "base"; }
490                                 color, 0 0 0 0;
491                         }
492                         description {
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"; }
496                                 color, 0 0 0 0;
497                         }
498                 }
499                 part { name, "weeknumber/wday/line";
500                         type, RECT;
501                         description {
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;
506                         }
507                 }
508                 part { name, "weeknumber/vl";
509                         type, RECT;
510                         description {
511                                 state, "default" 0.0;
512                                 rel1 {
513                                         relative, 1 0;
514                                         offset, 0 -1;
515                                         to, "weeknumber/day/base";
516                                 }
517                                 rel2 {
518                                         relative, 1 1;
519                                         offset, 0 -1;
520                                         to, "weeknumber/day/base";
521                                 }
522                                 color, COLOR_OF_LINE_FOR_MONTH_CAL;
523                         }
524                 }
525
526                 part { name, "wday/weeknumber/base";
527                         type, RECT;
528                         description {
529                                 state, "default" 0.0;
530                                 rel1 {
531                                         relative: 0 0;
532                                         to, "weeknumber/wday/base";
533                                 }
534                                 rel2 {
535                                         relative: 1 1;
536                                         to, "weeknumber/wday/base";
537                                 }
538                                 color, 0 0 0 0;
539                         }
540                 }
541
542                 part { name, "wday/weeknumber/text";
543                         type, TEXT;
544                         mouse_events, 0;
545                         scale, 1;
546                         description {
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;
551                                 text {
552                                         font, "SLP:style=Medium";
553                                         size, 22;
554                                         align, 0.0 0.5;
555                                 }
556                         }
557                 }
558
559                 WNUMBER(0) WNUMBER(1) WNUMBER(2) WNUMBER(3) WNUMBER(4) WNUMBER(5)
560
561                 WNHL(0) WNHL(1) WNHL(2) WNHL(3) WNHL(4) WNHL(5) WNHL(6)
562
563                 programs {
564                         program { name, "display_week_number";
565                                 signal, "display_week_number";
566                                 source, "prog";
567                                 action, STATE_SET "default" 0.1;
568                                 target, "weeknumber/wday/base";
569                                 target, "weeknumber/day/base";
570                         }
571                 }
572                 part { name, "wday/base";
573                         type, RECT;
574                         description {
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"; }
578                                 color, 0 0 0 0;
579                         }
580                 }
581                 part { name, "day/base";
582                         type, RECT;
583                         description {
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"; }
587                                 color, 0 0 0 0;
588                         }
589                 }
590                 part { name, "wday/line";
591                         type, RECT;
592                         description {
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;
597                         }
598                 }
599
600                 WD(0) WD(1) WD(2) WD(3) WD(4) WD(5) WD(6)
601
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)
608
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)
611         }
612 }