*
*/
-#define DAYSELECTOR_TOTAL_WIDTH (DAYSELECTOR_CHECK_WIDTH_INC*7)
-group {
- name: "elm/dayselector/base/default";
- alias: "elm/dayselector/base/sun_first";
- min: ((DAYSELECTOR_CHECK_WIDTH_INC*7)+6) DAYSELECTOR_CHECK_HEIGHT_INC;
- parts {
- part {
- name: "bg";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- rel1 { relative: 0.0 0.0; offset: 4 0; }
- rel2 { relative: 1.0 1.0; offset: -4 0; }
- color: DAYSELECTOR_BACKGROUND_COLOR_INC;
- }
- }
- part {
- name: "sun";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*1)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "mon";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "sun"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*2)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "tue";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "mon"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*3)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "wed";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "tue"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*4)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "thu";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "wed"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*5)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "fri";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "thu"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*6)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "sat";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "fri"; relative: 1 0; offset: 1 0; }
- }
- }
- }
-}
-group {
- name: "elm/dayselector/base/mon_first";
- min: (DAYSELECTOR_CHECK_WIDTH_INC*7) DAYSELECTOR_CHECK_HEIGHT_INC;
- parts {
- part {
- name: "bg";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- rel1 { relative: 0.0 0.0; offset: 4 0; }
- rel2 { relative: 1.0 1.0; offset: -4 0; }
- color: DAYSELECTOR_BACKGROUND_COLOR_INC;
- }
- }
- part {
- name: "mon";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*1)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "tue";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "mon"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*2)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "wed";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "tue"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*3)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "thu";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "wed"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*4)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "fri";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "thu"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*5)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "sat";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "fri"; relative: 1 0; offset: 1 0; }
- rel2 { relative: ((DAYSELECTOR_CHECK_WIDTH_INC*6)/DAYSELECTOR_TOTAL_WIDTH) 1;}
- }
- }
- part {
- name: "sun";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- rel1 { to: "sat"; relative: 1 0; offset: 1 0; }
- }
- }
- }
-}
-group {
- name: "elm/check/base/dayselector/sun_first_sun";
- alias: "elm/check/base/dayselector/default_sun";
- images {
- image: "00_alarm_repeat_button_normal_01.png" COMP;
- image: "00_alarm_repeat_button_press_01.png" COMP;
- }
- script {
- public check_is_on = 0;
- public text_show = 1;
- public checkon() {
- set_state(PART:"check", "visible", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 1);
- }
- public checkoff() {
- set_state(PART:"check", "default", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "default", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 0);
- }
- public show_check_text() {
- if(get_int(check_is_on) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(check_is_on) == 0)
- set_state(PART:"elm.text", "default", 0.0);
- set_int(text_show, 1);
- }
- public hide_check_text() {
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(text_show, 0);
- }
- }
- parts {
- part {
- name: "bg";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.5 0.5;
- image {
- normal: "00_alarm_repeat_button_normal_01.png";
- border: 4 0 4 4;
- border_scale: 1;
- }
- }
- }
- part {
- name: "check";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- visible: 0;
- image {
- normal: "00_alarm_repeat_button_press_01.png";
- border: 4 0 4 4;
- border_scale: 1;
- }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part {
- name: "elm.swallow.content";
- type: SWALLOW;
- description {
- state: "default" 0.0;
- fixed: 1 0;
- visible: 0;
- align: 0.0 0.5;
- rel1.to_x: "bg";
- rel1.relative: 1.0 0.0;
- rel2.to_x: "bg";
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- fixed: 1 1;
- visible: 1;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
- }
- }
- part {
- name: "elm.text";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- effect: SHADOW;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: DAYSELECTOR_SUNDAY_COLOR_INC;
- align: 0.5 0.5;
- text {
- font: "SLP:style=Medium";
- size: DAYSELECTOR_DAY_FONT_SIZE_INC;
- min: 1 1;
- align: 0.5 0.5;
- }
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- description {
- state: "checked" 0.0;
- inherit: "default" 0.0;
- color: DAYSELECTOR_DAY_PRESSED_COLOR_INC;
- }
- }
- part {
- name: "events";
- type: RECT;
- ignore_flags: ON_HOLD;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: 0 0 0 0;
- }
- }
- }
- programs {
- program {
- name: "click";
- signal: "mouse,up,1";
- source: "events";
- action: SIGNAL_EMIT "elm,action,check,toggle" "";
- }
- program {
- name: "check_on";
- signal: "elm,state,check,on";
- source: "elm";
- script {
- checkon();
- }
- }
- program {
- name: "check_off";
- signal: "elm,state,check,off";
- source: "elm";
- script {
- checkoff();
- }
- }
- program {
- name: "text_show";
- signal: "elm,state,text,visible";
- source: "elm";
- script {
- show_check_text();
- }
- }
- program {
- name: "text_hide";
- signal: "elm,state,text,hidden";
- source: "elm";
- script {
- hide_check_text();
- }
- }
- }
-}
-group {
- name: "elm/check/base/dayselector/mon_first_mon";
- images {
- image: "00_alarm_repeat_button_normal_01.png" COMP;
- image: "00_alarm_repeat_button_press_01.png" COMP;
- }
- script {
- public check_is_on = 0;
- public text_show = 1;
- public checkon() {
- set_state(PART:"check", "visible", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 1);
- }
- public checkoff() {
- set_state(PART:"check", "default", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "default", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 0);
- }
- public show_check_text() {
- if(get_int(check_is_on) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(check_is_on) == 0)
- set_state(PART:"elm.text", "default", 0.0);
- set_int(text_show, 1);
- }
- public hide_check_text() {
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(text_show, 0);
- }
- }
- parts {
- part {
- name: "bg";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.5 0.5;
- image {
- normal: "00_alarm_repeat_button_normal_01.png";
- border: 4 0 4 4;
- border_scale: 1;
- }
- }
- }
- part {
- name: "check";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- visible: 0;
- image {
- normal: "00_alarm_repeat_button_press_01.png";
- border: 4 0 4 4;
- border_scale: 1;
- }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part {
- name: "elm.swallow.content";
- type: SWALLOW;
- description {
- state: "default" 0.0;
- fixed: 1 0;
- visible: 0;
- align: 0.0 0.5;
- rel1.to_x: "bg";
- rel1.relative: 1.0 0.0;
- rel2.to_x: "bg";
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- fixed: 1 1;
- visible: 1;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
- }
- }
- part {
- name: "elm.text";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- effect: SHADOW;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: DAYSELECTOR_WEEKDAY_COLOR_INC;
- align: 0.5 0.5;
- text {
- font: "SLP:style=Medium";
- size: DAYSELECTOR_DAY_FONT_SIZE_INC;
- min: 1 1;
- align: 0.5 0.5;
- }
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- description {
- state: "checked" 0.0;
- inherit: "default" 0.0;
- color: DAYSELECTOR_DAY_PRESSED_COLOR_INC;
- }
- }
- part {
- name: "events";
- type: RECT;
- ignore_flags: ON_HOLD;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: 0 0 0 0;
- }
- }
- }
- programs {
- program {
- name: "click";
- signal: "mouse,up,1";
- source: "events";
- action: SIGNAL_EMIT "elm,action,check,toggle" "";
- }
- program {
- name: "check_on";
- signal: "elm,state,check,on";
- source: "elm";
- script {
- checkon();
- }
- }
- program {
- name: "check_off";
- signal: "elm,state,check,off";
- source: "elm";
- script {
- checkoff();
- }
- }
- program {
- name: "text_show";
- signal: "elm,state,text,visible";
- source: "elm";
- script {
- show_check_text();
- }
- }
- program {
- name: "text_hide";
- signal: "elm,state,text,hidden";
- source: "elm";
- script {
- hide_check_text();
- }
- }
- }
-}
-group {
- name: "elm/check/base/dayselector/sun_first_mon";
- alias: "elm/check/base/dayselector/sun_first_tue";
- alias: "elm/check/base/dayselector/sun_first_wed";
- alias: "elm/check/base/dayselector/sun_first_thu";
- alias: "elm/check/base/dayselector/sun_first_fri";
- alias: "elm/check/base/dayselector/default_mon";
- alias: "elm/check/base/dayselector/default_tue";
- alias: "elm/check/base/dayselector/default_wed";
- alias: "elm/check/base/dayselector/default_thu";
- alias: "elm/check/base/dayselector/default_fri";
- alias: "elm/check/base/dayselector/mon_first_tue";
- alias: "elm/check/base/dayselector/mon_first_wed";
- alias: "elm/check/base/dayselector/mon_first_thu";
- alias: "elm/check/base/dayselector/mon_first_fri";
- images {
- image: "00_alarm_repeat_button_normal_02.png" COMP;
- image: "00_alarm_repeat_button_press_02.png" COMP;
- }
- script {
- public check_is_on = 0;
- public text_show = 1;
- public checkon() {
- set_state(PART:"check", "visible", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 1);
- }
- public checkoff() {
- set_state(PART:"check", "default", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "default", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 0);
- }
- public show_check_text() {
- if(get_int(check_is_on) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(check_is_on) == 0)
- set_state(PART:"elm.text", "default", 0.0);
- set_int(text_show, 1);
- }
- public hide_check_text() {
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(text_show, 0);
- }
- }
- parts {
- part {
- name: "bg";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.5 0.5;
- image {
- normal: "00_alarm_repeat_button_normal_02.png";
- border: 0 0 4 4;
- border_scale: 1;
- }
- }
- }
- part {
- name: "check";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- visible: 0;
- image {
- normal: "00_alarm_repeat_button_press_02.png";
- border: 0 0 4 4;
- border_scale: 1;
- }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part {
- name: "elm.swallow.content";
- type: SWALLOW;
- description {
- state: "default" 0.0;
- fixed: 1 0;
- visible: 0;
- align: 0.0 0.5;
- rel1.to_x: "bg";
- rel1.relative: 1.0 0.0;
- rel2.to_x: "bg";
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- fixed: 1 1;
- visible: 1;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
- }
- }
- part {
- name: "elm.text";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- effect: SHADOW;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: DAYSELECTOR_WEEKDAY_COLOR_INC;
- align: 0.5 0.5;
- text {
- font: "SLP:style=Medium";
- size: DAYSELECTOR_DAY_FONT_SIZE_INC;
- min: 1 1;
- align: 0.5 0.5;
- }
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- description {
- state: "checked" 0.0;
- inherit: "default" 0.0;
- color: DAYSELECTOR_DAY_PRESSED_COLOR_INC;
- }
- }
- part {
- name: "events";
- type: RECT;
- ignore_flags: ON_HOLD;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: 0 0 0 0;
- }
- }
- }
- programs {
- program {
- name: "click";
- signal: "mouse,up,1";
- source: "events";
- action: SIGNAL_EMIT "elm,action,check,toggle" "";
- }
- program {
- name: "check_on";
- signal: "elm,state,check,on";
- source: "elm";
- script {
- checkon();
- }
- }
- program {
- name: "check_off";
- signal: "elm,state,check,off";
- source: "elm";
- script {
- checkoff();
- }
- }
- program {
- name: "text_show";
- signal: "elm,state,text,visible";
- source: "elm";
- script {
- show_check_text();
- }
- }
- program {
- name: "text_hide";
- signal: "elm,state,text,hidden";
- source: "elm";
- script {
- hide_check_text();
- }
- }
+#define DAYSELECOR_DAY_POS_LEFT 1
+#define DAYSELECOR_DAY_POS_RIGHT 2
+#define DAYSELECOR_DAY_POS_MIDDLE 3
+#define DAYSELECOR_DAY_TYPE_WEEKDAY 1
+#define DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT 2
+#define DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1 3
+#define DAYSELECOR_DAY_STATE_DEFAULT 1
+#define DAYSELECOR_DAY_STATE_PRESSED 2
+#define DAYSELECOR_DAY_STATE_SELECTED 3
+
+#define DAYSELECTOR_DAY(_pos, _after)\
+ part {\
+ name: "day"#_pos;\
+ type: SWALLOW;\
+ scale: 1;\
+ clip_to: "clipper";\
+ description { state: "default" 0.0;\
+ visible: 0;\
+ min: 0 0;\
+ align: 0.0 0.5;\
+ fixed: 1 0;\
+ rel1 {\
+ relative: 1.0 0.0;\
+ to: "day"#_after;\
+ offset: 1 0;\
+ }\
+ rel2 {\
+ relative: 1.0 1.0;\
+ to: "day"#_after;\
+ }\
+ }\
+ description { state: "visible" 0.0;\
+ inherit: "default" 0.0;\
+ visible: 1;\
+ min: DAYSELECTOR_CHECK_WIDTH_INC DAYSELECTOR_CHECK_HEIGHT_INC;\
+ }\
+ }\
+ programs{\
+ program {\
+ name: "day"#_pos"visible";\
+ signal: "day"#_pos",visible";\
+ source: "elm";\
+ action: STATE_SET "visible" 0.0;\
+ target: "day"#_pos;\
+ }\
+ program {\
+ name: "day"#_pos"notvisible";\
+ signal: "day"#_pos",default";\
+ source: "elm";\
+ action: STATE_SET "default" 0.0;\
+ target: "day"#_pos;\
+ }\
}
-}
group {
- name: "elm/check/base/dayselector/mon_first_sat";
- images {
- image: "00_alarm_repeat_button_normal_02.png" COMP;
- image: "00_alarm_repeat_button_press_02.png" COMP;
- }
- script {
- public check_is_on = 0;
- public text_show = 1;
- public checkon() {
- set_state(PART:"check", "visible", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 1);
- }
- public checkoff() {
- set_state(PART:"check", "default", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "default", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 0);
- }
- public show_check_text() {
- if(get_int(check_is_on) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(check_is_on) == 0)
- set_state(PART:"elm.text", "default", 0.0);
- set_int(text_show, 1);
- }
- public hide_check_text() {
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(text_show, 0);
- }
- }
+ name: "elm/dayselector/base/default";
parts {
part {
name: "bg";
+ type: RECT;
mouse_events: 0;
- scale: 1;
+ clip_to: "clipper";
description {
state: "default" 0.0;
- align: 0.5 0.5;
- image {
- normal: "00_alarm_repeat_button_normal_02.png";
- border: 0 0 4 4;
- border_scale: 1;
+ rel1 {
+ relative: 0.5 0.0;
+ to: "day0";
}
- }
- }
- part {
- name: "check";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- visible: 0;
- image {
- normal: "00_alarm_repeat_button_press_02.png";
- border: 0 0 4 4;
- border_scale: 1;
+ rel2 {
+ relative: 0.5 1.0;
+ to: "day6";
}
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
+ color: DAYSELECTOR_BACKGROUND_COLOR_INC;
}
}
part {
- name: "elm.swallow.content";
+ name: "day0";
type: SWALLOW;
+ scale: 1;
+ clip_to: "clipper";
description {
state: "default" 0.0;
- fixed: 1 0;
visible: 0;
+ min: 0 0;
align: 0.0 0.5;
- rel1.to_x: "bg";
- rel1.relative: 1.0 0.0;
- rel2.to_x: "bg";
+ fixed: 1 0;
+ rel2.relative: 0.0 1.0;
}
description {
state: "visible" 0.0;
inherit: "default" 0.0;
- fixed: 1 1;
visible: 1;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
+ min: DAYSELECTOR_CHECK_WIDTH_INC DAYSELECTOR_CHECK_HEIGHT_INC;
}
}
+ DAYSELECTOR_DAY(1, 0)
+ DAYSELECTOR_DAY(2, 1)
+ DAYSELECTOR_DAY(3, 2)
+ DAYSELECTOR_DAY(4, 3)
+ DAYSELECTOR_DAY(5, 4)
+ DAYSELECTOR_DAY(6, 5)
part {
- name: "elm.text";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- effect: SHADOW;
+ name: "clipper";
+ type: RECT;
description {
state: "default" 0.0;
- visible: 1;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: DAYSELECTOR_SATURDAY_COLOR_INC;
- align: 0.5 0.5;
- text {
- font: "SLP:style=Medium";
- size: DAYSELECTOR_DAY_FONT_SIZE_INC;
- min: 1 1;
- align: 0.5 0.5;
- }
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
+ rel1.to: "day0";
+ rel2.to: "day6";
+ color: 255 255 255 255;
}
description {
- state: "checked" 0.0;
+ state: "visible" 0.0;
inherit: "default" 0.0;
- color: DAYSELECTOR_DAY_PRESSED_COLOR_INC;
+ color: 200 200 200 255;
}
}
part {
- name: "events";
+ name: "disabler";
type: RECT;
- ignore_flags: ON_HOLD;
description {
state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
color: 0 0 0 0;
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
}
}
}
programs {
program {
- name: "click";
- signal: "mouse,up,1";
- source: "events";
- action: SIGNAL_EMIT "elm,action,check,toggle" "";
- }
- program {
- name: "check_on";
- signal: "elm,state,check,on";
+ name: "disble_dayselector";
+ signal: "elm,state,disabled";
source: "elm";
- script {
- checkon();
- }
+ action: STATE_SET "visible" 0.0;
+ target: "disabler";
+ target: "clipper";
}
program {
- name: "check_off";
- signal: "elm,state,check,off";
+ name: "enable_dayselector";
+ signal: "elm,state,enabled";
source: "elm";
- script {
- checkoff();
- }
+ action: STATE_SET "default" 0.0;
+ target: "disabler";
+ target: "clipper";
}
program {
- name: "text_show";
- signal: "elm,state,text,visible";
+ name: "day0_visible";
+ signal: "day0,visible";
source: "elm";
- script {
- show_check_text();
- }
- }
+ action: STATE_SET "visible" 0.0;
+ target: "day0";
+ }
program {
- name: "text_hide";
- signal: "elm,state,text,hidden";
+ name: "day0_default";
+ signal: "day0,default";
source: "elm";
- script {
- hide_check_text();
- }
+ action: STATE_SET "default" 0.0;
+ target: "day0";
}
}
}
group {
- name: "elm/check/base/dayselector/sun_first_sat";
- alias: "elm/check/base/dayselector/default_sat";
+ name: "elm/check/base/dayselector/default";
images {
+ image: "00_alarm_repeat_button_normal_01.png" COMP;
+ image: "00_alarm_repeat_button_press_01.png" COMP;
+ image: "00_alarm_repeat_button_normal_02.png" COMP;
+ image: "00_alarm_repeat_button_press_02.png" COMP;
image: "00_alarm_repeat_button_normal_03.png" COMP;
image: "00_alarm_repeat_button_press_03.png" COMP;
}
script {
- public check_is_on = 0;
- public text_show = 1;
- public checkon() {
- set_state(PART:"check", "visible", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 1);
- }
- public checkoff() {
- set_state(PART:"check", "default", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "default", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 0);
- }
- public show_check_text() {
- if(get_int(check_is_on) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(check_is_on) == 0)
+ public check_pos; // Left, Right, Middle.
+ public check_type; // Weekday, Weekend.
+ public check_state = DAYSELECOR_DAY_STATE_DEFAULT; // Default, Pressed, Selected.
+
+ public check_bg_show() {
+ if(get_int(check_pos) == DAYSELECOR_DAY_POS_LEFT) {
+ if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT)
+ set_state(PART:"bg", "default_left", 0.0);
+ else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED)
+ set_state(PART:"bg", "pressed_left", 0.0);
+ else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
+ set_state(PART:"bg", "selected_left", 0.0);
+ }
+ else if(get_int(check_pos) == DAYSELECOR_DAY_POS_RIGHT) {
+ if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT)
+ set_state(PART:"bg", "default_right", 0.0);
+ else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED)
+ set_state(PART:"bg", "pressed_right", 0.0);
+ else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
+ set_state(PART:"bg", "selected_right", 0.0);
+ }
+ else if(get_int(check_pos) == DAYSELECOR_DAY_POS_MIDDLE) {
+ if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT)
+ set_state(PART:"bg", "default_middle", 0.0);
+ else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED)
+ set_state(PART:"bg", "pressed_middle", 0.0);
+ else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
+ set_state(PART:"bg", "selected_middle", 0.0);
+ }
+ }
+ public check_text_show() {
+ if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
+ set_state(PART:"elm.text", "selected", 0.0);
+ else {
+ if(get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKDAY)
set_state(PART:"elm.text", "default", 0.0);
- set_int(text_show, 1);
- }
- public hide_check_text() {
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(text_show, 0);
+ else if (get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT)
+ set_state(PART:"elm.text", "weekend_default", 0.0);
+ else if (get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1)
+ set_state(PART:"elm.text", "weekend_style1", 0.0);
+ }
}
}
parts {
scale: 1;
description {
state: "default" 0.0;
- align: 0.5 0.5;
+ //color: DAYSELECTOR_BACKGROUND_COLOR_INC;
+ }
+ description { state: "default_left" 0.0;
+ inherit: "default" 0.0;
image {
- normal: "00_alarm_repeat_button_normal_03.png";
- border: 0 4 4 4;
+ normal: "00_alarm_repeat_button_normal_01.png";
+ border: 4 0 4 4;
border_scale: 1;
}
}
- }
- part {
- name: "check";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- visible: 0;
+ description { state: "default_right" 0.0;
+ inherit: "default" 0.0;
image {
- normal: "00_alarm_repeat_button_press_03.png";
+ normal: "00_alarm_repeat_button_normal_03.png";
border: 0 4 4 4;
border_scale: 1;
}
}
- description {
- state: "visible" 0.0;
+ description { state: "default_middle" 0.0;
inherit: "default" 0.0;
- visible: 1;
- }
- }
- part {
- name: "elm.swallow.content";
- type: SWALLOW;
- description {
- state: "default" 0.0;
- fixed: 1 0;
- visible: 0;
- align: 0.0 0.5;
- rel1.to_x: "bg";
- rel1.relative: 1.0 0.0;
- rel2.to_x: "bg";
+ image {
+ normal: "00_alarm_repeat_button_normal_02.png";
+ border: 0 0 4 4;
+ border_scale: 1;
+ }
}
- description {
- state: "visible" 0.0;
+ description { state: "pressed_left" 0.0;
inherit: "default" 0.0;
- fixed: 1 1;
- visible: 1;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
- }
- }
- part {
- name: "elm.text";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- effect: SHADOW;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: DAYSELECTOR_SATURDAY_COLOR_INC;
- align: 0.5 0.5;
- text {
- font: "SLP:style=Medium";
- size: DAYSELECTOR_DAY_FONT_SIZE_INC;
- min: 1 1;
- align: 0.5 0.5;
+ image {
+ normal: "00_alarm_repeat_button_press_01.png";
+ border: 4 0 4 4;
+ border_scale: 1;
}
}
- description {
- state: "hide" 0.0;
+ description { state: "pressed_right" 0.0;
inherit: "default" 0.0;
- visible: 0;
+ image {
+ normal: "00_alarm_repeat_button_press_03.png";
+ border: 0 4 4 4;
+ border_scale: 1;
+ }
}
- description {
- state: "checked" 0.0;
+ description { state: "pressed_middle" 0.0;
inherit: "default" 0.0;
- color: DAYSELECTOR_DAY_PRESSED_COLOR_INC;
- }
- }
- part {
- name: "events";
- type: RECT;
- ignore_flags: ON_HOLD;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: 0 0 0 0;
- }
- }
- }
- programs {
- program {
- name: "click";
- signal: "mouse,up,1";
- source: "events";
- action: SIGNAL_EMIT "elm,action,check,toggle" "";
- }
- program {
- name: "check_on";
- signal: "elm,state,check,on";
- source: "elm";
- script {
- checkon();
- }
- }
- program {
- name: "check_off";
- signal: "elm,state,check,off";
- source: "elm";
- script {
- checkoff();
- }
- }
- program {
- name: "text_show";
- signal: "elm,state,text,visible";
- source: "elm";
- script {
- show_check_text();
- }
- }
- program {
- name: "text_hide";
- signal: "elm,state,text,hidden";
- source: "elm";
- script {
- hide_check_text();
+ image {
+ normal: "00_alarm_repeat_button_press_02.png";
+ border: 0 0 4 4;
+ border_scale: 1;
+ }
}
- }
- }
-}
-
-group {
- name: "elm/check/base/dayselector/mon_first_sun";
- images {
- image: "00_alarm_repeat_button_normal_03.png" COMP;
- image: "00_alarm_repeat_button_press_03.png" COMP;
- }
- script {
- public check_is_on = 0;
- public text_show = 1;
- public checkon() {
- set_state(PART:"check", "visible", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 1);
- }
- public checkoff() {
- set_state(PART:"check", "default", 0.0);
- if(get_int(text_show) == 1)
- set_state(PART:"elm.text", "default", 0.0);
- else if(get_int(text_show) == 0)
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(check_is_on, 0);
- }
- public show_check_text() {
- if(get_int(check_is_on) == 1)
- set_state(PART:"elm.text", "checked", 0.0);
- else if(get_int(check_is_on) == 0)
- set_state(PART:"elm.text", "default", 0.0);
- set_int(text_show, 1);
- }
- public hide_check_text() {
- set_state(PART:"elm.text", "hide", 0.0);
- set_int(text_show, 0);
- }
- }
- parts {
- part {
- name: "bg";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.5 0.5;
+ description { state: "selected_left" 0.0;
+ inherit: "default" 0.0;
image {
- normal: "00_alarm_repeat_button_normal_03.png";
- border: 0 4 4 4;
+ normal: "00_alarm_repeat_button_press_01.png";
+ border: 4 0 4 4;
border_scale: 1;
}
}
- }
- part {
- name: "check";
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- visible: 0;
+ description { state: "selected_right" 0.0;
+ inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_press_03.png";
border: 0 4 4 4;
border_scale: 1;
}
}
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part {
- name: "elm.swallow.content";
- type: SWALLOW;
- description {
- state: "default" 0.0;
- fixed: 1 0;
- visible: 0;
- align: 0.0 0.5;
- rel1.to_x: "bg";
- rel1.relative: 1.0 0.0;
- rel2.to_x: "bg";
- }
- description {
- state: "visible" 0.0;
+ description { state: "selected_middle" 0.0;
inherit: "default" 0.0;
- fixed: 1 1;
- visible: 1;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
+ image {
+ normal: "00_alarm_repeat_button_press_02.png";
+ border: 0 0 4 4;
+ border_scale: 1;
+ }
}
}
part {
type: TEXT;
mouse_events: 0;
scale: 1;
- effect: SHADOW;
description {
state: "default" 0.0;
- visible: 1;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
- color: DAYSELECTOR_SUNDAY_COLOR_INC;
- align: 0.5 0.5;
+ rel1.to: "bg";
+ rel2.to: "bg";
+ color: DAYSELECTOR_WEEKDAY_COLOR_INC;
text {
font: "SLP:style=Medium";
size: DAYSELECTOR_DAY_FONT_SIZE_INC;
}
}
description {
- state: "hide" 0.0;
+ state: "weekend_default" 0.0;
inherit: "default" 0.0;
- visible: 0;
+ color: DAYSELECTOR_SATURDAY_COLOR_INC;
+ }
+ description {
+ state: "weekend_style1" 0.0;
+ inherit: "default" 0.0;
+ color: DAYSELECTOR_SUNDAY_COLOR_INC;
}
description {
- state: "checked" 0.0;
+ state: "selected" 0.0;
inherit: "default" 0.0;
color: DAYSELECTOR_DAY_PRESSED_COLOR_INC;
}
ignore_flags: ON_HOLD;
description {
state: "default" 0.0;
- rel1 {to: "bg";}
- rel2 {to: "bg";}
+ rel1.to: "bg";
+ rel2.to: "bg";
color: 0 0 0 0;
}
}
}
programs {
program {
- name: "click";
+ name: "check,pressed";
+ signal: "mouse,down,1";
+ source: "events";
+ script {
+ set_int(check_state, DAYSELECOR_DAY_STATE_PRESSED);
+ check_bg_show();
+ }
+ }
+ program {
+ name: "check,toggle";
signal: "mouse,up,1";
source: "events";
action: SIGNAL_EMIT "elm,action,check,toggle" "";
}
program {
- name: "check_on";
+ name: "check,on";
signal: "elm,state,check,on";
source: "elm";
script {
- checkon();
+ set_int(check_state, DAYSELECOR_DAY_STATE_SELECTED);
+ check_bg_show();
+ check_text_show();
}
}
program {
- name: "check_off";
+ name: "check,off";
signal: "elm,state,check,off";
source: "elm";
script {
- checkoff();
+ set_int(check_state, DAYSELECOR_DAY_STATE_DEFAULT);
+ check_bg_show();
+ check_text_show();
}
}
- program {
- name: "text_show";
- signal: "elm,state,text,visible";
+ program { name: "check,left";
+ signal: "elm,pos,check,left";
source: "elm";
script {
- show_check_text();
+ set_int(check_pos, DAYSELECOR_DAY_POS_LEFT);
+ check_bg_show();
}
- }
- program {
- name: "text_hide";
- signal: "elm,state,text,hidden";
+ }
+ program { name: "check,right";
+ signal: "elm,pos,check,right";
+ source: "elm";
+ script {
+ set_int(check_pos, DAYSELECOR_DAY_POS_RIGHT);
+ check_bg_show();
+ }
+ }
+ program { name: "check,middle";
+ signal: "elm,pos,check,middle";
source: "elm";
script {
- hide_check_text();
+ set_int(check_pos, DAYSELECOR_DAY_POS_MIDDLE);
+ check_bg_show();
+ }
+ }
+ program { name: "check,weekday";
+ signal: "elm,type,weekday,default";
+ source: "";
+ script {
+ set_int(check_type, DAYSELECOR_DAY_TYPE_WEEKDAY);
+ check_text_show();
+ }
+ }
+ program { name: "check,weekend,default";
+ signal: "elm,type,weekend,default";
+ source: "";
+ script {
+ set_int(check_type, DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT);
+ check_text_show();
+ }
+ }
+ program { name: "check,weekend,style1";
+ signal: "elm,type,weekend,style1";
+ source: "";
+ script {
+ set_int(check_type, DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1);
+ check_text_show();
}
}
}
}
+
+#undef DAYSELECOR_DAY_POS_LEFT
+#undef DAYSELECOR_DAY_POS_RIGHT
+#undef DAYSELECOR_DAY_POS_MIDDLE
+#undef DAYSELECOR_DAY_TYPE_WEEKDAY
+#undef DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT
+#undef DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1
+#undef DAYSELECOR_DAY_STATE_DEFAULT
+#undef DAYSELECOR_DAY_STATE_PRESSED
+#undef DAYSELECOR_DAY_STATE_SELECTED
+#undef DAYSELECTOR_DAY