Bundles / res / edje /
data_source.edc
- #include "../../inc/view_defines.h"
- #include "edc_defines.edc"
- #define IMAGE_SOURCE_BACKGROUND "../res/images/source/background.png"
- #define IMAGE_RADIO_OFF "../res/images/source/radio_off.png"
- #define IMAGE_RADIO_ON "../res/images/source/radio_on.png"
- #define IMAGE_INCLUDE_HEADER "../res/images/source/check_off.png"
- #define IMAGE_INCLUDE_HEADER_PRESSED "../res/images/source/check_on.png"
- #define IMAGE_INCLUDE_SHADOW "../res/images/source/image1.png"
- #define PART_BYTE_BUTTON "part,byte_button"
- #define PART_STRING_BUTTON "part,string_button"
- #define PART_INCLUDE_BUTTON "part,include_button"
- #define PART_ADD_BUTTON "part,add_button"
- #define PART_SEND_BUTTON "part,send_button"
- #define STYLE_KEY_VAL "style,key_val"
- #define STYLE_BYTE "style,byte"
- #define STYLE_ITEM "style,item"
- #define PART_ENTRY(part_name, pos_y) \
- part { \
- name: part_name; \
- type: SWALLOW; \
- description { \
- state: "default" 0.0; \
- fixed: 1 1; \
- rel1.relative: 0.2306 pos_y; \
- rel2.relative: 0.7306 pos_y+0.05; \
- } \
- } \
- #define PROGRAM_BUTTON(part_name, signal_name) \
- program { \
- signal: "mouse,down,1"; \
- source: part_name; \
- script { \
- new state[256]; \
- new Float:state_val; \
- get_state(PART:part_name, state, 256, state_val); \
- if (!strncmp(STATE_DEFAULT, state, 256)) { \
- set_state(PART:part_name, STATE_PRESSED, 0.0);\
- } \
- } \
- } \
- program { \
- signal: "mouse,up,1"; \
- source: part_name; \
- action: STATE_SET STATE_DEFAULT 0.0; \
- target: part_name; \
- script { \
- new state[256]; \
- new Float:state_val; \
- get_state(PART:part_name, state, 256, state_val); \
- if (!strncmp(STATE_PRESSED, state, 256)) { \
- set_state(PART:part_name, STATE_DEFAULT, 0.0);\
- } \
- } \
- } \
- program \
- { \
- signal: "mouse,clicked,1"; \
- source: part_name; \
- action: SIGNAL_EMIT signal_name ""; \
- } \
- #define PROGRAM_SET_BUTTON_ACTIVITY(part_name, signal_on, signal_off) \
- program { \
- signal: signal_on; \
- source: ""; \
- action: STATE_SET STATE_DEFAULT 0.0; \
- target: part_name; \
- } \
- program { \
- signal: signal_off; \
- source: ""; \
- action: STATE_SET STATE_INACTIVE 0.0; \
- target: part_name; \
- } \
- styles {
- style {
- name: STYLE_ITEM;
- base: "font=BreezeSans:style=medium font_size=26 color=#000000 wrap=mixed align=left valign=top";
- tag: "br" "\n";
- tag: "highlight" "+ font_weight=Bold";
- tag: "b" "+ font_weight=Bold";
- tag: "tab" "\t";
- tag: "type" "+ font=BreezeSans:style=light font_size=24 color=#666666";
- }
- }
- collections {
- images {
- image: IMAGE_SOURCE_BACKGROUND COMP;
- image: IMAGE_RADIO_OFF COMP;
- image: IMAGE_RADIO_ON COMP;
- image: IMAGE_INCLUDE_HEADER COMP;
- image: IMAGE_INCLUDE_HEADER_PRESSED COMP;
- image: IMAGE_ARROW_DOWN COMP;
- image: IMAGE_ARROW_UP COMP;
- image: IMAGE_INCLUDE_SHADOW COMP;
- }
- group {
- name: GROUP_SOURCE;
- parts {
- part {
- name: PART_BACKGROUND;
- type: IMAGE;
- description {
- state: "default" 0.0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- image.normal: IMAGE_SOURCE_BACKGROUND;
- }
- }
- part {
- name: PART_LIST;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- rel1.relative: 0.0 0.4516;
- rel2.relative: 1.0 0.8828;
- }
- }
- PART_ENTRY(PART_SOURCE_KEY, 0.1161)
- PART_ENTRY(PART_SOURCE_VALUE, 0.2060)
- PART_RECT_BTN("Add", PART_ADD_BUTTON, 0.0208, 0.9180, 0.4931, 0.9883)
- PART_RECT_BTN("Send", PART_SEND_BUTTON, 0.5069, 0.9180, 0.9792, 0.9883)
- PART_IMAGE_BTN("Byte", PART_BYTE_BUTTON, 0.2278, 0.3172, 0.2750, 0.3438, IMAGE_RADIO_OFF, IMAGE_RADIO_ON, 0.2889, 0.4889, 26)
- PART_IMAGE_BTN("String", PART_STRING_BUTTON, 0.5722, 0.3172, 0.6194, 0.3438, IMAGE_RADIO_OFF, IMAGE_RADIO_ON, 0.6333, 0.8333, 26)
- PART_IMAGE_BTN("Include bundle header", PART_INCLUDE_BUTTON, 0.0417, 0.4055, 0.0917, 0.4336, IMAGE_INCLUDE_HEADER, IMAGE_INCLUDE_HEADER_PRESSED, 0.1167, 0.5167, 24)
- part {
- name: PART_SHADOW;
- type: IMAGE;
- repeat_events: 1;
- description {
- state: "default" 0.0;
- rel1.relative: 0.0 0.4492;
- rel2.relative: 1.0 0.4609;
- image.normal: IMAGE_INCLUDE_SHADOW;
- }
- }
- }
- programs {
- program {
- signal: "load";
- source: "";
- script {
- set_state(PART:PART_BYTE_BUTTON"_img", STATE_PRESSED, 0.0);
- set_state(PART:PART_ADD_BUTTON, STATE_INACTIVE, 0.0);
- set_state(PART:PART_SEND_BUTTON, STATE_INACTIVE, 0.0);
- }
- }
- program {
- signal: "header_off";
- source: "";
- signal: SIGNAL_HEADER_OFF;
- action: STATE_SET STATE_DEFAULT 0.0;
- target: PART_INCLUDE_BUTTON"_img";
- }
- PROGRAM_BUTTON(PART_ADD_BUTTON, SIGNAL_SOURCE_ADD)
- PROGRAM_BUTTON(PART_SEND_BUTTON, SIGNAL_SOURCE_SEND)
- PROGRAM_RADIO("mouse,clicked,1", PART_BYTE_BUTTON, PART_BYTE_BUTTON"_img", PART_STRING_BUTTON"_img", SIGNAL_SOURCE_BYTE_SELECTED)
- PROGRAM_RADIO("mouse,clicked,1", PART_STRING_BUTTON, PART_STRING_BUTTON"_img", PART_BYTE_BUTTON"_img", SIGNAL_SOURCE_STRING_SELECTED)
- PROGRAM_RADIO(SIGNAL_SET_BYTE, "", PART_BYTE_BUTTON"_img", PART_STRING_BUTTON"_img", "")
- PROGRAM_RADIO(SIGNAL_SET_STRING, "", PART_STRING_BUTTON"_img", PART_BYTE_BUTTON"_img", "")
- PROGRAM_CHECK("mouse,clicked,1", PART_INCLUDE_BUTTON, PART_INCLUDE_BUTTON"_img", SIGNAL_SOURCE_INCLUDE_CHECKED, SIGNAL_SOURCE_INCLUDE_UNCHECKED)
- PROGRAM_SET_BUTTON_ACTIVITY(PART_ADD_BUTTON, SIGNAL_ADD_ON, SIGNAL_ADD_OFF)
- PROGRAM_SET_BUTTON_ACTIVITY(PART_SEND_BUTTON, SIGNAL_SEND_ON, SIGNAL_SEND_OFF)
- }
- }
- group {
- name: GROUP_SOURCE_HEADER;
- parts {
- part {
- name: PART_ITEM_BG;
- type: RECT;
- description {
- state: "default" 0.0;
- min: 720 65;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- color: 212 212 212 255;
- }
- }
- part {
- name: PART_ITEM;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1.relative: 0.0417 0.0;
- rel2.relative: 1.0000 1.0;
- text.style: STYLE_ITEM;
- }
- }
- PART_IMAGE_BTN("", PART_ARROW, 0.9181, 0.3846, 0.9611, 0.6462, IMAGE_ARROW_DOWN, IMAGE_ARROW_UP, 0.9181, 0.9181, 0)
- }
- programs {
- PROGRAM_CHECK(SIGNAL_ARROW_STATE_CHANGE, "", PART_ARROW"_img", "", "")
- }
- }
- group {
- name: GROUP_SOURCE_HEADER_DATA;
- parts {
- part {
- name: PART_ITEM_BG;
- type: RECT;
- description {
- state: "default" 0.0;
- min: 720 55;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- color: 212 212 212 255;
- }
- }
- part {
- name: PART_ITEM;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1.relative: 0.0417 0.0;
- rel2.relative: 1.0000 1.0;
- text.style: STYLE_ITEM;
- }
- }
- }
- }
- group {
- name: GROUP_SOURCE_ITEM;
- parts {
- part {
- name: PART_ITEM_BG;
- type: SPACER;
- description {
- state: "default" 0.0;
- min: 0 90;
- rel1.relative: 0.0417 0.0;
- rel2.relative: 1.0000 1.0;
- }
- }
- part {
- name: PART_ITEM;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1.relative: 0.0417 0.0;
- rel2.relative: 1.0000 1.0;
- text.style: STYLE_ITEM;
- }
- }
- }
- }
- }