Bundles / res / edje /

data_source.edc

  1. #include "../../inc/view_defines.h"
  2. #include "edc_defines.edc"
  3.  
  4. #define IMAGE_SOURCE_BACKGROUND "../res/images/source/background.png"
  5.  
  6. #define IMAGE_RADIO_OFF "../res/images/source/radio_off.png"
  7. #define IMAGE_RADIO_ON "../res/images/source/radio_on.png"
  8.  
  9.  
  10. #define IMAGE_INCLUDE_HEADER "../res/images/source/check_off.png"
  11. #define IMAGE_INCLUDE_HEADER_PRESSED "../res/images/source/check_on.png"
  12. #define IMAGE_INCLUDE_SHADOW "../res/images/source/image1.png"
  13.  
  14. #define PART_BYTE_BUTTON "part,byte_button"
  15. #define PART_STRING_BUTTON "part,string_button"
  16. #define PART_INCLUDE_BUTTON "part,include_button"
  17. #define PART_ADD_BUTTON "part,add_button"
  18. #define PART_SEND_BUTTON "part,send_button"
  19.  
  20. #define STYLE_KEY_VAL "style,key_val"
  21. #define STYLE_BYTE "style,byte"
  22. #define STYLE_ITEM "style,item"
  23.  
  24. #define PART_ENTRY(part_name, pos_y) \
  25. part { \
  26. name: part_name; \
  27. type: SWALLOW; \
  28. description { \
  29. state: "default" 0.0; \
  30. fixed: 1 1; \
  31. rel1.relative: 0.2306 pos_y; \
  32. rel2.relative: 0.7306 pos_y+0.05; \
  33. } \
  34. } \
  35.  
  36. #define PROGRAM_BUTTON(part_name, signal_name) \
  37. program { \
  38. signal: "mouse,down,1"; \
  39. source: part_name; \
  40. script { \
  41. new state[256]; \
  42. new Float:state_val; \
  43. get_state(PART:part_name, state, 256, state_val); \
  44. if (!strncmp(STATE_DEFAULT, state, 256)) { \
  45. set_state(PART:part_name, STATE_PRESSED, 0.0);\
  46. } \
  47. } \
  48. } \
  49. program { \
  50. signal: "mouse,up,1"; \
  51. source: part_name; \
  52. action: STATE_SET STATE_DEFAULT 0.0; \
  53. target: part_name; \
  54. script { \
  55. new state[256]; \
  56. new Float:state_val; \
  57. get_state(PART:part_name, state, 256, state_val); \
  58. if (!strncmp(STATE_PRESSED, state, 256)) { \
  59. set_state(PART:part_name, STATE_DEFAULT, 0.0);\
  60. } \
  61. } \
  62. } \
  63. program \
  64. { \
  65. signal: "mouse,clicked,1"; \
  66. source: part_name; \
  67. action: SIGNAL_EMIT signal_name ""; \
  68. } \
  69.  
  70. #define PROGRAM_SET_BUTTON_ACTIVITY(part_name, signal_on, signal_off) \
  71. program { \
  72. signal: signal_on; \
  73. source: ""; \
  74. action: STATE_SET STATE_DEFAULT 0.0; \
  75. target: part_name; \
  76. } \
  77. program { \
  78. signal: signal_off; \
  79. source: ""; \
  80. action: STATE_SET STATE_INACTIVE 0.0; \
  81. target: part_name; \
  82. } \
  83.  
  84. styles {
  85. style {
  86. name: STYLE_ITEM;
  87. base: "font=BreezeSans:style=medium font_size=26 color=#000000 wrap=mixed align=left valign=top";
  88. tag: "br" "\n";
  89. tag: "highlight" "+ font_weight=Bold";
  90. tag: "b" "+ font_weight=Bold";
  91. tag: "tab" "\t";
  92. tag: "type" "+ font=BreezeSans:style=light font_size=24 color=#666666";
  93. }
  94. }
  95.  
  96. collections {
  97. images {
  98. image: IMAGE_SOURCE_BACKGROUND COMP;
  99. image: IMAGE_RADIO_OFF COMP;
  100. image: IMAGE_RADIO_ON COMP;
  101. image: IMAGE_INCLUDE_HEADER COMP;
  102. image: IMAGE_INCLUDE_HEADER_PRESSED COMP;
  103. image: IMAGE_ARROW_DOWN COMP;
  104. image: IMAGE_ARROW_UP COMP;
  105. image: IMAGE_INCLUDE_SHADOW COMP;
  106. }
  107. group {
  108. name: GROUP_SOURCE;
  109. parts {
  110. part {
  111. name: PART_BACKGROUND;
  112. type: IMAGE;
  113. description {
  114. state: "default" 0.0;
  115. rel1.relative: 0.0 0.0;
  116. rel2.relative: 1.0 1.0;
  117. image.normal: IMAGE_SOURCE_BACKGROUND;
  118. }
  119. }
  120. part {
  121. name: PART_LIST;
  122. type: SWALLOW;
  123. description {
  124. state: "default" 0.0;
  125. rel1.relative: 0.0 0.4516;
  126. rel2.relative: 1.0 0.8828;
  127. }
  128. }
  129.  
  130. PART_ENTRY(PART_SOURCE_KEY, 0.1161)
  131. PART_ENTRY(PART_SOURCE_VALUE, 0.2060)
  132. PART_RECT_BTN("Add", PART_ADD_BUTTON, 0.0208, 0.9180, 0.4931, 0.9883)
  133. PART_RECT_BTN("Send", PART_SEND_BUTTON, 0.5069, 0.9180, 0.9792, 0.9883)
  134. 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)
  135. 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)
  136. 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)
  137.  
  138. part {
  139. name: PART_SHADOW;
  140. type: IMAGE;
  141. repeat_events: 1;
  142. description {
  143. state: "default" 0.0;
  144. rel1.relative: 0.0 0.4492;
  145. rel2.relative: 1.0 0.4609;
  146. image.normal: IMAGE_INCLUDE_SHADOW;
  147. }
  148. }
  149. }
  150. programs {
  151. program {
  152. signal: "load";
  153. source: "";
  154. script {
  155. set_state(PART:PART_BYTE_BUTTON"_img", STATE_PRESSED, 0.0);
  156. set_state(PART:PART_ADD_BUTTON, STATE_INACTIVE, 0.0);
  157. set_state(PART:PART_SEND_BUTTON, STATE_INACTIVE, 0.0);
  158. }
  159. }
  160. program {
  161. signal: "header_off";
  162. source: "";
  163. signal: SIGNAL_HEADER_OFF;
  164. action: STATE_SET STATE_DEFAULT 0.0;
  165. target: PART_INCLUDE_BUTTON"_img";
  166. }
  167.  
  168. PROGRAM_BUTTON(PART_ADD_BUTTON, SIGNAL_SOURCE_ADD)
  169. PROGRAM_BUTTON(PART_SEND_BUTTON, SIGNAL_SOURCE_SEND)
  170. PROGRAM_RADIO("mouse,clicked,1", PART_BYTE_BUTTON, PART_BYTE_BUTTON"_img", PART_STRING_BUTTON"_img", SIGNAL_SOURCE_BYTE_SELECTED)
  171. PROGRAM_RADIO("mouse,clicked,1", PART_STRING_BUTTON, PART_STRING_BUTTON"_img", PART_BYTE_BUTTON"_img", SIGNAL_SOURCE_STRING_SELECTED)
  172. PROGRAM_RADIO(SIGNAL_SET_BYTE, "", PART_BYTE_BUTTON"_img", PART_STRING_BUTTON"_img", "")
  173. PROGRAM_RADIO(SIGNAL_SET_STRING, "", PART_STRING_BUTTON"_img", PART_BYTE_BUTTON"_img", "")
  174. PROGRAM_CHECK("mouse,clicked,1", PART_INCLUDE_BUTTON, PART_INCLUDE_BUTTON"_img", SIGNAL_SOURCE_INCLUDE_CHECKED, SIGNAL_SOURCE_INCLUDE_UNCHECKED)
  175. PROGRAM_SET_BUTTON_ACTIVITY(PART_ADD_BUTTON, SIGNAL_ADD_ON, SIGNAL_ADD_OFF)
  176. PROGRAM_SET_BUTTON_ACTIVITY(PART_SEND_BUTTON, SIGNAL_SEND_ON, SIGNAL_SEND_OFF)
  177. }
  178. }
  179. group {
  180. name: GROUP_SOURCE_HEADER;
  181. parts {
  182. part {
  183. name: PART_ITEM_BG;
  184. type: RECT;
  185. description {
  186. state: "default" 0.0;
  187. min: 720 65;
  188. rel1.relative: 0.0 0.0;
  189. rel2.relative: 1.0 1.0;
  190. color: 212 212 212 255;
  191. }
  192. }
  193. part {
  194. name: PART_ITEM;
  195. type: TEXTBLOCK;
  196. description {
  197. state: "default" 0.0;
  198. rel1.relative: 0.0417 0.0;
  199. rel2.relative: 1.0000 1.0;
  200. text.style: STYLE_ITEM;
  201. }
  202. }
  203.  
  204. PART_IMAGE_BTN("", PART_ARROW, 0.9181, 0.3846, 0.9611, 0.6462, IMAGE_ARROW_DOWN, IMAGE_ARROW_UP, 0.9181, 0.9181, 0)
  205. }
  206. programs {
  207. PROGRAM_CHECK(SIGNAL_ARROW_STATE_CHANGE, "", PART_ARROW"_img", "", "")
  208. }
  209. }
  210.  
  211. group {
  212. name: GROUP_SOURCE_HEADER_DATA;
  213. parts {
  214. part {
  215. name: PART_ITEM_BG;
  216. type: RECT;
  217. description {
  218. state: "default" 0.0;
  219. min: 720 55;
  220. rel1.relative: 0.0 0.0;
  221. rel2.relative: 1.0 1.0;
  222. color: 212 212 212 255;
  223. }
  224. }
  225. part {
  226. name: PART_ITEM;
  227. type: TEXTBLOCK;
  228. description {
  229. state: "default" 0.0;
  230. rel1.relative: 0.0417 0.0;
  231. rel2.relative: 1.0000 1.0;
  232. text.style: STYLE_ITEM;
  233. }
  234. }
  235. }
  236. }
  237.  
  238. group {
  239. name: GROUP_SOURCE_ITEM;
  240. parts {
  241. part {
  242. name: PART_ITEM_BG;
  243. type: SPACER;
  244. description {
  245. state: "default" 0.0;
  246. min: 0 90;
  247. rel1.relative: 0.0417 0.0;
  248. rel2.relative: 1.0000 1.0;
  249. }
  250. }
  251. part {
  252. name: PART_ITEM;
  253. type: TEXTBLOCK;
  254. description {
  255. state: "default" 0.0;
  256. rel1.relative: 0.0417 0.0;
  257. rel2.relative: 1.0000 1.0;
  258. text.style: STYLE_ITEM;
  259. }
  260. }
  261. }
  262. }
  263. }