}
}
+#define SEGMENT_TYPE_SINGLE 1
+#define SEGMENT_TYPE_LEFT 2
+#define SEGMENT_TYPE_MIDDLE 3
+#define SEGMENT_TYPE_RIGHT 4
+#define SEGMENT_STATE_NORMAL 1
+#define SEGMENT_STATE_PRESSED 2
+#define SEGMENT_STATE_SELECTED 3
+#define SEGMENT_STATUS_ENABLED 0
+#define SEGMENT_STATUS_DISABLED 1
+
group { name: "elm/segment_control/item/default";
data.item: "label.wrap.part" "label.bg";
}
programs {
script {
- public seg_type; // 1-Single, 2-Left, 3-Middle, 4-Right.
- public seg_state; // 1-Normal/Default, 2-Pressed, 3-Selected.
- public seg_status;// 0-Enabled/Default, 1-Disabled
+ public seg_type; // Single, Left, Middle, Right.
+ public seg_state; // Normal/Default, Pressed, Selected.
+ public seg_status;// Enabled/Default, Disabled
public update_state() {
new type, state, disabled;
state = get_int(seg_state);
disabled = get_int(seg_status);
- if( state ==1 )
+ if(state == SEGMENT_STATE_NORMAL)
{
- if(type == 1)
+ if(type == SEGMENT_TYPE_SINGLE)
set_state(PART:"segment", "default_single", 0.0);
- else if(type == 2)
+ else if(type == SEGMENT_TYPE_LEFT)
set_state(PART:"segment", "default_left", 0.0);
- else if(type == 3)
+ else if(type == SEGMENT_TYPE_MIDDLE)
set_state(PART:"segment", "default_middle", 0.0);
- else if(type == 4)
+ else if(type == SEGMENT_TYPE_RIGHT)
set_state(PART:"segment", "default_right", 0.0);
}
- else if( state == 2 )
+ else if(state == SEGMENT_STATE_PRESSED)
{
- if(type == 1)
+ if(type == SEGMENT_TYPE_SINGLE)
set_state(PART:"segment", "pressed_single", 0.0);
- else if(type == 2)
+ else if(type == SEGMENT_TYPE_LEFT)
set_state(PART:"segment", "pressed_left", 0.0);
- else if(type == 3)
+ else if(type == SEGMENT_TYPE_MIDDLE)
set_state(PART:"segment", "pressed_middle", 0.0);
- else if(type == 4)
+ else if(type == SEGMENT_TYPE_RIGHT)
set_state(PART:"segment", "pressed_right", 0.0);
}
- else if( state == 3 )
+ else if(state == SEGMENT_STATE_SELECTED)
{
- if(type == 1)
+ if(type == SEGMENT_TYPE_SINGLE)
set_state(PART:"segment", "selected_single", 0.0);
- else if(type == 2)
+ else if(type == SEGMENT_TYPE_LEFT)
set_state(PART:"segment", "selected_left", 0.0);
- else if(type == 3)
+ else if(type == SEGMENT_TYPE_MIDDLE)
set_state(PART:"segment", "selected_middle", 0.0);
- else if(type == 4)
+ else if(type == SEGMENT_TYPE_RIGHT)
set_state(PART:"segment", "selected_right", 0.0);
}
- if( disabled == 1 )
+ if(disabled == SEGMENT_STATUS_DISABLED)
{
- if(type == 1)
+ if(type == SEGMENT_TYPE_SINGLE)
set_state(PART:"disabler", "disabled_single", 0.0);
- else if(type == 2)
+ else if(type == SEGMENT_TYPE_LEFT)
set_state(PART:"disabler", "disabled_left", 0.0);
- else if(type == 3)
+ else if(type == SEGMENT_TYPE_MIDDLE)
set_state(PART:"disabler", "disabled_middle", 0.0);
- else if(type == 4)
+ else if(type == SEGMENT_TYPE_RIGHT)
set_state(PART:"disabler", "disabled_right", 0.0);
}
}
signal: "elm,type,segment,single";
source: "elm";
script {
- set_int(seg_status, 0);
- set_int(seg_type, 1);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_SINGLE);
update_state();
}
}
signal: "elm,type,segment,left";
source: "elm";
script {
- set_int(seg_status, 0);
- set_int(seg_type, 2);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_LEFT);
update_state();
}
}
signal: "elm,type,segment,middle";
source: "elm";
script {
- set_int(seg_status, 0);
- set_int(seg_type, 3);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_MIDDLE);
update_state();
}
}
signal: "elm,type,segment,right";
source: "elm";
script {
- set_int(seg_status, 0);
- set_int(seg_type, 4);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_RIGHT);
update_state();
}
}
signal: "elm,state,segment,normal";
source: "elm";
script {
- set_int(seg_status, 0);
- set_int(seg_state, 1);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_state, SEGMENT_STATE_NORMAL);
update_state();
}
}
signal: "elm,state,segment,pressed";
source: "elm";
script {
- set_int(seg_status, 0);
- set_int(seg_state, 2);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_state, SEGMENT_STATE_PRESSED);
update_state();
}
}
signal: "elm,state,segment,selected";
source: "elm";
script {
- set_int(seg_status, 0);
- set_int(seg_state, 3);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_state, SEGMENT_STATE_SELECTED);
update_state();
}
}
signal: "elm,state,disabled";
source: "elm";
script {
- set_int(seg_status, 1);
+ set_int(seg_status, SEGMENT_STATUS_DISABLED);
update_state();
}
}
signal: "elm,state,enabled";
source: "elm";
script {
- set_int(seg_status, 0);
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
update_state();
}
}
}
}
-group { name: "elm/label/base/segment_normal";
+group { name: "elm/label/base/default/segment_normal";
data.item: "default_font_size" "24";
data.item: "min_font_size" "16";
data.item: "max_font_size" "24";
styles{
style { name: "seg_text_style_normal";
- base: "font=SLP:style=Medium font_size=18 style=shadow \
- shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_NORMAL_INC" \
+ base: "font=SLP:style=Medium font_size=18\
align=center \
color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_NORMAL_INC" wrap=char";
tag: "br" "\n";
tag: "tab" "\t";
}
style { name: "seg_text_style_pressed";
- base: "font=SLP:style=Medium font_size=18 style=shadow \
- shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_NORMAL_INC" \
+ base: "font=SLP:style=Medium font_size=18\
align=center \
color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_PRESSED_INC" wrap=char";
tag: "br" "\n";
tag: "tab" "\t";
}
style { name: "seg_text_style_selected";
- base: "font=SLP:style=Medium font_size=18 style=shadow \
- shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_SELECTED_INC" \
+ base: "font=SLP:style=Medium font_size=18\
align=center color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_SELECTED_INC" \
wrap=char";
tag: "br" "\n";
tag: "tab" "\t";
}
style { name: "seg_text_style_disabled";
- base: "font=SLP:style=Medium font_size=18 style=shadow \
- shadow_color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_SHADOW_STYLE_COLOR_SELECTED_INC" \
- align=center color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_DISABLED_INC" \
+ base: "font=SLP:style=Medium font_size=18\
+ align=center color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_NORMAL_INC" \
wrap=char";
tag: "br" "\n";
tag: "hilight" "+ font=SLP:style=Bold";
}
}
-group { name: "elm/label/base/segment_selected";
+group { name: "elm/label/base/default/segment_selected";
data.item: "default_font_size" "24";
data.item: "min_font_size" "16";
data.item: "max_font_size" "24";
}
}
}
-group { name: "elm/label/base/segment_pressed";
+group { name: "elm/label/base/default/segment_pressed";
data.item: "default_font_size" "24";
data.item: "min_font_size" "16";
data.item: "max_font_size" "24";
}
}
-group { name: "elm/label/base/segment_disabled";
+group { name: "elm/label/base/default/segment_disabled";
data.item: "default_font_size" "24";
data.item: "min_font_size" "16";
data.item: "max_font_size" "24";
}
}
}
+
+
+group { name: "elm/segment_control/base/body_style";
+ parts {
+ part { name: "bg";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 203 193 182 255;
+ rel1.offset: 5 0;
+ rel2.offset: -5 -1;
+ min: 100 40;
+ }
+ }
+ }
+}
+
+group { name: "elm/segment_control/item/body_style";
+ data.item: "label.wrap.part" "label.bg";
+
+ images {
+ image: "00_winset_btn_sge_normal.png" COMP;
+ image: "00_winset_btn_sge_body_normal_left.png" COMP;
+ image: "00_winset_btn_sge_body_normal_centre.png" COMP;
+ image: "00_winset_btn_sge_body_normal_right.png" COMP;
+ image: "00_winset_btn_sge_body.png" COMP;
+ image: "00_winset_btn_sge_body_press_center.png" COMP;
+ image: "00_winset_btn_sge_body_press_left.png" COMP;
+ image: "00_winset_btn_sge_body_press_right.png" COMP;
+ }
+ parts {
+ part { name: "segment";
+ mouse_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 1 1;
+ visible: 0;
+ image {
+ normal: "00_winset_btn_sge_body.png";
+ border: 5 5 5 5;
+ border_scale: 1;
+ middle: 1;
+ }
+ }
+ description { state: "default_single" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body.png";
+ border: 5 5 5 5;
+ }
+ }
+ description { state: "default_left" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_normal_left.png";
+ border: 5 1 5 5;
+ }
+ }
+ description { state: "default_right" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_normal_right.png";
+ border: 1 5 5 5;
+ }
+ }
+ description { state: "default_middle" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_normal_centre.png";
+ border: 1 1 5 5;
+ }
+ }
+ description { state: "pressed_single" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_normal.png";
+ border: 5 5 5 5;
+ }
+ }
+ description { state: "pressed_left" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_press_left.png";
+ border: 5 1 5 5;
+ }
+ }
+ description { state: "pressed_right" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_press_right.png";
+ border: 1 5 5 5;
+ }
+ }
+ description { state: "pressed_middle" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_press_center.png";
+ border: 1 1 7 7;
+ }
+ }
+ description { state: "selected_single" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_normal.png";
+ border: 5 5 5 5;
+ }
+ }
+ description { state: "selected_left" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_press_left.png";
+ border: 5 1 5 5;
+ }
+ }
+ description { state: "selected_right" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_press_right.png";
+ border: 1 5 5 5;
+ }
+ }
+ description { state: "selected_middle" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_body_press_center.png";
+ border: 1 1 7 7;
+ }
+ }
+ }
+ part { name: "padding_left";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 1.0;
+ min: 2 2;
+ max: 2 2;
+ fixed: 1 0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "padding_right";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 1.0 1.0;
+ min: 2 2;
+ max: 2 2;
+ fixed: 1 0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "padding_top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ min: 2 2;
+ max: 2 2;
+ fixed: 0 1;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "padding_bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1.relative: 0.0 1.0;
+ rel2.relative: 1.0 1.0;
+ min: 2 2;
+ max: 2 2;
+ fixed: 0 1;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "icon.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 1;
+ fixed: 1 0;
+ rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
+ rel2 {relative: 1.0 1.0; to: "elm.swallow.icon"; }
+ align: 0.0 0.5;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "padding_icon_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "icon.bg"; }
+ rel2 { relative: 1.0 1.0; to: "icon.bg"; }
+ fixed: 1 0;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "visible" 0.0; //when icon is visible
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "icon.bg"; }
+ rel2 { relative: 1.0 1.0; to: "icon.bg"; }
+ fixed: 1 0;
+ min: 2 0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.0 0.5;
+ rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
+ rel2 {relative: 0.0 0.0; to_y: "padding_bottom"; }
+ fixed: 1 0;
+ aspect: 1.0 1.0;
+ aspect_preference: BOTH;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ rel2 {relative: 0.3 0.0; to_y: "padding_bottom"; }
+ }
+ description { state: "icononly" 0.0;;
+ inherit: "default" 0.0;
+ visible: 1;
+ rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
+ align: 0.5 0.5;
+ }
+ }
+ part { name: "label.bg";
+ repeat_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
+ rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
+ }
+ }
+ part { name: "elm.swallow.label";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "label.bg";
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 1 1;
+ min: 1 1;
+ align: 0.0 0.5;
+ rel1 { relative: 1.0 1.0; to_x: "padding_icon_text";}
+ rel2 { relative: 0.0 0.0; to_x: "padding_right";}
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "disabler";
+ repeat_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 1 1;
+ min: 1 1;
+ align: 0.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "segment";}
+ rel2 { relative: 1.0 1.0; to: "segment";}
+ color: 255 255 255 150;
+ }
+ description { state: "disabled_single" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_button_02_normal.png";
+ border: 7 7 7 7;
+ }
+ }
+ description { state: "disabled_left" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_normal_left.png";
+ border: 6 1 7 7;
+ }
+ }
+ description { state: "disabled_right" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_normal_right.png";
+ border: 1 6 7 7;
+ }
+ }
+ description { state: "disabled_middle" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_winset_btn_sge_normal_centre.png";
+ border: 2 2 2 2;
+ }
+ }
+ }
+ }
+ programs {
+ script {
+ public seg_type; // Single, Left, Middle, Right.
+ public seg_state; // Normal/Default, Pressed, Selected.
+ public seg_status;// Enabled/Default, Disabled
+
+ public update_state() {
+ new type, state, disabled;
+ type = get_int(seg_type);
+ state = get_int(seg_state);
+ disabled = get_int(seg_status);
+
+ if(state == SEGMENT_STATE_NORMAL)
+ {
+ if(type == SEGMENT_TYPE_SINGLE)
+ set_state(PART:"segment", "default_single", 0.0);
+ else if(type == SEGMENT_TYPE_LEFT)
+ set_state(PART:"segment", "default_left", 0.0);
+ else if(type == SEGMENT_TYPE_MIDDLE)
+ set_state(PART:"segment", "default_middle", 0.0);
+ else if(type == SEGMENT_TYPE_RIGHT)
+ set_state(PART:"segment", "default_right", 0.0);
+ }
+ else if(state == SEGMENT_STATE_PRESSED)
+ {
+ if(type == SEGMENT_TYPE_SINGLE)
+ set_state(PART:"segment", "pressed_single", 0.0);
+ else if(type == SEGMENT_TYPE_LEFT)
+ set_state(PART:"segment", "pressed_left", 0.0);
+ else if(type == SEGMENT_TYPE_MIDDLE)
+ set_state(PART:"segment", "pressed_middle", 0.0);
+ else if(type == SEGMENT_TYPE_RIGHT)
+ set_state(PART:"segment", "pressed_right", 0.0);
+ }
+ else if(state == SEGMENT_STATE_SELECTED)
+ {
+ if(type == SEGMENT_TYPE_SINGLE)
+ set_state(PART:"segment", "selected_single", 0.0);
+ else if(type == SEGMENT_TYPE_LEFT)
+ set_state(PART:"segment", "selected_left", 0.0);
+ else if(type == SEGMENT_TYPE_MIDDLE)
+ set_state(PART:"segment", "selected_middle", 0.0);
+ else if(type == SEGMENT_TYPE_RIGHT)
+ set_state(PART:"segment", "selected_right", 0.0);
+ }
+ if(disabled == SEGMENT_STATUS_DISABLED)
+ {
+ if(type == SEGMENT_TYPE_SINGLE)
+ set_state(PART:"disabler", "disabled_single", 0.0);
+ else if(type == SEGMENT_TYPE_LEFT)
+ set_state(PART:"disabler", "disabled_left", 0.0);
+ else if(type == SEGMENT_TYPE_MIDDLE)
+ set_state(PART:"disabler", "disabled_middle", 0.0);
+ else if(type == SEGMENT_TYPE_RIGHT)
+ set_state(PART:"disabler", "disabled_right", 0.0);
+ }
+ }
+ }
+ program {
+ name: "segment_type_s";
+ signal: "elm,type,segment,single";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_SINGLE);
+ update_state();
+ }
+ }
+ program {
+ name: "segment_type_l";
+ signal: "elm,type,segment,left";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_LEFT);
+ update_state();
+ }
+ }
+ program {
+ name: "segment_type_m";
+ signal: "elm,type,segment,middle";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_MIDDLE);
+ update_state();
+ }
+ }
+ program {
+ name: "segment_type_r";
+ signal: "elm,type,segment,right";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_type, SEGMENT_TYPE_RIGHT);
+ update_state();
+ }
+ }
+ program {
+ name: "normal_segment";
+ signal: "elm,state,segment,normal";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_state, SEGMENT_STATE_NORMAL);
+ update_state();
+ }
+ }
+ program {
+ name: "pressed_segment";
+ signal: "elm,state,segment,pressed";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_state, SEGMENT_STATE_PRESSED);
+ update_state();
+ }
+ }
+ program {
+ name: "selected_segment";
+ signal: "elm,state,segment,selected";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ set_int(seg_state, SEGMENT_STATE_SELECTED);
+ update_state();
+ }
+ }
+ program { name: "disable_segment";
+ signal: "elm,state,disabled";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_DISABLED);
+ update_state();
+ }
+ }
+ program { name: "enable_segment";
+ signal: "elm,state,enabled";
+ source: "elm";
+ script {
+ set_int(seg_status, SEGMENT_STATUS_ENABLED);
+ update_state();
+ }
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ new st1[31];
+ new Float:vl1;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ get_state(PART:"elm.swallow.label", st1, 30, vl1);
+ if (!strcmp(st, "icononly"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"padding_icon_text", "visible", 0.0);
+ }
+ set_state(PART:"elm.swallow.label", "visible", 0.0);
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"padding_icon_text", "icononly", 0.0);
+ }
+ set_state(PART:"elm.swallow.label", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.label", st, 30, vl);
+ if (!strcmp(st, "normal"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"padding_icon_text", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"padding_icon_text", "icononly", 0.0);
+ }
+ }
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.icon";
+ }
+ }
+}
+
+group { name: "elm/label/base/body_style/segment_normal";
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "16";
+ data.item: "max_font_size" "24";
+ styles{
+ style { name: "seg_text_body_style_normal";
+ base: "font=SLP:style=Medium font_size=18\
+ align=center \
+ color="SEGMENT_CONTROL_ITEM_TITLE_BODY_TEXT_STYLE_COLOR_NORMAL_INC" wrap=char";
+ tag: "br" "\n";
+ tag: "hilight" "+ font=SLP:style=Bold";
+ tag: "b" "+ font=SLP:style=Bold";
+ tag: "tab" "\t";
+ }
+ style { name: "seg_text_body_style_pressed";
+ base: "font=SLP:style=Medium font_size=18\
+ align=center \
+ color="SEGMENT_CONTROL_ITEM_TITLE_TEXT_STYLE_COLOR_PRESSED_INC" wrap=char";
+ tag: "br" "\n";
+ tag: "hilight" "+ font=SLP:style=Bold";
+ tag: "b" "+ font=SLP:style=Bold";
+ tag: "tab" "\t";
+ }
+ style { name: "seg_text_body_style_selected";
+ base: "font=SLP:style=Medium font_size=18\
+ align=center color="SEGMENT_CONTROL_ITEM_TITLE_BODY_TEXT_STYLE_COLOR_SELECTED_INC" \
+ wrap=char";
+ tag: "br" "\n";
+ tag: "hilight" "+ font=SLP:style=Bold";
+ tag: "b" "+ font=SLP:style=Bold";
+ tag: "tab" "\t";
+ }
+ style { name: "seg_text_body_style_disabled";
+ base: "font=SLP:style=Medium font_size=18\
+ align=center color="SEGMENT_CONTROL_ITEM_TITLE_BODY_TEXT_STYLE_COLOR_NORMAL_INC" \
+ wrap=char";
+ tag: "br" "\n";
+ tag: "hilight" "+ font=SLP:style=Bold";
+ tag: "b" "+ font=SLP:style=Bold";
+ tag: "tab" "\t";
+ }
+ }
+ parts {
+ part { name: "label.swallow.background";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ }
+ }
+ part { name: "label.text.clip";
+ type: RECT;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0 0; to: "label.swallow.background"; }
+ rel2 { relative: 1 1; to: "label.swallow.background"; }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "label.text.clip";
+ description { state: "default" 0.0;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ align: 0.0 0.5;
+ text {
+ style: "seg_text_body_style_normal";
+ align: 0.0 0.5;
+ min: 1 0;
+ }
+ }
+ }
+ }
+}
+
+group { name: "elm/label/base/body_style/segment_selected";
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "16";
+ data.item: "max_font_size" "24";
+ parts {
+ part { name: "label.swallow.background";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ }
+ }
+ part { name: "label.text.clip";
+ type: RECT;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0 0; to: "label.swallow.background"; }
+ rel2 { relative: 1 1; to: "label.swallow.background"; }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "label.text.clip";
+ description { state: "default" 0.0;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ align: 0.0 0.5;
+ text {
+ style: "seg_text_body_style_selected";
+ align: 0.0 0.5;
+ min: 1 0;
+ }
+ }
+ }
+ }
+}
+group { name: "elm/label/base/body_style/segment_pressed";
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "16";
+ data.item: "max_font_size" "24";
+ parts {
+ part { name: "label.swallow.background";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ }
+ }
+ part { name: "label.text.clip";
+ type: RECT;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0 0; to: "label.swallow.background"; }
+ rel2 { relative: 1 1; to: "label.swallow.background"; }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "label.text.clip";
+ description { state: "default" 0.0;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ align: 0.5 0.5;
+ text {
+ style: "seg_text_body_style_pressed";
+ align: 0.5 0.5;
+ min: 1 0;
+ }
+ }
+ }
+ }
+}
+
+group { name: "elm/label/base/body_style/segment_disabled";
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "16";
+ data.item: "max_font_size" "24";
+ parts {
+ part { name: "label.swallow.background";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ }
+ }
+ part { name: "label.text.clip";
+ type: RECT;
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0 0; to: "label.swallow.background"; }
+ rel2 { relative: 1 1; to: "label.swallow.background"; }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "label.text.clip";
+ description { state: "default" 0.0;
+ rel1.relative, 0.0 0.0;
+ rel2.relative, 1.0 1.0;
+ align: 0.0 0.5;
+ text {
+ style: "seg_text_body_style_disabled";
+ align: 0.0 0.5;
+ min: 1 0;
+ }
+ }
+ }
+ }
+}
+#undef SEGMENT_TYPE_SINGLE
+#undef SEGMENT_TYPE_LEFT
+#undef SEGMENT_TYPE_MIDDLE
+#undef SEGMENT_TYPE_RIGHT
+#undef SEGMENT_STATE_NORMAL
+#undef SEGMENT_STATE_PRESSED
+#undef SEGMENT_STATE_SELECTED
+#undef SEGMENT_STATUS_ENABLED
+#undef SEGMENT_STATUS_DISABLED