5 #define OUTER_BASE_PARTS(w, h) \
6 part { name: "base"; type: SPACER; \
8 state: "default" 0.0; } } \
9 part { name: "c1"; type: SPACER; \
10 description { state: "default" 0.0; \
17 part { name: "c3"; type: SPACER; \
18 description { state: "default" 0.0; \
26 part { name: "c4"; type: SPACER; \
27 description { state: "default" 0.0; \
34 part { name: "c2"; type: SPACER; \
36 description { state: "default" 0.0; \
46 group { name: "elm/focus_highlight/top/glow";
48 image: "border6.png" COMP;
50 data.item: "animate" "on";
53 public src_x, src_y, src_w, src_h;
54 public diffx, diffy, diffw, diffh;
55 public anim_highlight(val, Float:pos) {
56 new x, y, w, h, dx, dy, dw, dh;
58 dx = round(float_mul(float(get_int(diffx)), pos));
59 x = get_int(src_x) + dx;
60 dy = round(float_mul(float(get_int(diffy)), pos));
61 y = get_int(src_y) + dy;
62 dw = round(float_mul(float(get_int(diffw)), pos));
63 w = get_int(src_w) + dw;
64 dh = round(float_mul(float(get_int(diffh)), pos));
65 h = get_int(src_h) + dh;
67 update_offset(x, y, w, h);
70 emit("elm,action,focus,anim,end", "");
71 set_state(PART:"highlight", "default", 0.0);
74 public update_offset(x, y, w, h) {
75 set_state_val(PART:"base", STATE_REL1_OFFSET, x, y);
76 set_state_val(PART:"base", STATE_REL2_OFFSET, x + w, y + h);
78 public message(Msg_Type:type, id, ...) {
79 if((type == MSG_INT_SET) && (id == 1)) {
80 new x1, y1, w1, h1, x2, y2, w2, h2;
95 set_int(diffx, x2 - x1);
96 set_int(diffy, y2 - y1);
97 set_int(diffw, w2 - w1);
98 set_int(diffh, h2 - h1);
100 custom_state(PART:"base", "default", 0.0);
101 set_state_val(PART:"base", STATE_REL1, 0.0, 0.0);
102 set_state_val(PART:"base", STATE_REL2, 0.0, 0.0);
103 update_offset(x1, y1, w1, h1);
104 set_state(PART:"base", "custom", 0.0);
105 anim(0.2, "anim_highlight", 0);
110 OUTER_BASE_PARTS(12, 12);
111 part { name: "highlight"; type: IMAGE;
113 description { state: "default" 0.0;
114 image.normal: "border6.png";
115 image.border: 20 20 20 20;
119 description { state: "visible" 0.0;
120 inherit: "default" 0.0;
122 description { state: "invisible" 0.0;
123 inherit: "default" 0.0;
129 program { name: "show";
130 signal: "elm,action,focus,show";
134 target: "hide_start";
138 program { name: "show_start";
139 action: STATE_SET "visible" 0.0;
144 program { name: "show_end";
145 action: SIGNAL_EMIT "elm,action,focus,show,end" "";
147 program { name: "hide";
148 signal: "elm,action,focus,hide";
152 target: "show_start";
156 program { name: "hide_start";
157 action: STATE_SET "invisible" 0.0;
162 program { name: "hide_end";
163 action: SIGNAL_EMIT "elm,action,focus,hide,end" "";
168 group { name: "elm/focus_highlight/top/glow_effect";
169 inherit: "elm/focus_highlight/top/glow";
171 image: "border.png" COMP;
172 image: "border2.png" COMP;
173 image: "border3.png" COMP;
174 image: "border4.png" COMP;
175 image: "border5.png" COMP;
176 image: "border6.png" COMP;
178 data.item: "animate" "on";
181 public src_x, src_y, src_w, src_h;
182 public diffx, diffy, diffw, diffh;
183 public anim_highlight(val, Float:pos) {
184 new x, y, w, h, dx, dy, dw, dh, Float:p;
185 p = 1.0 - ((1.0 - pos) * (1.0 - pos) * (1.0 - pos));
187 dx = round(float_mul(float(get_int(diffx)), p));
188 x = get_int(src_x) + dx;
189 dy = round(float_mul(float(get_int(diffy)), p));
190 y = get_int(src_y) + dy;
191 dw = round(float_mul(float(get_int(diffw)), p));
192 w = get_int(src_w) + dw;
193 dh = round(float_mul(float(get_int(diffh)), p));
194 h = get_int(src_h) + dh;
196 update_offset(x, y, w, h);
199 emit("elm,action,focus,anim,end", "");
200 set_state(PART:"highlight", "default", 0.0);
204 public update_offset(x, y, w, h) {
205 set_state_val(PART:"base", STATE_REL1_OFFSET, x, y);
206 set_state_val(PART:"base", STATE_REL2_OFFSET, x + w, y + h);
208 public message(Msg_Type:type, id, ...) {
209 if((type == MSG_INT_SET) && (id == 1)) {
210 new x1, y1, w1, h1, x2, y2, w2, h2;
225 set_int(diffx, x2 - x1);
226 set_int(diffy, y2 - y1);
227 set_int(diffw, w2 - w1);
228 set_int(diffh, h2 - h1);
230 custom_state(PART:"base", "default", 0.0);
231 set_state_val(PART:"base", STATE_REL1, 0.0, 0.0);
232 set_state_val(PART:"base", STATE_REL2, 0.0, 0.0);
233 update_offset(x1, y1, w1, h1);
234 set_state(PART:"base", "custom", 0.0);
235 anim(0.2, "anim_highlight", 0);
240 part { name: "highlight"; type: IMAGE;
242 description { state: "default" 0.0;
243 image.normal: "border6.png";
244 image.border: 16 16 16 16;
249 description { state: "visible" 0.0;
250 inherit: "default" 0.0;
252 description { state: "visible" 0.1;
253 inherit: "visible" 0.0;
254 image.normal: "border2.png";
255 image.border: 18 18 18 18;
257 description { state: "visible" 0.2;
258 inherit: "visible" 0.0;
259 image.normal: "border3.png";
260 image.border: 19 19 19 19;
262 description { state: "visible" 0.3;
263 inherit: "visible" 0.0;
264 image.normal: "border4.png";
265 image.border: 20 20 20 20;
267 description { state: "visible" 0.4;
268 inherit: "visible" 0.0;
269 image.normal: "border5.png";
270 image.border: 21 21 21 21;
272 description { state: "visible" 0.5;
273 inherit: "visible" 0.0;
274 image.normal: "border6.png";
275 image.border: 25 25 25 25;
277 description { state: "invisible" 0.0;
278 inherit: "default" 0.0;
284 program { name: "show";
285 signal: "elm,action,focus,show";
289 target: "hide_start";
293 program { name: "show_start";
294 action: SIGNAL_EMIT "dim" "";
297 program { name: "dim_start";
301 action: STATE_SET "visible" 0.4;
302 transition: SINUSOIDAL 0.2;
306 program { name: "dim1";
307 action: STATE_SET "visible" 0.3;
308 transition: SINUSOIDAL 0.2;
312 program { name: "dim2";
313 action: STATE_SET "visible" 0.2;
314 transition: SINUSOIDAL 0.2;
318 program { name: "dim3";
319 action: STATE_SET "visible" 0.1;
320 transition: SINUSOIDAL 0.2;
324 program { name: "dim_end";
325 action: SIGNAL_EMIT "glow" "";
327 program { name: "glow_start";
331 action: STATE_SET "visible" 0.0;
332 transition: SINUSOIDAL 0.2;
336 program { name: "glow1";
337 action: STATE_SET "visible" 0.1;
338 transition: SINUSOIDAL 0.2;
342 program { name: "glow2";
343 action: STATE_SET "visible" 0.2;
344 transition: SINUSOIDAL 0.2;
348 program { name: "glow3";
349 action: STATE_SET "visible" 0.3;
350 transition: SINUSOIDAL 0.2;
354 program { name: "glow4";
355 action: STATE_SET "visible" 0.4;
356 transition: SINUSOIDAL 0.2;
360 program { name: "glow5";
361 action: STATE_SET "visible" 0.5;
362 transition: SINUSOIDAL 0.2;
366 program { name: "show_end";
367 action: SIGNAL_EMIT "elm,action,focus,show,end" "";
369 program { name: "hide";
370 signal: "elm,action,focus,hide";
374 target: "show_start";
378 program { name: "hide_start";
379 action: STATE_SET "invisible" 0.0;
384 program { name: "hide_end";
385 action: SIGNAL_EMIT "elm,action,focus,hide,end" "";
390 group { name: "elm/layout/focus/example";
391 data.item: "focus_part" "focus_area";
393 part { name: "bg"; type: RECT;
395 description { state: "default" 0.0;
396 color: 255 255 0 255;
401 part { name: "elm.text"; type: TEXT;
403 description { state: "default" 0.0;
411 part { name: "focus_area"; type: RECT;
413 description { state: "default" 0.0;
421 color: 125 125 125 125;
424 part { name: "elm.text1"; type: TEXT;
426 description { state: "default" 0.0;
427 rel1.to: "focus_area";
428 rel2.to: "focus_area";
429 text.text: "focus_part";
431 color: 255 0 255 255;
437 #include "../../data/themes/macros.edc"
438 #include "../../data/themes/fonts.edc"
439 #include "../../data/themes/colorclasses.edc"
441 // to customize check default style
442 #include "../../data/themes/edc/elm/check.edc"
443 group { name: "elm/check/base/focus_text";
444 data.item: "focus_part" "elm.text";
445 inherit: "elm/check/base/default";
448 // to customize button default style
449 #include "../../data/themes/edc/elm/button.edc"
450 group { name: "elm/button/base/focus_icon";
451 data.item: "focus_part" "elm.swallow.content";
452 inherit: "elm/button/base/default";