Merge branch 'tizen_2.1_smack' into tizen_2.1
[apps/core/preloaded/ug-camera-efl.git] / edc / style_label_camera.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *        http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18
19 #define TEXT_SLIDE_DURATION 10
20
21       styles {
22          style { name: "textblock_style";
23             base: "font=SLP:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT_BLOCK_STYLE_COLOR_INC" text_class=slp_medium";
24             tag:  "br" "\n";
25             tag:  "ps" "ps";
26             tag:  "hilight" "+ font=SLP:style=Bold";
27             tag:  "b" "+ font=SLP:style=Bold";
28             tag:  "tab" "\t";
29          }
30       }
31
32       /* label doesn't use it */
33       styles {
34          style { name: "textblock_charwrap_style";
35 base: "font=SLP:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT_BLOCK_STYLE_COLOR_INC" text_class=slp_medium";
36             tag:  "br" "\n";
37             tag:  "ps" "ps";
38             tag:  "hilight" "+ font=SLP:style=Bold";
39             tag:  "b" "+ font=SLP:style=Bold";
40             tag:  "tab" "\t";
41          }
42       }
43
44 collections {
45
46       group { name: "elm/label/base/default";
47          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
48          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
49          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
50          parts {
51             part { name: "label.text.clip";
52                type: RECT;
53                description { state: "default" 0.0;
54                }
55             }
56             part { name: "elm.text";
57                type: TEXTBLOCK;
58                scale: 1;
59                clip_to: "label.text.clip";
60                description { state: "default" 0.0;
61                   text {
62                      style: "textblock_style";
63                      min: 0 1;
64                      align: 0.0 0.0;
65                   }
66                }
67             }
68          }
69       }
70
71       /* default label doesn't use it */
72       group { name: "elm/label/base_wrap/default";
73          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
74          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
75          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
76          parts {
77             part { name: "elm.text";
78                type: TEXTBLOCK;
79                mouse_events: 1;
80                scale: 1;
81                multiline: 1;
82                description { state: "default" 0.0;
83                   text {
84                        style: "textblock_style";
85                        min: 0 1;
86                        align: 0.0 0.0;
87                   }
88                }
89                description { state: "charwrap_mode" 0.0;
90                   text {
91                      style: "textblock_charwrap_style";
92                      min: 0 1;
93                      align: 0.0 0.0;
94                   }
95                }
96             }
97          }
98          programs {
99             program { name: "default_on";
100                signal: "elm,state,default";
101                source: "elm";
102                action: STATE_SET "default" 0.0;
103                target: "elm.text";
104             }
105             program { name: "charwrap_on";
106                signal: "elm,state,charwrap";
107                source: "elm";
108                action: STATE_SET "charwrap_mode" 0.0;
109                target: "elm.text";
110             }
111          } // end programs
112       } // end group
113
114       /* default label doesn't use it */
115       group { name: "elm/label/base_wrap_ellipsis/default";
116          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
117          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
118          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
119          parts {
120             part { name: "elm.text";
121                type: TEXTBLOCK;
122                mouse_events: 0;
123                scale: 1;
124                multiline: 1;
125                description { state: "default" 0.0;
126                   // FIXME : fixed for multiline ellipsis.
127                   //         does it need to make another ellipsis style?
128                   fixed: 0 1;
129                   text {
130                      style: "textblock_style";
131                      min: 0 1;
132                      align: 0.0 0.0;
133                   }
134                }
135                description { state: "charwrap_mode" 0.0;
136                   // FIXME : fixed for multiline ellipsis.
137                   //         does it need to make another ellipsis style?
138                   fixed: 0 1;
139                   text {
140                      style: "textblock_charwrap_style";
141                      min: 0 1;
142                      align: 0.0 0.0;
143                   }
144                }
145             }
146          }
147          programs {
148             program { name: "default_on";
149                signal: "elm,state,default";
150                source: "elm";
151                action: STATE_SET "default" 0.0;
152                target: "elm.text";
153             }
154             program { name: "charwrap_on";
155                signal: "elm,state,charwrap";
156                source: "elm";
157                action: STATE_SET "charwrap_mode" 0.0;
158                target: "elm.text";
159             }
160          } // end programs
161       } // end group
162
163       group { name: "elm/label/base/marker";
164          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
165          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
166          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
167          styles {
168             style { name: "textblock_style2";
169                base: "font=SLP:style=Bold font_size=14 align=center color=#fff wrap=word text_class=slp_bold";
170                tag:  "br" "\n";
171                tag:  "ps" "ps";
172                tag:  "hilight" "+ color=#ffff";
173                tag:  "b" "+ color=#ffff";
174                tag:  "tab" "\t";
175             }
176          }
177          parts {
178             part { name: "elm.text";
179                type: TEXTBLOCK;
180                mouse_events: 0;
181                scale: 1;
182                description { state: "default" 0.0;
183                   text {
184                      style: "textblock_style2";
185                      min: 1 1;
186                      align: 0.0 0.0;
187                   }
188                }
189             }
190          }
191       }
192
193       /* default label doesn't use it */
194       group { name: "elm/label/base_wrap/marker";
195          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
196          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
197          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
198          parts {
199             part { name: "elm.text";
200                type: TEXTBLOCK;
201                mouse_events: 0;
202                scale: 1;
203                multiline: 1;
204                description { state: "default" 0.0;
205                   text {
206                      style: "textblock_style2";
207                      min: 1 1;
208                      align: 0.0 0.0;
209                   }
210                }
211             }
212          }
213       }
214
215       group { name: "elm/label/base/titlebar/default";
216          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
217          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
218          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
219          parts {
220             part { name: "elm.text";
221                type: TEXT;
222                effect: SHADOW;
223                mouse_events: 0;
224                scale: 1;
225                description { state: "default" 0.0;
226                   text {
227                      font: "SLP:style=Bold";
228                      size: 28;
229                      min: 0 0;
230                      align: 0.0 0.5;
231                      text: "slp";
232                   }
233                   color2: 0 0 0 255;
234                }
235             }
236          }
237       }
238
239       group { name: "elm/label/base/titlebar/header";
240          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
241          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
242          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
243          styles {
244             style { name: "header_textblock_style";
245                base: "font=SLP:style=Medium font_size=34 color=#ffffff wrap=mixed";
246                tag:  "br" "\n";
247                tag:  "ps" "ps";
248                tag:  "tab" "\t";
249                tag:  "em" "+ font=SLP:style=Oblique";
250                tag:  "b" "+ font=SLP:style=Bold";
251                tag:  "link" "+ color=#800 underline=on underline_color=#8008";
252                tag:  "hilight" "+ font=SLP:style=Bold";
253             }
254          }
255
256          parts {
257             part { name: "elm.text";
258                type: TEXT;
259                effect: SHADOW;
260                mouse_events: 0;
261                scale: 1;
262                description { state: "default" 0.0;
263                   text {
264                      font:     "SLP:style=Medium";
265                      size:     34;
266                      min:      0 0;
267                      align:    0.0 0.5;
268                      text: "slp";
269                   }
270                   color2: 0 0 0 255;
271                }
272             }
273          }
274       }
275
276
277       group { name: "elm/label/base/slide_long";
278          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
279          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
280          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
281
282          script {
283             public g_duration, g_stopslide, g_timer_id, g_anim_id;
284
285             public message(Msg_Type:type, id, ...) {
286                if ((type == MSG_FLOAT_SET) && (id == 0)) {
287                   new Float:duration;
288                   duration = getfarg(2);
289                   set_float(g_duration, duration);
290                }
291             }
292             public slide_to_end_anim(val, Float:pos) {
293                new stopflag;
294                new id;
295                stopflag = get_int(g_stopslide);
296                if (stopflag == 1) return;
297                set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
298                if (pos >= 1.0) {
299                   id = timer(0.5, "slide_to_begin", 1);
300                   set_int(g_timer_id, id);
301                }
302             }
303             public slide_to_end() {
304                new stopflag;
305                new id;
306                new Float:duration;
307                stopflag = get_int(g_stopslide);
308                if (stopflag == 1) return;
309                duration = get_float(g_duration);
310                id = anim(duration, "slide_to_end_anim", 1);
311                set_int(g_anim_id, id);
312             }
313             public slide_to_begin() {
314                new stopflag;
315                new id;
316                stopflag = get_int(g_stopslide);
317                if (stopflag == 1) return;
318                set_state(PART:"elm.text", "slide_begin", 0.0);
319                id = timer(0.5, "slide_to_end", 1);
320                set_int(g_timer_id, id);
321             }
322             public start_slide() {
323                set_int(g_stopslide, 0);
324                set_state(PART:"elm.text", "slide_begin", 0.0);
325                slide_to_end();
326             }
327             public stop_slide() {
328                new id;
329                set_int(g_stopslide, 1);
330                id = get_int(g_anim_id);
331                cancel_anim(id);
332                id = get_int(g_timer_id);
333                cancel_timer(id);
334                set_state(PART:"elm.text", "default", 0.0);
335             }
336          }
337
338          parts {
339             part { name: "label.text.clip";
340                type: RECT;
341                description { state: "default" 0.0;
342                }
343             }
344             part { name: "elm.text";
345                type: TEXTBLOCK;
346                mouse_events: 0;
347                scale: 1;
348                clip_to: "label.text.clip";
349                description { state: "default" 0.0;
350                   rel1.relative: 0.0 0.0;
351                   rel2.relative: 1.0 1.0;
352                   align: 0.0 0.0;
353                   text {
354                      style: "textblock_style";
355                      min: 1 1;
356                      align: 0.0 0.0;
357                   }
358                }
359                description { state: "slide_end" 0.0;
360                   inherit: "default" 0.0;
361                   rel1.relative: 0.0 0.0;
362                   rel2.relative: 0.0 1.0;
363                   align: 1.0 0.0;
364                }
365                description { state: "slide_begin" 0.0;
366                   inherit: "default" 0.0;
367                   rel1.relative: 1.0 0.0;
368                   rel2.relative: 1.0 1.0;
369                   align: 0.0 0.0;
370                }
371             }
372          }
373          programs {
374             program { name: "start_slide";
375                source: "elm";
376                signal: "elm,state,slide,start";
377                script {
378                   start_slide();
379                }
380             }
381             program { name: "stop_slide";
382                source: "elm";
383                signal: "elm,state,slide,stop";
384                script {
385                   stop_slide();
386                }
387             }
388          }
389       }
390
391
392       group { name: "elm/label/base/slide_short";
393          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
394          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
395          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
396
397          script {
398             public g_duration, g_stopslide, g_timer_id, g_anim_id;
399
400             public message(Msg_Type:type, id, ...) {
401                if ((type == MSG_FLOAT_SET) && (id == 0)) {
402                   new Float:duration;
403                   duration = getfarg(2);
404                   set_float(g_duration, duration);
405                }
406             }
407             public slide_to_end_anim(val, Float:pos) {
408                new stopflag;
409                new id;
410                stopflag = get_int(g_stopslide);
411                if (stopflag == 1) return;
412                set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
413                if (pos >= 1.0) {
414                   id = timer(0.5, "slide_to_begin", 1);
415                   set_int(g_timer_id, id);
416                }
417             }
418             public slide_to_end() {
419                new stopflag;
420                new id;
421                new Float:duration;
422                stopflag = get_int(g_stopslide);
423                if (stopflag == 1) return;
424                duration = get_float(g_duration);
425                id = anim(duration, "slide_to_end_anim", 1);
426                set_int(g_anim_id, id);
427             }
428             public slide_to_begin() {
429                new stopflag;
430                new id;
431                stopflag = get_int(g_stopslide);
432                if (stopflag == 1) return;
433                set_state(PART:"elm.text", "slide_begin", 0.0);
434                id = timer(0.5, "slide_to_end", 1);
435                set_int(g_timer_id, id);
436             }
437             public start_slide() {
438                set_int(g_stopslide, 0);
439                set_state(PART:"elm.text", "slide_begin", 0.0);
440                slide_to_end();
441             }
442             public stop_slide() {
443                new id;
444                set_int(g_stopslide, 1);
445                id = get_int(g_anim_id);
446                cancel_anim(id);
447                id = get_int(g_timer_id);
448                cancel_timer(id);
449                set_state(PART:"elm.text", "default", 0.0);
450             }
451          }
452
453          parts {
454             part { name: "label.text.clip";
455                type: RECT;
456                description { state: "default" 0.0;
457                }
458             }
459             part { name: "elm.text";
460                type: TEXTBLOCK;
461                mouse_events: 0;
462                scale: 1;
463                clip_to: "label.text.clip";
464                description { state: "default" 0.0;
465                   rel1.relative: 0.0 0.0;
466                   rel2.relative: 1.0 1.0;
467                   align: 0.0 0.0;
468                   text {
469                      style: "textblock_style";
470                      min: 1 1;
471                      align: 0.0 0.0;
472                   }
473                }
474                description { state: "slide_end" 0.0;
475                   inherit: "default" 0.0;
476                   rel1.relative: 1.0 0.0;
477                   rel2.relative: 1.0 1.0;
478                   align: 1.0 0.0;
479                }
480                description { state: "slide_begin" 0.0;
481                   inherit: "default" 0.0;
482                   rel1.relative: 0.0 0.0;
483                   rel2.relative: 0.0 1.0;
484                   align: 0.0 0.0;
485                }
486             }
487          }
488          programs {
489             program { name: "start_slide";
490                source: "elm";
491                signal: "elm,state,slide,start";
492                script {
493                   start_slide();
494                }
495             }
496             program { name: "stop_slide";
497                source: "elm";
498                signal: "elm,state,slide,stop";
499                script {
500                   stop_slide();
501                }
502             }
503          }
504       }
505
506       group { name: "elm/label/base/slide_bounce";
507          data.item: "default_font_size" LABEL_FONT_SIZE_INC;
508          data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
509          data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
510
511          script {
512             public g_duration, g_stopslide, g_timer_id, g_anim_id;
513
514             public message(Msg_Type:type, id, ...) {
515                if ((type == MSG_FLOAT_SET) && (id == 0)) {
516                   new Float:duration;
517                   duration = getfarg(2);
518                   set_float(g_duration, duration);
519                }
520             }
521             public slide_to_end_anim(val, Float:pos) {
522                new stopflag;
523                new id;
524                stopflag = get_int(g_stopslide);
525                if (stopflag == 1) return;
526                set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
527                if (pos >= 1.0) {
528                   id = timer(0.5, "slide_to_begin", 1);
529                   set_int(g_timer_id, id);
530                }
531             }
532             public slide_to_end() {
533                new stopflag;
534                new id;
535                new Float:duration;
536                stopflag = get_int(g_stopslide);
537                if (stopflag == 1) return;
538                duration = get_float(g_duration);
539                id = anim(duration, "slide_to_end_anim", 1);
540                set_int(g_anim_id, id);
541             }
542             public slide_to_begin_anim(val, Float:pos) {
543                new stopflag;
544                new id;
545                stopflag = get_int(g_stopslide);
546                if (stopflag == 1) return;
547                set_tween_state(PART:"elm.text", pos, "slide_end", 0.0, "slide_begin", 0.0);
548                if (pos >= 1.0) {
549                   id = timer(0.5, "slide_to_end", 1);
550                   set_int(g_timer_id, id);
551                }
552             }
553             public slide_to_begin() {
554                new stopflag;
555                new id;
556                new Float:duration;
557                stopflag = get_int(g_stopslide);
558                if (stopflag == 1) return;
559                duration = get_float(g_duration);
560                id = anim(duration, "slide_to_begin_anim", 1);
561                set_int(g_anim_id, id);
562             }
563             public start_slide() {
564                set_int(g_stopslide, 0);
565                set_state(PART:"elm.text", "slide_begin", 0.0);
566                slide_to_end();
567             }
568             public stop_slide() {
569                new id;
570                set_int(g_stopslide, 1);
571                id = get_int(g_anim_id);
572                cancel_anim(id);
573                id = get_int(g_timer_id);
574                cancel_timer(id);
575                set_state(PART:"elm.text", "default", 0.0);
576             }
577          }
578
579          parts {
580             part { name: "label.text.clip";
581                type: RECT;
582                description { state: "default" 0.0;
583                }
584             }
585             part { name: "elm.text";
586                type: TEXTBLOCK;
587                mouse_events: 0;
588                scale: 1;
589                clip_to: "label.text.clip";
590                description { state: "default" 0.0;
591                   rel1.relative: 0.0 0.0;
592                   rel2.relative: 1.0 1.0;
593                   align: 0.0 0.0;
594                   text {
595                      style: "textblock_style";
596                      min: 1 1;
597                      align: 0.0 0.0;
598                   }
599                }
600                description { state: "slide_end" 0.0;
601                   inherit: "default" 0.0;
602                   rel1.relative: 1.0 0.0;
603                   rel2.relative: 1.0 1.0;
604                   align: 1.0 0.0;
605                }
606                description { state: "slide_begin" 0.0;
607                   inherit: "default" 0.0;
608                   rel1.relative: 0.0 0.0;
609                   rel2.relative: 0.0 1.0;
610                   align: 0.0 0.0;
611                }
612             }
613          }
614          programs {
615             program { name: "start_slide";
616                source: "elm";
617                signal: "elm,state,slide,start";
618                script {
619                   start_slide();
620                }
621             }
622             program { name: "stop_slide";
623                source: "elm";
624                signal: "elm,state,slide,stop";
625                script {
626                   stop_slide();
627                }
628             }
629          }
630       }
631       /*note:button*/
632
633 }
634 //end file