summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-02-26 21:11:58 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-02-26 21:11:59 +0900
commitdca1581b032014845d1ca590aaad101dd590a5bf (patch)
tree2296de0ed63b0a858fdc4cfcb02a2ceea740f85e
parent736de05ea7fde749f0b6f356cb6a2b3acd8e3586 (diff)
efl.ui.slider: change signal name for icon/text
Summary: See also 73f8b3b78f0ff92ddfc1c16426bf7c176f10293a because slider use "elm.swallow.icon" part name, it don't need to edit .c file. Test Plan: 1. elementary_test -to efl.ui.slider 2. check that icon and text are visible Reviewers: cedric, woohyun, Jaehyun_Cho Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5822
-rw-r--r--data/elementary/themes/edc/efl/slider.edc2953
-rw-r--r--src/bin/elementary/test_ui_slider.c8
2 files changed, 2946 insertions, 15 deletions
diff --git a/data/elementary/themes/edc/efl/slider.edc b/data/elementary/themes/edc/efl/slider.edc
index 20b479b1f1..8bd19ec16f 100644
--- a/data/elementary/themes/edc/efl/slider.edc
+++ b/data/elementary/themes/edc/efl/slider.edc
@@ -3,71 +3,2996 @@ group { "efl/slider/hidden/limit";
3} 3}
4 4
5group { "efl/slider/horizontal/indicator"; 5group { "efl/slider/horizontal/indicator";
6 inherit: "elm/slider/horizontal/indicator/default";
7 alias: "efl/slider/horizontal/indicator:disabled"; 6 alias: "efl/slider/horizontal/indicator:disabled";
8 alias: "efl/slider/horizontal/popup"; 7 alias: "efl/slider/horizontal/popup";
9 alias: "efl/slider_interval/horizontal/indicator"; 8 alias: "efl/slider_interval/horizontal/indicator";
10 alias: "efl/slider_interval/horizontal/popup"; 9 alias: "efl/slider_interval/horizontal/popup";
10 images.image: "darken_rounded_square.png" COMP;
11 parts {
12 part { name: "base"; type: SPACER;
13 scale: 1;
14 description { state: "default" 0.0;
15 fixed: 1 1;
16 min: 16 16;
17 }
18 description { state: "disabled" 0.0;
19 inherit: "default" 0.0;
20 }
21 }
22 part { name: "clip"; type: RECT;
23 description { state: "default" 0.0;
24 fixed: 1 1;
25 rel1.to: "elm.indicator";
26 rel1.offset: -100 -100;
27 rel2.to: "elm.indicator";
28 rel2.offset: 99 99;
29 visible: 0;
30 }
31 description { state: "visible" 0.0;
32 inherit: "default" 0.0;
33 visible: 1;
34 }
35 }
36 part { name: "bevel"; mouse_events: 0;
37 clip_to: "clip";
38 description { state: "default" 0.0;
39 rel1.offset: -12 -12;
40 rel1.to: "elm.indicator";
41 rel2.offset: 11 11;
42 rel2.to: "elm.indicator";
43 image.normal: "darken_rounded_square.png";
44 image.border: 15 15 15 15;
45 fill.smooth: 0;
46 visible: 0;
47 }
48 description { state: "visible" 0.0;
49 inherit: "default" 0.0;
50 visible: 1;
51 }
52 }
53 part { name: "elm.indicator"; type: TEXT; mouse_events: 0;
54 clip_to: "clip";
55 effect: SHADOW BOTTOM;
56 scale: 1;
57 description { state: "default" 0.0;
58 fixed: 1 1;
59 align: 0.5 1.0;
60 rel1.to: "base";
61 rel1.relative: 0.0 -0.1;
62 rel1.offset: 0 -12;
63 rel2.to: "base";
64 rel2.relative: 1.0 -0.1;
65 rel2.offset: -1 -12;
66 color_class: "slider_indicator";
67 color: FN_COL_DEFAULT;
68 text { font: FNBD; size: 10;
69 min: 1 1;
70 align: 0.5 1.0;
71 text_class: "slider_indicator";
72 ellipsis: -1;
73 }
74 visible: 0;
75 }
76 description { state: "visible" 0.0;
77 inherit: "default" 0.0;
78 visible: 1;
79 }
80 }
81 }
82 programs {
83 program {
84 signal: "elm,popup,show"; source: "elm";
85 action: STATE_SET "visible" 0.0;
86 target: "elm.indicator";
87 target: "bevel";
88 }
89 program {
90 signal: "elm,popup,hide"; source: "elm";
91 action: STATE_SET "default" 0.0;
92 target: "elm.indicator";
93 target: "bevel";
94 }
95 program {
96 signal: "elm,popup,hide"; source: "elm";
97 action: SIGNAL_EMIT "elm,popup,hide,done" "elm";
98 }
99 program {
100 signal: "elm,state,val,show"; source: "elm";
101 action: STATE_SET "visible" 0.0;
102 target: "clip";
103 }
104 program {
105 signal: "elm,state,val,hide"; source: "elm";
106 action: STATE_SET "default" 0.0;
107 target: "clip";
108 }
109 program {
110 signal: "elm,state,indicator,show"; source: "elm";
111 action: STATE_SET "visible" 0.0;
112 target: "elm.indicator";
113 target: "bevel";
114 }
115 program {
116 signal: "elm,state,indicator,hide"; source: "elm";
117 action: STATE_SET "visible" 0.0;
118 target: "elm.indicator";
119 target: "bevel";
120 }
121 program {
122 signal: "elm,state,disabled"; source: "elm";
123 action: STATE_SET "disabled" 0.0;
124 target: "base";
125 }
126 program {
127 signal: "elm,state,enabled"; source: "elm";
128 action: STATE_SET "default" 0.0;
129 target: "base";
130 }
131 }
11} 132}
12 133
13group { "efl/slider/vertical/indicator"; 134group { "efl/slider/vertical/indicator";
14 inherit: "elm/slider/vertical/indicator/default";
15 alias: "efl/slider/vertical/indicator:disabled"; 135 alias: "efl/slider/vertical/indicator:disabled";
16 alias: "efl/slider/vertical/popup"; 136 alias: "efl/slider/vertical/popup";
17 alias: "efl/slider_interval/vertical/indicator"; 137 alias: "efl/slider_interval/vertical/indicator";
18 alias: "efl/slider_interval/vertical/popup"; 138 alias: "efl/slider_interval/vertical/popup";
139 images.image: "darken_rounded_square.png" COMP;
140 parts {
141 part { name: "base"; type: SPACER;
142 scale: 1;
143 description { state: "default" 0.0;
144 fixed: 1 1;
145 min: 16 16;
146 }
147 description { state: "disabled" 0.0;
148 inherit: "default" 0.0;
149 }
150 }
151 part { name: "clip"; type: RECT;
152 description { state: "default" 0.0;
153 fixed: 1 1;
154 rel1.to: "elm.indicator";
155 rel1.offset: -100 -100;
156 rel2.to: "elm.indicator";
157 rel2.offset: 99 99;
158 visible: 0;
159 }
160 description { state: "visible" 0.0;
161 inherit: "default" 0.0;
162 visible: 1;
163 }
164 }
165 part { name: "bevel"; mouse_events: 0;
166 clip_to: "clip";
167 description { state: "default" 0.0;
168 rel1.offset: -12 -12;
169 rel1.to: "elm.indicator";
170 rel2.offset: 11 11;
171 rel2.to: "elm.indicator";
172 image.normal: "darken_rounded_square.png";
173 image.border: 15 15 15 15;
174 fill.smooth: 0;
175 visible: 0;
176 }
177 description { state: "visible" 0.0;
178 inherit: "default" 0.0;
179 visible: 1;
180 }
181 }
182 part { name: "elm.indicator"; type: TEXT; mouse_events: 0;
183 clip_to: "clip";
184 effect: SHADOW BOTTOM;
185 scale: 1;
186 description { state: "default" 0.0;
187 fixed: 1 1;
188 align: 0.0 0.5;
189 rel1.to: "base";
190 rel1.relative: 1.1 0.0;
191 rel1.offset: 11 0;
192 rel2.to: "base";
193 rel2.relative: 1.1 1.0;
194 rel2.offset: 11 -1;
195 color_class: "slider_indicator";
196 color: FN_COL_DEFAULT;
197 text { font: FNBD; size: 10;
198 min: 1 1;
199 align: 0.0 0.5;
200 text_class: "slider_indicator";
201 ellipsis: -1;
202 }
203 visible: 0;
204 }
205 description { state: "visible" 0.0;
206 inherit: "default" 0.0;
207 visible: 1;
208 }
209 }
210 }
211 programs {
212 program {
213 signal: "elm,popup,show"; source: "elm";
214 action: STATE_SET "visible" 0.0;
215 target: "elm.indicator";
216 target: "bevel";
217 }
218 program {
219 signal: "elm,popup,hide"; source: "elm";
220 action: STATE_SET "default" 0.0;
221 target: "elm.indicator";
222 target: "bevel";
223 }
224 program {
225 signal: "elm,popup,hide"; source: "elm";
226 action: SIGNAL_EMIT "elm,popup,hide,done" "elm";
227 }
228 program {
229 signal: "elm,state,val,show"; source: "elm";
230 action: STATE_SET "visible" 0.0;
231 target: "clip";
232 }
233 program {
234 signal: "elm,state,val,hide"; source: "elm";
235 action: STATE_SET "default" 0.0;
236 target: "clip";
237 }
238 program {
239 signal: "elm,state,indicator,show"; source: "elm";
240 action: STATE_SET "visible" 0.0;
241 target: "elm.indicator";
242 target: "bevel";
243 }
244 program {
245 signal: "elm,state,indicator,hide"; source: "elm";
246 action: STATE_SET "visible" 0.0;
247 target: "elm.indicator";
248 target: "bevel";
249 }
250 program {
251 signal: "elm,state,disabled"; source: "elm";
252 action: STATE_SET "disabled" 0.0;
253 target: "base";
254 }
255 program {
256 signal: "elm,state,enabled"; source: "elm";
257 action: STATE_SET "default" 0.0;
258 target: "base";
259 }
260 }
19} 261}
20 262
21group { "efl/slider/horizontal"; 263group { "efl/slider/horizontal";
22 inherit: "elm/slider/horizontal/default";
23 alias: "efl/slider/horizontal:disabled"; 264 alias: "efl/slider/horizontal:disabled";
265 images.image: "slider_run_base_horiz.png" COMP;
266 images.image: "slider_run_bevel_horiz.png" COMP;
267 images.image: "slider_run_base_light_horiz.png" COMP;
268 images.image: "horiz_glow_run.png" COMP;
269 images.image: "horiz_glow_run_rev.png" COMP;
270 images.image: "knob_round_small_normal.png" COMP;
271 images.image: "knob_round_small_selected.png" COMP;
272 set { name: "knob";
273 // XXX: add more sizes (at least up to 128x128)
274 image { image: "knob_sz_24.png" COMP; size: 31 31 32 32; }
275 image { image: "knob_sz_22.png" COMP; size: 29 29 30 30; }
276 image { image: "knob_sz_20.png" COMP; size: 27 27 28 28; }
277 image { image: "knob_sz_18.png" COMP; size: 25 25 26 26; }
278 image { image: "knob_sz_16.png" COMP; size: 23 23 24 24; }
279 image { image: "knob_sz_14.png" COMP; size: 21 21 22 22; }
280 image { image: "knob_sz_12.png" COMP; size: 19 19 20 20; }
281 image { image: "knob_sz_10.png" COMP; size: 17 17 18 18; }
282 image { image: "knob_sz_08.png" COMP; size: 15 15 16 16; }
283 image { image: "knob_sz_06.png" COMP; size: 13 13 14 14; }
284 image { image: "knob_sz_04.png" COMP; size: 0 0 12 12; }
285 }
286#define ICON 1
287#define LABEL 2
288#define END 4
289#define UNITS 8
290#define MASK 15
291#define INVERT 16
292#define DISABLE 32
293 script {
294 public slmode;
295 public eval_mode(m) {
296 new ic = m & ICON;
297 new l = m & LABEL;
298 new e = m & END;
299 new u = m & UNITS;
300 new d = m & DISABLE;
301 new i = m & INVERT;
302 if (i) {
303 if (!d) {
304 set_state(PART:"base", "default", 0.0);
305 set_state(PART:"glow", "inverted", 0.0);
306 } else {
307 set_state(PART:"base", "disabled", 0.0);
308 set_state(PART:"glow", "disabled_inverted", 0.0);
309 }
310 } else {
311 if (!d) {
312 set_state(PART:"base", "default", 0.0);
313 set_state(PART:"glow", "default", 0.0);
314 } else {
315 set_state(PART:"base", "disabled", 0.0);
316 set_state(PART:"glow", "disabled", 0.0);
317 }
318 }
319 if (l) {
320 if (!d) {
321 set_state(PART:"elm.text", "visible", 0.0);
322 } else {
323 set_state(PART:"elm.text", "disabled_visible", 0.0);
324 }
325 } else {
326 set_state(PART:"elm.text", "default", 0.0);
327 }
328 if (u) {
329 if (!d) {
330 set_state(PART:"elm.units", "visible", 0.0);
331 set_state(PART:"limits", "visible", 0.0);
332 } else {
333 set_state(PART:"elm.units", "disabled_visible", 0.0);
334 set_state(PART:"limits", "disabled_visible", 0.0);
335 }
336 } else {
337 set_state(PART:"elm.units", "default", 0.0);
338 set_state(PART:"limits", "default", 0.0);
339 }
340 if (ic) {
341 set_state(PART:"elm.swallow.icon", "visible", 0.0);
342 set_state(PART:"sizer.content", "visible", 0.0);
343 } else {
344 set_state(PART:"elm.swallow.icon", "default", 0.0);
345 set_state(PART:"sizer.content", "default", 0.0);
346 }
347 if (e) {
348 set_state(PART:"elm.swallow.end", "visible", 0.0);
349 set_state(PART:"sizer.content.end", "visible", 0.0);
350 } else {
351 set_state(PART:"elm.swallow.end", "default", 0.0);
352 set_state(PART:"sizer.content.end", "default", 0.0);
353 }
354 if (!d) {
355 set_state(PART:"event", "default", 0.0);
356 set_state(PART:"dis_clip", "default", 0.0);
357 } else {
358 set_state(PART:"event", "disabled", 0.0);
359 set_state(PART:"dis_clip", "disabled", 0.0);
360 }
361 }
362 }
24 parts { 363 parts {
25 part { "limits"; 364 part { name: "elm.swallow.bar"; type: SWALLOW;
365 scale: 1;
366 description { state: "default" 0.0;
367 min: 42 21;
368 max: 99999 21;
369 align: 1.0 0.5;
370 rel1.to_x: "elm.text";
371 rel1.relative: 1.0 0.0;
372 rel1.offset: 2 0;
373 rel2.to_x: "limits";
374 rel2.relative: 0.0 1.0;
375 rel2.offset: -3 -1;
376 }
377 }
378 part { name: "base"; mouse_events: 0;
379 description { state: "default" 0.0;
380 rel1.to: "elm.swallow.bar";
381 rel2.to: "elm.swallow.bar";
382 image.normal: "slider_run_base_horiz.png";
383 image.border: 4 4 0 0;
384 fill.smooth: 0;
385 min: 8 5;
386 max: 99999 5;
387 fixed: 0 1;
388 }
389 description { state: "disabled" 0.0;
390 inherit: "default" 0.0;
391 image.normal: "slider_run_base_light_horiz.png";
392 }
393 }
394 part { name: "glow"; mouse_events: 0;
395 description { state: "default" 0.0;
396 image.normal: "horiz_glow_run.png";
397 rel1.offset: 1 1;
398 rel1.to: "base";
399 rel2.relative: 0.5 1.0;
400 rel2.offset: -1 -2;
401 rel2.to_x: "button";
402 rel2.to_y: "base";
403 image.border: 0 4 0 0;
404 }
405 description { state: "disabled" 0.0;
406 inherit: "default" 0.0;
407 color: 255 255 255 64;
408 }
409 description { state: "inverted" 0.0;
410 image.normal: "horiz_glow_run_rev.png";
411 rel1.relative: 0.5 0.0;
412 rel1.offset: 0 1;
413 rel1.to_x: "button";
414 rel1.to_y: "base";
415 rel2.offset: -2 -2;
416 rel2.to: "base";
417 image.border: 4 0 0 0;
418 }
419 description { state: "disabled_inverted" 0.0;
420 inherit: "inverted" 0.0;
421 color: 255 255 255 64;
422 }
423 }
424 part { name: "bevel"; mouse_events: 0;
425 description { state: "default" 0.0;
426 rel1.to: "base";
427 rel2.to: "base";
428 image.normal: "slider_run_bevel_horiz.png";
429 image.border: 5 5 0 0;
430 fill.smooth: 0;
431 }
432 }
433 part { name: "dis_clip"; type: RECT;
434 description { state: "default" 0.0;
435 rel1.to: "elm.swallow.icon";
436 rel2.to: "elm.swallow.end";
437 }
438 description { state: "disabled" 0.0;
439 inherit: "default" 0.0;
440 color: 255 255 255 64;
441 }
442 }
443 part { name: "elm.swallow.icon"; type: SWALLOW;
444 clip_to: "dis_clip";
445 required;
446 description { state: "default" 0.0;
447 fixed: 1 0;
448 visible: 0;
449 align: 0.0 0.5;
450 rel1.offset: 0 2;
451 rel1.to_y: "elm.swallow.bar";
452 rel2.offset: -1 -3;
453 rel2.relative: 0.0 1.0;
454 rel2.to_y: "elm.swallow.bar";
455 }
456 description { state: "visible" 0.0;
457 inherit: "default" 0.0;
458 visible: 1;
459 aspect: 1.0 1.0; aspect_preference: VERTICAL;
460 rel1.offset: 2 2;
461 rel2.offset: 2 -3;
462 }
463 }
464 part { name: "sizer.content"; type: TEXT; mouse_events: 0;
465 scale: 1;
466 description { state: "default" 0.0;
467 fixed: 1 1;
468 visible: 0;
469 text { font: FN; size: 10;
470 min: 0 0;
471 text_class: "slider_text";
472 }
473 }
474 description { state: "visible" 0.0;
475 inherit: "default" 0.0;
476 rel1.to: "elm.swallow.icon";
477 rel2.to: "elm.swallow.icon";
478 text {
479 min: 1 1;
480 ellipsis: -1;
481 text: "M";
482 }
483 }
484 }
485 part { name: "elm.text"; type: TEXT; mouse_events: 0;
486 effect: SHADOW BOTTOM;
487 scale: 1;
488 required;
489 description { state: "default" 0.0;
490 fixed: 1 1;
491 align: 0.0 0.5;
492 rel1.to_x: "elm.swallow.icon";
493 rel1.relative: 1.0 0.0;
494 rel1.offset: -1 2;
495 rel2.to_x: "elm.swallow.icon";
496 rel2.relative: 1.0 1.0;
497 rel2.offset: -1 -3;
498 color: FN_COL_DEFAULT;
499 color_class: "slider_text";
500 text { font: FN; size: 10;
501 text_class: "slider";
502 min: 0 0;
503 align: 0.0 0.5;
504 }
505 visible: 0;
506 }
507 description { state: "visible" 0.0;
508 inherit: "default" 0.0;
509 fixed: 1 0;
510 visible: 1;
511 rel1.offset: 2 2;
512 rel2.offset: 2 -3;
513 text.min: 1 1;
514 text.ellipsis: -1;
515 }
516 description { state: "disabled_visible" 0.0;
517 inherit: "visible" 0.0;
518 color_class: "slider_text_disabled";
519 color3: 255 255 255 255;
520 }
521 }
522 part { name: "elm.swallow.end"; type: SWALLOW;
523 clip_to: "dis_clip";
524 description { state: "default" 0.0;
525 fixed: 1 0;
526 visible: 0;
527 align: 1.0 0.5;
528 rel1.offset: 0 2;
529 rel1.relative: 1.0 0.0;
530 rel2.offset: -1 -3;
531 }
532 description { state: "visible" 0.0;
533 inherit: "default" 0.0;
534 visible: 1;
535 aspect: 1.0 1.0;
536 aspect_preference: VERTICAL;
537 rel1.offset: -3 2;
538 rel2.offset: -3 -3;
539 }
540 }
541 part { name: "sizer.content.end"; type: TEXT; mouse_events: 0;
542 scale: 1;
543 description { state: "default" 0.0;
544 fixed: 1 1;
545 visible: 0;
546 text { font: FN; size: 10;
547 min: 0 0;
548 text_class: "slider_text";
549 }
550 }
551 description { state: "visible" 0.0;
552 inherit: "default" 0.0;
553 rel1.to: "elm.swallow.end";
554 rel2.to: "elm.swallow.end";
555 text {
556 min: 1 1;
557 ellipsis: -1;
558 text: "M";
559 }
560 }
561 }
562 alias: "elm.units.min" "limits:elm.units.min";
563 alias: "elm.units.max" "limits:elm.units.max";
564 part { name: "limits"; type: GROUP; mouse_events: 0;
26 source: "efl/slider/hidden/limit"; 565 source: "efl/slider/hidden/limit";
566 scale: 1;
567 description { state: "default" 0.0;
568 visible: 0;
569 align: 1.0 0.5;
570 min: SOURCE;
571 fixed: 1 1;
572 rel1.to_x: "elm.swallow.end";
573 rel1.relative: 0.0 0.0;
574 rel1.offset: 0 2;
575 rel2.to_x: "elm.swallow.end";
576 rel2.relative: 0.0 1.0;
577 rel2.offset: -1 -3;
578 }
579 description { state: "visible" 0.0;
580 inherit: "default" 0.0;
581 rel1.offset: -3 2;
582 rel2.offset: -3 -3;
583 }
584 description { state: "disabled_visible" 0.0;
585 inherit: "default" 0.0;
586 rel1.offset: -3 2;
587 rel2.offset: -3 -3;
588 color: 255 255 255 64;
589 }
590 }
591 part { name: "elm.units"; type: TEXT; mouse_events: 0;
592 effect: SHADOW BOTTOM;
593 scale: 1;
594 description { state: "default" 0.0;
595 visible: 0;
596 fixed: 1 1;
597 rel1.to_x: "limits";
598 rel2.to_x: "limits";
599 color: FN_COL_DEFAULT;
600 color_class: "slider_text";
601 text { font: FN; size: 10;
602 text_class: "slider";
603 align: 1.0 0.5;
604 min: 1 1;
605 ellipsis: -1;
606 }
607 }
608 description { state: "visible" 0.0;
609 inherit: "default" 0.0;
610 visible: 1;
611 }
612 description { state: "disabled_visible" 0.0;
613 inherit: "visible" 0.0;
614 color_class: "slider_text_disabled";
615 color3: 255 255 255 255;
616 }
27 } 617 }
28 part { "button"; 618 part { name: "button"; type: GROUP; mouse_events: 0;
29 source: "efl/slider/horizontal/indicator"; 619 source: "efl/slider/horizontal/indicator";
620 description { state: "default" 0.0;
621 fixed: 1 1;
622 rel1.to: "elm.dragable.slider";
623 rel2.to: "elm.dragable.slider";
624 }
625 description { state: "hidden" 0.0;
626 inherit: "default" 0.0;
627 visible: 0;
628 }
629 }
630 part { name: "elm.dragable.slider"; type: RECT;
631 scale: 1;
632 dragable.x: 1 1 0;
633 dragable.y: 0 0 0;
634 dragable.confine: "elm.swallow.bar";
635 description { state: "default" 0.0;
636 color: 0 0 0 0;
637 min: 16 16;
638 max: 16 16;
639 fixed: 1 1;
640 rel1.relative: 0.5 0.0;
641 rel1.to_x: "elm.swallow.bar";
642 rel2.relative: 0.5 1.0;
643 rel2.to_x: "elm.swallow.bar";
644 }
645 }
646 part { name: "knob";
647 description { state: "default" 0.0;
648 image.normal: "knob";
649 fixed: 1 1;
650 min: 12 12;
651 step: 2 2;
652 max: 32 32; // XXX allow bigger sizes with more knob images
653 rel1.to: "elm.dragable.slider";
654 rel1.offset: -4 -4;
655 rel2.to: "elm.dragable.slider";
656 rel2.offset: 3 3;
657 }
658 description { state: "clicked" 0.0;
659 inherit: "default" 0.0;
660 }
661 }
662 part { name: "slideevent"; type: RECT; repeat_events: 1;
663 scale: 1;
664 ignore_flags: ON_HOLD;
665 dragable.events: "elm.dragable.slider";
666 description { state: "default" 0.0;
667 fixed: 1 1;
668 rel1.to: "elm.dragable.slider";
669 rel2.to: "elm.dragable.slider";
670 color: 0 0 0 0;
671 }
672 }
673 part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
674 description { state: "default" 0.0;
675 max: 0 0;
676 rel1.to: "elm.dragable.slider";
677 rel2.to: "elm.dragable.slider";
678 }
679 }
680 part { name: "event"; type: RECT;
681 description { state: "default" 0.0;
682 color: 0 0 0 0;
683 visible: 0;
684 }
685 description { state: "disabled" 0.0;
686 inherit: "default" 0.0;
687 visible: 1;
688 }
30 } 689 }
31 } 690 }
691 programs {
692 program {
693 signal: "mouse,down,1"; source: "elm.dragable.slider";
694 action: STATE_SET "clicked" 0.0;
695 target: "knob";
696 }
697 program {
698 signal: "mouse,up,1"; source: "elm.dragable.slider";
699 action: STATE_SET "default" 0.0;
700 target: "knob";
701 }
702 program {
703 signal: "elm,state,indicator,show"; source: "elm";
704 action: SIGNAL_EMIT "elm,popup,show" "elm";
705 after: "popup_show2";
706 }
707 program {
708 signal: "elm,state,indicator,hide"; source: "elm";
709 action: SIGNAL_EMIT "elm,popup,hide" "elm";
710 after: "popup_hide2";
711 }
712 program {
713 signal: "mouse,down,1"; source: "slideevent";
714 action: SIGNAL_EMIT "elm,popup,show" "elm";
715 after: "popup_show2";
716 }
717 program { name: "popup_show2";
718 action: STATE_SET "hidden" 0.0;
719 target: "button";
720 }
721 program {
722 signal: "mouse,up,1"; source: "slideevent";
723 action: SIGNAL_EMIT "elm,popup,hide" "elm";
724 after: "popup_hide2";
725 }
726 program { name: "popup_hide2";
727 action: STATE_SET "default" 0.0;
728 target: "button";
729 }
730 program {
731 signal: "elm,state,elm.text,set"; source: "elm";
732 script {
733 new m = get_int(slmode);
734 m |= LABEL; set_int(slmode, m);
735 eval_mode(m);
736 }
737 }
738 program {
739 signal: "elm,state,elm.text,unset"; source: "elm";
740 script {
741 new m = get_int(slmode);
742 m &= ~LABEL; set_int(slmode, m);
743 eval_mode(m);
744 }
745 }
746 program {
747 signal: "elm,state,icon,set"; source: "elm";
748 script {
749 new m = get_int(slmode);
750 m |= ICON; set_int(slmode, m);
751 eval_mode(m);
752 }
753 }
754 program {
755 signal: "elm,state,icon,unset"; source: "elm";
756 script {
757 new m = get_int(slmode);
758 m &= ~ICON; set_int(slmode, m);
759 eval_mode(m);
760 }
761 }
762 program { name: "end_show";
763 signal: "elm,state,end,visible"; source: "elm";
764 script {
765 new m = get_int(slmode);
766 m |= END; set_int(slmode, m);
767 eval_mode(m);
768 }
769 }
770 program { name: "end_hide";
771 signal: "elm,state,end,hidden"; source: "elm";
772 script {
773 new m = get_int(slmode);
774 m &= ~END; set_int(slmode, m);
775 eval_mode(m);
776 }
777 }
778 program {
779 signal: "elm,state,units,visible"; source: "elm";
780 script {
781 new m = get_int(slmode);
782 m |= UNITS; set_int(slmode, m);
783 eval_mode(m);
784 }
785 }
786 program {
787 signal: "elm,state,units,visible"; source: "elm";
788 action: SIGNAL_EMIT "limits,visible" "elm";
789 target: "limits";
790 }
791 program {
792 signal: "elm,state,units,hidden"; source: "elm";
793 action: STATE_SET "default" 0.0;
794 script {
795 new m = get_int(slmode);
796 m &= ~UNITS; set_int(slmode, m);
797 eval_mode(m);
798 }
799 }
800 program {
801 signal: "elm,state,units,hidden"; source: "elm";
802 action: SIGNAL_EMIT "limits,hide" "elm";
803 target: "limits";
804 }
805 program {
806 signal: "elm,state,inverted,on"; source: "elm";
807 script {
808 new m = get_int(slmode);
809 m |= INVERT; set_int(slmode, m);
810 eval_mode(m);
811 }
812 }
813 program {
814 signal: "elm,state,inverted,off"; source: "elm";
815 script {
816 new m = get_int(slmode);
817 m &= ~INVERT; set_int(slmode, m);
818 eval_mode(m);
819 }
820 }
821 program {
822 signal: "elm,state,disabled"; source: "elm";
823 script {
824 new m = get_int(slmode);
825 m |= DISABLE; set_int(slmode, m);
826 eval_mode(m);
827 }
828 }
829 program {
830 signal: "elm,state,enabled"; source: "elm";
831 script {
832 new m = get_int(slmode);
833 m &= ~DISABLE; set_int(slmode, m);
834 eval_mode(m);
835 }
836 }
837 }
838#undef ICON
839#undef LABEL
840#undef END
841#undef UNITS
842#undef MASK
843#undef INVERT
844#undef DISABLE
32} 845}
33 846
34group { "efl/slider/vertical"; 847group { "efl/slider/vertical";
35 inherit: "elm/slider/vertical/default";
36 alias: "efl/slider/vertical:disabled"; 848 alias: "efl/slider/vertical:disabled";
849 images.image: "slider_run_base_vert.png" COMP;
850 images.image: "slider_run_bevel_vert.png" COMP;
851 images.image: "slider_run_base_light_vert.png" COMP;
852 images.image: "vert_glow_run.png" COMP;
853 images.image: "vert_glow_run_rev.png" COMP;
854 images.image: "knob_round_small_normal.png" COMP;
855 images.image: "knob_round_small_selected.png" COMP;
856 set { name: "knob";
857 // XXX: add more sizes (at least up to 128x128)
858 image { image: "knob_sz_24.png" COMP; size: 31 31 32 32; }
859 image { image: "knob_sz_22.png" COMP; size: 29 29 30 30; }
860 image { image: "knob_sz_20.png" COMP; size: 27 27 28 28; }
861 image { image: "knob_sz_18.png" COMP; size: 25 25 26 26; }
862 image { image: "knob_sz_16.png" COMP; size: 23 23 24 24; }
863 image { image: "knob_sz_14.png" COMP; size: 21 21 22 22; }
864 image { image: "knob_sz_12.png" COMP; size: 19 19 20 20; }
865 image { image: "knob_sz_10.png" COMP; size: 17 17 18 18; }
866 image { image: "knob_sz_08.png" COMP; size: 15 15 16 16; }
867 image { image: "knob_sz_06.png" COMP; size: 13 13 14 14; }
868 image { image: "knob_sz_04.png" COMP; size: 0 0 12 12; }
869 }
870#define ICON 1
871#define LABEL 2
872#define END 4
873#define UNITS 8
874#define MASK 15
875#define INVERT 16
876#define DISABLE 32
877 script {
878 public slmode;
879 public eval_mode(m) {
880 new ic = m & ICON;
881 new l = m & LABEL;
882 new e = m & END;
883 new u = m & UNITS;
884 new d = m & DISABLE;
885 new i = m & INVERT;
886 if (i) {
887 if (!d) {
888 set_state(PART:"base", "default", 0.0);
889 set_state(PART:"glow", "inverted", 0.0);
890 } else {
891 set_state(PART:"base", "disabled", 0.0);
892 set_state(PART:"glow", "disabled_inverted", 0.0);
893 }
894 } else {
895 if (!d) {
896 set_state(PART:"base", "default", 0.0);
897 set_state(PART:"glow", "default", 0.0);
898 } else {
899 set_state(PART:"base", "disabled", 0.0);
900 set_state(PART:"glow", "disabled", 0.0);
901 }
902 }
903 if (l) {
904 if (!d) {
905 set_state(PART:"elm.text", "visible", 0.0);
906 } else {
907 set_state(PART:"elm.text", "disabled_visible", 0.0);
908 }
909 } else {
910 set_state(PART:"elm.text", "default", 0.0);
911 }
912 if (u) {
913 if (!d) {
914 set_state(PART:"elm.units", "visible", 0.0);
915 set_state(PART:"limits", "visible", 0.0);
916 } else {
917 set_state(PART:"elm.units", "disabled_visible", 0.0);
918 set_state(PART:"limits", "disabled_visible", 0.0);
919 }
920 } else {
921 set_state(PART:"elm.units", "default", 0.0);
922 set_state(PART:"limits", "default", 0.0);
923 }
924 if (ic) {
925 set_state(PART:"elm.swallow.icon", "visible", 0.0);
926 set_state(PART:"sizer.content", "visible", 0.0);
927 } else {
928 set_state(PART:"elm.swallow.icon", "default", 0.0);
929 set_state(PART:"sizer.content", "default", 0.0);
930 }
931 if (e) {
932 set_state(PART:"elm.swallow.end", "visible", 0.0);
933 set_state(PART:"sizer.content.end", "visible", 0.0);
934 } else {
935 set_state(PART:"elm.swallow.end", "default", 0.0);
936 set_state(PART:"sizer.content.end", "default", 0.0);
937 }
938 if (!d) {
939 set_state(PART:"event", "default", 0.0);
940 set_state(PART:"dis_clip", "default", 0.0);
941 } else {
942 set_state(PART:"event", "disabled", 0.0);
943 set_state(PART:"dis_clip", "disabled", 0.0);
944 }
945 }
946 }
37 parts { 947 parts {
38 part { "limits"; 948 part { name: "elm.swallow.bar"; type: SWALLOW;
949 scale: 1;
950 description { state: "default" 0.0;
951 min: 21 42;
952 max: 21 99999;
953 align: 0.5 1.0;
954 rel1.to_y: "elm.text";
955 rel1.relative: 0.0 1.0;
956 rel1.offset: 0 2;
957 rel2.to_y: "limits";
958 rel2.relative: 1.0 0.0;
959 rel2.offset: -1 -3;
960 }
961 }
962 part { name: "base"; mouse_events: 0;
963 description { state: "default" 0.0;
964 rel1.to: "elm.swallow.bar";
965 rel2.to: "elm.swallow.bar";
966 image.normal: "slider_run_base_vert.png";
967 image.border: 0 0 4 4;
968 fill.smooth: 0;
969 min: 5 8;
970 max: 5 99999;
971 fixed: 1 0;
972 }
973 description { state: "disabled" 0.0;
974 inherit: "default" 0.0;
975 image.normal: "slider_run_base_light_vert.png";
976 }
977 }
978 part { name: "glow"; mouse_events: 0;
979 description { state: "default" 0.0;
980 image.normal: "vert_glow_run.png";
981 rel1.offset: 1 1;
982 rel1.to: "base";
983 rel2.relative: 1.0 0.5;
984 rel2.offset: -2 -1;
985 rel2.to_y: "button";
986 rel2.to_x: "base";
987 image.border: 0 0 0 4;
988 }
989 description { state: "disabled" 0.0;
990 inherit: "default" 0.0;
991 color: 255 255 255 64;
992 }
993 description { state: "inverted" 0.0;
994 image.normal: "vert_glow_run_rev.png";
995 rel1.relative: 0.0 0.5;
996 rel1.offset: 1 0;
997 rel1.to_y: "button";
998 rel1.to_x: "base";
999 rel2.offset: -2 -2;
1000 rel2.to: "base";
1001 image.border: 0 0 4 0;
1002 }
1003 description { state: "disabled_inverted" 0.0;
1004 inherit: "inverted" 0.0;
1005 color: 255 255 255 64;
1006 }
1007 }
1008 part { name: "bevel"; mouse_events: 0;
1009 description { state: "default" 0.0;
1010 rel1.to: "base";
1011 rel2.to: "base";
1012 image.normal: "slider_run_bevel_vert.png";
1013 image.border: 0 0 5 5;
1014 fill.smooth: 0;
1015 }
1016 }
1017 part { name: "dis_clip"; type: RECT;
1018 description { state: "default" 0.0;
1019 rel1.to: "elm.swallow.icon";
1020 rel2.to: "elm.swallow.end";
1021 }
1022 description { state: "disabled" 0.0;
1023 inherit: "default" 0.0;
1024 color: 255 255 255 64;
1025 }
1026 }
1027 part { name: "elm.swallow.icon"; type: SWALLOW;
1028 clip_to: "dis_clip";
1029 required;
1030 description { state: "default" 0.0;
1031 fixed: 0 1;
1032 visible: 0;
1033 align: 0.5 0.0;
1034 rel1.offset: 2 0;
1035 rel1.to_x: "elm.swallow.bar";
1036 rel2.offset: -3 -1;
1037 rel2.relative: 1.0 0.0;
1038 rel2.to_x: "elm.swallow.bar";
1039 }
1040 description { state: "visible" 0.0;
1041 inherit: "default" 0.0;
1042 visible: 1;
1043 aspect: 1.0 1.0; aspect_preference: VERTICAL;
1044 rel1.offset: 2 2;
1045 rel2.offset: -3 2;
1046 }
1047 }
1048 part { name: "sizer.content"; type: TEXT; mouse_events: 0;
1049 scale: 1;
1050 description { state: "default" 0.0;
1051 fixed: 1 1;
1052 visible: 0;
1053 text { font: FN; size: 10;
1054 min: 0 0;
1055 text_class: "slider_text";
1056 }
1057 }
1058 description { state: "visible" 0.0;
1059 inherit: "default" 0.0;
1060 rel1.to: "elm.swallow.icon";
1061 rel2.to: "elm.swallow.icon";
1062 text {
1063 min: 1 1;
1064 ellipsis: -1;
1065 text: "M";
1066 }
1067 }
1068 }
1069 part { name: "elm.text"; type: TEXT; mouse_events: 0;
1070 effect: SHADOW BOTTOM;
1071 scale: 1;
1072 required;
1073 description { state: "default" 0.0;
1074 fixed: 0 1;
1075 align: 0.5 0.0;
1076 rel1.to_y: "elm.swallow.icon";
1077 rel1.relative: 0.0 1.0;
1078 rel1.offset: 2 -1;
1079 rel2.to_y: "elm.swallow.icon";
1080 rel2.relative: 1.0 1.0;
1081 rel2.offset: -3 -1;
1082 color: FN_COL_DEFAULT;
1083 color_class: "slider_text";
1084 text { font: FN; size: 10;
1085 text_class: "slider";
1086 min: 1 0;
1087 ellipsis: -1;
1088 align: 0.5 0.0;
1089 }
1090 visible: 0;
1091 }
1092 description { state: "visible" 0.0;
1093 inherit: "default" 0.0;
1094 visible: 1;
1095 rel1.offset: 2 2;
1096 rel2.offset: -3 2;
1097 text.min: 1 1;
1098 text.ellipsis: -1;
1099
1100 }
1101 description { state: "disabled_visible" 0.0;
1102 inherit: "visible" 0.0;
1103 color_class: "slider_text_disabled";
1104 color3: 255 255 255 255;
1105 }
1106 }
1107 part { name: "elm.swallow.end"; type: SWALLOW;
1108 clip_to: "dis_clip";
1109 description { state: "default" 0.0;
1110 fixed: 0 1;
1111 visible: 0;
1112 align: 0.5 1.0;
1113 rel1.offset: 2 0;
1114 rel1.relative: 0.0 1.0;
1115 rel2.offset: -3 -1;
1116 }
1117 description { state: "visible" 0.0;
1118 inherit: "default" 0.0;
1119 visible: 1;
1120 aspect: 1.0 1.0;
1121 aspect_preference: VERTICAL;
1122 rel2.offset: 2 -3;
1123 rel2.offset: -3 -3;
1124 }
1125 }
1126 part { name: "sizer.content.end"; type: TEXT; mouse_events: 0;
1127 scale: 1;
1128 description { state: "default" 0.0;
1129 fixed: 1 1;
1130 visible: 0;
1131 text { font: FN; size: 10;
1132 min: 0 0;
1133 text_class: "slider_text";
1134 }
1135 }
1136 description { state: "visible" 0.0;
1137 inherit: "default" 0.0;
1138 rel1.to: "elm.swallow.end";
1139 rel2.to: "elm.swallow.end";
1140 text {
1141 min: 1 1;
1142 ellipsis: -1;
1143 text: "M";
1144 }
1145 }
1146 }
1147 alias: "elm.units.min" "limits:elm.units.min";
1148 alias: "elm.units.max" "limits:elm.units.max";
1149 part { name: "limits"; type: GROUP; mouse_events: 0;
39 source: "efl/slider/hidden/limit"; 1150 source: "efl/slider/hidden/limit";
1151 scale: 1;
1152 description { state: "default" 0.0;
1153 align: 0.5 1.0;
1154 fixed: 1 1;
1155 max: 0 0;
1156 rel1.to_y: "elm.swallow.end";
1157 rel1.relative: 0.0 0.0;
1158 rel1.offset: 2 1;
1159 rel2.to_y: "elm.swallow.end";
1160 rel2.relative: 1.0 0.0;
1161 rel2.offset: -3 0;
1162 }
1163 description { state: "visible" 0.0;
1164 inherit: "default" 0.0;
1165 min: SOURCE;
1166 rel1.offset: 2 -3;
1167 rel2.offset: -3 -3;
1168 }
1169 description { state: "disabled_visible" 0.0;
1170 inherit: "default" 0.0;
1171 rel1.offset: 2 -3;
1172 rel2.offset: -3 -3;
1173 color: 255 255 255 64;
1174 }
1175 }
1176 part { name: "elm.units"; type: TEXT; mouse_events: 0;
1177 effect: SHADOW BOTTOM;
1178 scale: 1;
1179 description { state: "default" 0.0;
1180 visible: 0;
1181 fixed: 1 1;
1182 rel1.to_y: "limits";
1183 rel2.to_y: "limits";
1184 color: FN_COL_DEFAULT;
1185 color_class: "slider_text";
1186 text { font: FN; size: 10;
1187 text_class: "slider";
1188 min: 0 0;
1189 align: 0.5 1.0;
1190 ellipsis: -1;
1191 }
1192 }
1193 description { state: "visible" 0.0;
1194 inherit: "default" 0.0;
1195 visible: 1;
1196 text.min: 1 1;
1197 text.ellipsis: -1;
1198 }
1199 description { state: "disabled_visible" 0.0;
1200 inherit: "visible" 0.0;
1201 color_class: "slider_text_disabled";
1202 color3: 255 255 255 255;
1203 }
40 } 1204 }
41 part { "button"; 1205 part { name: "button"; type: GROUP; mouse_events: 0;
42 source: "efl/slider/vertical/indicator"; 1206 source: "efl/slider/vertical/indicator";
1207 description { state: "default" 0.0;
1208 fixed: 1 1;
1209 rel1.to: "elm.dragable.slider";
1210 rel2.to: "elm.dragable.slider";
1211 }
1212 description { state: "hidden" 0.0;
1213 inherit: "default" 0.0;
1214 visible: 0;
1215 }
1216 }
1217 part { name: "elm.dragable.slider"; type: RECT;
1218 scale: 1;
1219 dragable.x: 0 0 0;
1220 dragable.y: 1 1 0;
1221 dragable.confine: "elm.swallow.bar";
1222 description { state: "default" 0.0;
1223 color: 0 0 0 0;
1224 min: 16 16;
1225 max: 16 16;
1226 fixed: 1 1;
1227 rel1.relative: 0.0 0.5;
1228 rel1.to_x: "elm.swallow.bar";
1229 rel2.relative: 1.0 0.5;
1230 rel2.to_x: "elm.swallow.bar";
1231 }
1232 }
1233 part { name: "knob";
1234 description { state: "default" 0.0;
1235 image.normal: "knob";
1236 fixed: 1 1;
1237 min: 12 12;
1238 step: 2 2;
1239 max: 32 32; // XXX allow bigger sizes with more knob images
1240 rel1.to: "elm.dragable.slider";
1241 rel1.offset: -4 -4;
1242 rel2.to: "elm.dragable.slider";
1243 rel2.offset: 3 3;
1244 }
1245 description { state: "clicked" 0.0;
1246 inherit: "default" 0.0;
1247 }
1248 }
1249 part { name: "slideevent"; type: RECT; repeat_events: 1;
1250 scale: 1;
1251 ignore_flags: ON_HOLD;
1252 dragable.events: "elm.dragable.slider";
1253 description { state: "default" 0.0;
1254 fixed: 1 1;
1255 rel1.to: "elm.dragable.slider";
1256 rel2.to: "elm.dragable.slider";
1257 color: 0 0 0 0;
1258 }
1259 }
1260 part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
1261 description { state: "default" 0.0;
1262 max: 0 0;
1263 rel1.to: "elm.dragable.slider";
1264 rel2.to: "elm.dragable.slider";
1265 }
1266 }
1267 part { name: "event"; type: RECT;
1268 description { state: "default" 0.0;
1269 color: 0 0 0 0;
1270 visible: 0;
1271 }
1272 description { state: "disabled" 0.0;
1273 inherit: "default" 0.0;
1274 visible: 1;
1275 }
43 } 1276 }
44 } 1277 }
1278 programs {
1279 program {
1280 signal: "mouse,down,1"; source: "elm.dragable.slider";
1281 action: STATE_SET "clicked" 0.0;
1282 target: "knob";
1283 }
1284 program {
1285 signal: "mouse,up,1"; source: "elm.dragable.slider";
1286 action: STATE_SET "default" 0.0;
1287 target: "knob";
1288 }
1289 program {
1290 signal: "elm,state,indicator,show"; source: "elm";
1291 action: SIGNAL_EMIT "elm,popup,show" "elm";
1292 after: "popup_show2";
1293 }
1294 program {
1295 signal: "elm,state,indicator,hide"; source: "elm";
1296 action: SIGNAL_EMIT "elm,popup,hide" "elm";
1297 after: "popup_hide2";
1298 }
1299 program {
1300 signal: "mouse,down,1"; source: "slideevent";
1301 action: SIGNAL_EMIT "elm,popup,show" "elm";
1302 after: "popup_show2";
1303 }
1304 program { name: "popup_show2";
1305 action: STATE_SET "hidden" 0.0;
1306 target: "button";
1307 }
1308 program {
1309 signal: "mouse,up,1"; source: "slideevent";
1310 action: SIGNAL_EMIT "elm,popup,hide" "elm";
1311 after: "popup_hide2";
1312 }
1313 program { name: "popup_hide2";
1314 action: STATE_SET "default" 0.0;
1315 target: "button";
1316 }
1317 program {
1318 signal: "elm,state,elm.text,set"; source: "elm";
1319 script {
1320 new m = get_int(slmode);
1321 m |= LABEL; set_int(slmode, m);
1322 eval_mode(m);
1323 }
1324 }
1325 program {
1326 signal: "elm,state,elm.text,unset"; source: "elm";
1327 script {
1328 new m = get_int(slmode);
1329 m &= ~LABEL; set_int(slmode, m);
1330 eval_mode(m);
1331 }
1332 }
1333 program {
1334 signal: "elm,state,icon,set"; source: "elm";
1335 script {
1336 new m = get_int(slmode);
1337 m |= ICON; set_int(slmode, m);
1338 eval_mode(m);
1339 }
1340 }
1341 program {
1342 signal: "elm,state,icon,unset"; source: "elm";
1343 script {
1344 new m = get_int(slmode);
1345 m &= ~ICON; set_int(slmode, m);
1346 eval_mode(m);
1347 }
1348 }
1349 program { name: "end_show";
1350 signal: "elm,state,end,visible"; source: "elm";
1351 script {
1352 new m = get_int(slmode);
1353 m |= END; set_int(slmode, m);
1354 eval_mode(m);
1355 }
1356 }
1357 program { name: "end_hide";
1358 signal: "elm,state,end,hidden"; source: "elm";
1359 script {
1360 new m = get_int(slmode);
1361 m &= ~END; set_int(slmode, m);
1362 eval_mode(m);
1363 }
1364 }
1365 program {
1366 signal: "elm,state,units,visible"; source: "elm";
1367 script {
1368 new m = get_int(slmode);
1369 m |= UNITS; set_int(slmode, m);
1370 eval_mode(m);
1371 }
1372 }
1373 program {
1374 signal: "elm,state,units,visible"; source: "elm";
1375 action: SIGNAL_EMIT "limits:limits,visible" "elm";
1376 }
1377 program {
1378 signal: "elm,state,units,hidden"; source: "elm";
1379 action: STATE_SET "default" 0.0;
1380 script {
1381 new m = get_int(slmode);
1382 m &= ~UNITS; set_int(slmode, m);
1383 eval_mode(m);
1384 }
1385 }
1386 program {
1387 signal: "elm,state,units,hidden"; source: "elm";
1388 action: SIGNAL_EMIT "limits:limits,hide" "elm";
1389 }
1390 program {
1391 signal: "elm,state,inverted,on"; source: "elm";
1392 script {
1393 new m = get_int(slmode);
1394 m |= INVERT; set_int(slmode, m);
1395 eval_mode(m);
1396 }
1397 }
1398 program {
1399 signal: "elm,state,inverted,off"; source: "elm";
1400 script {
1401 new m = get_int(slmode);
1402 m &= ~INVERT; set_int(slmode, m);
1403 eval_mode(m);
1404 }
1405 }
1406 program {
1407 signal: "elm,state,disabled"; source: "elm";
1408 script {
1409 new m = get_int(slmode);
1410 m |= DISABLE; set_int(slmode, m);
1411 eval_mode(m);
1412 }
1413 }
1414 program {
1415 signal: "elm,state,enabled"; source: "elm";
1416 script {
1417 new m = get_int(slmode);
1418 m &= ~DISABLE; set_int(slmode, m);
1419 eval_mode(m);
1420 }
1421 }
1422 }
1423#undef ICON
1424#undef LABEL
1425#undef END
1426#undef UNITS
1427#undef MASK
1428#undef INVERT
1429#undef DISABLE
45} 1430}
46 1431
47//Range 1432//Range
48 1433
49group { "efl/slider_interval/horizontal"; 1434group { "efl/slider_interval/horizontal";
50 inherit: "elm/slider/range/horizontal/default";
51 alias: "efl/slider/horizontal:disabled"; 1435 alias: "efl/slider/horizontal:disabled";
1436 images.image: "slider_run_base_horiz.png" COMP;
1437 images.image: "slider_run_bevel_horiz.png" COMP;
1438 images.image: "slider_run_base_light_horiz.png" COMP;
1439 images.image: "horiz_glow_run.png" COMP;
1440 images.image: "horiz_glow_range.png" COMP;
1441 images.image: "horiz_glow_run_rev.png" COMP;
1442 images.image: "knob_round_small_normal.png" COMP;
1443 images.image: "knob_round_small_selected.png" COMP;
1444 set { name: "knob";
1445 // XXX: add more sizes (at least up to 128x128)
1446 image { image: "knob_sz_24.png" COMP; size: 31 31 32 32; }
1447 image { image: "knob_sz_22.png" COMP; size: 29 29 30 30; }
1448 image { image: "knob_sz_20.png" COMP; size: 27 27 28 28; }
1449 image { image: "knob_sz_18.png" COMP; size: 25 25 26 26; }
1450 image { image: "knob_sz_16.png" COMP; size: 23 23 24 24; }
1451 image { image: "knob_sz_14.png" COMP; size: 21 21 22 22; }
1452 image { image: "knob_sz_12.png" COMP; size: 19 19 20 20; }
1453 image { image: "knob_sz_10.png" COMP; size: 17 17 18 18; }
1454 image { image: "knob_sz_08.png" COMP; size: 15 15 16 16; }
1455 image { image: "knob_sz_06.png" COMP; size: 13 13 14 14; }
1456 image { image: "knob_sz_04.png" COMP; size: 0 0 12 12; }
1457 }
1458#define ICON 1
1459#define LABEL 2
1460#define END 4
1461#define UNITS 8
1462#define MASK 15
1463#define INVERT 16
1464#define DISABLE 32
1465 script {
1466 public slmode;
1467 public range;
1468 public g_timer_id;
1469 public update_glow()
1470 {
1471 new x1,y1,w1,h1;
1472 new x2,y2,w2,h2;
1473 get_geometry(PART:"knob", x1, y1, w1, h1);
1474 get_geometry(PART:"knob2", x2, y2, w2, h2);
1475 if(x2 < x1)
1476 set_state(PART:"glow", "range_reverse", 0.0);
1477 else
1478 set_state(PART:"glow", "range", 0.0);
1479 }
1480 public eval_mode(m) {
1481 new ic = m & ICON;
1482 new l = m & LABEL;
1483 new e = m & END;
1484 new u = m & UNITS;
1485 new d = m & DISABLE;
1486 new i = m & INVERT;
1487 new r = get_int(range);
1488 if (!r) {
1489 if (i) {
1490 if (!d) {
1491 set_state(PART:"base", "default", 0.0);
1492 set_state(PART:"glow", "inverted", 0.0);
1493 } else {
1494 set_state(PART:"base", "disabled", 0.0);
1495 set_state(PART:"glow", "disabled_inverted", 0.0);
1496 }
1497 } else {
1498 if (!d) {
1499 set_state(PART:"base", "default", 0.0);
1500 set_state(PART:"glow", "default", 0.0);
1501 } else {
1502 set_state(PART:"base", "disabled", 0.0);
1503 set_state(PART:"glow", "disabled", 0.0);
1504 }
1505 }
1506 } else if (d) {
1507 new x1,y1,w1,h1;
1508 new x2,y2,w2,h2;
1509 get_geometry(PART:"knob", x1, y1, w1, h1);
1510 get_geometry(PART:"knob2", x2, y2, w2, h2);
1511 set_state(PART:"base", "disabled", 0.0);
1512 if(x2 < x1)
1513 set_state(PART:"glow", "disabled_range_reverse", 0.0);
1514 else
1515 set_state(PART:"glow", "disabled_range", 0.0);
1516
1517 }
1518 if (l) {
1519 if (!d) {
1520 set_state(PART:"elm.text", "visible", 0.0);
1521 } else {
1522 set_state(PART:"elm.text", "disabled_visible", 0.0);
1523 }
1524 } else {
1525 set_state(PART:"elm.text", "default", 0.0);
1526 }
1527 if (u) {
1528 if (!d) {
1529 set_state(PART:"elm.units", "visible", 0.0);
1530 set_state(PART:"limits", "visible", 0.0);
1531 } else {
1532 set_state(PART:"elm.units", "disabled_visible", 0.0);
1533 set_state(PART:"limits", "disabled_visible", 0.0);
1534 }
1535 } else {
1536 set_state(PART:"elm.units", "default", 0.0);
1537 set_state(PART:"limits", "default", 0.0);
1538 }
1539 if (ic) {
1540 set_state(PART:"elm.swallow.icon", "visible", 0.0);
1541 set_state(PART:"sizer.content", "visible", 0.0);
1542 } else {
1543 set_state(PART:"elm.swallow.icon", "default", 0.0);
1544 set_state(PART:"sizer.content", "default", 0.0);
1545 }
1546 if (e) {
1547 set_state(PART:"elm.swallow.end", "visible", 0.0);
1548 set_state(PART:"sizer.content.end", "visible", 0.0);
1549 } else {
1550 set_state(PART:"elm.swallow.end", "default", 0.0);
1551 set_state(PART:"sizer.content.end", "default", 0.0);
1552 }
1553 if (!d) {
1554 set_state(PART:"event", "default", 0.0);
1555 set_state(PART:"dis_clip", "default", 0.0);
1556 } else {
1557 set_state(PART:"event", "disabled", 0.0);
1558 set_state(PART:"dis_clip", "disabled", 0.0);
1559 }
1560 }
1561 }
52 parts { 1562 parts {
53 part { "limits"; 1563 part { name: "elm.swallow.bar"; type: SWALLOW;
1564 scale: 1;
1565 description { state: "default" 0.0;
1566 min: 42 21;
1567 max: 99999 21;
1568 align: 1.0 0.5;
1569 rel1.to_x: "elm.text";
1570 rel1.relative: 1.0 0.0;
1571 rel1.offset: 2 0;
1572 rel2.to_x: "limits";
1573 rel2.relative: 0.0 1.0;
1574 rel2.offset: -3 -1;
1575 }
1576 }
1577 part { name: "base"; mouse_events: 0;
1578 description { state: "default" 0.0;
1579 rel1.to: "elm.swallow.bar";
1580 rel2.to: "elm.swallow.bar";
1581 image.normal: "slider_run_base_horiz.png";
1582 image.border: 4 4 0 0;
1583 fill.smooth: 0;
1584 min: 8 5;
1585 max: 99999 5;
1586 fixed: 0 1;
1587 }
1588 description { state: "disabled" 0.0;
1589 inherit: "default" 0.0;
1590 image.normal: "slider_run_base_light_horiz.png";
1591 }
1592 }
1593 part { name: "glow"; mouse_events: 0;
1594 description { state: "default" 0.0;
1595 image.normal: "horiz_glow_run.png";
1596 rel1.offset: 1 1;
1597 rel1.to: "base";
1598 rel2.relative: 0.5 1.0;
1599 rel2.offset: -1 -2;
1600 rel2.to_x: "button";
1601 rel2.to_y: "base";
1602 image.border: 0 4 0 0;
1603 }
1604 description { state: "disabled" 0.0;
1605 inherit: "default" 0.0;
1606 color: 255 255 255 64;
1607 }
1608 description { state: "inverted" 0.0;
1609 image.normal: "horiz_glow_run_rev.png";
1610 rel1.relative: 0.5 0.0;
1611 rel1.offset: 0 1;
1612 rel1.to_x: "button";
1613 rel1.to_y: "base";
1614 rel2.offset: -2 -2;
1615 rel2.to: "base";
1616 image.border: 4 0 0 0;
1617 }
1618 description { state: "range" 0.0;
1619 image.normal: "horiz_glow_range.png";
1620 rel1.relative: 0.5 1.0;
1621 rel1.offset: -1 -2;
1622 rel1.to_x: "button";
1623 rel1.to_y: "base";
1624 rel2.relative: 0.5 1.0;
1625 rel2.offset: -1 -2;
1626 rel2.to_x: "button2";
1627 rel2.to_y: "base";
1628 fixed: 0 1;
1629 image.border: 0 4 0 0;
1630 }
1631 description { state: "disabled_range" 0.0;
1632 inherit: "range" 0.0;
1633 color: 255 255 255 64;
1634 }
1635 description { state: "range_reverse" 0.0;
1636 inherit: "range" 0.0;
1637 rel1.to_x: "button2";
1638 rel2.to_x: "button";
1639 }
1640 description { state: "disabled_range_reverse" 0.0;
1641 inherit: "range_reverse" 0.0;
1642 color: 255 255 255 64;
1643 }
1644 description { state: "disabled_inverted" 0.0;
1645 inherit: "inverted" 0.0;
1646 color: 255 255 255 64;
1647 }
1648 }
1649 part { name: "bevel"; mouse_events: 0;
1650 description { state: "default" 0.0;
1651 rel1.to: "base";
1652 rel2.to: "base";
1653 image.normal: "slider_run_bevel_horiz.png";
1654 image.border: 5 5 0 0;
1655 fill.smooth: 0;
1656 }
1657 }
1658 part { name: "dis_clip"; type: RECT;
1659 description { state: "default" 0.0;
1660 rel1.to: "elm.swallow.icon";
1661 rel2.to: "elm.swallow.end";
1662 }
1663 description { state: "disabled" 0.0;
1664 inherit: "default" 0.0;
1665 color: 255 255 255 64;
1666 }
1667 }
1668 part { name: "elm.swallow.icon"; type: SWALLOW;
1669 clip_to: "dis_clip";
1670 required;
1671 description { state: "default" 0.0;
1672 visible: 0;
1673 align: 0.0 0.5;
1674 rel1.offset: 0 2;
1675 rel1.to_y: "elm.swallow.bar";
1676 rel2.offset: -1 -3;
1677 rel2.relative: 0.0 1.0;
1678 rel2.to_y: "elm.swallow.bar";
1679 fixed: 1 0;
1680 }
1681 description { state: "visible" 0.0;
1682 inherit: "default" 0.0;
1683 visible: 1;
1684 aspect: 1.0 1.0; aspect_preference: VERTICAL;
1685 rel1.offset: 2 2;
1686 rel2.offset: 2 -3;
1687 }
1688 }
1689 part { name: "sizer.content"; type: TEXT; mouse_events: 0;
1690 scale: 1;
1691 description { state: "default" 0.0;
1692 fixed: 1 1;
1693 visible: 0;
1694 text { font: FN; size: 10;
1695 min: 0 0;
1696 text_class: "slider_text";
1697 }
1698 }
1699 description { state: "visible" 0.0;
1700 inherit: "default" 0.0;
1701 rel1.to: "elm.swallow.icon";
1702 rel2.to: "elm.swallow.icon";
1703 text {
1704 min: 1 1;
1705 ellipsis: -1;
1706 text: "M";
1707 }
1708 }
1709 }
1710 part { name: "elm.text"; type: TEXT; mouse_events: 0;
1711 effect: SHADOW BOTTOM;
1712 scale: 1;
1713 required;
1714 description { state: "default" 0.0;
1715 fixed: 1 1;
1716 align: 0.0 0.5;
1717 rel1.to_x: "elm.swallow.icon";
1718 rel1.relative: 1.0 0.0;
1719 rel1.offset: -1 2;
1720 rel2.to_x: "elm.swallow.icon";
1721 rel2.relative: 1.0 1.0;
1722 rel2.offset: -1 -3;
1723 color: FN_COL_DEFAULT;
1724 color_class: "slider_text";
1725 text { font: FN; size: 10;
1726 text_class: "slider";
1727 min: 0 0;
1728 align: 0.0 0.5;
1729 }
1730 visible: 0;
1731 }
1732 description { state: "visible" 0.0;
1733 inherit: "default" 0.0;
1734 fixed: 1 0;
1735 visible: 1;
1736 rel1.offset: 2 2;
1737 rel2.offset: 2 -3;
1738 text.min: 1 1;
1739 text.ellipsis: -1;
1740 }
1741 description { state: "disabled_visible" 0.0;
1742 inherit: "visible" 0.0;
1743 color_class: "slider_text_disabled";
1744 color3: 255 255 255 255;
1745 }
1746 }
1747 part { name: "elm.swallow.end"; type: SWALLOW;
1748 clip_to: "dis_clip";
1749 description { state: "default" 0.0;
1750 visible: 0;
1751 align: 1.0 0.5;
1752 rel1.offset: 0 2;
1753 rel1.relative: 1.0 0.0;
1754 rel2.offset: -1 -3;
1755 fixed: 1 0;
1756 }
1757 description { state: "visible" 0.0;
1758 inherit: "default" 0.0;
1759 visible: 1;
1760 aspect: 1.0 1.0;
1761 aspect_preference: VERTICAL;
1762 rel1.offset: -3 2;
1763 rel2.offset: -3 -3;
1764 }
1765 }
1766 part { name: "sizer.content.end"; type: TEXT; mouse_events: 0;
1767 scale: 1;
1768 description { state: "default" 0.0;
1769 fixed: 1 1;
1770 visible: 0;
1771 text { font: FN; size: 10;
1772 min: 0 0;
1773 text_class: "slider_text";
1774 }
1775 }
1776 description { state: "visible" 0.0;
1777 inherit: "default" 0.0;
1778 rel1.to: "elm.swallow.end";
1779 rel2.to: "elm.swallow.end";
1780 text {
1781 min: 1 1;
1782 ellipsis: -1;
1783 text: "M";
1784 }
1785 }
1786 }
1787 alias: "elm.units.min" "limits:elm.units.min";
1788 alias: "elm.units.max" "limits:elm.units.max";
1789 part { name: "limits"; type: GROUP; mouse_events: 0;
54 source: "efl/slider/hidden/limit"; 1790 source: "efl/slider/hidden/limit";
1791 scale: 1;
1792 description { state: "default" 0.0;
1793 visible: 0;
1794 align: 1.0 0.5;
1795 min: SOURCE;
1796 fixed: 1 1;
1797 rel1.to_x: "elm.swallow.end";
1798 rel1.relative: 0.0 0.0;
1799 rel1.offset: 0 2;
1800 rel2.to_x: "elm.swallow.end";
1801 rel2.relative: 0.0 1.0;
1802 rel2.offset: -1 -3;
1803 }
1804 description { state: "visible" 0.0;
1805 inherit: "default" 0.0;
1806 rel1.offset: -3 2;
1807 rel2.offset: -3 -3;
1808 }
1809 description { state: "disabled_visible" 0.0;
1810 inherit: "default" 0.0;
1811 rel1.offset: -3 2;
1812 rel2.offset: -3 -3;
1813 color: 255 255 255 64;
1814 }
1815 }
1816 part { name: "elm.units"; type: TEXT; mouse_events: 0;
1817 effect: SHADOW BOTTOM;
1818 scale: 1;
1819 description { state: "default" 0.0;
1820 visible: 0;
1821 fixed: 1 1;
1822 rel1.to_x: "limits";
1823 rel2.to_x: "limits";
1824 color: FN_COL_DEFAULT;
1825 color_class: "slider_text";
1826 text { font: FN; size: 10;
1827 text_class: "slider";
1828 align: 1.0 0.5;
1829 min: 1 1;
1830 ellipsis: -1;
1831 }
1832 }
1833 description { state: "visible" 0.0;
1834 inherit: "default" 0.0;
1835 visible: 1;
1836 }
1837 description { state: "disabled_visible" 0.0;
1838 inherit: "visible" 0.0;
1839 color_class: "slider_text_disabled";
1840 color3: 255 255 255 255;
1841 }
1842 }
1843 part { name: "button"; type: GROUP; mouse_events: 0;
1844 source: "efl/slider_interval/horizontal/indicator";
1845 description { state: "default" 0.0;
1846 fixed: 1 1;
1847 rel1.to: "elm.dragable.slider";
1848 rel2.to: "elm.dragable.slider";
1849 }
1850 description { state: "hidden" 0.0;
1851 inherit: "default" 0.0;
1852 visible: 0;
1853 }
1854 }
1855 part { name: "elm.dragable.slider"; type: RECT;
1856 scale: 1;
1857 dragable.x: 1 1 0;
1858 dragable.y: 0 0 0;
1859 dragable.confine: "elm.swallow.bar";
1860 description { state: "default" 0.0;
1861 color: 0 0 0 0;
1862 min: 16 16;
1863 max: 16 16;
1864 fixed: 1 1;
1865 rel1.relative: 0.5 0.0;
1866 rel1.to_x: "elm.swallow.bar";
1867 rel2.relative: 0.5 1.0;
1868 rel2.to_x: "elm.swallow.bar";
1869 }
1870 }
1871 part { name: "knob";
1872 description { state: "default" 0.0;
1873 image.normal: "knob";
1874 fixed: 1 1;
1875 min: 12 12;
1876 step: 2 2;
1877 max: 32 32; // XXX allow bigger sizes with more knob images
1878 rel1.to: "elm.dragable.slider";
1879 rel1.offset: -4 -4;
1880 rel2.to: "elm.dragable.slider";
1881 rel2.offset: 3 3;
1882 }
1883 description { state: "clicked" 0.0;
1884 inherit: "default" 0.0;
1885 }
1886 }
1887 part { name: "slideevent"; type: RECT; repeat_events: 1;
1888 scale: 1;
1889 ignore_flags: ON_HOLD;
1890 dragable.events: "elm.dragable.slider";
1891 description { state: "default" 0.0;
1892 fixed: 1 1;
1893 rel1.to: "elm.dragable.slider";
1894 rel2.to: "elm.dragable.slider";
1895 color: 0 0 0 0;
1896 }
55 } 1897 }
56 part { "button"; 1898 part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
1899 description { state: "default" 0.0;
1900 max: 0 0;
1901 rel1.to: "elm.dragable.slider";
1902 rel2.to: "elm.dragable.slider";
1903 }
1904 }
1905 part { name: "button2"; type: GROUP; mouse_events: 0;
57 source: "efl/slider_interval/horizontal/indicator"; 1906 source: "efl/slider_interval/horizontal/indicator";
1907 description { state: "default" 0.0;
1908 fixed: 1 1;
1909 rel1.to: "elm.dragable2.slider";
1910 rel2.to: "elm.dragable2.slider";
1911 visible: 0;
1912 }
1913 description { state: "show" 0.0;
1914 inherit: "default" 0.0;
1915 visible: 1;
1916 }
1917 description { state: "hidden" 0.0;
1918 inherit: "default" 0.0;
1919 visible: 0;
1920 }
1921 }
1922 part { name: "elm.dragable2.slider"; type: RECT;
1923 scale: 1;
1924 dragable.x: 1 1 0;
1925 dragable.y: 0 0 0;
1926 dragable.confine: "elm.swallow.bar";
1927 description { state: "default" 0.0;
1928 color: 0 0 0 0;
1929 min: 16 16;
1930 max: 16 16;
1931 fixed: 1 1;
1932 rel1.relative: 0.5 0.0;
1933 rel1.to_x: "elm.swallow.bar";
1934 rel2.relative: 0.5 1.0;
1935 rel2.to_x: "elm.swallow.bar";
1936 visible: 0;
1937 }
1938 description { state: "show" 0.0;
1939 inherit: "default" 0.0;
1940 visible: 1;
1941 }
1942 }
1943 part { name: "knob2";
1944 description { state: "default" 0.0;
1945 image.normal: "knob";
1946 fixed: 1 1;
1947 min: 12 12;
1948 step: 2 2;
1949 max: 32 32; // XXX allow bigger sizes with more knob images
1950 rel1.to: "elm.dragable2.slider";
1951 rel1.offset: -4 -4;
1952 rel2.to: "elm.dragable2.slider";
1953 rel2.offset: 3 3;
1954 visible: 0;
1955 }
1956 description { state: "show" 0.0;
1957 inherit: "default" 0.0;
1958 visible: 1;
1959 }
1960 description { state: "clicked" 0.0;
1961 inherit: "default" 0.0;
1962 }
1963 }
1964 part { name: "slideevent2"; type: RECT; repeat_events: 1;
1965 scale: 1;
1966 ignore_flags: ON_HOLD;
1967 dragable.events: "elm.dragable2.slider";
1968 description { state: "default" 0.0;
1969 fixed: 1 1;
1970 rel1.to: "elm.dragable2.slider";
1971 rel2.to: "elm.dragable2.slider";
1972 color: 0 0 0 0;
1973 visible: 0;
1974 }
1975 description { state: "show" 0.0;
1976 inherit: "default" 0.0;
1977 visible: 1;
1978 }
1979 }
1980 part { name: "elm.track2.slider"; type: SWALLOW; mouse_events: 0;
1981 description { state: "default" 0.0;
1982 max: 0 0;
1983 rel1.to: "elm.dragable2.slider";
1984 rel2.to: "elm.dragable2.slider";
1985 visible: 0;
1986 }
1987 description { state: "show" 0.0;
1988 inherit: "default" 0.0;
1989 visible: 1;
1990 }
1991 }
1992 part { name: "event"; type: RECT;
1993 description { state: "default" 0.0;
1994 color: 0 0 0 0;
1995 visible: 0;
1996 }
1997 description { state: "disabled" 0.0;
1998 inherit: "default" 0.0;
1999 visible: 1;
2000 }
2001 }
2002 }
2003 programs {
2004 program {
2005 signal: "mouse,down,1"; source: "elm.dragable.slider";
2006 action: STATE_SET "clicked" 0.0;
2007 target: "knob";
2008 }
2009 program {
2010 signal: "mouse,up,1"; source: "elm.dragable.slider";
2011 action: STATE_SET "default" 0.0;
2012 target: "knob";
2013 }
2014 program {
2015 signal: "elm,slider,range,enable";
2016 source: "elm";
2017 script {
2018 set_int(range, 1);
2019 set_state(PART:"button2", "show", 0.0);
2020 set_state(PART:"elm.dragable2.slider", "show", 0.0);
2021 set_state(PART:"knob2", "show", 0.0);
2022 set_state(PART:"slideevent2", "show", 0.0);
2023 set_state(PART:"elm.track2.slider", "show", 0.0);
2024 update_glow();
2025 new m = get_int(slmode);
2026 eval_mode(m);
2027 }
2028 }
2029 program {
2030 signal: "elm,slider,range,disable";
2031 source: "elm";
2032 script {
2033 set_int(range, 0);
2034 set_state(PART:"button2", "default", 0.0);
2035 set_state(PART:"elm.dragable2.slider", "default", 0.0);
2036 set_state(PART:"knob2", "default", 0.0);
2037 set_state(PART:"slideevent2", "default", 0.0);
2038 set_state(PART:"elm.track2.slider", "default", 0.0);
2039 set_state(PART:"glow", "default", 0.0);
2040 new m = get_int(slmode);
2041 eval_mode(m);
2042 }
2043 }
2044 program {
2045 signal: "drag";
2046 source: "elm.dragable*";
2047 script {
2048 new r;
2049 r = get_int(range);
2050 if (r)
2051 update_glow();
2052 }
2053 }
2054 program {
2055 signal: "elm,state,indicator,show"; source: "elm";
2056 action: SIGNAL_EMIT "elm,popup,show" "elm";
2057 after: "popup_show2";
2058 }
2059 program {
2060 signal: "elm,state,indicator,hide"; source: "elm";
2061 action: SIGNAL_EMIT "elm,popup,hide" "elm";
2062 after: "popup_hide2";
2063 }
2064 program {
2065 signal: "mouse,down,1"; source: "slideevent";
2066 action: SIGNAL_EMIT "elm,popup,show" "elm";
2067 after: "popup_show2";
2068 }
2069 program { name: "popup_show2";
2070 action: STATE_SET "hidden" 0.0;
2071 target: "button";
2072 }
2073 program {
2074 signal: "mouse,up,1"; source: "slideevent";
2075 action: SIGNAL_EMIT "elm,popup,hide" "elm";
2076 after: "popup_hide2";
2077 }
2078 program { name: "popup_hide2";
2079 action: STATE_SET "default" 0.0;
2080 target: "button";
2081 }
2082 program {
2083 signal: "mouse,down,1"; source: "slideevent2";
2084 action: SIGNAL_EMIT "elm,popup,show" "elm";
2085 after: "popup2_show2";
2086 }
2087 program { name: "popup2_show2";
2088 action: STATE_SET "show" 0.0;
2089 target: "button2";
2090 }
2091 program {
2092 signal: "mouse,up,1"; source: "slideevent2";
2093 action: SIGNAL_EMIT "elm,popup,hide" "elm";
2094 after: "popup2_hide2";
2095 }
2096 program { name: "popup2_hide2";
2097 action: STATE_SET "hidden" 0.0;
2098 target: "button2";
2099 }
2100 program {
2101 signal: "elm,state,elm.text,set"; source: "elm";
2102 script {
2103 new m = get_int(slmode);
2104 m |= LABEL; set_int(slmode, m);
2105 eval_mode(m);
2106 }
2107 }
2108 program {
2109 signal: "elm,state,elm.text,unset"; source: "elm";
2110 script {
2111 new m = get_int(slmode);
2112 m &= ~LABEL; set_int(slmode, m);
2113 eval_mode(m);
2114 }
2115 }
2116 program {
2117 signal: "elm,state,icon,set"; source: "elm";
2118 script {
2119 new m = get_int(slmode);
2120 m |= ICON; set_int(slmode, m);
2121 eval_mode(m);
2122 }
2123 }
2124 program {
2125 signal: "elm,state,icon,unset"; source: "elm";
2126 script {
2127 new m = get_int(slmode);
2128 m &= ~ICON; set_int(slmode, m);
2129 eval_mode(m);
2130 }
2131 }
2132 program { name: "end_show";
2133 signal: "elm,state,end,visible"; source: "elm";
2134 script {
2135 new m = get_int(slmode);
2136 m |= END; set_int(slmode, m);
2137 eval_mode(m);
2138 }
2139 }
2140 program { name: "end_hide";
2141 signal: "elm,state,end,hidden"; source: "elm";
2142 script {
2143 new m = get_int(slmode);
2144 m &= ~END; set_int(slmode, m);
2145 eval_mode(m);
2146 }
2147 }
2148 program {
2149 signal: "elm,state,units,visible"; source: "elm";
2150 script {
2151 new m = get_int(slmode);
2152 m |= UNITS; set_int(slmode, m);
2153 eval_mode(m);
2154 }
2155 }
2156 program {
2157 signal: "elm,state,units,visible"; source: "elm";
2158 action: SIGNAL_EMIT "limits,visible" "elm";
2159 target: "limits";
2160 }
2161 program {
2162 signal: "elm,state,units,hidden"; source: "elm";
2163 action: STATE_SET "default" 0.0;
2164 script {
2165 new m = get_int(slmode);
2166 m &= ~UNITS; set_int(slmode, m);
2167 eval_mode(m);
2168 }
2169 }
2170 program {
2171 signal: "elm,state,units,hidden"; source: "elm";
2172 action: SIGNAL_EMIT "limits,hide" "elm";
2173 target: "limits";
2174 }
2175 program {
2176 signal: "elm,state,inverted,on"; source: "elm";
2177 script {
2178 new m = get_int(slmode);
2179 m |= INVERT; set_int(slmode, m);
2180 eval_mode(m);
2181 }
2182 }
2183 program {
2184 signal: "elm,state,inverted,off"; source: "elm";
2185 script {
2186 new m = get_int(slmode);
2187 m &= ~INVERT; set_int(slmode, m);
2188 eval_mode(m);
2189 }
2190 }
2191 program {
2192 signal: "elm,state,disabled"; source: "elm";
2193 script {
2194 new m = get_int(slmode);
2195 m |= DISABLE; set_int(slmode, m);
2196 eval_mode(m);
2197 }
2198 }
2199 program {
2200 signal: "elm,state,enabled"; source: "elm";
2201 script {
2202 new m = get_int(slmode);
2203 m &= ~DISABLE; set_int(slmode, m);
2204 eval_mode(m);
2205 }
58 } 2206 }
59 } 2207 }
2208#undef ICON
2209#undef LABEL
2210#undef END
2211#undef UNITS
2212#undef MASK
2213#undef INVERT
2214#undef DISABLE
60} 2215}
61 2216
62group { "efl/slider_interval/vertical"; 2217group { "efl/slider_interval/vertical";
63 inherit: "elm/slider/range/vertical/default";
64 alias: "efl/slider/vertical:disabled"; 2218 alias: "efl/slider/vertical:disabled";
2219 images.image: "slider_run_base_vert.png" COMP;
2220 images.image: "slider_run_bevel_vert.png" COMP;
2221 images.image: "slider_run_base_light_vert.png" COMP;
2222 images.image: "vert_glow_run.png" COMP;
2223 images.image: "vert_glow_range.png" COMP;
2224 images.image: "vert_glow_run_rev.png" COMP;
2225 images.image: "knob_round_small_normal.png" COMP;
2226 images.image: "knob_round_small_selected.png" COMP;
2227 set { name: "knob";
2228 // XXX: add more sizes (at least up to 128x128)
2229 image { image: "knob_sz_24.png" COMP; size: 31 31 32 32; }
2230 image { image: "knob_sz_22.png" COMP; size: 29 29 30 30; }
2231 image { image: "knob_sz_20.png" COMP; size: 27 27 28 28; }
2232 image { image: "knob_sz_18.png" COMP; size: 25 25 26 26; }
2233 image { image: "knob_sz_16.png" COMP; size: 23 23 24 24; }
2234 image { image: "knob_sz_14.png" COMP; size: 21 21 22 22; }
2235 image { image: "knob_sz_12.png" COMP; size: 19 19 20 20; }
2236 image { image: "knob_sz_10.png" COMP; size: 17 17 18 18; }
2237 image { image: "knob_sz_08.png" COMP; size: 15 15 16 16; }
2238 image { image: "knob_sz_06.png" COMP; size: 13 13 14 14; }
2239 image { image: "knob_sz_04.png" COMP; size: 0 0 12 12; }
2240 }
2241#define ICON 1
2242#define LABEL 2
2243#define END 4
2244#define UNITS 8
2245#define MASK 15
2246#define INVERT 16
2247#define DISABLE 32
2248 script {
2249 public slmode;
2250 public range;
2251 public g_timer_id;
2252 public update_glow()
2253 {
2254 new x1,y1,w1,h1;
2255 new x2,y2,w2,h2;
2256 get_geometry(PART:"knob", x1, y1, w1, h1);
2257 get_geometry(PART:"knob2", x2, y2, w2, h2);
2258 if(y2 < y1)
2259 set_state(PART:"glow", "range_reverse", 0.0);
2260 else
2261 set_state(PART:"glow", "range", 0.0);
2262 }
2263 public eval_mode(m) {
2264 new ic = m & ICON;
2265 new l = m & LABEL;
2266 new e = m & END;
2267 new u = m & UNITS;
2268 new d = m & DISABLE;
2269 new i = m & INVERT;
2270 new r = get_int(range);
2271 if (!r) {
2272 if (i) {
2273 if (!d) {
2274 set_state(PART:"base", "default", 0.0);
2275 set_state(PART:"glow", "inverted", 0.0);
2276 } else {
2277 set_state(PART:"base", "disabled", 0.0);
2278 set_state(PART:"glow", "disabled_inverted", 0.0);
2279 }
2280 } else {
2281 if (!d) {
2282 set_state(PART:"base", "default", 0.0);
2283 set_state(PART:"glow", "default", 0.0);
2284 } else {
2285 set_state(PART:"base", "disabled", 0.0);
2286 set_state(PART:"glow", "disabled", 0.0);
2287 }
2288 }
2289 } else if (d) {
2290 new x1,y1,w1,h1;
2291 new x2,y2,w2,h2;
2292 get_geometry(PART:"knob", x1, y1, w1, h1);
2293 get_geometry(PART:"knob2", x2, y2, w2, h2);
2294 set_state(PART:"base", "disabled", 0.0);
2295 if(y2 < y1)
2296 set_state(PART:"glow", "disabled_range_reverse", 0.0);
2297 else
2298 set_state(PART:"glow", "disabled_range", 0.0);
2299 }
2300 if (l) {
2301 if (!d) {
2302 set_state(PART:"elm.text", "visible", 0.0);
2303 } else {
2304 set_state(PART:"elm.text", "disabled_visible", 0.0);
2305 }
2306 } else {
2307 set_state(PART:"elm.text", "default", 0.0);
2308 }
2309 if (u) {
2310 if (!d) {
2311 set_state(PART:"elm.units", "visible", 0.0);
2312 set_state(PART:"limits", "visible", 0.0);
2313 } else {
2314 set_state(PART:"elm.units", "disabled_visible", 0.0);
2315 set_state(PART:"limits", "disabled_visible", 0.0);
2316 }
2317 } else {
2318 set_state(PART:"elm.units", "default", 0.0);
2319 set_state(PART:"limits", "default", 0.0);
2320 }
2321 if (ic) {
2322 set_state(PART:"elm.swallow.icon", "visible", 0.0);
2323 set_state(PART:"sizer.content", "visible", 0.0);
2324 } else {
2325 set_state(PART:"elm.swallow.icon", "default", 0.0);
2326 set_state(PART:"sizer.content", "default", 0.0);
2327 }
2328 if (e) {
2329 set_state(PART:"elm.swallow.end", "visible", 0.0);
2330 set_state(PART:"sizer.content.end", "visible", 0.0);
2331 } else {
2332 set_state(PART:"elm.swallow.end", "default", 0.0);
2333 set_state(PART:"sizer.content.end", "default", 0.0);
2334 }
2335 if (!d) {
2336 set_state(PART:"event", "default", 0.0);
2337 set_state(PART:"dis_clip", "default", 0.0);
2338 } else {
2339 set_state(PART:"event", "disabled", 0.0);
2340 set_state(PART:"dis_clip", "disabled", 0.0);
2341 }
2342 }
2343 }
65 parts { 2344 parts {
66 part { "limits"; 2345 part { name: "elm.swallow.bar"; type: SWALLOW;
2346 scale: 1;
2347 description { state: "default" 0.0;
2348 min: 21 42;
2349 max: 21 99999;
2350 align: 0.5 1.0;
2351 rel1.to_y: "elm.text";
2352 rel1.relative: 0.0 1.0;
2353 rel1.offset: 0 2;
2354 rel2.to_y: "limits";
2355 rel2.relative: 1.0 0.0;
2356 rel2.offset: -1 -3;
2357 }
2358 }
2359 part { name: "base"; mouse_events: 0;
2360 description { state: "default" 0.0;
2361 rel1.to: "elm.swallow.bar";
2362 rel2.to: "elm.swallow.bar";
2363 image.normal: "slider_run_base_vert.png";
2364 image.border: 0 0 4 4;
2365 fill.smooth: 0;
2366 min: 5 8;
2367 max: 5 99999;
2368 fixed: 1 0;
2369 }
2370 description { state: "disabled" 0.0;
2371 inherit: "default" 0.0;
2372 image.normal: "slider_run_base_light_vert.png";
2373 }
2374 }
2375 part { name: "glow"; mouse_events: 0;
2376 description { state: "default" 0.0;
2377 image.normal: "vert_glow_run.png";
2378 rel1.offset: 1 1;
2379 rel1.to: "base";
2380 rel2.relative: 1.0 0.5;
2381 rel2.offset: -2 -1;
2382 rel2.to_y: "button";
2383 rel2.to_x: "base";
2384 image.border: 0 0 0 4;
2385 }
2386 description { state: "disabled" 0.0;
2387 inherit: "default" 0.0;
2388 color: 255 255 255 64;
2389 }
2390 description { state: "inverted" 0.0;
2391 image.normal: "vert_glow_run_rev.png";
2392 rel1.relative: 0.0 0.5;
2393 rel1.offset: 1 0;
2394 rel1.to_y: "button";
2395 rel1.to_x: "base";
2396 rel2.offset: -2 -2;
2397 rel2.to: "base";
2398 image.border: 0 0 4 0;
2399 }
2400 description { state: "range" 0.0;
2401 image.normal: "vert_glow_range.png";
2402 rel1.relative: 0.5 1.0;
2403 rel1.offset: -1 -2;
2404 rel1.to_x: "base";
2405 rel1.to_y: "button";
2406 rel2.relative: 0.5 1.0;
2407 rel2.offset: -1 -2;
2408 rel2.to_x: "base";
2409 rel2.to_y: "button2";
2410 fixed: 1 0;
2411 image.border: 0 4 0 0;
2412 }
2413 description { state: "disabled_range" 0.0;
2414 inherit: "range" 0.0;
2415 color: 255 255 255 64;
2416 }
2417 description { state: "range_reverse" 0.0;
2418 inherit: "range" 0.0;
2419 rel1.to_y: "button2";
2420 rel2.to_y: "button";
2421 }
2422 description { state: "disabled_range_reverse" 0.0;
2423 inherit: "range_reverse" 0.0;
2424 color: 255 255 255 64;
2425 }
2426 description { state: "disabled_inverted" 0.0;
2427 inherit: "inverted" 0.0;
2428 color: 255 255 255 64;
2429 }
2430 }
2431 part { name: "bevel"; mouse_events: 0;
2432 description { state: "default" 0.0;
2433 rel1.to: "base";
2434 rel2.to: "base";
2435 image.normal: "slider_run_bevel_vert.png";
2436 image.border: 0 0 5 5;
2437 fill.smooth: 0;
2438 }
2439 }
2440 part { name: "dis_clip"; type: RECT;
2441 description { state: "default" 0.0;
2442 rel1.to: "elm.swallow.icon";
2443 rel2.to: "elm.swallow.end";
2444 }
2445 description { state: "disabled" 0.0;
2446 inherit: "default" 0.0;
2447 color: 255 255 255 64;
2448 }
2449 }
2450 part { name: "elm.swallow.icon"; type: SWALLOW;
2451 clip_to: "dis_clip";
2452 required;
2453 description { state: "default" 0.0;
2454 visible: 0;
2455 align: 0.5 0.0;
2456 rel1.offset: 2 0;
2457 rel1.to_x: "elm.swallow.bar";
2458 rel2.offset: -3 -1;
2459 rel2.relative: 1.0 0.0;
2460 rel2.to_x: "elm.swallow.bar";
2461 fixed: 0 1;
2462 }
2463 description { state: "visible" 0.0;
2464 inherit: "default" 0.0;
2465 visible: 1;
2466 aspect: 1.0 1.0; aspect_preference: VERTICAL;
2467 rel1.offset: 2 2;
2468 rel2.offset: -3 2;
2469 }
2470 }
2471 part { name: "sizer.content"; type: TEXT; mouse_events: 0;
2472 scale: 1;
2473 description { state: "default" 0.0;
2474 fixed: 1 1;
2475 visible: 0;
2476 text { font: FN; size: 10;
2477 min: 0 0;
2478 text_class: "slider_text";
2479 }
2480 }
2481 description { state: "visible" 0.0;
2482 inherit: "default" 0.0;
2483 rel1.to: "elm.swallow.icon";
2484 rel2.to: "elm.swallow.icon";
2485 text {
2486 min: 1 1;
2487 ellipsis: -1;
2488 text: "M";
2489 }
2490 }
2491 }
2492 part { name: "elm.text"; type: TEXT; mouse_events: 0;
2493 effect: SHADOW BOTTOM;
2494 scale: 1;
2495 required;
2496 description { state: "default" 0.0;
2497 fixed: 0 1;
2498 align: 0.5 0.0;
2499 rel1.to_y: "elm.swallow.icon";
2500 rel1.relative: 0.0 1.0;
2501 rel1.offset: 2 -1;
2502 rel2.to_y: "elm.swallow.icon";
2503 rel2.relative: 1.0 1.0;
2504 rel2.offset: -3 -1;
2505 color: FN_COL_DEFAULT;
2506 color_class: "slider_text";
2507 text { font: FN; size: 10;
2508 text_class: "slider";
2509 min: 1 0;
2510 ellipsis: -1;
2511 align: 0.5 0.0;
2512 }
2513 visible: 0;
2514 }
2515 description { state: "visible" 0.0;
2516 inherit: "default" 0.0;
2517 visible: 1;
2518 rel1.offset: 2 2;
2519 rel2.offset: -3 2;
2520 text.min: 1 1;
2521 text.ellipsis: -1;
2522
2523 }
2524 description { state: "disabled_visible" 0.0;
2525 inherit: "visible" 0.0;
2526 color_class: "slider_text_disabled";
2527 color3: 255 255 255 255;
2528 }
2529 }
2530 part { name: "elm.swallow.end"; type: SWALLOW;
2531 clip_to: "dis_clip";
2532 description { state: "default" 0.0;
2533 visible: 0;
2534 align: 0.5 1.0;
2535 rel1.offset: 2 0;
2536 rel1.relative: 0.0 1.0;
2537 rel2.offset: -3 -1;
2538 fixed: 0 1;
2539 }
2540 description { state: "visible" 0.0;
2541 inherit: "default" 0.0;
2542 visible: 1;
2543 aspect: 1.0 1.0;
2544 aspect_preference: VERTICAL;
2545 rel2.offset: 2 -3;
2546 rel2.offset: -3 -3;
2547 }
2548 }
2549 part { name: "sizer.content.end"; type: TEXT; mouse_events: 0;
2550 scale: 1;
2551 description { state: "default" 0.0;
2552 fixed: 1 1;
2553 visible: 0;
2554 text { font: FN; size: 10;
2555 min: 0 0;
2556 text_class: "slider_text";
2557 }
2558 }
2559 description { state: "visible" 0.0;
2560 inherit: "default" 0.0;
2561 rel1.to: "elm.swallow.end";
2562 rel2.to: "elm.swallow.end";
2563 text {
2564 min: 1 1;
2565 ellipsis: -1;
2566 text: "M";
2567 }
2568 }
2569 }
2570 alias: "elm.units.min" "limits:elm.units.min";
2571 alias: "elm.units.max" "limits:elm.units.max";
2572 part { name: "limits"; type: GROUP; mouse_events: 0;
67 source: "efl/slider/hidden/limit"; 2573 source: "efl/slider/hidden/limit";
2574 scale: 1;
2575 description { state: "default" 0.0;
2576 align: 0.5 1.0;
2577 fixed: 1 1;
2578 max: 0 0;
2579 rel1.to_y: "elm.swallow.end";
2580 rel1.relative: 0.0 0.0;
2581 rel1.offset: 2 1;
2582 rel2.to_y: "elm.swallow.end";
2583 rel2.relative: 1.0 0.0;
2584 rel2.offset: -3 0;
2585 }
2586 description { state: "visible" 0.0;
2587 inherit: "default" 0.0;
2588 min: SOURCE;
2589 rel1.offset: 2 -3;
2590 rel2.offset: -3 -3;
2591 }
2592 description { state: "disabled_visible" 0.0;
2593 inherit: "default" 0.0;
2594 rel1.offset: -3 2;
2595 rel2.offset: -3 -3;
2596 color: 255 255 255 64;
2597 }
68 } 2598 }
69 part { "button"; 2599 part { name: "elm.units"; type: TEXT; mouse_events: 0;
2600 effect: SHADOW BOTTOM;
2601 scale: 1;
2602 description { state: "default" 0.0;
2603 visible: 0;
2604 fixed: 1 1;
2605 rel1.to_y: "limits";
2606 rel2.to_y: "limits";
2607 color: FN_COL_DEFAULT;
2608 color_class: "slider_text";
2609 text { font: FN; size: 10;
2610 text_class: "slider";
2611 min: 0 0;
2612 align: 0.5 1.0;
2613 ellipsis: -1;
2614 }
2615 }
2616 description { state: "visible" 0.0;
2617 inherit: "default" 0.0;
2618 visible: 1;
2619 text.min: 1 1;
2620 text.ellipsis: -1;
2621 }
2622 description { state: "disabled_visible" 0.0;
2623 inherit: "visible" 0.0;
2624 color_class: "slider_text_disabled";
2625 color3: 255 255 255 255;
2626 }
2627 }
2628 part { name: "button"; type: GROUP; mouse_events: 0;
2629 source: "efl/slider_interval/vertical/indicator";
2630 description { state: "default" 0.0;
2631 fixed: 1 1;
2632 rel1.to: "elm.dragable.slider";
2633 rel2.to: "elm.dragable.slider";
2634 }
2635 description { state: "hidden" 0.0;
2636 inherit: "default" 0.0;
2637 visible: 0;
2638 }
2639 }
2640 part { name: "elm.dragable.slider"; type: RECT;
2641 scale: 1;
2642 dragable.x: 0 0 0;
2643 dragable.y: 1 1 0;
2644 dragable.confine: "elm.swallow.bar";
2645 description { state: "default" 0.0;
2646 color: 0 0 0 0;
2647 min: 16 16;
2648 max: 16 16;
2649 fixed: 1 1;
2650 rel1.relative: 0.0 0.5;
2651 rel1.to_x: "elm.swallow.bar";
2652 rel2.relative: 1.0 0.5;
2653 rel2.to_x: "elm.swallow.bar";
2654 }
2655 }
2656 part { name: "knob";
2657 description { state: "default" 0.0;
2658 image.normal: "knob";
2659 fixed: 1 1;
2660 min: 12 12;
2661 step: 2 2;
2662 max: 32 32; // XXX allow bigger sizes with more knob images
2663 rel1.to: "elm.dragable.slider";
2664 rel1.offset: -4 -4;
2665 rel2.to: "elm.dragable.slider";
2666 rel2.offset: 3 3;
2667 }
2668 description { state: "clicked" 0.0;
2669 inherit: "default" 0.0;
2670 }
2671 }
2672 part { name: "slideevent"; type: RECT; repeat_events: 1;
2673 scale: 1;
2674 ignore_flags: ON_HOLD;
2675 dragable.events: "elm.dragable.slider";
2676 description { state: "default" 0.0;
2677 fixed: 1 1;
2678 rel1.to: "elm.dragable.slider";
2679 rel2.to: "elm.dragable.slider";
2680 color: 0 0 0 0;
2681 }
2682 }
2683 part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
2684 description { state: "default" 0.0;
2685 max: 0 0;
2686 rel1.to: "elm.dragable.slider";
2687 rel2.to: "elm.dragable.slider";
2688 }
2689 }
2690 part { name: "button2"; type: GROUP; mouse_events: 0;
70 source: "efl/slider_interval/vertical/indicator"; 2691 source: "efl/slider_interval/vertical/indicator";
2692 description { state: "default" 0.0;
2693 fixed: 1 1;
2694 rel1.to: "elm.dragable2.slider";
2695 rel2.to: "elm.dragable2.slider";
2696 visible: 0;
2697 }
2698 description { state: "hidden" 0.0;
2699 inherit: "default" 0.0;
2700 visible: 0;
2701 }
2702 description { state: "show" 0.0;
2703 inherit: "default" 0.0;
2704 visible: 1;
2705 }
2706 }
2707 part { name: "elm.dragable2.slider"; type: RECT;
2708 scale: 1;
2709 dragable.x: 0 0 0;
2710 dragable.y: 1 1 0;
2711 dragable.confine: "elm.swallow.bar";
2712 description { state: "default" 0.0;
2713 color: 0 0 0 0;
2714 min: 16 16;
2715 max: 16 16;
2716 fixed: 1 1;
2717 rel1.relative: 0.0 0.5;
2718 rel1.to_x: "elm.swallow.bar";
2719 rel2.relative: 1.0 0.5;
2720 rel2.to_x: "elm.swallow.bar";
2721 visible: 0;
2722 }
2723 description { state: "show" 0.0;
2724 inherit: "default" 0.0;
2725 visible: 1;
2726 }
2727 }
2728 part { name: "knob2";
2729 description { state: "default" 0.0;
2730 image.normal: "knob";
2731 fixed: 1 1;
2732 min: 12 12;
2733 step: 2 2;
2734 max: 32 32; // XXX allow bigger sizes with more knob images
2735 rel1.to: "elm.dragable2.slider";
2736 rel1.offset: -4 -4;
2737 rel2.to: "elm.dragable2.slider";
2738 rel2.offset: 3 3;
2739 visible: 0;
2740 }
2741 description { state: "show" 0.0;
2742 inherit: "default" 0.0;
2743 visible: 1;
2744 }
2745 description { state: "clicked" 0.0;
2746 inherit: "default" 0.0;
2747 }
2748 }
2749 part { name: "slideevent2"; type: RECT; repeat_events: 1;
2750 scale: 1;
2751 ignore_flags: ON_HOLD;
2752 dragable.events: "elm.dragable2.slider";
2753 description { state: "default" 0.0;
2754 fixed: 1 1;
2755 rel1.to: "elm.dragable2.slider";
2756 rel2.to: "elm.dragable2.slider";
2757 color: 0 0 0 0;
2758 visible: 0;
2759 }
2760 description { state: "show" 0.0;
2761 inherit: "default" 0.0;
2762 visible: 1;
2763 }
2764 }
2765 part { name: "elm.track2.slider"; type: SWALLOW; mouse_events: 0;
2766 description { state: "default" 0.0;
2767 max: 0 0;
2768 rel1.to: "elm.dragable2.slider";
2769 rel2.to: "elm.dragable2.slider";
2770 visible: 0;
2771 }
2772 description { state: "show" 0.0;
2773 inherit: "default" 0.0;
2774 visible: 1;
2775 }
2776 }
2777 part { name: "event"; type: RECT;
2778 description { state: "default" 0.0;
2779 color: 0 0 0 0;
2780 visible: 0;
2781 }
2782 description { state: "disabled" 0.0;
2783 inherit: "default" 0.0;
2784 visible: 1;
2785 }
2786 }
2787 }
2788 programs {
2789 program {
2790 signal: "mouse,down,1"; source: "elm.dragable.slider";
2791 action: STATE_SET "clicked" 0.0;
2792 target: "knob";
2793 }
2794 program {
2795 signal: "mouse,up,1"; source: "elm.dragable.slider";
2796 action: STATE_SET "default" 0.0;
2797 target: "knob";
2798 }
2799 program {
2800 signal: "elm,slider,range,enable";
2801 source: "elm";
2802 script {
2803 set_int(range, 1);
2804 set_state(PART:"button2", "show", 0.0);
2805 set_state(PART:"elm.dragable2.slider", "show", 0.0);
2806 set_state(PART:"knob2", "show", 0.0);
2807 set_state(PART:"slideevent2", "show", 0.0);
2808 set_state(PART:"elm.track2.slider", "show", 0.0);
2809 update_glow();
2810 new m = get_int(slmode);
2811 eval_mode(m);
2812 }
2813 }
2814 program {
2815 signal: "elm,slider,range,disable";
2816 source: "elm";
2817 script {
2818 set_int(range, 0);
2819 set_state(PART:"button2", "default", 0.0);
2820 set_state(PART:"elm.dragable2.slider", "default", 0.0);
2821 set_state(PART:"knob2", "default", 0.0);
2822 set_state(PART:"slideevent2", "default", 0.0);
2823 set_state(PART:"elm.track2.slider", "default", 0.0);
2824 set_state(PART:"glow", "default", 0.0);
2825 new m = get_int(slmode);
2826 eval_mode(m);
2827 }
2828 }
2829 program {
2830 signal: "drag";
2831 source: "elm.dragable*";
2832 script {
2833 new r;
2834 r = get_int(range);
2835 if (r)
2836 update_glow();
2837 }
2838 }
2839 program {
2840 signal: "elm,state,indicator,show"; source: "elm";
2841 action: SIGNAL_EMIT "elm,popup,show" "elm";
2842 after: "popup_show2";
2843 }
2844 program {
2845 signal: "elm,state,indicator,hide"; source: "elm";
2846 action: SIGNAL_EMIT "elm,popup,hide" "elm";
2847 after: "popup_hide2";
2848 }
2849 program {
2850 signal: "mouse,down,1"; source: "slideevent";
2851 action: SIGNAL_EMIT "elm,popup,show" "elm";
2852 after: "popup_show2";
2853 }
2854 program { name: "popup_show2";
2855 action: STATE_SET "hidden" 0.0;
2856 target: "button";
2857 }
2858 program {
2859 signal: "mouse,up,1"; source: "slideevent";
2860 action: SIGNAL_EMIT "elm,popup,hide" "elm";
2861 after: "popup_hide2";
2862 }
2863 program { name: "popup_hide2";
2864 action: STATE_SET "default" 0.0;
2865 target: "button";
2866 }
2867 program {
2868 signal: "mouse,down,1"; source: "slideevent2";
2869 action: SIGNAL_EMIT "elm,popup,show" "elm";
2870 after: "popup2_show2";
2871 }
2872 program { name: "popup2_show2";
2873 action: STATE_SET "show" 0.0;
2874 target: "button2";
2875 }
2876 program {
2877 signal: "mouse,up,1"; source: "slideevent2";
2878 action: SIGNAL_EMIT "elm,popup,hide" "elm";
2879 after: "popup2_hide2";
2880 }
2881 program { name: "popup2_hide2";
2882 action: STATE_SET "hidden" 0.0;
2883 target: "button2";
2884 }
2885 program {
2886 signal: "elm,state,elm.text,set"; source: "elm";
2887 script {
2888 new m = get_int(slmode);
2889 m |= LABEL; set_int(slmode, m);
2890 eval_mode(m);
2891 }
2892 }
2893 program {
2894 signal: "elm,state,elm.text,unset"; source: "elm";
2895 script {
2896 new m = get_int(slmode);
2897 m &= ~LABEL; set_int(slmode, m);
2898 eval_mode(m);
2899 }
2900 }
2901 program {
2902 signal: "elm,state,icon,set"; source: "elm";
2903 script {
2904 new m = get_int(slmode);
2905 m |= ICON; set_int(slmode, m);
2906 eval_mode(m);
2907 }
2908 }
2909 program {
2910 signal: "elm,state,icon,unset"; source: "elm";
2911 script {
2912 new m = get_int(slmode);
2913 m &= ~ICON; set_int(slmode, m);
2914 eval_mode(m);
2915 }
2916 }
2917 program { name: "end_show";
2918 signal: "elm,state,end,visible"; source: "elm";
2919 script {
2920 new m = get_int(slmode);
2921 m |= END; set_int(slmode, m);
2922 eval_mode(m);
2923 }
2924 }
2925 program { name: "end_hide";
2926 signal: "elm,state,end,hidden"; source: "elm";
2927 script {
2928 new m = get_int(slmode);
2929 m &= ~END; set_int(slmode, m);
2930 eval_mode(m);
2931 }
2932 }
2933 program {
2934 signal: "elm,state,units,visible"; source: "elm";
2935 script {
2936 new m = get_int(slmode);
2937 m |= UNITS; set_int(slmode, m);
2938 eval_mode(m);
2939 }
2940 }
2941 program {
2942 signal: "elm,state,units,visible"; source: "elm";
2943 action: SIGNAL_EMIT "limits:limits,visible" "elm";
2944 }
2945 program {
2946 signal: "elm,state,units,hidden"; source: "elm";
2947 action: STATE_SET "default" 0.0;
2948 script {
2949 new m = get_int(slmode);
2950 m &= ~UNITS; set_int(slmode, m);
2951 eval_mode(m);
2952 }
2953 }
2954 program {
2955 signal: "elm,state,units,hidden"; source: "elm";
2956 action: SIGNAL_EMIT "limits:limits,hide" "elm";
2957 }
2958 program {
2959 signal: "elm,state,inverted,on"; source: "elm";
2960 script {
2961 new m = get_int(slmode);
2962 m |= INVERT; set_int(slmode, m);
2963 eval_mode(m);
2964 }
2965 }
2966 program {
2967 signal: "elm,state,inverted,off"; source: "elm";
2968 script {
2969 new m = get_int(slmode);
2970 m &= ~INVERT; set_int(slmode, m);
2971 eval_mode(m);
2972 }
2973 }
2974 program {
2975 signal: "elm,state,disabled"; source: "elm";
2976 script {
2977 new m = get_int(slmode);
2978 m |= DISABLE; set_int(slmode, m);
2979 eval_mode(m);
2980 }
2981 }
2982 program {
2983 signal: "elm,state,enabled"; source: "elm";
2984 script {
2985 new m = get_int(slmode);
2986 m &= ~DISABLE; set_int(slmode, m);
2987 eval_mode(m);
2988 }
71 } 2989 }
72 } 2990 }
2991#undef ICON
2992#undef LABEL
2993#undef END
2994#undef UNITS
2995#undef MASK
2996#undef INVERT
2997#undef DISABLE
73} 2998}
diff --git a/src/bin/elementary/test_ui_slider.c b/src/bin/elementary/test_ui_slider.c
index 8fe7047778..a47fa09675 100644
--- a/src/bin/elementary/test_ui_slider.c
+++ b/src/bin/elementary/test_ui_slider.c
@@ -29,8 +29,9 @@ _slider_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
29void 29void
30test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 30test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
31{ 31{
32 Eo *win, *bx, *hbx; 32 Eo *win, *bx, *hbx, *ic;
33 double step; 33 double step;
34 char buf[PATH_MAX];
34 35
35 win = efl_add(EFL_UI_WIN_CLASS, NULL, 36 win = efl_add(EFL_UI_WIN_CLASS, NULL,
36 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 37 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
@@ -40,8 +41,13 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
40 bx = efl_add(EFL_UI_BOX_CLASS, win, 41 bx = efl_add(EFL_UI_BOX_CLASS, win,
41 efl_content_set(win, efl_added)); 42 efl_content_set(win, efl_added));
42 43
44 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
45 ic = efl_add(EFL_UI_IMAGE_CLASS, win,
46 efl_file_set(efl_added, buf, NULL));
47
43 efl_add(EFL_UI_SLIDER_CLASS, bx, 48 efl_add(EFL_UI_SLIDER_CLASS, bx,
44 efl_text_set(efl_added, "Horizontal"), 49 efl_text_set(efl_added, "Horizontal"),
50 efl_content_set(efl_added, ic),
45 efl_ui_slider_part_indicator_visible_mode_set(efl_part(efl_added, "indicator"), 51 efl_ui_slider_part_indicator_visible_mode_set(efl_part(efl_added, "indicator"),
46 EFL_UI_SLIDER_INDICATOR_VISIBLE_MODE_NONE), 52 EFL_UI_SLIDER_INDICATOR_VISIBLE_MODE_NONE),
47 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(160, 0)), 53 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(160, 0)),