Merge with chun and jin
[apps/native/sample/adventure.git] / chun / momentic / momentic.edc
1 collections {
2    //base_scale: 1.8;
3    styles {
4       style { "text_style";
5          base: "font=Tizen font_size=18 text_class=entry color=#646261 valign=0.5 align=center";
6       }
7    }
8    images {
9       image: "world_map.png" COMP;
10       image: "searchlist.png" COMP;
11       image: "city0.png" COMP;
12       image: "city01.png" COMP;
13       image: "city1.png" COMP;
14       image: "city11.png" COMP;
15       image: "city2.png" COMP;
16       image: "city21.png" COMP;
17    }
18    group { name: "city0";
19       data.item: "width" "14";
20       data.item: "height" "12";
21       parts {
22          part  { name: "city";
23             type: IMAGE;
24             scale: 1;
25             description { state: "default";
26                image.normal: "city0.png";
27                aspect_preference: BOTH;
28                aspect: 1 1;
29                min: 14 12;
30                max: 14 12;
31                fixed: 1 1;
32             }
33          }
34          part { name: "effect";
35             type: IMAGE;
36             description { state: "default";
37                image.normal: "city01.png";
38                aspect_preference: BOTH;
39                aspect: 1 1;
40                rel1.to: "city";
41                rel2.to: "city";
42             }
43          }
44       }
45    }
46    group { "city1";
47       data.item: "width" "10";
48       data.item: "height" "10";
49       parts {
50          part { name: "city";
51             type: IMAGE;
52             scale: 1;
53             description { state: "default";
54                image.normal: "city1.png";
55                aspect_preference: BOTH;
56                aspect: 1 1;
57                min: 10 10;
58                max: 10 10;
59                fixed: 1 1;
60             }
61          }
62          image { name: "effect";
63             description { state: "default";
64                image.normal: "city11.png";
65                aspect_preference: BOTH;
66                aspect: 1 1;
67                rel1.to: "city";
68                rel2.to: "city";
69             }
70          }
71       }
72    }
73    group { "city2";
74       data.item: "width" "10";
75       data.item: "height" "10";
76       parts {
77          part { name: "city";
78             type: IMAGE;
79             scale: 1;
80             description { state: "default";
81                image.normal: "city2.png";
82                aspect_preference: BOTH;
83                aspect: 1 1;
84                min: 10 10;
85                max: 10 10;
86                fixed: 1 1;
87             }
88          }
89          image { name: "effect";
90             description { state: "default";
91                image.normal: "city21.png";
92                aspect_preference: BOTH;
93                aspect: 1 1;
94                rel1.to: "city";
95                rel2.to: "city";
96             }
97          }
98       }
99    }
100    group { "map";
101       parts {
102          part { name: "map";
103             type: IMAGE;
104             scale:1 ;
105             description { state: "default";
106                image.normal: "world_map.png";
107                fixed: 1 1;
108                min: 443 259;
109                max: 443 259;
110             }
111          }
112       }
113    }
114    group { "main";
115 //common      
116       parts {
117          part { name: "base";
118             type: RECT;
119             description { state: "default";
120             }
121          }
122          part { name: "map_base";
123             type: RECT;
124             description { state: "default";
125                rel2.relative: 1 0.51;
126                color: 246 243 243 255;
127             }
128             description { state: "next";
129                inherit: "default";
130                rel2.relative: 1 0.45;
131             }
132          }
133          part { name: "map";
134             type: SWALLOW;
135             scale:1 ;
136             description { state: "default";
137                rel1.to: "map_base";
138                rel2.to: "map_base";
139                rel1.relative: 0.0 0.27;
140                rel2.relative: 1.0 0.90;
141                fixed: 1 1;
142             }
143             description { state: "next";
144                inherit: "default";
145                rel1.relative: 0.0 0.10;
146                rel2.relative: 1.0 0.90;
147             }
148          }
149          part { name: "city_list";
150             type: SWALLOW;
151             scale: 1;
152             description { state: "default";
153                rel1.to: "map_base";
154                rel1.relative: 0.0 1.0;
155             }
156             description { state: "next";
157                inherit: "default";
158                rel2.relative: 1.0 0.75;
159             }
160          }
161 // Init
162          part { name: "add_dim";
163             type: RECT;
164             description { state: "default";
165                rel1.to: "map_base";
166                rel2.to: "map_base";
167                color: 0 0 0 50;
168             }
169             description { state: "next";
170                inherit: "default";
171                color: 0 0 0 0;
172             }
173          }
174          part { name: "add_btn_clipper";
175             type: RECT;
176             description { state: "default";
177                color: 255 255 255 0;
178             }
179             description { state: "visible";
180                color: 255 255 255 255;
181             }
182             description { state: "next";
183                color: 255 255 255 0;
184             }
185          }
186          part { name: "add_btn";
187             type: SWALLOW;
188             scale: 1;
189             clip_to: "add_btn_clipper";
190             description { state: "default";
191                rel1.to: "map_base";
192                rel2.to: "map_base";
193                rel1.relative: 0.5 0.4;
194                rel2.relative: 0.5 0.4;
195                align: 0.5 0.5;
196                min: 54 54;
197                fixed: 1 1;
198                color: 255 255 255 255;
199             }
200             description { state: "visible";
201                inherit: "default";
202                rel1.relative: 0.5 0.35;
203                rel2.relative: 0.5 0.35;
204                color: 255 255 255 255;
205             }
206             description { state: "next";
207                inherit: "visible";
208                min: 84 84;
209                color: 255 255 255 0;
210             }
211          }
212          part { name: "add_description";
213             type: TEXTBLOCK;
214             scale: 1;
215             description { state: "default";
216                rel1.to: "map_base";
217                rel2.to: "map_base";
218                rel1.relative: 0.0 0.5;
219                rel2.relative: 1.0 0.5;
220                fixed: 1 1;
221                align: 0 0;
222                text {
223                   text: "<b>Add cities,<br>To find best time for your chat.";
224                   style: "text_style";
225                   min: 0 1;
226                }
227                color: 255 255 255 0;
228             }
229             description { state: "visible";
230                inherit: "default";
231                rel1.relative: 0.0 0.45;
232                rel2.relative: 1.0 0.45;
233                color: 255 255 255 255;
234             }
235             description { state: "next";
236                inherit: "visible";
237                color: 255 255 255 0;
238             }
239          }
240          part { name: "add_description2";
241             type: TEXTBLOCK;
242             scale: 1;
243             description { state: "default";
244                rel1.relative: 0 0.6;
245                fixed: 1 1;
246                text {
247                   text: "<b>After you add cities,<br>they will be shown here.";
248                   style: "text_style";
249                   min: 0 1;
250                }
251                color: 255 255 255 255;
252             }
253             description { state: "hide";
254                inherit: "default";
255                color: 255 255 255 0;
256             }
257          }
258 // page 1
259           part { name: "searchlist";
260             type: IMAGE;
261             scale: 1;
262             description { state: "default";
263                rel1.relative: 0.03 0.015;
264                rel2.relative: 0.97 0.015;
265                align: 0.5 0;
266                fixed: 1 1;
267                image.normal: "searchlist.png";
268                image.border: 10 10 10 10;
269                image.border_scale: 1;
270             }
271             description { state: "visible";
272                inherit: "default";
273                rel2.to: "map";
274                rel2.relative: 0.97 0.5;
275             }
276          }
277          part { name: "searchbar";
278             type: RECT;
279             scale: 1;
280             description { state: "default";
281                rel1.relative: 0.03 0.015;
282                rel2.relative: 0.97 0.015;
283                min: 0 35;
284                align: 0.5 0;
285                fixed: 1 1;
286                color: 255 255 255 0;
287             }
288             description { state: "visible";
289                inherit: "default";
290                color: 255 255 255 255;
291             }
292          }
293          part { name: "next_btn_clipper";
294             type: RECT;
295             description { state: "default";
296                color: 255 255 255 0;
297             }
298             description { state: "visible";
299                color: 255 255 255 255;
300             }
301             description { state: "next";
302                color: 255 255 255 0;
303             }
304          }
305          part { name: "next_btn";
306             type: SWALLOW;
307             scale: 1;
308             clip_to: "next_btn_clipper";
309             description { state: "default";
310                rel1.to: "map";
311                rel2.to: "map";
312                rel1.relative: 0.85 0.8;
313                rel2.relative: 0.85 0.8;
314                min: 54 54;
315                fixed: 1 1;
316                color: 255 255 255 0;
317                align: 0.5 0.5;
318             }
319             description { state: "visible";
320                inherit: "default";
321                rel1.relative: 0.9 0.8;
322                rel2.relative: 0.9 0.8;
323                color: 255 255 255 255;
324             }
325             description { state: "next";
326                inherit: "visible";
327                min: 84 84;
328                color: 255 255 255 0;
329             }
330          }
331 //page 2
332          part { name: "best_time";
333             type: SWALLOW;
334             scale: 1;
335             description { state: "default";
336                rel1.to: "city_list";
337                rel1.relative: 0 1;
338                rel2.to: "city_list";
339                rel2.relative: 1 1;
340                min: 0 100;
341                fixed: 1 1;
342                align: 0.5 0;
343             }
344          }
345          part { name: "bottom_part";
346             type: SPACER;
347             scale: 1;
348             description { state: "default";
349                rel1.to: "best_time";
350                rel1.relative: 0 1;
351                rel2.relative: 1 1;
352             }
353             description { state:"next";
354                inherit: "default";
355             }
356          }
357          part { name: "save_dim";
358             type: RECT;
359             description{ state: "default";
360                color: 0 0 0 0;
361                visible: 0;
362             }
363             description{ state:"next";
364                color: 0 0 0 126;
365                visible: 1;
366             }
367          }
368          part { name: "save_group_btn";
369             type: SWALLOW;
370             scale: 1;
371             description { state: "default";
372                rel1.to: "bottom_part";
373                rel2.to: "bottom_part";
374                rel1.relative: 0.25 0.5;
375                rel2.relative: 0.25 0.5;
376                fixed: 1 1;
377                min: 150 50;
378                align: 0.5 0.5;
379             }
380          }
381          part { name: "new_event_btn";
382             type: SWALLOW;
383             scale: 1;
384             description { state: "default";
385                rel1.to: "bottom_part";
386                rel2.to: "bottom_part";
387                rel1.relative: 0.75 0.5;
388                rel2.relative: 0.75 0.5;
389                fixed: 1 1;
390                min: 150 50;
391                align: 0.5 0.5;
392             }
393          }
394       }
395       programs {
396
397 //sequence begin
398          program { name: "start";
399             signal: "load";
400             action: STATE_SET "visible";
401             target: "add_btn";
402             target: "add_btn_clipper";
403             target: "add_description";
404             transition: DECELERATE 1;
405          }
406          program { name: "page1";
407             signal: "momentic,state,page1";
408             script {
409                run_program(PROGRAM:"go_page1a");
410             }
411          }
412          program { name: "page2";
413             signal: "momentic,state,page2";
414             script {
415                run_program(PROGRAM:"hide_search");
416                run_program(PROGRAM:"go_page2a");
417             }
418          }
419 //sequence end
420          
421          
422 //page 1 begin
423          program { name: "go_page1a";
424             action: STATE_SET "next";
425             target: "add_btn";
426             target: "add_btn_clipper";
427             target: "add_description";
428             target: "add_dim";
429             transition: DECELERATE 0.25;
430             after: "go_page1b";
431          }
432          program { name: "go_page1b";
433             action: STATE_SET "visible";
434             target: "searchbar";
435          }
436 //page 1 end
437          
438          
439 //search bar begin
440          program { name: "show_searchbar";
441             signal: "momentic,state,searchbar,show";
442             action: STATE_SET "visible";
443             target: "searchbar";
444             transition: DECELERATE 0.25;
445          }
446          program { name: "hide_searchbar";
447             signal: "momentic,state,searchbar,hide";
448             action: STATE_SET "default";
449             target: "searchbar";
450             transition: DECELERATE 0.25;
451          }
452          program { name: "show_searchlist";
453             signal: "momentic,state,searchlist,show";
454             action: STATE_SET "visible";
455             target: "searchlist";
456             transition: DECELERATE 0.5;
457          }
458          program { name: "hide_searchlist";
459             signal: "momentic,state,searchlist,hide";
460             action: STATE_SET "default";
461             target: "searchlist";
462             transition: DECELERATE 0.5;
463          }
464          program { name: "hide_search";
465             signal: "momentic,state,searchlist,hide";
466             action: STATE_SET "default";
467             target: "searchlist";
468             transition: DECELERATE 0.5;
469             after: "hide_searchbar";
470          }
471 //search bar end
472          
473          program { name: "show_add_description2";
474             signal: "momentic,state,add_description,show";
475             action: STATE_SET "default";
476             target: "add_description2";
477             transition: DECELERATE 0.25;
478          }
479          program { name: "hide_add_description2";
480             signal: "momentic,state,add_description,hide";
481             action: STATE_SET "hide";
482             target: "add_description2";
483             transition: DECELERATE 0.25;
484          }
485
486          
487 //page 2 begin
488          program { name: "go_page2a";
489             action: STATE_SET "next";
490             target: "next_btn";
491             target: "next_btn_clipper";
492             transition: DECELERATE 0.25;
493             after: "go_page2b";
494          }
495          program { name: "go_page2b";
496             action: STATE_SET "next";
497             target: "map_base";
498             target: "map";
499             target: "city_list";
500             target: "bottom_part";
501             transition: DECELERATE 0.75;
502          }
503 //page 2 end
504          
505
506 //next button begin
507          program { name: "next_btn_show";
508             signal: "momentic,state,next_btn,show";
509             action: STATE_SET "visible";
510             target: "next_btn";
511             target: "next_btn_clipper";
512             transition: DECELERATE 0.75;
513          }
514          program { name: "next_btn_hide";
515             signal: "momentic,state,next_btn,hide";
516             action: STATE_SET "default";
517             target: "next_btn";
518             transition: DECELERATE 0.75;
519          }
520 //next button end
521          
522          
523 //test begin
524          program { name: "add_btn_clicked";
525             signal: "mouse,clicked,1";
526             source: "add_btn";
527             script {
528                run_program(PROGRAM:"page1");
529             }
530          }
531          program { name: "searchbar_clicked";
532             signal: "mouse,clicked,1";
533             source: "searchbar";
534             script {
535                run_program(PROGRAM:"show_searchlist");
536             }
537          }
538          program { name: "add_description2_clicked";
539             signal: "mouse,clicked,1";
540             source: "add_description2";
541             script {
542                run_program(PROGRAM:"hide_add_description2");
543                run_program(PROGRAM:"next_btn_show");
544             }
545          }
546          program { name: "next_btn_clicked";
547             signal: "mouse,clicked,1";
548             source: "next_btn";
549             script {
550                run_program(PROGRAM:"page2");
551             }
552          }
553 //test end         
554       }
555    }
556 }