*/
}
}
-
-sounds {
- sample {
- name: "touch_sound" AS_IS;
- source: "Tizen_Touch.wav";
- }
-}
styles {
style {
name: "title_textstyle";
}
}
-///////////////////////////////////////////////////////////////////////////////////////
-#define BUTTON_ICON_STYLES(style_name , min_width, min_height) \
- group { name: "elm/button/base/"style_name; \
- images { \
- } \
- script { \
- public mouse_down = 0; \
- public multi_down = 0; \
- } \
- parts { \
- part { name: "button_image"; \
- type: SPACER; \
- scale: 1; \
- description { state: "default" 0.0; \
- min: min_width min_height; \
- max: min_width min_height; \
- } \
- } \
- part { name: "button_center_part"; \
- type : SWALLOW ; \
- mouse_events: 0; \
- scale: 1; \
- description { state: "default" 0.0; \
- rel1.to: "button_image"; \
- rel2.to: "button_image"; \
- } \
- description { state: "pressed" 0.0; \
- inherit: "default" 0.0; \
- } \
- description { state: "disabled" 0.0; \
- inherit: "default" 0.0; \
- } \
- } \
- part { name: "over1"; \
- type: RECT; \
- repeat_events: 1; \
- ignore_flags: ON_HOLD; \
- description { state: "default" 0.0; \
- rel1.to: "button_image"; \
- rel2.to: "button_image"; \
- color: 0 0 0 0; \
- } \
- } \
- part { name: "over2"; \
- type: RECT; \
- repeat_events: 1; \
- description { state: "default" 0.0; \
- rel1.to: "button_image"; \
- rel2.to: "button_image"; \
- color: 0 0 0 0; \
- } \
- } \
- part { name: "disabler"; \
- type: RECT; \
- description { state: "default" 0.0; \
- rel1.to: "button_image"; \
- rel2.to: "button_image"; \
- color: 0 0 0 0; \
- visible: 0; \
- } \
- description { state: "disabled" 0.0; \
- inherit: "default" 0.0; \
- visible: 1; \
- } \
- } \
- } \
- programs { \
- program { name: "button_press"; \
- signal: "mouse,down,1*"; \
- source: "over1"; \
- script { \
- if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) \
- { \
- set_int(mouse_down, 1); \
- run_program(PROGRAM:"button_press2"); \
- } \
- } \
- } \
- program { name: "button_press2"; \
- action: SIGNAL_EMIT "elm,action,press" ""; \
- after: "button_press_anim"; \
- } \
- program { name: "button_press_anim"; \
- action: STATE_SET "pressed" 0.0; \
- target: "button_center_part"; \
- } \
- program { name: "key_press"; \
- signal: "elm,action,pressed"; \
- source: "elm"; \
- action: STATE_SET "pressed" 0.0; \
- target: "button_center_part"; \
- } \
- program { name: "key_unpress"; \
- signal: "elm,action,unpressed"; \
- source: "elm"; \
- action: STATE_SET "default" 0.0; \
- target: "button_center_part"; \
- } \
- program { name: "button_unpress"; \
- signal: "mouse,up,1*"; \
- source: "over2"; \
- script { \
- if (get_int(mouse_down) == 1) \
- { \
- set_int(mouse_down, 0); \
- run_program(PROGRAM:"button_unpress2"); \
- run_program(PROGRAM:"button_unpress_anim"); \
- } \
- } \
- } \
- program { name: "button_unpress2"; \
- action: SIGNAL_EMIT "elm,action,unpress" ""; \
- } \
- program { name: "button_unpress_anim"; \
- action: STATE_SET "default" 0.0; \
- target: "button_center_part"; \
- } \
- program { name: "button_click"; \
- signal: "mouse,clicked,1"; \
- source: "over2"; \
- script { \
- if (get_int(multi_down) == 0) { \
- run_program(PROGRAM:"touch_sound"); \
- run_program(PROGRAM:"button_click2"); \
- } \
- } \
- } \
- program { name: "touch_sound"; \
- action: RUN_PLUGIN "touch_sound"; \
- } \
- program { name: "button_click2"; \
- action: SIGNAL_EMIT "elm,action,click" ""; \
- } \
- program { name: "disable"; \
- signal: "elm,state,disabled"; \
- source: "elm"; \
- action: STATE_SET "disabled" 0.0; \
- target: "disabler"; \
- target: "button_center_part"; \
- } \
- program { name: "enable"; \
- signal: "elm,state,enabled"; \
- source: "elm"; \
- action: STATE_SET "default" 0.0; \
- target: "disabler"; \
- target: "button_center_part"; \
- } \
- program { \
- name: "multi_down"; \
- signal: "elm,action,multi,down"; \
- source: "elm"; \
- script { \
- set_int(multi_down, 1); \
- } \
- } \
- program { \
- name: "multi_up"; \
- signal: "elm,action,multi,up"; \
- source: "elm"; \
- script { \
- set_int(multi_down, 0); \
- } \
- } \
- } \
- }
-
-BUTTON_ICON_STYLES("send_custom", 46 , 40)
-
#define BUTTON_BODY_STYLES(style_name ,img_width, img_height, bg_width, bg_height) \
group { name: "elm/button/base/"style_name; \
images { \