3 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an AS IS BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 #define TEXT_SLIDE_DURATION 10
23 style { name: "textblock_style";
24 base: "font=Tizen:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT_BLOCK_STYLE_COLOR_INC" text_class=tizen";
27 tag: "hilight" "+ font=Tizen:style=Bold";
28 tag: "b" "+ font=Tizen:style=Bold";
31 style { name: "naviframe_title_style";
32 base: "font=Tizen:style=Medium font_size="NAVIFRAME_TITLE_FONT_SIZE_INC" color="NAVIFRAME_TITLE_STYLE_COLOR_INC" text_class=tizen";
35 tag: "hilight" "+ font=Tizen:style=Bold";
36 tag: "b" "+ font=Tizen:style=Bold";
39 /* label doesn't use it */
40 style { name: "textblock_charwrap_style";
41 base: "font=Tizen:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT_BLOCK_STYLE_COLOR_INC" text_class=tizen";
44 tag: "hilight" "+ font=Tizen:style=Bold";
45 tag: "b" "+ font=Tizen:style=Bold";
50 group { name: "elm/label/base/default";
52 part { name: "label.text.clip";
54 description { state: "default" 0.0;
57 part { name: "elm.text";
60 clip_to: "label.text.clip";
61 description { state: "default" 0.0;
63 style: "textblock_style";
72 /* default label doesn't use it */
73 group { name: "elm/label/base_wrap/default";
75 part { name: "elm.text";
80 description { state: "default" 0.0;
82 style: "textblock_style";
87 description { state: "charwrap_mode" 0.0;
89 style: "textblock_charwrap_style";
97 program { name: "default_on";
98 signal: "elm,state,default";
100 action: STATE_SET "default" 0.0;
103 program { name: "charwrap_on";
104 signal: "elm,state,charwrap";
106 action: STATE_SET "charwrap_mode" 0.0;
112 /* default label doesn't use it */
113 group { name: "elm/label/base_wrap_ellipsis/default";
115 part { name: "elm.text";
120 description { state: "default" 0.0;
121 // FIXME : fixed for multiline ellipsis.
122 // does it need to make another ellipsis style?
125 style: "textblock_style";
130 description { state: "charwrap_mode" 0.0;
131 // FIXME : fixed for multiline ellipsis.
132 // does it need to make another ellipsis style?
135 style: "textblock_charwrap_style";
143 program { name: "default_on";
144 signal: "elm,state,default";
146 action: STATE_SET "default" 0.0;
149 program { name: "charwrap_on";
150 signal: "elm,state,charwrap";
152 action: STATE_SET "charwrap_mode" 0.0;
158 group { name: "elm/label/base/marker";
160 style { name: "textblock_style2";
161 base: "font=Tizen:style=Bold font_size=14 align=center color=#fff wrap=word text_class=tizen";
164 tag: "hilight" "+ color=#ffff";
165 tag: "b" "+ color=#ffff";
170 part { name: "elm.text";
174 description { state: "default" 0.0;
176 style: "textblock_style2";
185 /* default label doesn't use it */
186 group { name: "elm/label/base_wrap/marker";
188 part { name: "elm.text";
193 description { state: "default" 0.0;
195 style: "textblock_style2";
204 group { name: "elm/label/base/slide_long";
206 public g_duration, g_stopslide, g_timer_id, g_anim_id;
208 public message(Msg_Type:type, id, ...) {
209 if ((type == MSG_FLOAT_SET) && (id == 0)) {
211 duration = getfarg(2);
212 set_float(g_duration, duration);
215 public slide_to_end_anim(val, Float:pos) {
218 stopflag = get_int(g_stopslide);
219 if (stopflag == 1) return;
220 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
222 id = timer(0.5, "slide_to_begin", 1);
223 set_int(g_timer_id, id);
226 public slide_to_end() {
230 stopflag = get_int(g_stopslide);
231 if (stopflag == 1) return;
232 duration = get_float(g_duration);
233 id = anim(duration, "slide_to_end_anim", 1);
234 set_int(g_anim_id, id);
236 public slide_to_begin() {
239 stopflag = get_int(g_stopslide);
240 if (stopflag == 1) return;
241 set_state(PART:"elm.text", "slide_begin", 0.0);
242 id = timer(0.5, "slide_to_end", 1);
243 set_int(g_timer_id, id);
245 public start_slide() {
246 set_int(g_stopslide, 0);
247 set_state(PART:"elm.text", "slide_begin", 0.0);
250 public stop_slide() {
252 set_int(g_stopslide, 1);
253 id = get_int(g_anim_id);
255 id = get_int(g_timer_id);
257 set_state(PART:"elm.text", "default", 0.0);
262 part { name: "label.text.clip";
264 description { state: "default" 0.0;
267 part { name: "elm.text";
271 clip_to: "label.text.clip";
272 description { state: "default" 0.0;
273 rel1.relative: 0.0 0.0;
274 rel2.relative: 1.0 1.0;
277 style: "textblock_style";
282 description { state: "slide_end" 0.0;
283 inherit: "default" 0.0;
284 rel1.relative: 0.0 0.0;
285 rel2.relative: 0.0 1.0;
288 style: "textblock_style";
293 description { state: "slide_begin" 0.0;
294 inherit: "default" 0.0;
295 rel1.relative: 1.0 0.0;
296 rel2.relative: 1.0 1.0;
299 style: "textblock_style";
307 program { name: "start_slide";
309 signal: "elm,state,slide,start";
314 program { name: "stop_slide";
316 signal: "elm,state,slide,stop";
324 group { name: "elm/label/base/slide_short";
326 public g_duration, g_stopslide, g_timer_id, g_anim_id;
328 public message(Msg_Type:type, id, ...) {
329 if ((type == MSG_FLOAT_SET) && (id == 0)) {
331 duration = getfarg(2);
332 set_float(g_duration, duration);
335 public slide_to_end_anim(val, Float:pos) {
338 stopflag = get_int(g_stopslide);
339 if (stopflag == 1) return;
340 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
342 id = timer(0.5, "slide_to_begin", 1);
343 set_int(g_timer_id, id);
346 public slide_to_end() {
350 stopflag = get_int(g_stopslide);
351 if (stopflag == 1) return;
352 duration = get_float(g_duration);
353 id = anim(duration, "slide_to_end_anim", 1);
354 set_int(g_anim_id, id);
356 public slide_to_begin() {
359 stopflag = get_int(g_stopslide);
360 if (stopflag == 1) return;
361 set_state(PART:"elm.text", "slide_begin", 0.0);
362 id = timer(0.5, "slide_to_end", 1);
363 set_int(g_timer_id, id);
365 public start_slide() {
366 set_int(g_stopslide, 0);
367 set_state(PART:"elm.text", "slide_begin", 0.0);
370 public stop_slide() {
372 set_int(g_stopslide, 1);
373 id = get_int(g_anim_id);
375 id = get_int(g_timer_id);
377 set_state(PART:"elm.text", "default", 0.0);
382 part { name: "label.text.clip";
384 description { state: "default" 0.0;
387 part { name: "elm.text";
391 clip_to: "label.text.clip";
392 description { state: "default" 0.0;
393 rel1.relative: 0.0 0.0;
394 rel2.relative: 1.0 1.0;
397 style: "textblock_style";
402 description { state: "slide_end" 0.0;
403 inherit: "default" 0.0;
404 rel1.relative: 1.0 0.0;
405 rel2.relative: 1.0 1.0;
408 style: "textblock_style";
413 description { state: "slide_begin" 0.0;
414 inherit: "default" 0.0;
415 rel1.relative: 0.0 0.0;
416 rel2.relative: 0.0 1.0;
419 style: "textblock_style";
427 program { name: "start_slide";
429 signal: "elm,state,slide,start";
434 program { name: "stop_slide";
436 signal: "elm,state,slide,stop";
444 group { name: "elm/label/base/slide_bounce";
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_anim(val, Float:pos) {
479 stopflag = get_int(g_stopslide);
480 if (stopflag == 1) return;
481 set_tween_state(PART:"elm.text", pos, "slide_end", 0.0, "slide_begin", 0.0);
483 id = timer(0.5, "slide_to_end", 1);
484 set_int(g_timer_id, id);
487 public slide_to_begin() {
491 stopflag = get_int(g_stopslide);
492 if (stopflag == 1) return;
493 duration = get_float(g_duration);
494 id = anim(duration, "slide_to_begin_anim", 1);
495 set_int(g_anim_id, id);
497 public start_slide() {
498 set_int(g_stopslide, 0);
499 set_state(PART:"elm.text", "slide_begin", 0.0);
502 public stop_slide() {
504 set_int(g_stopslide, 1);
505 id = get_int(g_anim_id);
507 id = get_int(g_timer_id);
509 set_state(PART:"elm.text", "default", 0.0);
514 part { name: "label.text.clip";
516 description { state: "default" 0.0;
519 part { name: "elm.text";
523 clip_to: "label.text.clip";
524 description { state: "default" 0.0;
525 rel1.relative: 0.0 0.0;
526 rel2.relative: 1.0 1.0;
529 style: "textblock_style";
534 description { state: "slide_end" 0.0;
535 inherit: "default" 0.0;
536 rel1.relative: 1.0 0.0;
537 rel2.relative: 1.0 1.0;
540 style: "textblock_style";
545 description { state: "slide_begin" 0.0;
546 inherit: "default" 0.0;
547 rel1.relative: 0.0 0.0;
548 rel2.relative: 0.0 1.0;
551 style: "textblock_style";
559 program { name: "start_slide";
561 signal: "elm,state,slide,start";
566 program { name: "stop_slide";
568 signal: "elm,state,slide,stop";
576 group { name: "elm/label/base/naviframe_title";
578 public g_duration, g_stopslide, g_timer_id, g_anim_id;
580 public message(Msg_Type:type, id, ...) {
581 if ((type == MSG_FLOAT_SET) && (id == 0)) {
583 duration = getfarg(2);
584 set_float(g_duration, duration);
587 public slide_end_pending(val, Float:pos) {
590 emit("elm,state,slide,end", "");
593 public slide_to_end_anim(val, Float:pos) {
595 stopflag = get_int(g_stopslide);
596 if (stopflag == 1) return;
597 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
599 anim(1, "slide_end_pending", 1);
601 public slide_to_end() {
605 stopflag = get_int(g_stopslide);
606 if (stopflag == 1) return;
607 duration = get_float(g_duration);
608 id = anim(duration, "slide_to_end_anim", 1);
609 set_int(g_anim_id, id);
611 public slide_to_begin() {
614 stopflag = get_int(g_stopslide);
615 if (stopflag == 1) return;
616 set_state(PART:"elm.text", "slide_begin", 0.0);
617 id = timer(0.5, "slide_to_end", 1);
618 set_int(g_timer_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.text.clip";
639 description { state: "default" 0.0;
642 part { name: "elm.text";
646 clip_to: "label.text.clip";
647 description { state: "default" 0.0;
648 rel1.relative: 0.0 0.0;
649 rel2.relative: 1.0 1.0;
652 style: "naviframe_title_style";
656 description { state: "slide_end" 0.0;
657 inherit: "default" 0.0;
658 rel1.relative: 1.0 0.0;
659 rel2.relative: 1.0 1.0;
662 style: "naviframe_title_style";
666 description { state: "slide_begin" 0.0;
667 inherit: "default" 0.0;
668 rel1.relative: 0.0 0.0;
669 rel2.relative: 0.0 1.0;
672 style: "naviframe_title_style";
679 program { name: "start_slide";
681 signal: "elm,state,slide,start";
686 program { name: "stop_slide";
688 signal: "elm,state,slide,stop";
697 group { name: "elm/label/base/datetime";
698 inherit: "elm/label/base/default";
700 part { name: "elm.text";
703 clip_to: "label.text.clip";
704 description { state: "default" 0.0;
705 color: DATETIME_LABEL_TEXT_BLOCK_STYLE_COLOR_INC;
707 font: "Tizen:style=Regular";
708 size: DATETIME_TEXT_FONT_SIZE_INC;
713 description { state: "selected" 0.0;
714 inherit: "default" 0.0;
715 color: DATETIME_LABEL_TEXT_BLOCK_STYLE_SELECTED_COLOR_INC;
720 program { name: "label_select";
721 signal: "elm,state,select";
723 action: STATE_SET "selected" 0.0;
726 program { name: "label_unselect";
727 signal: "elm,state,unselect";
729 action: STATE_SET "default" 0.0;