2 * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
4 * PROPRIETARY/CONFIDENTIAL
6 * This software is the confidential and proprietary information of SAMSUNG
7 * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
8 * software is owned by Samsung and you shall not disclose such Confidential
9 * Information and shall use it only in accordance with the terms of the license
10 * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
11 * representations or warranties about the suitability of the software, either
12 * express or implied, including but not limited to the implied warranties of
13 * merchantability, fitness for a particular purpose, or non-infringement.
14 * SAMSUNG shall not be liable for any damages suffered by licensee arising out
15 * of or releated to this software.
19 //################################################################
21 //################################################################
23 group { name: "elm/segment_control/base/default";
25 image: "00_winset_btn_sge_normal.png" COMP;
27 #define SEGMENT_TYPE_SINGLE 1
28 #define SEGMENT_TYPE_LEFT 2
29 #define SEGMENT_TYPE_MIDDLE 3
30 #define SEGMENT_TYPE_RIGHT 4
31 #define SEGMENT_STATE_NORMAL 1
32 #define SEGMENT_STATE_PRESSED 2
33 #define SEGMENT_STATE_SELECTED 3
34 #define SEGMENT_STATUS_ENABLED 0
35 #define SEGMENT_STATUS_DISABLED 1
46 normal: "00_winset_btn_sge_normal.png";
55 group { name: "elm/segment_control/item/default";
57 image: "00_winset_btn_sge_normal.png" COMP;
58 image: "00_winset_btn_sge_normal_left.png" COMP;
59 image: "00_winset_btn_sge_normal_centre.png" COMP;
60 image: "00_winset_btn_sge_normal_right.png" COMP;
61 image: "00_winset_btn_sge_press_normal.png" COMP;
62 image: "00_winset_btn_sge_press_01.png" COMP;
63 image: "00_winset_btn_sge_press_02.png" COMP;
64 image: "00_winset_btn_sge_press_03.png" COMP;
70 description { state: "default" 0.0;
74 part { name: "segment";
76 description { state: "default" 0.0;
91 normal: "00_winset_btn_sge_normal.png";
97 description { state: "default_single" 0.0;
98 inherit: "default" 0.0;
101 normal: "00_winset_btn_sge_normal.png";
105 description { state: "default_left" 0.0;
106 inherit: "default" 0.0;
109 normal: "00_winset_btn_sge_normal_left.png";
113 description { state: "default_right" 0.0;
114 inherit: "default" 0.0;
117 normal: "00_winset_btn_sge_normal_right.png";
121 description { state: "default_middle" 0.0;
122 inherit: "default" 0.0;
125 normal: "00_winset_btn_sge_normal_centre.png";
129 description { state: "pressed_single" 0.0;
130 inherit: "default" 0.0;
133 normal: "00_winset_btn_sge_press_normal.png";
137 description { state: "pressed_left" 0.0;
138 inherit: "default" 0.0;
141 normal: "00_winset_btn_sge_press_01.png";
145 description { state: "pressed_right" 0.0;
146 inherit: "default" 0.0;
149 normal: "00_winset_btn_sge_press_03.png";
153 description { state: "pressed_middle" 0.0;
154 inherit: "default" 0.0;
157 normal: "00_winset_btn_sge_press_02.png";
161 description { state: "selected_single" 0.0;
162 inherit: "default" 0.0;
165 normal: "00_winset_btn_sge_press_normal.png";
169 description { state: "selected_left" 0.0;
170 inherit: "default" 0.0;
173 normal: "00_winset_btn_sge_press_01.png";
177 description { state: "selected_right" 0.0;
178 inherit: "default" 0.0;
181 normal: "00_winset_btn_sge_press_03.png";
185 description { state: "selected_middle" 0.0;
186 inherit: "default" 0.0;
189 normal: "00_winset_btn_sge_press_02.png";
194 part { name: "left_1pxl_padding";
197 description { state: "default" 0.0;
210 color: SEGMENT_CONTROL_ITEM_1PX_LEFT_PADDING_COLOR_INC;
212 description { state: "visible" 0.0;
213 inherit: "default" 0.0;
217 part { name: "right_1pxl_padding";
220 description { state: "default" 0.0;
235 color: SEGMENT_CONTROL_ITEM_1PX_RIGHT_PADDING_COLOR_INC;
237 description { state: "visible" 0.0;
238 inherit: "default" 0.0;
242 part { name: "padding_frame";
246 description { state: "default" 0.0;
248 /* Add a padding of 2 pxs in all directions */
253 part { name: "icon.bg";
257 description { state: "default" 0.0;
260 rel1.to: "elm.swallow.icon";
261 rel2.to: "elm.swallow.icon";
264 part { name: "padding_icon_text";
268 description { state: "default" 0.0; //when only icon or no icon is there
280 description { state: "icononly" 0.0;
281 inherit: "default" 0.0;
283 description { state: "visible" 0.0; //when icon is visible
284 inherit: "default" 0.0;
288 part { name: "elm.swallow.icon";
291 description { state: "default" 0.0;
294 rel1.to: "padding_frame";
295 rel2.to: "padding_frame";
296 rel2.relative: 0.0 0.0;
298 aspect_preference: BOTH;
300 description { state: "visible" 0.0;
301 inherit: "default" 0.0;
303 rel2.relative: 0.3 1.0;
305 description { state: "icononly" 0.0;
306 inherit: "default" 0.0;
308 rel2.relative: 1.0 1.0;
311 part { name: "elm.text";
316 state: "default" 0.0;
321 to_x: "padding_icon_text";
324 rel2.to: "padding_frame";
325 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_NORMAL_INC;
330 size: SEGMENT_CONTROL_TEXT_SIZE_INC;
331 size_range: SEGMENT_CONTROL_TEXT_SIZE_RANGE_MIN_INC SEGMENT_CONTROL_TEXT_SIZE_RANGE_MAX_INC;
336 description { state: "normal" 0.0;
337 inherit: "default" 0.0;
340 description { state: "pressed" 0.0;
341 inherit: "default" 0.0;
343 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_PRESSED_INC;
345 description { state: "selected" 0.0;
346 inherit: "default" 0.0;
348 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_SELECTED_INC;
350 description { state: "disabled" 0.0;
351 inherit: "default" 0.0;
353 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_DISABLED_INC;
356 part { name: "disabler";
359 description { state: "default" 0.0;
372 color: 255 255 255 150;
374 description { state: "disabled_single" 0.0;
375 inherit: "default" 0.0;
378 normal: "00_winset_btn_sge_body.png";
382 description { state: "disabled_left" 0.0;
383 inherit: "default" 0.0;
386 normal: "00_winset_btn_sge_normal_left.png";
390 description { state: "disabled_right" 0.0;
391 inherit: "default" 0.0;
394 normal: "00_winset_btn_sge_normal_right.png";
398 description { state: "disabled_middle" 0.0;
399 inherit: "default" 0.0;
402 normal: "00_winset_btn_sge_normal_centre.png";
410 public seg_type; // Single, Left, Middle, Right.
411 public seg_state; // Normal/Default, Pressed, Selected.
412 public seg_status;// Enabled/Default, Disabled
414 public update_state() {
415 new type, state, disabled;
416 type = get_int(seg_type);
417 state = get_int(seg_state);
418 disabled = get_int(seg_status);
420 if(state == SEGMENT_STATE_NORMAL)
422 if(type == SEGMENT_TYPE_SINGLE)
424 set_state(PART:"segment", "default_single", 0.0);
425 set_state(PART:"left_1pxl_padding", "default", 0.0);
426 set_state(PART:"right_1pxl_padding", "default", 0.0);
428 else if(type == SEGMENT_TYPE_LEFT)
430 set_state(PART:"segment", "default_left", 0.0);
431 set_state(PART:"left_1pxl_padding", "default", 0.0);
432 set_state(PART:"right_1pxl_padding", "visible", 0.0);
434 else if(type == SEGMENT_TYPE_MIDDLE)
436 set_state(PART:"segment", "default_middle", 0.0);
437 set_state(PART:"left_1pxl_padding", "visible", 0.0);
438 set_state(PART:"right_1pxl_padding", "visible", 0.0);
440 else if(type == SEGMENT_TYPE_RIGHT)
442 set_state(PART:"segment", "default_right", 0.0);
443 set_state(PART:"left_1pxl_padding", "visible", 0.0);
444 set_state(PART:"right_1pxl_padding", "default", 0.0);
446 set_state(PART:"elm.text", "normal", 0.0);
448 else if(state == SEGMENT_STATE_PRESSED)
450 if(type == SEGMENT_TYPE_SINGLE)
452 set_state(PART:"segment", "pressed_single", 0.0);
453 set_state(PART:"left_1pxl_padding", "default", 0.0);
454 set_state(PART:"right_1pxl_padding", "default", 0.0);
456 else if(type == SEGMENT_TYPE_LEFT)
458 set_state(PART:"segment", "pressed_left", 0.0);
459 set_state(PART:"left_1pxl_padding", "default", 0.0);
460 set_state(PART:"right_1pxl_padding", "visible", 0.0);
462 else if(type == SEGMENT_TYPE_MIDDLE)
464 set_state(PART:"segment", "pressed_middle", 0.0);
465 set_state(PART:"left_1pxl_padding", "visible", 0.0);
466 set_state(PART:"right_1pxl_padding", "visible", 0.0);
468 else if(type == SEGMENT_TYPE_RIGHT)
470 set_state(PART:"segment", "pressed_right", 0.0);
471 set_state(PART:"left_1pxl_padding", "visible", 0.0);
472 set_state(PART:"right_1pxl_padding", "default", 0.0);
474 set_state(PART:"elm.text", "pressed", 0.0);
476 else if(state == SEGMENT_STATE_SELECTED)
478 if(type == SEGMENT_TYPE_SINGLE)
480 set_state(PART:"segment", "selected_single", 0.0);
481 set_state(PART:"left_1pxl_padding", "default", 0.0);
482 set_state(PART:"right_1pxl_padding", "default", 0.0);
484 else if(type == SEGMENT_TYPE_LEFT)
486 set_state(PART:"segment", "selected_left", 0.0);
487 set_state(PART:"left_1pxl_padding", "default", 0.0);
488 set_state(PART:"right_1pxl_padding", "visible", 0.0);
490 else if(type == SEGMENT_TYPE_MIDDLE)
492 set_state(PART:"segment", "selected_middle", 0.0);
493 set_state(PART:"left_1pxl_padding", "visible", 0.0);
494 set_state(PART:"right_1pxl_padding", "visible", 0.0);
496 else if(type == SEGMENT_TYPE_RIGHT)
498 set_state(PART:"segment", "selected_right", 0.0);
499 set_state(PART:"left_1pxl_padding", "visible", 0.0);
500 set_state(PART:"right_1pxl_padding", "default", 0.0);
502 set_state(PART:"elm.text", "selected", 0.0);
504 if(disabled == SEGMENT_STATUS_DISABLED)
506 if(type == SEGMENT_TYPE_SINGLE)
508 set_state(PART:"disabler", "disabled_single", 0.0);
510 else if(type == SEGMENT_TYPE_LEFT)
512 set_state(PART:"disabler", "disabled_left", 0.0);
513 set_state(PART:"left_1pxl_padding", "default", 0.0);
514 set_state(PART:"right_1pxl_padding", "visible", 0.0);
516 else if(type == SEGMENT_TYPE_MIDDLE)
518 set_state(PART:"disabler", "disabled_middle", 0.0);
519 set_state(PART:"left_1pxl_padding", "visible", 0.0);
520 set_state(PART:"right_1pxl_padding", "visible", 0.0);
522 else if(type == SEGMENT_TYPE_RIGHT)
524 set_state(PART:"disabler", "disabled_right", 0.0);
525 set_state(PART:"left_1pxl_padding", "visible", 0.0);
526 set_state(PART:"right_1pxl_padding", "default", 0.0);
528 set_state(PART:"elm.text", "disabled", 0.0);
532 set_state(PART:"disabler", "default", 0.0);
537 name: "segment_type_s";
538 signal: "elm,type,segment,single";
541 set_int(seg_type, SEGMENT_TYPE_SINGLE);
546 name: "segment_type_l";
547 signal: "elm,type,segment,left";
550 set_int(seg_type, SEGMENT_TYPE_LEFT);
555 name: "segment_type_m";
556 signal: "elm,type,segment,middle";
559 set_int(seg_type, SEGMENT_TYPE_MIDDLE);
564 name: "segment_type_r";
565 signal: "elm,type,segment,right";
568 set_int(seg_type, SEGMENT_TYPE_RIGHT);
573 name: "normal_segment";
574 signal: "elm,state,segment,normal";
577 set_int(seg_state, SEGMENT_STATE_NORMAL);
582 name: "pressed_segment";
583 signal: "elm,state,segment,pressed";
586 set_int(seg_state, SEGMENT_STATE_PRESSED);
591 name: "selected_segment";
592 signal: "elm,state,segment,selected";
595 set_int(seg_state, SEGMENT_STATE_SELECTED);
599 program { name: "disable_segment";
600 signal: "elm,state,disabled";
603 set_int(seg_status, SEGMENT_STATUS_DISABLED);
607 program { name: "enable_segment";
608 signal: "elm,state,enabled";
611 set_int(seg_status, SEGMENT_STATUS_ENABLED);
615 program { name: "text_show";
616 signal: "elm,state,text,visible";
621 get_state(PART:"elm.swallow.icon", st, 30, vl);
622 if (!strcmp(st, "icononly"))
624 set_state(PART:"elm.swallow.icon", "visible", 0.0);
625 set_state(PART:"padding_icon_text", "visible", 0.0);
627 get_state(PART:"elm.text", st, 30, vl);
628 if (!strcmp(st, "selected"))
629 set_state(PART:"elm.text", "selected", 0.0);
631 set_state(PART:"elm.text", "normal", 0.0);
634 program { name: "text_hide";
635 signal: "elm,state,text,hidden";
640 get_state(PART:"elm.swallow.icon", st, 30, vl);
641 if (!strcmp(st, "visible"))
643 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
644 set_state(PART:"padding_icon_text", "icononly", 0.0);
646 set_state(PART:"elm.text", "default", 0.0);
649 program { name: "icon_show";
650 signal: "elm,state,icon,visible";
655 get_state(PART:"elm.text", st, 30, vl);
656 if ((!strcmp(st, "normal")) || (!strcmp(st, "selected")))
658 set_state(PART:"elm.swallow.icon", "visible", 0.0);
659 set_state(PART:"padding_icon_text", "visible", 0.0);
663 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
664 set_state(PART:"padding_icon_text", "icononly", 0.0);
668 program { name: "icon_hide";
669 signal: "elm,state,icon,hidden";
671 action: STATE_SET "default" 0.0;
672 target: "elm.swallow.icon";
677 group { name: "elm/segment_control/base/body_style";
679 image: "00_winset_btn_sge_body.png" COMP;
686 state: "default" 0.0;
691 normal: "00_winset_btn_sge_body.png";
701 group { name: "elm/segment_control/item/body_style";
704 image: "00_winset_btn_sge_body_press_single.png" COMP;
705 image: "00_winset_btn_sge_body_normal_left.png" COMP;
706 image: "00_winset_btn_sge_body_normal_centre.png" COMP;
707 image: "00_winset_btn_sge_body_normal_right.png" COMP;
708 image: "00_winset_btn_sge_body.png" COMP;
709 image: "00_winset_btn_sge_body_press_left.png" COMP;
710 image: "00_winset_btn_sge_body_press_center.png" COMP;
711 image: "00_winset_btn_sge_body_press_right.png" COMP;
717 description { state: "default" 0.0;
721 part { name: "segment";
724 description { state: "default" 0.0;
738 normal: "00_winset_btn_sge_body.png";
744 description { state: "default_single" 0.0;
745 inherit: "default" 0.0;
748 normal: "00_winset_btn_sge_body.png";
752 description { state: "default_left" 0.0;
753 inherit: "default" 0.0;
756 normal: "00_winset_btn_sge_body_normal_left.png";
760 description { state: "default_right" 0.0;
761 inherit: "default" 0.0;
764 normal: "00_winset_btn_sge_body_normal_right.png";
768 description { state: "default_middle" 0.0;
769 inherit: "default" 0.0;
772 normal: "00_winset_btn_sge_body_normal_centre.png";
776 description { state: "pressed_single" 0.0;
777 inherit: "default" 0.0;
780 normal: "00_winset_btn_sge_body_press_single.png";
784 description { state: "pressed_left" 0.0;
785 inherit: "default" 0.0;
788 normal: "00_winset_btn_sge_body_press_left.png";
792 description { state: "pressed_right" 0.0;
793 inherit: "default" 0.0;
796 normal: "00_winset_btn_sge_body_press_right.png";
800 description { state: "pressed_middle" 0.0;
801 inherit: "default" 0.0;
804 normal: "00_winset_btn_sge_body_press_center.png";
808 description { state: "selected_single" 0.0;
809 inherit: "default" 0.0;
812 normal: "00_winset_btn_sge_body_press_single.png";
816 description { state: "selected_left" 0.0;
817 inherit: "default" 0.0;
820 normal: "00_winset_btn_sge_body_press_left.png";
824 description { state: "selected_right" 0.0;
825 inherit: "default" 0.0;
828 normal: "00_winset_btn_sge_body_press_right.png";
832 description { state: "selected_middle" 0.0;
833 inherit: "default" 0.0;
836 normal: "00_winset_btn_sge_body_press_center.png";
841 part { name: "left_1pxl_padding";
844 description { state: "default" 0.0;
857 color: SEGMENT_CONTROL_BODY_ITEM_1PX_LEFT_PADDING_COLOR_INC;
859 description { state: "visible" 0.0;
860 inherit: "default" 0.0;
864 part { name: "right_1pxl_padding";
867 description { state: "default" 0.0;
882 color: SEGMENT_CONTROL_BODY_ITEM_1PX_RIGHT_PADDING_COLOR_INC;
884 description { state: "visible" 0.0;
885 inherit: "default" 0.0;
889 part { name: "padding_frame";
893 description { state: "default" 0.0;
895 /* Add a padding of 2 pxs in all directions */
900 part { name: "icon.bg";
904 description { state: "default" 0.0;
907 rel1.to: "elm.swallow.icon";
908 rel2.to: "elm.swallow.icon";
911 part { name: "padding_icon_text";
915 description { state: "default" 0.0; //when only icon or no icon is there
927 description { state: "icononly" 0.0;
928 inherit: "default" 0.0;
930 description { state: "visible" 0.0; //when icon is visible
931 inherit: "default" 0.0;
935 part { name: "elm.swallow.icon";
938 description { state: "default" 0.0;
941 rel1.to: "padding_frame";
942 rel2.to: "padding_frame";
943 rel2.relative: 0.0 0.0;
945 aspect_preference: BOTH;
947 description { state: "visible" 0.0;
948 inherit: "default" 0.0;
950 rel2.relative: 0.3 1.0;
952 description { state: "icononly" 0.0;
953 inherit: "default" 0.0;
955 rel2.relative: 1.0 1.0;
958 part { name: "elm.text";
963 state: "default" 0.0;
968 to_x: "padding_icon_text";
971 rel2.to: "padding_frame";
972 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_NORMAL_INC;
977 size: SEGMENT_CONTROL_TEXT_SIZE_INC;
978 size_range: SEGMENT_CONTROL_TEXT_SIZE_RANGE_MIN_INC SEGMENT_CONTROL_TEXT_SIZE_RANGE_MAX_INC;
983 description { state: "normal" 0.0;
984 inherit: "default" 0.0;
987 description { state: "pressed" 0.0;
988 inherit: "default" 0.0;
990 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_PRESSED_INC;
992 description { state: "selected" 0.0;
993 inherit: "default" 0.0;
995 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_SELECTED_INC;
997 description { state: "disabled" 0.0;
998 inherit: "default" 0.0;
1000 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_DISABLED_INC;
1003 part { name: "disabler";
1006 description { state: "default" 0.0;
1019 color: 255 255 255 150;
1021 description { state: "disabled_single" 0.0;
1022 inherit: "default" 0.0;
1025 normal: "00_winset_btn_sge_body.png";
1029 description { state: "disabled_left" 0.0;
1030 inherit: "default" 0.0;
1033 normal: "00_winset_btn_sge_body_normal_left.png";
1037 description { state: "disabled_right" 0.0;
1038 inherit: "default" 0.0;
1041 normal: "00_winset_btn_sge_body_normal_right.png";
1045 description { state: "disabled_middle" 0.0;
1046 inherit: "default" 0.0;
1049 normal: "00_winset_btn_sge_body_normal_centre.png";
1057 public seg_type; // Single, Left, Middle, Right.
1058 public seg_state; // Normal/Default, Pressed, Selected.
1059 public seg_status;// Enabled/Default, Disabled
1061 public update_state() {
1062 new type, state, disabled;
1063 type = get_int(seg_type);
1064 state = get_int(seg_state);
1065 disabled = get_int(seg_status);
1067 if(state == SEGMENT_STATE_NORMAL)
1069 if(type == SEGMENT_TYPE_SINGLE)
1071 set_state(PART:"segment", "default_single", 0.0);
1072 set_state(PART:"left_1pxl_padding", "default", 0.0);
1073 set_state(PART:"right_1pxl_padding", "default", 0.0);
1075 else if(type == SEGMENT_TYPE_LEFT)
1077 set_state(PART:"segment", "default_left", 0.0);
1078 set_state(PART:"left_1pxl_padding", "default", 0.0);
1079 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1081 else if(type == SEGMENT_TYPE_MIDDLE)
1083 set_state(PART:"segment", "default_middle", 0.0);
1084 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1085 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1087 else if(type == SEGMENT_TYPE_RIGHT)
1089 set_state(PART:"segment", "default_right", 0.0);
1090 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1091 set_state(PART:"right_1pxl_padding", "default", 0.0);
1093 set_state(PART:"elm.text", "normal", 0.0);
1095 else if(state == SEGMENT_STATE_PRESSED)
1097 if(type == SEGMENT_TYPE_SINGLE)
1099 set_state(PART:"segment", "pressed_single", 0.0);
1100 set_state(PART:"left_1pxl_padding", "default", 0.0);
1101 set_state(PART:"right_1pxl_padding", "default", 0.0);
1103 else if(type == SEGMENT_TYPE_LEFT)
1105 set_state(PART:"segment", "pressed_left", 0.0);
1106 set_state(PART:"left_1pxl_padding", "default", 0.0);
1107 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1109 else if(type == SEGMENT_TYPE_MIDDLE)
1111 set_state(PART:"segment", "pressed_middle", 0.0);
1112 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1113 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1115 else if(type == SEGMENT_TYPE_RIGHT)
1117 set_state(PART:"segment", "pressed_right", 0.0);
1118 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1119 set_state(PART:"right_1pxl_padding", "default", 0.0);
1121 set_state(PART:"elm.text", "pressed", 0.0);
1123 else if(state == SEGMENT_STATE_SELECTED)
1125 if(type == SEGMENT_TYPE_SINGLE)
1127 set_state(PART:"segment", "selected_single", 0.0);
1128 set_state(PART:"left_1pxl_padding", "default", 0.0);
1129 set_state(PART:"right_1pxl_padding", "default", 0.0);
1131 else if(type == SEGMENT_TYPE_LEFT)
1133 set_state(PART:"segment", "selected_left", 0.0);
1134 set_state(PART:"left_1pxl_padding", "default", 0.0);
1135 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1137 else if(type == SEGMENT_TYPE_MIDDLE)
1139 set_state(PART:"segment", "selected_middle", 0.0);
1140 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1141 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1143 else if(type == SEGMENT_TYPE_RIGHT)
1145 set_state(PART:"segment", "selected_right", 0.0);
1146 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1147 set_state(PART:"right_1pxl_padding", "default", 0.0);
1149 set_state(PART:"elm.text", "selected", 0.0);
1151 if(disabled == SEGMENT_STATUS_DISABLED)
1153 if(type == SEGMENT_TYPE_SINGLE)
1155 set_state(PART:"disabler", "disabled_single", 0.0);
1156 set_state(PART:"left_1pxl_padding", "default", 0.0);
1157 set_state(PART:"right_1pxl_padding", "default", 0.0);
1159 else if(type == SEGMENT_TYPE_LEFT)
1161 set_state(PART:"disabler", "disabled_left", 0.0);
1162 set_state(PART:"left_1pxl_padding", "default", 0.0);
1163 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1165 else if(type == SEGMENT_TYPE_MIDDLE)
1167 set_state(PART:"disabler", "disabled_middle", 0.0);
1168 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1169 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1171 else if(type == SEGMENT_TYPE_RIGHT)
1173 set_state(PART:"disabler", "disabled_right", 0.0);
1174 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1175 set_state(PART:"right_1pxl_padding", "default", 0.0);
1177 set_state(PART:"elm.text", "disabled", 0.0);
1181 set_state(PART:"disabler", "default", 0.0);
1186 name: "segment_type_s";
1187 signal: "elm,type,segment,single";
1190 set_int(seg_type, SEGMENT_TYPE_SINGLE);
1195 name: "segment_type_l";
1196 signal: "elm,type,segment,left";
1199 set_int(seg_type, SEGMENT_TYPE_LEFT);
1204 name: "segment_type_m";
1205 signal: "elm,type,segment,middle";
1208 set_int(seg_type, SEGMENT_TYPE_MIDDLE);
1213 name: "segment_type_r";
1214 signal: "elm,type,segment,right";
1217 set_int(seg_type, SEGMENT_TYPE_RIGHT);
1222 name: "normal_segment";
1223 signal: "elm,state,segment,normal";
1226 set_int(seg_state, SEGMENT_STATE_NORMAL);
1231 name: "pressed_segment";
1232 signal: "elm,state,segment,pressed";
1235 set_int(seg_state, SEGMENT_STATE_PRESSED);
1240 name: "selected_segment";
1241 signal: "elm,state,segment,selected";
1244 set_int(seg_state, SEGMENT_STATE_SELECTED);
1248 program { name: "disable_segment";
1249 signal: "elm,state,disabled";
1252 set_int(seg_status, SEGMENT_STATUS_DISABLED);
1256 program { name: "enable_segment";
1257 signal: "elm,state,enabled";
1260 set_int(seg_status, SEGMENT_STATUS_ENABLED);
1264 program { name: "text_show";
1265 signal: "elm,state,text,visible";
1270 get_state(PART:"elm.swallow.icon", st, 30, vl);
1271 if (!strcmp(st, "icononly"))
1273 set_state(PART:"elm.swallow.icon", "visible", 0.0);
1274 set_state(PART:"padding_icon_text", "visible", 0.0);
1276 get_state(PART:"elm.text", st, 30, vl);
1277 if (!strcmp(st, "selected"))
1278 set_state(PART:"elm.text", "selected", 0.0);
1280 set_state(PART:"elm.text", "normal", 0.0);
1283 program { name: "text_hide";
1284 signal: "elm,state,text,hidden";
1289 get_state(PART:"elm.swallow.icon", st, 30, vl);
1290 if (!strcmp(st, "visible"))
1292 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1293 set_state(PART:"padding_icon_text", "icononly", 0.0);
1295 set_state(PART:"elm.text", "default", 0.0);
1298 program { name: "icon_show";
1299 signal: "elm,state,icon,visible";
1304 get_state(PART:"elm.text", st, 30, vl);
1305 if ((!strcmp(st, "normal")) || (!strcmp(st, "selected")))
1307 set_state(PART:"elm.swallow.icon", "visible", 0.0);
1308 set_state(PART:"padding_icon_text", "visible", 0.0);
1312 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1313 set_state(PART:"padding_icon_text", "icononly", 0.0);
1317 program { name: "icon_hide";
1318 signal: "elm,state,icon,hidden";
1320 action: STATE_SET "default" 0.0;
1321 target: "elm.swallow.icon";
1326 group { name: "elm/segment_control/base/multiline";
1328 image: "00_winset_btn_sge_normal.png" COMP;
1335 state: "default" 0.0;
1338 normal: "00_winset_btn_sge_normal.png";
1348 group { name: "elm/segment_control/item/multiline";
1351 image: "00_winset_btn_sge_normal.png" COMP;
1352 image: "00_winset_btn_sge_normal_left.png" COMP;
1353 image: "00_winset_btn_sge_normal_centre.png" COMP;
1354 image: "00_winset_btn_sge_normal_right.png" COMP;
1355 image: "00_winset_btn_sge_press_normal.png" COMP;
1356 image: "00_winset_btn_sge_press_01.png" COMP;
1357 image: "00_winset_btn_sge_press_02.png" COMP;
1358 image: "00_winset_btn_sge_press_03.png" COMP;
1362 style { name: "segment_control_multiline_style";
1363 base: "font=SLP:style=Roman font_size="SEGMENT_CONTROL_MULTILINE_TEXT_SIZE_INC" align=center color=#ffffff wrap=char ellipsis=1.0 text_class=slp_roman";
1365 tag: "hilight" "+ font=SLP:style=Bold";
1366 tag: "b" "+ font=SLP:style=Bold";
1371 part { name: "base";
1374 description { state: "default" 0.0;
1378 part { name: "segment";
1381 description { state: "default" 0.0;
1393 normal: "00_winset_btn_sge_normal.png";
1399 description { state: "default_single" 0.0;
1400 inherit: "default" 0.0;
1403 normal: "00_winset_btn_sge_normal.png";
1407 description { state: "default_left" 0.0;
1408 inherit: "default" 0.0;
1411 normal: "00_winset_btn_sge_normal_left.png";
1415 description { state: "default_right" 0.0;
1416 inherit: "default" 0.0;
1419 normal: "00_winset_btn_sge_normal_right.png";
1423 description { state: "default_middle" 0.0;
1424 inherit: "default" 0.0;
1427 normal: "00_winset_btn_sge_normal_centre.png";
1431 description { state: "pressed_single" 0.0;
1432 inherit: "default" 0.0;
1435 normal: "00_winset_btn_sge_press_normal.png";
1439 description { state: "pressed_left" 0.0;
1440 inherit: "default" 0.0;
1443 normal: "00_winset_btn_sge_press_01.png";
1447 description { state: "pressed_right" 0.0;
1448 inherit: "default" 0.0;
1451 normal: "00_winset_btn_sge_press_03.png";
1455 description { state: "pressed_middle" 0.0;
1456 inherit: "default" 0.0;
1459 normal: "00_winset_btn_sge_press_02.png";
1463 description { state: "selected_single" 0.0;
1464 inherit: "default" 0.0;
1467 normal: "00_winset_btn_sge_press_normal.png";
1471 description { state: "selected_left" 0.0;
1472 inherit: "default" 0.0;
1475 normal: "00_winset_btn_sge_press_01.png";
1479 description { state: "selected_right" 0.0;
1480 inherit: "default" 0.0;
1483 normal: "00_winset_btn_sge_press_03.png";
1487 description { state: "selected_middle" 0.0;
1488 inherit: "default" 0.0;
1491 normal: "00_winset_btn_sge_press_02.png";
1496 part { name: "left_1pxl_padding";
1499 description { state: "default" 0.0;
1514 color: SEGMENT_CONTROL_ITEM_1PX_LEFT_PADDING_COLOR_INC;
1516 description { state: "visible" 0.0;
1517 inherit: "default" 0.0;
1521 part { name: "right_1pxl_padding";
1524 description { state: "default" 0.0;
1539 color: SEGMENT_CONTROL_ITEM_1PX_RIGHT_PADDING_COLOR_INC;
1541 description { state: "visible" 0.0;
1542 inherit: "default" 0.0;
1546 part { name: "padding_frame";
1550 description { state: "default" 0.0;
1552 /* Add a padding of 2 pxs in all directions */
1557 part { name: "icon.bg";
1561 description { state: "default" 0.0;
1564 rel1.to: "elm.swallow.icon";
1565 rel2.to: "elm.swallow.icon";
1568 part { name: "padding_icon_text";
1572 description { state: "default" 0.0; //when only icon or no icon is there
1584 description { state: "icononly" 0.0;
1585 inherit: "default" 0.0;
1587 description { state: "visible" 0.0; //when icon is visible
1588 inherit: "default" 0.0;
1592 part { name: "elm.swallow.icon";
1595 description { state: "default" 0.0;
1598 rel1.to: "padding_frame";
1599 rel2.to: "padding_frame";
1600 rel2.relative: 0.0 0.0;
1602 aspect_preference: BOTH;
1604 description { state: "visible" 0.0;
1605 inherit: "default" 0.0;
1607 rel2.relative: 0.3 1.0;
1609 description { state: "icononly" 0.0;
1610 inherit: "default" 0.0;
1612 rel2.relative: 1.0 1.0;
1615 part { name: "elm.text";
1620 state: "default" 0.0;
1625 to_x: "padding_icon_text";
1629 rel2.to_x: "padding_frame";
1631 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_NORMAL_INC;
1633 style: "segment_control_multiline_style";
1638 description { state: "normal" 0.0;
1639 inherit: "default" 0.0;
1642 description { state: "pressed" 0.0;
1643 inherit: "default" 0.0;
1645 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_PRESSED_INC;
1647 description { state: "selected" 0.0;
1648 inherit: "default" 0.0;
1650 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_SELECTED_INC;
1652 description { state: "disabled" 0.0;
1653 inherit: "default" 0.0;
1655 color: SEGMENT_CONTROL_ITEM_TITLE_TEXT_COLOR_DISABLED_INC;
1658 part { name: "disabler";
1661 description { state: "default" 0.0;
1674 color: 255 255 255 150;
1676 description { state: "disabled_single" 0.0;
1677 inherit: "default" 0.0;
1680 normal: "00_winset_btn_sge_body.png";
1684 description { state: "disabled_left" 0.0;
1685 inherit: "default" 0.0;
1688 normal: "00_winset_btn_sge_body_normal_left.png";
1692 description { state: "disabled_right" 0.0;
1693 inherit: "default" 0.0;
1696 normal: "00_winset_btn_sge_body_normal_right.png";
1700 description { state: "disabled_middle" 0.0;
1701 inherit: "default" 0.0;
1704 normal: "00_winset_btn_sge_body_normal_centre.png";
1712 public seg_type; // Single, Left, Middle, Right.
1713 public seg_state; // Normal/Default, Pressed, Selected.
1714 public seg_status;// Enabled/Default, Disabled
1716 public update_state() {
1717 new type, state, disabled;
1718 type = get_int(seg_type);
1719 state = get_int(seg_state);
1720 disabled = get_int(seg_status);
1722 if(state == SEGMENT_STATE_NORMAL)
1724 if(type == SEGMENT_TYPE_SINGLE)
1726 set_state(PART:"segment", "default_single", 0.0);
1727 set_state(PART:"left_1pxl_padding", "default", 0.0);
1728 set_state(PART:"right_1pxl_padding", "default", 0.0);
1730 else if(type == SEGMENT_TYPE_LEFT)
1732 set_state(PART:"segment", "default_left", 0.0);
1733 set_state(PART:"left_1pxl_padding", "default", 0.0);
1734 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1736 else if(type == SEGMENT_TYPE_MIDDLE)
1738 set_state(PART:"segment", "default_middle", 0.0);
1739 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1740 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1742 else if(type == SEGMENT_TYPE_RIGHT)
1744 set_state(PART:"segment", "default_right", 0.0);
1745 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1746 set_state(PART:"right_1pxl_padding", "default", 0.0);
1748 set_state(PART:"elm.text", "normal", 0.0);
1750 else if(state == SEGMENT_STATE_PRESSED)
1752 if(type == SEGMENT_TYPE_SINGLE)
1754 set_state(PART:"segment", "pressed_single", 0.0);
1755 set_state(PART:"left_1pxl_padding", "default", 0.0);
1756 set_state(PART:"right_1pxl_padding", "default", 0.0);
1758 else if(type == SEGMENT_TYPE_LEFT)
1760 set_state(PART:"segment", "pressed_left", 0.0);
1761 set_state(PART:"left_1pxl_padding", "default", 0.0);
1762 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1764 else if(type == SEGMENT_TYPE_MIDDLE)
1766 set_state(PART:"segment", "pressed_middle", 0.0);
1767 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1768 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1770 else if(type == SEGMENT_TYPE_RIGHT)
1772 set_state(PART:"segment", "pressed_right", 0.0);
1773 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1774 set_state(PART:"right_1pxl_padding", "default", 0.0);
1776 set_state(PART:"elm.text", "pressed", 0.0);
1778 else if(state == SEGMENT_STATE_SELECTED)
1780 if(type == SEGMENT_TYPE_SINGLE)
1782 set_state(PART:"segment", "selected_single", 0.0);
1783 set_state(PART:"left_1pxl_padding", "default", 0.0);
1784 set_state(PART:"right_1pxl_padding", "default", 0.0);
1786 else if(type == SEGMENT_TYPE_LEFT)
1788 set_state(PART:"segment", "selected_left", 0.0);
1789 set_state(PART:"left_1pxl_padding", "default", 0.0);
1790 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1792 else if(type == SEGMENT_TYPE_MIDDLE)
1794 set_state(PART:"segment", "selected_middle", 0.0);
1795 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1796 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1798 else if(type == SEGMENT_TYPE_RIGHT)
1800 set_state(PART:"segment", "selected_right", 0.0);
1801 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1802 set_state(PART:"right_1pxl_padding", "default", 0.0);
1804 set_state(PART:"elm.text", "selected", 0.0);
1806 if(disabled == SEGMENT_STATUS_DISABLED)
1808 if(type == SEGMENT_TYPE_SINGLE)
1810 set_state(PART:"disabler", "disabled_single", 0.0);
1811 set_state(PART:"left_1pxl_padding", "default", 0.0);
1812 set_state(PART:"right_1pxl_padding", "default", 0.0);
1814 else if(type == SEGMENT_TYPE_LEFT)
1816 set_state(PART:"disabler", "disabled_left", 0.0);
1817 set_state(PART:"left_1pxl_padding", "default", 0.0);
1818 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1820 else if(type == SEGMENT_TYPE_MIDDLE)
1822 set_state(PART:"disabler", "disabled_middle", 0.0);
1823 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1824 set_state(PART:"right_1pxl_padding", "visible", 0.0);
1826 else if(type == SEGMENT_TYPE_RIGHT)
1828 set_state(PART:"disabler", "disabled_right", 0.0);
1829 set_state(PART:"left_1pxl_padding", "visible", 0.0);
1830 set_state(PART:"right_1pxl_padding", "default", 0.0);
1832 set_state(PART:"elm.text", "disabled", 0.0);
1836 set_state(PART:"disabler", "default", 0.0);
1841 name: "segment_type_s";
1842 signal: "elm,type,segment,single";
1845 set_int(seg_type, SEGMENT_TYPE_SINGLE);
1850 name: "segment_type_l";
1851 signal: "elm,type,segment,left";
1854 set_int(seg_type, SEGMENT_TYPE_LEFT);
1859 name: "segment_type_m";
1860 signal: "elm,type,segment,middle";
1863 set_int(seg_type, SEGMENT_TYPE_MIDDLE);
1868 name: "segment_type_r";
1869 signal: "elm,type,segment,right";
1872 set_int(seg_type, SEGMENT_TYPE_RIGHT);
1877 name: "normal_segment";
1878 signal: "elm,state,segment,normal";
1881 set_int(seg_state, SEGMENT_STATE_NORMAL);
1886 name: "pressed_segment";
1887 signal: "elm,state,segment,pressed";
1890 set_int(seg_state, SEGMENT_STATE_PRESSED);
1895 name: "selected_segment";
1896 signal: "elm,state,segment,selected";
1899 set_int(seg_state, SEGMENT_STATE_SELECTED);
1903 program { name: "disable_segment";
1904 signal: "elm,state,disabled";
1907 set_int(seg_status, SEGMENT_STATUS_DISABLED);
1911 program { name: "enable_segment";
1912 signal: "elm,state,enabled";
1915 set_int(seg_status, SEGMENT_STATUS_ENABLED);
1919 program { name: "text_show";
1920 signal: "elm,state,text,visible";
1925 get_state(PART:"elm.swallow.icon", st, 30, vl);
1926 if (!strcmp(st, "icononly"))
1928 set_state(PART:"elm.swallow.icon", "visible", 0.0);
1929 set_state(PART:"padding_icon_text", "visible", 0.0);
1931 get_state(PART:"elm.text", st, 30, vl);
1932 if (!strcmp(st, "selected"))
1933 set_state(PART:"elm.text", "selected", 0.0);
1935 set_state(PART:"elm.text", "normal", 0.0);
1938 program { name: "text_hide";
1939 signal: "elm,state,text,hidden";
1944 get_state(PART:"elm.swallow.icon", st, 30, vl);
1945 if (!strcmp(st, "visible"))
1947 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1948 set_state(PART:"padding_icon_text", "icononly", 0.0);
1950 set_state(PART:"elm.text", "default", 0.0);
1953 program { name: "icon_show";
1954 signal: "elm,state,icon,visible";
1959 get_state(PART:"elm.text", st, 30, vl);
1960 if ((!strcmp(st, "normal")) || (!strcmp(st, "selected")))
1962 set_state(PART:"elm.swallow.icon", "visible", 0.0);
1963 set_state(PART:"padding_icon_text", "visible", 0.0);
1967 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1968 set_state(PART:"padding_icon_text", "icononly", 0.0);
1972 program { name: "icon_hide";
1973 signal: "elm,state,icon,hidden";
1975 action: STATE_SET "default" 0.0;
1976 target: "elm.swallow.icon";
1982 group { name: "elm/segment_control/base/title_multiline";
1984 image: "00_winset_btn_sge_body.png" COMP;
1991 state: "default" 0.0;
1995 normal: "00_winset_btn_sge_body.png";
2005 group { name: "elm/segment_control/item/title_multiline";
2008 image: "00_winset_btn_sge_body.png" COMP;
2009 image: "00_winset_btn_sge_body_normal_left.png" COMP;
2010 image: "00_winset_btn_sge_body_normal_centre.png" COMP;
2011 image: "00_winset_btn_sge_body_normal_right.png" COMP;
2012 image: "00_winset_btn_sge_body_press_left.png" COMP;
2013 image: "00_winset_btn_sge_body_press_center.png" COMP;
2014 image: "00_winset_btn_sge_body_press_right.png" COMP;
2017 part { name: "base";
2020 description { state: "default" 0.0;
2024 part { name: "segment";
2027 description { state: "default" 0.0;
2041 normal: "00_winset_btn_sge_body.png";
2047 description { state: "default_single" 0.0;
2048 inherit: "default" 0.0;
2051 normal: "00_winset_btn_sge_body.png";
2055 description { state: "default_left" 0.0;
2056 inherit: "default" 0.0;
2059 normal: "00_winset_btn_sge_body_normal_left.png";
2063 description { state: "default_right" 0.0;
2064 inherit: "default" 0.0;
2067 normal: "00_winset_btn_sge_body_normal_right.png";
2071 description { state: "default_middle" 0.0;
2072 inherit: "default" 0.0;
2075 normal: "00_winset_btn_sge_body_normal_centre.png";
2079 description { state: "pressed_single" 0.0;
2080 inherit: "default" 0.0;
2083 normal: "00_winset_btn_sge_normal.png";
2087 description { state: "pressed_left" 0.0;
2088 inherit: "default" 0.0;
2091 normal: "00_winset_btn_sge_body_press_left.png";
2095 description { state: "pressed_right" 0.0;
2096 inherit: "default" 0.0;
2099 normal: "00_winset_btn_sge_body_press_right.png";
2103 description { state: "pressed_middle" 0.0;
2104 inherit: "default" 0.0;
2107 normal: "00_winset_btn_sge_body_press_center.png";
2111 description { state: "selected_single" 0.0;
2112 inherit: "default" 0.0;
2115 normal: "00_winset_btn_sge_normal.png";
2119 description { state: "selected_left" 0.0;
2120 inherit: "default" 0.0;
2123 normal: "00_winset_btn_sge_body_press_left.png";
2127 description { state: "selected_right" 0.0;
2128 inherit: "default" 0.0;
2131 normal: "00_winset_btn_sge_body_press_right.png";
2135 description { state: "selected_middle" 0.0;
2136 inherit: "default" 0.0;
2139 normal: "00_winset_btn_sge_body_press_center.png";
2144 part { name: "left_1pxl_padding";
2147 description { state: "default" 0.0;
2162 color: SEGMENT_CONTROL_BODY_ITEM_1PX_LEFT_PADDING_COLOR_INC;
2164 description { state: "visible" 0.0;
2165 inherit: "default" 0.0;
2169 part { name: "right_1pxl_padding";
2172 description { state: "default" 0.0;
2188 color: SEGMENT_CONTROL_BODY_ITEM_1PX_RIGHT_PADDING_COLOR_INC;
2190 description { state: "visible" 0.0;
2191 inherit: "default" 0.0;
2195 part { name: "padding_frame";
2199 description { state: "default" 0.0;
2201 /* Add a padding of 2 pxs in all directions */
2206 part { name: "icon.bg";
2210 description { state: "default" 0.0;
2213 rel1.to: "elm.swallow.icon";
2214 rel2.to: "elm.swallow.icon";
2217 part { name: "padding_icon_text";
2221 description { state: "default" 0.0; //when only icon or no icon is there
2233 description { state: "icononly" 0.0;
2234 inherit: "default" 0.0;
2236 description { state: "visible" 0.0; //when icon is visible
2237 inherit: "default" 0.0;
2241 part { name: "elm.swallow.icon";
2244 description { state: "default" 0.0;
2247 rel1.to: "padding_frame";
2248 rel2.to: "padding_frame";
2249 rel2.relative: 0.0 0.0;
2251 aspect_preference: BOTH;
2253 description { state: "visible" 0.0;
2254 inherit: "default" 0.0;
2256 rel2.relative: 0.3 1.0;
2258 description { state: "icononly" 0.0;
2259 inherit: "default" 0.0;
2261 rel2.relative: 1.0 1.0;
2264 part { name: "elm.text";
2269 state: "default" 0.0;
2274 to_x: "padding_icon_text";
2277 rel2.to: "padding_frame";
2278 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_NORMAL_INC;
2280 style: "segment_control_multiline_style";
2285 description { state: "normal" 0.0;
2286 inherit: "default" 0.0;
2289 description { state: "pressed" 0.0;
2290 inherit: "default" 0.0;
2292 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_PRESSED_INC;
2294 description { state: "selected" 0.0;
2295 inherit: "default" 0.0;
2297 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_SELECTED_INC;
2299 description { state: "disabled" 0.0;
2300 inherit: "default" 0.0;
2302 color: SEGMENT_CONTROL_BODY_STYLE_ITEM_TITLE_TEXT_COLOR_DISABLED_INC;
2305 part { name: "disabler";
2308 description { state: "default" 0.0;
2321 color: 255 255 255 150;
2323 description { state: "disabled_single" 0.0;
2324 inherit: "default" 0.0;
2327 normal: "00_winset_btn_sge_body.png";
2331 description { state: "disabled_left" 0.0;
2332 inherit: "default" 0.0;
2335 normal: "00_winset_btn_sge_body_normal_left.png";
2339 description { state: "disabled_right" 0.0;
2340 inherit: "default" 0.0;
2343 normal: "00_winset_btn_sge_body_normal_right.png";
2347 description { state: "disabled_middle" 0.0;
2348 inherit: "default" 0.0;
2351 normal: "00_winset_btn_sge_body_normal_centre.png";
2359 public seg_type; // Single, Left, Middle, Right.
2360 public seg_state; // Normal/Default, Pressed, Selected.
2361 public seg_status;// Enabled/Default, Disabled
2363 public update_state() {
2364 new type, state, disabled;
2365 type = get_int(seg_type);
2366 state = get_int(seg_state);
2367 disabled = get_int(seg_status);
2369 if(state == SEGMENT_STATE_NORMAL)
2371 if(type == SEGMENT_TYPE_SINGLE)
2373 set_state(PART:"segment", "default_single", 0.0);
2374 set_state(PART:"left_1pxl_padding", "default", 0.0);
2375 set_state(PART:"right_1pxl_padding", "default", 0.0);
2377 else if(type == SEGMENT_TYPE_LEFT)
2379 set_state(PART:"segment", "default_left", 0.0);
2380 set_state(PART:"left_1pxl_padding", "default", 0.0);
2381 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2383 else if(type == SEGMENT_TYPE_MIDDLE)
2385 set_state(PART:"segment", "default_middle", 0.0);
2386 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2387 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2389 else if(type == SEGMENT_TYPE_RIGHT)
2391 set_state(PART:"segment", "default_right", 0.0);
2392 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2393 set_state(PART:"right_1pxl_padding", "default", 0.0);
2395 set_state(PART:"elm.text", "normal", 0.0);
2397 else if(state == SEGMENT_STATE_PRESSED)
2399 if(type == SEGMENT_TYPE_SINGLE)
2401 set_state(PART:"segment", "pressed_single", 0.0);
2402 set_state(PART:"left_1pxl_padding", "default", 0.0);
2403 set_state(PART:"right_1pxl_padding", "default", 0.0);
2405 else if(type == SEGMENT_TYPE_LEFT)
2407 set_state(PART:"segment", "pressed_left", 0.0);
2408 set_state(PART:"left_1pxl_padding", "default", 0.0);
2409 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2411 else if(type == SEGMENT_TYPE_MIDDLE)
2413 set_state(PART:"segment", "pressed_middle", 0.0);
2414 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2415 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2417 else if(type == SEGMENT_TYPE_RIGHT)
2419 set_state(PART:"segment", "pressed_right", 0.0);
2420 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2421 set_state(PART:"right_1pxl_padding", "default", 0.0);
2423 set_state(PART:"elm.text", "pressed", 0.0);
2425 else if(state == SEGMENT_STATE_SELECTED)
2427 if(type == SEGMENT_TYPE_SINGLE)
2429 set_state(PART:"segment", "selected_single", 0.0);
2430 set_state(PART:"left_1pxl_padding", "default", 0.0);
2431 set_state(PART:"right_1pxl_padding", "default", 0.0);
2433 else if(type == SEGMENT_TYPE_LEFT)
2435 set_state(PART:"segment", "selected_left", 0.0);
2436 set_state(PART:"left_1pxl_padding", "default", 0.0);
2437 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2439 else if(type == SEGMENT_TYPE_MIDDLE)
2441 set_state(PART:"segment", "selected_middle", 0.0);
2442 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2443 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2445 else if(type == SEGMENT_TYPE_RIGHT)
2447 set_state(PART:"segment", "selected_right", 0.0);
2448 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2449 set_state(PART:"right_1pxl_padding", "default", 0.0);
2451 set_state(PART:"elm.text", "selected", 0.0);
2453 if(disabled == SEGMENT_STATUS_DISABLED)
2455 if(type == SEGMENT_TYPE_SINGLE)
2457 set_state(PART:"disabler", "disabled_single", 0.0);
2458 set_state(PART:"left_1pxl_padding", "default", 0.0);
2459 set_state(PART:"right_1pxl_padding", "default", 0.0);
2461 else if(type == SEGMENT_TYPE_LEFT)
2463 set_state(PART:"disabler", "disabled_left", 0.0);
2464 set_state(PART:"left_1pxl_padding", "default", 0.0);
2465 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2467 else if(type == SEGMENT_TYPE_MIDDLE)
2469 set_state(PART:"disabler", "disabled_middle", 0.0);
2470 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2471 set_state(PART:"right_1pxl_padding", "visible", 0.0);
2473 else if(type == SEGMENT_TYPE_RIGHT)
2475 set_state(PART:"disabler", "disabled_right", 0.0);
2476 set_state(PART:"left_1pxl_padding", "visible", 0.0);
2477 set_state(PART:"right_1pxl_padding", "default", 0.0);
2479 set_state(PART:"elm.text", "disabled", 0.0);
2483 set_state(PART:"disabler", "default", 0.0);
2488 name: "segment_type_s";
2489 signal: "elm,type,segment,single";
2492 set_int(seg_type, SEGMENT_TYPE_SINGLE);
2497 name: "segment_type_l";
2498 signal: "elm,type,segment,left";
2501 set_int(seg_type, SEGMENT_TYPE_LEFT);
2506 name: "segment_type_m";
2507 signal: "elm,type,segment,middle";
2510 set_int(seg_type, SEGMENT_TYPE_MIDDLE);
2515 name: "segment_type_r";
2516 signal: "elm,type,segment,right";
2519 set_int(seg_type, SEGMENT_TYPE_RIGHT);
2524 name: "normal_segment";
2525 signal: "elm,state,segment,normal";
2528 set_int(seg_state, SEGMENT_STATE_NORMAL);
2533 name: "pressed_segment";
2534 signal: "elm,state,segment,pressed";
2537 set_int(seg_state, SEGMENT_STATE_PRESSED);
2542 name: "selected_segment";
2543 signal: "elm,state,segment,selected";
2546 set_int(seg_state, SEGMENT_STATE_SELECTED);
2550 program { name: "disable_segment";
2551 signal: "elm,state,disabled";
2554 set_int(seg_status, SEGMENT_STATUS_DISABLED);
2558 program { name: "enable_segment";
2559 signal: "elm,state,enabled";
2562 set_int(seg_status, SEGMENT_STATUS_ENABLED);
2566 program { name: "text_show";
2567 signal: "elm,state,text,visible";
2572 get_state(PART:"elm.swallow.icon", st, 30, vl);
2573 if (!strcmp(st, "icononly"))
2575 set_state(PART:"elm.swallow.icon", "visible", 0.0);
2576 set_state(PART:"padding_icon_text", "visible", 0.0);
2578 get_state(PART:"elm.text", st, 30, vl);
2579 if (!strcmp(st, "selected"))
2580 set_state(PART:"elm.text", "selected", 0.0);
2582 set_state(PART:"elm.text", "normal", 0.0);
2585 program { name: "text_hide";
2586 signal: "elm,state,text,hidden";
2591 get_state(PART:"elm.swallow.icon", st, 30, vl);
2592 if (!strcmp(st, "visible"))
2594 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2595 set_state(PART:"padding_icon_text", "icononly", 0.0);
2597 set_state(PART:"elm.text", "default", 0.0);
2600 program { name: "icon_show";
2601 signal: "elm,state,icon,visible";
2606 get_state(PART:"elm.text", st, 30, vl);
2607 if ((!strcmp(st, "normal")) || (!strcmp(st, "selected")))
2609 set_state(PART:"elm.swallow.icon", "visible", 0.0);
2610 set_state(PART:"padding_icon_text", "visible", 0.0);
2614 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2615 set_state(PART:"padding_icon_text", "icononly", 0.0);
2619 program { name: "icon_hide";
2620 signal: "elm,state,icon,hidden";
2622 action: STATE_SET "default" 0.0;
2623 target: "elm.swallow.icon";
2626 #undef SEGMENT_TYPE_SINGLE
2627 #undef SEGMENT_TYPE_LEFT
2628 #undef SEGMENT_TYPE_MIDDLE
2629 #undef SEGMENT_TYPE_RIGHT
2630 #undef SEGMENT_STATE_NORMAL
2631 #undef SEGMENT_STATE_PRESSED
2632 #undef SEGMENT_STATE_SELECTED
2633 #undef SEGMENT_STATUS_ENABLED
2634 #undef SEGMENT_STATUS_DISABLED