4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seokjae Jeong <seok.j.jeong@samsung.com>, Myoungwoon Roy Kim <Myoungwoon.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>, Jaehwan Kim <jae.hwan.kim@samsung.com>, Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>, IlKook Yun <ilkook.yun@samsung.com>, CinWoo Kim <cinoo.kim@samsung.com> JiYeon Park <jy0703.park@samsung.com>
8 * This library is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU Lesser General Public License as published by the
10 * Free Software Foundation; either version 2.1 of the License, or (at your option)
13 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 * License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library; if not, write to the Free Software Foundation, Inc., 51
20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #define TEXT_SLIDE_DURATION 10
27 style { name: "textblock_style";
28 base: "font=SLP:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT_BLOCK_STYLE_COLOR_INC" text_class=label";
31 tag: "hilight" "+ font=SLP:style=Bold";
32 tag: "b" "+ font=SLP:style=Bold";
37 /* label doesn't use it */
39 style { name: "textblock_charwrap_style";
40 base: "font=SLP:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT_BLOCK_STYLE_COLOR_INC;
43 tag: "hilight" "+ font=SLP:style=Bold";
44 tag: "b" "+ font=SLP:style=Bold";
49 group { name: "elm/label/base/default";
50 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
51 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
52 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
54 part { name: "label.swallow.background";
56 description { state: "default" 0.0;
60 part { name: "label.text.clip";
62 description { state: "default" 0.0;
64 color: 255 255 255 255;
65 rel1 { relative: 0 0; to: "label.swallow.background"; }
66 rel2 { relative: 1 1; to: "label.swallow.background"; }
69 part { name: "elm.text";
73 clip_to: "label.text.clip";
74 description { state: "default" 0.0;
75 rel1.relative: 0.0 0.0;
76 rel2.relative: 1.0 1.0;
78 style: "textblock_style";
86 /* default label doesn't use it */
87 group { name: "elm/label/base_wrap/default";
88 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
89 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
90 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
92 part { name: "label.swallow.background";
94 description { state: "default" 0.0;
96 rel1 { relative: 0 0; to: "elm.text"; }
97 rel2 { relative: 1 1; to: "elm.text"; }
100 part { name: "elm.text";
105 description { state: "default" 0.0;
107 style: "textblock_style";
111 description { state: "charwrap_mode" 0.0;
113 style: "textblock_charwrap_style";
120 program { name: "default_on";
121 signal: "elm,state,default";
123 action: STATE_SET "default" 0.0;
126 program { name: "charwrap_on";
127 signal: "elm,state,charwrap";
129 action: STATE_SET "charwrap_mode" 0.0;
135 /* default label doesn't use it */
136 group { name: "elm/label/base_wrap_ellipsis/default";
137 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
138 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
139 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
141 part { name: "label.swallow.background";
143 description { state: "default" 0.0;
145 rel1 { relative: 0 0; to: "elm.text"; }
146 rel2 { relative: 1 1; to: "elm.text"; }
149 part { name: "elm.text";
154 description { state: "default" 0.0;
155 // FIXME : fixed for multiline ellipsis.
156 // does it need to make another ellipsis style?
159 style: "textblock_style";
163 description { state: "charwrap_mode" 0.0;
164 // FIXME : fixed for multiline ellipsis.
165 // does it need to make another ellipsis style?
168 style: "textblock_charwrap_style";
175 program { name: "default_on";
176 signal: "elm,state,default";
178 action: STATE_SET "default" 0.0;
181 program { name: "charwrap_on";
182 signal: "elm,state,charwrap";
184 action: STATE_SET "charwrap_mode" 0.0;
190 group { name: "elm/label/base/marker";
191 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
192 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
193 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
195 style { name: "textblock_style2";
196 base: "font=SLP:style=Bold font_size=14 align=center color=#fff wrap=word text_class=label";
199 tag: "hilight" "+ color=#ffff";
200 tag: "b" "+ color=#ffff";
205 part { name: "label.swallow.background";
207 description { state: "default" 0.0;
209 rel1 { relative: 0 0; to: "elm.text"; }
210 rel2 { relative: 1 1; to: "elm.text"; }
213 part { name: "elm.text";
217 description { state: "default" 0.0;
219 style: "textblock_style2";
227 /* default label doesn't use it */
228 group { name: "elm/label/base_wrap/marker";
229 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
230 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
231 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
233 part { name: "label.swallow.background";
235 description { state: "default" 0.0;
237 rel1 { relative: 0 0; to: "elm.text"; }
238 rel2 { relative: 1 1; to: "elm.text"; }
241 part { name: "elm.text";
246 description { state: "default" 0.0;
248 style: "textblock_style2";
256 group { name: "elm/label/base/titlebar/default";
257 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
258 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
259 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
261 part { name: "elm.text";
266 description { state: "default" 0.0;
268 font: "SLP:style=Bold";
279 group { name: "elm/label/base/titlebar/header";
280 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
281 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
282 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
284 style { name: "header_textblock_style";
285 base: "font=SLP:style=Medium font_size=34 color=#ffffff wrap=mixed";
289 tag: "em" "+ font=SLP:style=Oblique";
290 tag: "b" "+ font=SLP:style=Bold";
291 tag: "link" "+ color=#800 underline=on underline_color=#8008";
292 tag: "hilight" "+ font=SLP:style=Bold";
297 part { name: "elm.text";
302 description { state: "default" 0.0;
304 font: "SLP:style=Medium";
316 group { name: "elm/label/base/slide_long";
317 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
318 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
319 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
322 public g_duration, g_stopslide, g_timer_id, g_anim_id;
324 public message(Msg_Type:type, id, ...) {
325 if ((type == MSG_FLOAT_SET) && (id == 0)) {
327 duration = getfarg(2);
328 set_float(g_duration, duration);
331 public slide_to_end_anim(val, Float:pos) {
334 stopflag = get_int(g_stopslide);
335 if (stopflag == 1) return;
336 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
338 id = timer(0.5, "slide_to_begin", 1);
339 set_int(g_timer_id, id);
342 public slide_to_end() {
346 stopflag = get_int(g_stopslide);
347 if (stopflag == 1) return;
348 duration = get_float(g_duration);
349 id = anim(duration, "slide_to_end_anim", 1);
350 set_int(g_anim_id, id);
352 public slide_to_begin() {
355 stopflag = get_int(g_stopslide);
356 if (stopflag == 1) return;
357 set_state(PART:"elm.text", "slide_begin", 0.0);
358 id = timer(0.5, "slide_to_end", 1);
359 set_int(g_timer_id, id);
361 public start_slide() {
362 set_int(g_stopslide, 0);
363 set_state(PART:"elm.text", "slide_begin", 0.0);
366 public stop_slide() {
368 set_int(g_stopslide, 1);
369 id = get_int(g_anim_id);
371 id = get_int(g_timer_id);
373 set_state(PART:"elm.text", "default", 0.0);
378 part { name: "label.swallow.background";
380 description { state: "default" 0.0;
384 part { name: "label.text.clip";
386 description { state: "default" 0.0;
388 color: 255 255 255 255;
389 rel1 { relative: 0 0; to: "label.swallow.background"; }
390 rel2 { relative: 1 1; to: "label.swallow.background"; }
393 part { name: "elm.text";
397 clip_to: "label.text.clip";
398 description { state: "default" 0.0;
399 rel1.relative: 0.0 0.0;
400 rel2.relative: 1.0 1.0;
403 style: "textblock_style";
407 description { state: "slide_end" 0.0;
408 inherit: "default" 0.0;
409 rel1.relative: 0.0 0.0;
410 rel2.relative: 0.0 1.0;
413 description { state: "slide_begin" 0.0;
414 inherit: "default" 0.0;
415 rel1.relative: 1.0 0.0;
416 rel2.relative: 1.0 1.0;
422 program { name: "start_slide";
424 signal: "elm,state,slide,start";
429 program { name: "stop_slide";
431 signal: "elm,state,slide,stop";
440 group { name: "elm/label/base/slide_short";
441 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
442 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
443 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
446 public g_duration, g_stopslide, g_timer_id, g_anim_id;
448 public message(Msg_Type:type, id, ...) {
449 if ((type == MSG_FLOAT_SET) && (id == 0)) {
451 duration = getfarg(2);
452 set_float(g_duration, duration);
455 public slide_to_end_anim(val, Float:pos) {
458 stopflag = get_int(g_stopslide);
459 if (stopflag == 1) return;
460 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
462 id = timer(0.5, "slide_to_begin", 1);
463 set_int(g_timer_id, id);
466 public slide_to_end() {
470 stopflag = get_int(g_stopslide);
471 if (stopflag == 1) return;
472 duration = get_float(g_duration);
473 id = anim(duration, "slide_to_end_anim", 1);
474 set_int(g_anim_id, id);
476 public slide_to_begin() {
479 stopflag = get_int(g_stopslide);
480 if (stopflag == 1) return;
481 set_state(PART:"elm.text", "slide_begin", 0.0);
482 id = timer(0.5, "slide_to_end", 1);
483 set_int(g_timer_id, id);
485 public start_slide() {
486 set_int(g_stopslide, 0);
487 set_state(PART:"elm.text", "slide_begin", 0.0);
490 public stop_slide() {
492 set_int(g_stopslide, 1);
493 id = get_int(g_anim_id);
495 id = get_int(g_timer_id);
497 set_state(PART:"elm.text", "default", 0.0);
502 part { name: "label.swallow.background";
504 description { state: "default" 0.0;
508 part { name: "label.text.clip";
510 description { state: "default" 0.0;
512 color: 255 255 255 255;
513 rel1 { relative: 0 0; to: "label.swallow.background"; }
514 rel2 { relative: 1 1; to: "label.swallow.background"; }
517 part { name: "elm.text";
521 clip_to: "label.text.clip";
522 description { state: "default" 0.0;
523 rel1.relative: 0.0 0.0;
524 rel2.relative: 1.0 1.0;
527 style: "textblock_style";
531 description { state: "slide_end" 0.0;
532 inherit: "default" 0.0;
533 rel1.relative: 1.0 0.0;
534 rel2.relative: 1.0 1.0;
537 description { state: "slide_begin" 0.0;
538 inherit: "default" 0.0;
539 rel1.relative: 0.0 0.0;
540 rel2.relative: 0.0 1.0;
546 program { name: "start_slide";
548 signal: "elm,state,slide,start";
553 program { name: "stop_slide";
555 signal: "elm,state,slide,stop";
563 group { name: "elm/label/base/slide_bounce";
564 data.item: "default_font_size" LABEL_FONT_SIZE_INC;
565 data.item: "min_font_size" LABEL_MIN_FONT_SIZE_INC;
566 data.item: "max_font_size" LABEL_MAX_FONT_SIZE_INC;
569 public g_duration, g_stopslide, g_timer_id, g_anim_id;
571 public message(Msg_Type:type, id, ...) {
572 if ((type == MSG_FLOAT_SET) && (id == 0)) {
574 duration = getfarg(2);
575 set_float(g_duration, duration);
578 public slide_to_end_anim(val, Float:pos) {
581 stopflag = get_int(g_stopslide);
582 if (stopflag == 1) return;
583 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
585 id = timer(0.5, "slide_to_begin", 1);
586 set_int(g_timer_id, id);
589 public slide_to_end() {
593 stopflag = get_int(g_stopslide);
594 if (stopflag == 1) return;
595 duration = get_float(g_duration);
596 id = anim(duration, "slide_to_end_anim", 1);
597 set_int(g_anim_id, id);
599 public slide_to_begin_anim(val, Float:pos) {
602 stopflag = get_int(g_stopslide);
603 if (stopflag == 1) return;
604 set_tween_state(PART:"elm.text", pos, "slide_end", 0.0, "slide_begin", 0.0);
606 id = timer(0.5, "slide_to_end", 1);
607 set_int(g_timer_id, id);
610 public slide_to_begin() {
614 stopflag = get_int(g_stopslide);
615 if (stopflag == 1) return;
616 duration = get_float(g_duration);
617 id = anim(duration, "slide_to_begin_anim", 1);
618 set_int(g_anim_id, id);
620 public start_slide() {
621 set_int(g_stopslide, 0);
622 set_state(PART:"elm.text", "slide_begin", 0.0);
625 public stop_slide() {
627 set_int(g_stopslide, 1);
628 id = get_int(g_anim_id);
630 id = get_int(g_timer_id);
632 set_state(PART:"elm.text", "default", 0.0);
637 part { name: "label.swallow.background";
639 description { state: "default" 0.0;
643 part { name: "label.text.clip";
645 description { state: "default" 0.0;
647 color: 255 255 255 255;
648 rel1 { relative: 0 0; to: "label.swallow.background"; }
649 rel2 { relative: 1 1; to: "label.swallow.background"; }
652 part { name: "elm.text";
656 clip_to: "label.text.clip";
657 description { state: "default" 0.0;
658 rel1.relative: 0.0 0.0;
659 rel2.relative: 1.0 1.0;
662 style: "textblock_style";
666 description { state: "slide_end" 0.0;
667 inherit: "default" 0.0;
668 rel1.relative: 1.0 0.0;
669 rel2.relative: 1.0 1.0;
672 description { state: "slide_begin" 0.0;
673 inherit: "default" 0.0;
674 rel1.relative: 0.0 0.0;
675 rel2.relative: 0.0 1.0;
681 program { name: "start_slide";
683 signal: "elm,state,slide,start";
688 program { name: "stop_slide";
690 signal: "elm,state,slide,stop";