Advertisement
Guest User

clock.edc-calendar

a guest
Jul 13th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.05 KB | None | 0 0
  1. group { name: "e/modules/clock/calendar/dayname";
  2. parts {
  3. part { name: "e.text.label"; type: TEXT; mouse_events: 0;
  4. effect: SHADOW BOTTOM;
  5. scale: 1;
  6. description { state: "default" 0.0;
  7. color: 245 245 245 255;
  8. color3: 255 255 255 25;
  9. text { font: "Sans"; size: 8;
  10. text: "WWe";
  11. min: 1 1;
  12. align: 0.5 0.5;
  13. text_class: "module_small";
  14. }
  15. }
  16. description { state: "weekend" 0.0;
  17. inherit: "default" 0.0;
  18. color: 241 26 26 255;
  19. }
  20. }
  21. }
  22. programs {
  23. program {
  24. signal: "e,state,weekend"; source: "e";
  25. action: STATE_SET "weekend" 0.0;
  26. target: "e.text.label";
  27. }
  28. program {
  29. signal: "e,state,weekday"; source: "e";
  30. action: STATE_SET "default" 0.0;
  31. target: "e.text.label";
  32. }
  33. }
  34. }
  35.  
  36. group { name: "e/modules/clock/calendar/day";
  37. script {
  38. public day_state = 0;
  39. evalstate() {
  40. new vv = get_int(day_state);
  41.  
  42. if (vv & 2)
  43. {
  44. set_state(PART:"e.text.label", "today", 0.0);
  45. set_state(PART:"label2", "today", 0.0);
  46. }
  47. else if (vv & 4)
  48. {
  49. set_state(PART:"e.text.label", "hidden", 0.0);
  50. set_state(PART:"label2", "default", 0.0);
  51. }
  52. else if (vv & 1)
  53. {
  54. set_state(PART:"e.text.label", "weekend", 0.0);
  55. set_state(PART:"label2", "default", 0.0);
  56. }
  57. else
  58. {
  59. set_state(PART:"e.text.label", "default", 0.0);
  60. set_state(PART:"label2", "default", 0.0);
  61. }
  62. }
  63. }
  64. parts {
  65. part { name: "e.text.label"; type: TEXT; mouse_events: 0;
  66. effect: SHADOW BOTTOM;
  67. scale: 1;
  68. description { state: "default" 0.0;
  69. color: 255 255 255 255;
  70. color3: 0 0 0 128;
  71. text { font: "Sans"; size: 10;
  72. text: "00";
  73. min: 1 1;
  74. align: 0.5 0.5;
  75. }
  76. }
  77. description { state: "today" 0.0;
  78. inherit: "default" 0.0;
  79. visible: 0;
  80. }
  81. description { state: "weekend" 0.0;
  82. inherit: "default" 0.0;
  83. color: 128 128 128 255;
  84. }
  85. description { state: "hidden" 0.0;
  86. inherit: "default" 0.0;
  87. color: 21 21 21 255;
  88. color3: 255 255 255 25;
  89. }
  90. }
  91. part { name: "label2"; type: TEXT; mouse_events: 0;
  92. effect: GLOW;
  93. scale: 1;
  94. description { state: "default" 0.0;
  95. rel1.offset: -3 -3;
  96. rel1.to: "e.text.label";
  97. rel2.offset: 2 1;
  98. rel2.to: "e.text.label";
  99. color: 240 240 240 255;
  100. color2: 240 240 240 24;
  101. color3: 240 240 240 18;
  102. text { font: "Sans"; size: 10;
  103. text_source: "e.text.label";
  104. min: 1 1;
  105. align: 0.5 0.5;
  106. }
  107. visible: 0;
  108. }
  109. description { state: "today" 0.0;
  110. inherit: "default" 0.0;
  111. visible: 1;
  112. }
  113. }
  114. }
  115. programs {
  116. program {
  117. signal: "e,state,weekend"; source: "e";
  118. script {
  119. new vv = get_int(day_state);
  120. set_int(day_state, vv | 1);
  121. evalstate();
  122. }
  123. }
  124. program {
  125. signal: "e,state,weekday"; source: "e";
  126. script {
  127. new vv = get_int(day_state);
  128. set_int(day_state, vv & (~1));
  129. evalstate();
  130. }
  131. }
  132.  
  133. program {
  134. signal: "e,state,today"; source: "e";
  135. script {
  136. new vv = get_int(day_state);
  137. set_int(day_state, vv | 2);
  138. evalstate();
  139. }
  140. }
  141. program {
  142. signal: "e,state,someday"; source: "e";
  143. script {
  144. new vv = get_int(day_state);
  145. set_int(day_state, vv & (~2));
  146. evalstate();
  147. }
  148. }
  149.  
  150. program {
  151. signal: "e,state,hidden"; source: "e";
  152. script {
  153. new vv = get_int(day_state);
  154. set_int(day_state, vv | 4);
  155. evalstate();
  156. }
  157. }
  158. program {
  159. signal: "e,state,visible"; source: "e";
  160. script {
  161. new vv = get_int(day_state);
  162. set_int(day_state, vv & (~4));
  163. evalstate();
  164. }
  165. }
  166. }
  167. }
  168.  
  169. group { name: "e/modules/clock/calendar";
  170. images.image: "separator_horiz.png" COMP;
  171. images.image: "sym_left_light_normal.png" COMP;
  172. images.image: "sym_right_light_normal.png" COMP;
  173. images.image: "sym_left_glow_normal.png" COMP;
  174. images.image: "sym_right_glow_normal.png" COMP;
  175. parts {
  176. part { name: "e.text.month"; type: TEXT;
  177. effect: SHADOW BOTTOM;
  178. mouse_events: 1;
  179. scale: 1;
  180. description { state: "default" 0.0;
  181. fixed: 0 1;
  182. align: 0.0 0.0;
  183. rel1.to_x: "prev";
  184. rel1.relative: 1.0 0.0;
  185. rel2.relative: 1.0 0.0;
  186. color: 255 255 255 255;
  187. color3: 0 0 0 128;
  188. text { font: "Sans:style=Bold"; size: 10;
  189. text: "000000000000";
  190. align: 0.0 0.5;
  191. min: 0 1;
  192. text_class: "module_normal";
  193. }
  194. }
  195. }
  196. part { name: "e.text.year"; type: TEXT; mouse_events: 0;
  197. effect: SHADOW BOTTOM;
  198. scale: 1;
  199. description { state: "default" 0.0;
  200. fixed: 0 1;
  201. align: 1.0 0.0;
  202. rel1.relative: 0.0 0.0;
  203. rel2.to_x: "next";
  204. rel2.relative: 0.0 0.0;
  205. color: 255 255 255 255;
  206. color3: 0 0 0 128;
  207. text { font: "Sans:style=Bold"; size: 10;
  208. text: "0000";
  209. align: 1.0 0.5;
  210. min: 0 1;
  211. text_class: "module_normal";
  212. }
  213. }
  214. }
  215. part { name: "previm"; mouse_events: 0;
  216. description { state: "default" 0.0;
  217. min: 15 15;
  218. max: 15 15;
  219. rel1.to: "prev";
  220. rel2.to: "prev";
  221. image.normal: "sym_left_light_normal.png";
  222. }
  223. description { state: "pressed" 0.0;
  224. inherit: "default" 0.0;
  225. image.normal: "sym_left_glow_normal.png";
  226. }
  227. }
  228. part { name: "prev"; type: RECT;
  229. description { state: "default" 0.0;
  230. align: 0.0 0.5;
  231. color: 0 0 0 0;
  232. aspect: 1.0 1.0; aspect_preference: VERTICAL;
  233. rel1.to_y: "e.text.month";
  234. rel1.relative: 0.0 0.0;
  235. rel2.to_y: "e.text.month";
  236. rel2.relative: 0.0 1.0;
  237. }
  238. program { name: "prev_down";
  239. signal: "mouse,down,1*"; source: "prev";
  240. action: STATE_SET "pressed" 0.0;
  241. target: "previm";
  242. }
  243. program { name: "prev_up";
  244. signal: "mouse,up,1"; source: "prev";
  245. action: STATE_SET "default" 0.0;
  246. target: "previm";
  247. }
  248. program { name: "prev_clicked";
  249. signal: "mouse,clicked,1*"; source: "prev";
  250. action: SIGNAL_EMIT "e,action,prev" "";
  251. }
  252. }
  253. part { name: "nextim"; mouse_events: 0;
  254. description { state: "default" 0.0;
  255. min: 15 15;
  256. max: 15 15;
  257. rel1.to: "next";
  258. rel2.to: "next";
  259. image.normal: "sym_right_light_normal.png";
  260. }
  261. description { state: "pressed" 0.0;
  262. inherit: "default" 0.0;
  263. image.normal: "sym_right_glow_normal.png";
  264. }
  265. }
  266. part { name: "next"; type: RECT;
  267. description { state: "default" 0.0;
  268. align: 1.0 0.5;
  269. color: 0 0 0 0;
  270. aspect: 1.0 1.0; aspect_preference: VERTICAL;
  271. rel1.to_y: "e.text.month";
  272. rel1.relative: 1.0 0.0;
  273. rel2.to_y: "e.text.month";
  274. rel2.relative: 1.0 1.0;
  275. }
  276. program { name: "next_down";
  277. signal: "mouse,down,1"; source: "next";
  278. action: STATE_SET "pressed" 0.0;
  279. target: "nextim";
  280. }
  281. program { name: "next_up";
  282. signal: "mouse,up,1"; source: "next";
  283. action: STATE_SET "default" 0.0;
  284. target: "nextim";
  285. }
  286. program { name: "next_clicked";
  287. signal: "mouse,clicked,1"; source: "next";
  288. action: SIGNAL_EMIT "e,action,next" "";
  289. }
  290. }
  291. part { name: "sel";
  292. description { state: "default" 0.0;
  293. image.normal: "separator_horiz.png";
  294. rel1.relative: 0.0 1.0;
  295. rel1.offset: 0 0;
  296. rel1.to: "e.table.daynames";
  297. rel2.offset: -1 1;
  298. rel2.to: "e.table.daynames";
  299. min: 0 2;
  300. fill.smooth: 0;
  301. }
  302. }
  303.  
  304. part { name: "e.table.daynames"; type: TABLE;
  305. description { state: "default" 0.0;
  306. fixed: 0 1;
  307. align: 0.5 0.0;
  308. rel1.to_y: "e.text.month";
  309. rel1.relative: 0.0 1.0;
  310. rel1.offset: 2 2;
  311. rel2.to_y: "e.text.month";
  312. rel2.relative: 1.0 1.0;
  313. rel2.offset: -3 2;
  314. step: 7 1;
  315. table { homogeneous: TABLE;
  316. padding: 1 1;
  317. align: 0.5 0.5;
  318. min: 1 1;
  319. }
  320. }
  321. table {
  322. items {
  323. #define D(x) \
  324. item { \
  325. position: x 0; \
  326. span: 1 1; \
  327. source: "e/modules/clock/calendar/dayname"; \
  328. weight: 1.0 1.0; \
  329. align: -1.0 -1.0; \
  330. }
  331. D(0) D(1) D(2) D(3) D(4) D(5) D(6)
  332. #undef D
  333. }
  334. }
  335. }
  336. part { name: "e.table.days"; type: TABLE;
  337. description { state: "default" 0.0;
  338. rel1.to_y: "e.table.daynames";
  339. rel1.relative: 0.0 1.0;
  340. rel1.offset: 2 2;
  341. rel2.offset: -3 -3;
  342. step: 7 5;
  343. table { homogeneous: TABLE;
  344. padding: 1 1;
  345. align: 0.5 0.5;
  346. min: 1 1;
  347. }
  348. }
  349. table {
  350. items {
  351. #define D(x, y) \
  352. item { \
  353. position: x y; \
  354. span: 1 1; \
  355. source: "e/modules/clock/calendar/day"; \
  356. weight: 1.0 1.0; \
  357. align: -1.0 -1.0; \
  358. }
  359. D(0, 0) D(1, 0) D(2, 0) D(3, 0) D(4, 0) D(5, 0) D(6, 0)
  360. D(0, 1) D(1, 1) D(2, 1) D(3, 1) D(4, 1) D(5, 1) D(6, 1)
  361. D(0, 2) D(1, 2) D(2, 2) D(3, 2) D(4, 2) D(5, 2) D(6, 2)
  362. D(0, 3) D(1, 3) D(2, 3) D(3, 3) D(4, 3) D(5, 3) D(6, 3)
  363. D(0, 4) D(1, 4) D(2, 4) D(3, 4) D(4, 4) D(5, 4) D(6, 4)
  364. D(0, 5) D(1, 5) D(2, 5) D(3, 5) D(4, 5) D(5, 5) D(6, 5)
  365. #undef D
  366. }
  367. }
  368. }
  369. }
  370. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement