4 * Copyright (c) 2000 - 2010 Samsung Electronics Co., Ltd.
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>,
7 * 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>,
8 * Hyunsil Park <hyunsil.park@samsung.com>, Sohyun Kim <anna1014.kim@samsung.com>, Seunggyun Kim <sgyun.kim@samsung.com>
10 * This library is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU Lesser General Public License as published by the
12 * Free Software Foundation; either version 2.1 of the License, or (at your option)
15 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation, Inc., 51
22 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 //################################################################
29 //################################################################
31 group { name: "elm/segment_control/base/default";
46 group { name: "elm/segment_control/item/default";
47 data.item: "label.wrap.part" "label.bg";
50 image: "00_winset_btn_sge_normal.png" COMP;
51 image: "00_winset_btn_sge_normal_left.png" COMP;
52 image: "00_winset_btn_sge_normal_centre.png" COMP;
53 image: "00_winset_btn_sge_normal_right.png" COMP;
54 image: "00_winset_btn_sge_press_normal.png" COMP;
55 image: "00_winset_btn_sge_press_left.png" COMP;
56 image: "00_winset_btn_sge_press_center.png" COMP;
57 image: "00_winset_btn_sge_press_right.png" COMP;
60 part { name: "segment";
63 description { state: "default" 0.0;
67 normal: "00_winset_btn_sge_normal.png";
73 description { state: "default_single" 0.0;
74 inherit: "default" 0.0;
77 normal: "00_winset_btn_sge_normal.png";
81 description { state: "default_left" 0.0;
82 inherit: "default" 0.0;
85 normal: "00_winset_btn_sge_normal_left.png";
89 description { state: "default_right" 0.0;
90 inherit: "default" 0.0;
93 normal: "00_winset_btn_sge_normal_right.png";
97 description { state: "default_middle" 0.0;
98 inherit: "default" 0.0;
101 normal: "00_winset_btn_sge_normal_centre.png";
105 description { state: "pressed_single" 0.0;
106 inherit: "default" 0.0;
109 normal: "00_winset_btn_sge_press_normal.png";
113 description { state: "pressed_left" 0.0;
114 inherit: "default" 0.0;
117 normal: "00_winset_btn_sge_press_left.png";
121 description { state: "pressed_right" 0.0;
122 inherit: "default" 0.0;
125 normal: "00_winset_btn_sge_press_right.png";
129 description { state: "pressed_middle" 0.0;
130 inherit: "default" 0.0;
133 normal: "00_winset_btn_sge_press_center.png";
137 description { state: "selected_single" 0.0;
138 inherit: "default" 0.0;
141 normal: "00_winset_btn_sge_press_normal.png";
145 description { state: "selected_left" 0.0;
146 inherit: "default" 0.0;
149 normal: "00_winset_btn_sge_press_left.png";
153 description { state: "selected_right" 0.0;
154 inherit: "default" 0.0;
157 normal: "00_winset_btn_sge_press_right.png";
161 description { state: "selected_middle" 0.0;
162 inherit: "default" 0.0;
165 normal: "00_winset_btn_sge_press_center.png";
170 part { name: "padding_left";
174 description { state: "default" 0.0;
176 rel1.relative: 0.0 0.0;
177 rel2.relative: 0.0 1.0;
184 part { name: "padding_right";
188 description { state: "default" 0.0;
190 rel1.relative: 1.0 0.0;
191 rel2.relative: 1.0 1.0;
198 part { name: "padding_top";
202 description { state: "default" 0.0;
204 rel1.relative: 0.0 0.0;
205 rel2.relative: 1.0 0.0;
212 part { name: "padding_bottom";
216 description { state: "default" 0.0;
218 rel1.relative: 0.0 1.0;
219 rel2.relative: 1.0 1.0;
226 part { name: "icon.bg";
230 description { state: "default" 0.0;
233 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
234 rel2 {relative: 1.0 1.0; to: "elm.swallow.icon"; }
239 part { name: "padding_icon_text";
243 description { state: "default" 0.0; //when only icon or no icon is there
245 rel1 { relative: 1.0 0.0; to: "icon.bg"; }
246 rel2 { relative: 1.0 1.0; to: "icon.bg"; }
251 description { state: "icononly" 0.0;
252 inherit: "default" 0.0;
254 description { state: "visible" 0.0; //when icon is visible
256 rel1 { relative: 1.0 0.0; to: "icon.bg"; }
257 rel2 { relative: 1.0 1.0; to: "icon.bg"; }
263 part { name: "elm.swallow.icon";
266 description { state: "default" 0.0;
269 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
270 rel2 {relative: 0.0 0.0; to_y: "padding_bottom"; }
273 aspect_preference: BOTH;
275 description { state: "visible" 0.0;
276 inherit: "default" 0.0;
278 rel2 {relative: 0.3 0.0; to_y: "padding_bottom"; }
280 description { state: "icononly" 0.0;;
281 inherit: "default" 0.0;
283 rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
287 part { name: "label.bg";
290 description { state: "default" 0.0;
291 rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
292 rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
295 part { name: "elm.swallow.label";
300 description { state: "default" 0.0;
305 rel1 { relative: 1.0 1.0; to_x: "padding_icon_text";}
306 rel2 { relative: 0.0 0.0; to_x: "padding_right";}
308 description { state: "visible" 0.0;
309 inherit: "default" 0.0;
313 part { name: "disabler";
316 description { state: "default" 0.0;
321 rel1 { relative: 0.0 0.0; to: "segment";}
322 rel2 { relative: 1.0 1.0; to: "segment";}
323 color: 255 255 255 150;
325 description { state: "disabled_single" 0.0;
326 inherit: "default" 0.0;
329 normal: "00_button_02_normal.png";
333 description { state: "disabled_left" 0.0;
334 inherit: "default" 0.0;
337 normal: "00_winset_btn_sge_normal_left.png";
341 description { state: "disabled_right" 0.0;
342 inherit: "default" 0.0;
345 normal: "00_winset_btn_sge_normal_right.png";
349 description { state: "disabled_middle" 0.0;
350 inherit: "default" 0.0;
353 normal: "00_winset_btn_sge_normal_centre.png";
361 public seg_type; // 1-Single, 2-Left, 3-Middle, 4-Right.
362 public seg_state; // 1-Normal/Default, 2-Pressed, 3-Selected.
363 public seg_status;// 0-Enabled/Default, 1-Disabled
365 public update_state() {
366 new type, state, disabled;
367 type = get_int(seg_type);
368 state = get_int(seg_state);
369 disabled = get_int(seg_status);
374 set_state(PART:"segment", "default_single", 0.0);
376 set_state(PART:"segment", "default_left", 0.0);
378 set_state(PART:"segment", "default_middle", 0.0);
380 set_state(PART:"segment", "default_right", 0.0);
382 else if( state == 2 )
385 set_state(PART:"segment", "pressed_single", 0.0);
387 set_state(PART:"segment", "pressed_left", 0.0);
389 set_state(PART:"segment", "pressed_middle", 0.0);
391 set_state(PART:"segment", "pressed_right", 0.0);
393 else if( state == 3 )
396 set_state(PART:"segment", "selected_single", 0.0);
398 set_state(PART:"segment", "selected_left", 0.0);
400 set_state(PART:"segment", "selected_middle", 0.0);
402 set_state(PART:"segment", "selected_right", 0.0);
407 set_state(PART:"disabler", "disabled_single", 0.0);
409 set_state(PART:"disabler", "disabled_left", 0.0);
411 set_state(PART:"disabler", "disabled_middle", 0.0);
413 set_state(PART:"disabler", "disabled_right", 0.0);
418 name: "segment_type_s";
419 signal: "elm,type,segment,single";
422 set_int(seg_status, 0);
423 set_int(seg_type, 1);
428 name: "segment_type_l";
429 signal: "elm,type,segment,left";
432 set_int(seg_status, 0);
433 set_int(seg_type, 2);
438 name: "segment_type_m";
439 signal: "elm,type,segment,middle";
442 set_int(seg_status, 0);
443 set_int(seg_type, 3);
448 name: "segment_type_r";
449 signal: "elm,type,segment,right";
452 set_int(seg_status, 0);
453 set_int(seg_type, 4);
458 name: "normal_segment";
459 signal: "elm,state,segment,normal";
462 set_int(seg_status, 0);
463 set_int(seg_state, 1);
468 name: "pressed_segment";
469 signal: "elm,state,segment,pressed";
472 set_int(seg_status, 0);
473 set_int(seg_state, 2);
478 name: "selected_segment";
479 signal: "elm,state,segment,selected";
482 set_int(seg_status, 0);
483 set_int(seg_state, 3);
487 program { name: "disable_segment";
488 signal: "elm,state,disabled";
491 set_int(seg_status, 1);
495 program { name: "enable_segment";
496 signal: "elm,state,enabled";
499 set_int(seg_status, 0);
503 program { name: "text_show";
504 signal: "elm,state,text,visible";
511 get_state(PART:"elm.swallow.icon", st, 30, vl);
512 get_state(PART:"elm.swallow.label", st1, 30, vl1);
513 if (!strcmp(st, "icononly"))
515 set_state(PART:"elm.swallow.icon", "visible", 0.0);
516 set_state(PART:"padding_icon_text", "visible", 0.0);
518 set_state(PART:"elm.swallow.label", "visible", 0.0);
521 program { name: "text_hide";
522 signal: "elm,state,text,hidden";
527 get_state(PART:"elm.swallow.icon", st, 30, vl);
528 if (!strcmp(st, "visible"))
530 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
531 set_state(PART:"padding_icon_text", "icononly", 0.0);
533 set_state(PART:"elm.swallow.label", "default", 0.0);
536 program { name: "icon_show";
537 signal: "elm,state,icon,visible";
542 get_state(PART:"elm.swallow.label", st, 30, vl);
543 if (!strcmp(st, "normal"))
545 set_state(PART:"elm.swallow.icon", "visible", 0.0);
546 set_state(PART:"padding_icon_text", "visible", 0.0);
550 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
551 set_state(PART:"padding_icon_text", "icononly", 0.0);
555 program { name: "icon_hide";
556 signal: "elm,state,icon,hidden";
558 action: STATE_SET "default" 0.0;
559 target: "elm.swallow.icon";
564 group { name: "elm/label/base/segment_normal";
565 data.item: "default_font_size" "24";
566 data.item: "min_font_size" "16";
567 data.item: "max_font_size" "24";
569 style { name: "seg_text_style_normal";
570 base: "font=SLP:style=Medium font_size=18 style=shadow \
571 shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_NORMAL_INC" \
573 color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_NORMAL_INC" wrap=char";
575 tag: "hilight" "+ font=SLP:style=Bold";
576 tag: "b" "+ font=SLP:style=Bold";
579 style { name: "seg_text_style_pressed";
580 base: "font=SLP:style=Medium font_size=18 style=shadow \
581 shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_NORMAL_INC" \
583 color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_PRESSED_INC" wrap=char";
585 tag: "hilight" "+ font=SLP:style=Bold";
586 tag: "b" "+ font=SLP:style=Bold";
589 style { name: "seg_text_style_selected";
590 base: "font=SLP:style=Medium font_size=18 style=shadow \
591 shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_SELECTED_INC" \
592 align=center color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_SELECTED_INC" \
595 tag: "hilight" "+ font=SLP:style=Bold";
596 tag: "b" "+ font=SLP:style=Bold";
599 style { name: "seg_text_style_disabled";
600 base: "font=SLP:style=Medium font_size=18 style=shadow \
601 shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_SELECTED_INC" \
602 align=center color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_DISABLED_INC" \
605 tag: "hilight" "+ font=SLP:style=Bold";
606 tag: "b" "+ font=SLP:style=Bold";
611 part { name: "label.swallow.background";
613 description { state: "default" 0.0;
615 rel1.relative, 0.0 0.0;
616 rel2.relative, 1.0 1.0;
619 part { name: "label.text.clip";
621 description { state: "default" 0.0;
623 rel1 { relative: 0 0; to: "label.swallow.background"; }
624 rel2 { relative: 1 1; to: "label.swallow.background"; }
627 part { name: "elm.text";
631 clip_to: "label.text.clip";
632 description { state: "default" 0.0;
633 rel1.relative, 0.0 0.0;
634 rel2.relative, 1.0 1.0;
637 style: "seg_text_style_normal";
646 group { name: "elm/label/base/segment_selected";
647 data.item: "default_font_size" "24";
648 data.item: "min_font_size" "16";
649 data.item: "max_font_size" "24";
651 part { name: "label.swallow.background";
653 description { state: "default" 0.0;
655 rel1.relative, 0.0 0.0;
656 rel2.relative, 1.0 1.0;
659 part { name: "label.text.clip";
661 description { state: "default" 0.0;
663 rel1 { relative: 0 0; to: "label.swallow.background"; }
664 rel2 { relative: 1 1; to: "label.swallow.background"; }
667 part { name: "elm.text";
671 clip_to: "label.text.clip";
672 description { state: "default" 0.0;
673 rel1.relative, 0.0 0.0;
674 rel2.relative, 1.0 1.0;
677 style: "seg_text_style_selected";
685 group { name: "elm/label/base/segment_pressed";
686 data.item: "default_font_size" "24";
687 data.item: "min_font_size" "16";
688 data.item: "max_font_size" "24";
690 part { name: "label.swallow.background";
692 description { state: "default" 0.0;
694 rel1.relative, 0.0 0.0;
695 rel2.relative, 1.0 1.0;
698 part { name: "label.text.clip";
700 description { state: "default" 0.0;
702 rel1 { relative: 0 0; to: "label.swallow.background"; }
703 rel2 { relative: 1 1; to: "label.swallow.background"; }
706 part { name: "elm.text";
710 clip_to: "label.text.clip";
711 description { state: "default" 0.0;
712 rel1.relative, 0.0 0.0;
713 rel2.relative, 1.0 1.0;
716 style: "seg_text_style_pressed";
725 group { name: "elm/label/base/segment_disabled";
726 data.item: "default_font_size" "24";
727 data.item: "min_font_size" "16";
728 data.item: "max_font_size" "24";
730 part { name: "label.swallow.background";
732 description { state: "default" 0.0;
734 rel1.relative, 0.0 0.0;
735 rel2.relative, 1.0 1.0;
738 part { name: "label.text.clip";
740 description { state: "default" 0.0;
742 rel1 { relative: 0 0; to: "label.swallow.background"; }
743 rel2 { relative: 1 1; to: "label.swallow.background"; }
746 part { name: "elm.text";
750 clip_to: "label.text.clip";
751 description { state: "default" 0.0;
752 rel1.relative, 0.0 0.0;
753 rel2.relative, 1.0 1.0;
756 style: "seg_text_style_disabled";