Elementary theme: Split default.edc to a file per widget.
[framework/uifw/elementary.git] / data / themes / widgets / ctxpopup.edc
1    group { name: "elm/scroller/base/ctxpopup";
2       data {
3          item: "focus_highlight" "on";
4       }
5       script {
6          public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
7          public timer0(val) {
8             new v;
9             v = get_int(sbvis_v);
10             if (v) {
11                v = get_int(sbalways_v);
12                if(!v) {
13                   emit("do-hide-vbar", "");
14                   set_int(sbvis_v, 0);
15                }
16             }
17             v = get_int(sbvis_h);
18             if (v) {
19                v = get_int(sbalways_h);
20                if(!v) {
21                   emit("do-hide-hbar", "");
22                   set_int(sbvis_h, 0);
23                }
24             }
25             set_int(sbvis_timer, 0);
26             return 0;
27          }
28       }
29       images {
30          image: "bt_sm_base2.png" COMP;
31          image: "bt_sm_shine.png" COMP;
32          image: "bt_sm_hilight.png" COMP;
33          image: "sl_bt2_2.png" COMP;
34       }
35       parts {
36          part { name: "clipper";
37             type: RECT;
38             mouse_events: 0;
39             scale: 1;
40             description { state: "default" 0.0;
41             }
42          }
43          part { name: "elm.swallow.content";
44             clip_to: "clipper";
45             type: SWALLOW;
46             scale: 1;
47             description { state: "default" 0.0;
48                align: 0.5 0.5;
49             }
50          }
51          part { name: "focus_highlight";
52             mouse_events: 0;
53             description { state: "default" 0.0;
54                rel1.offset: -1 -1;
55                rel2.offset: 0 0;
56                image { normal: "sl_bt2_2.png";
57                   border: 7 7 7 7;
58                   middle: 0;
59                }
60                fill.smooth : 0;
61                color: 200 155 0 0;
62             }
63             description { state: "enabled" 0.0;
64                inherit: "default" 0.0;
65                color: 200 155 0 255;
66             }
67          }
68          part { name: "sb_vbar_clip_master";
69             type: RECT;
70             mouse_events: 0;
71             description { state: "default" 0.0;
72             }
73             description { state: "hidden" 0.0;
74                visible: 0;
75                color: 255 255 255 0;
76             }
77          }
78          part { name: "sb_vbar_clip";
79             clip_to:"sb_vbar_clip_master";
80             type: RECT;
81             mouse_events: 0;
82             scale: 1;
83             description { state: "default" 0.0;
84                align: 0.0 0.0;
85                rel2{ to:"clipper"; relative: 1.0 1.0; }
86             }
87             description { state: "hidden" 0.0;
88                visible: 0;
89                color: 255 255 255 0;
90             }
91          }
92          part { name: "sb_vbar";
93             type: RECT;
94             mouse_events: 0;
95             scale: 1;
96             description { state: "default" 0.0;
97                fixed: 1 1;
98                visible: 0;
99                align: 1.0 0.0;
100                rel1{ to:"clipper"; relative: 1.0 0.0; }
101                rel2{ to:"clipper"; relative: 1.0 1.0; }
102             }
103          }
104          part { name: "elm.dragable.vbar";
105             clip_to: "sb_vbar_clip";
106             mouse_events: 0;
107             scale: 1;
108             dragable {
109                x: 0 0 0;
110                y: 1 1 0;
111                confine: "sb_vbar";
112             }
113             description { state: "default" 0.0;
114                fixed: 1 1;
115                min: 10 17;
116                max: 10 99999;
117                rel1 { relative: 0.5 0.5; to: "sb_vbar"; }
118                rel2 { relative: 0.5  0.5; to: "sb_vbar"; }
119                image { normal: "bt_sm_base2.png";
120                   border: 6 6 6 6;
121                   middle: SOLID;
122                }
123             }
124          }
125          part { name: "sb_vbar_over1";
126             clip_to: "sb_vbar_clip";
127             mouse_events: 0;
128             description { state: "default" 0.0;
129                rel1.to: "elm.dragable.vbar";
130                rel2.relative: 1.0 0.5;
131                rel2.to: "elm.dragable.vbar";
132                image { normal: "bt_sm_hilight.png";
133                   border: 6 6 6 0;
134                }
135             }
136          }
137          part { name: "sb_vbar_over2";
138             clip_to: "sb_vbar_clip";
139             mouse_events: 0;
140             description { state: "default" 0.0;
141                rel1.to: "elm.dragable.vbar";
142                rel2.to: "elm.dragable.vbar";
143                image { normal: "bt_sm_shine.png";
144                   border: 6 6 6 0;
145                }
146             }
147          }
148          part { name: "sb_hbar_clip_master";
149             type: RECT;
150             mouse_events: 0;
151             description { state: "default" 0.0;
152             }
153             description { state: "hidden" 0.0;
154                visible: 0;
155                color: 255 255 255 0;
156             }
157          }
158          part { name: "sb_hbar_clip";
159             clip_to: "sb_hbar_clip_master";
160             type: RECT;
161             mouse_events: 0;
162             scale: 1;
163             description { state: "default" 0.0;
164                align: 0.0 0.0;
165                rel2{ to:"clipper"; relative: 1.0 1.0; }
166             }
167             description { state: "hidden" 0.0;
168                visible: 0;
169                color: 255 255 255 0;
170             }
171          }
172          part { name: "sb_hbar";
173             type: RECT;
174             mouse_events: 0;
175             scale: 1;
176             description { state: "default" 0.0;
177                fixed: 1 1;
178                visible: 0;
179                align: 0.0 1.0;
180                rel1 { to:"clipper"; relative: 0.0 1.0; }
181                rel2 { to:"clipper"; relative: 1.0 1.0; }
182             }
183          }
184          part { name: "elm.dragable.hbar";
185             clip_to: "sb_hbar_clip";
186             mouse_events: 0;
187             scale: 1;
188             dragable {
189                x: 1 1 0;
190                y: 0 0 0;
191                confine: "sb_hbar";
192             }
193             description { state: "default" 0.0;
194                min: 17 10;
195                max: 99999 10;
196                fixed: 1 1;
197                rel1 { relative: 0.5  0.5; to: "sb_hbar"; }
198                rel2 { relative: 0.5  0.5; to: "sb_hbar"; }
199                image { normal: "bt_sm_base2.png";
200                   border: 4 4 4 4;
201                   middle: SOLID;
202                }
203             }
204          }
205          part { name: "sb_hbar_over1";
206             clip_to: "sb_hbar_clip";
207             mouse_events: 0;
208             description { state: "default" 0.0;
209                rel1.to: "elm.dragable.hbar";
210                rel2.relative: 1.0 0.5;
211                rel2.to: "elm.dragable.hbar";
212                image { normal: "bt_sm_hilight.png";
213                   border: 6 6 6 0;
214                }
215             }
216          }
217          part { name: "sb_hbar_over2";
218             clip_to: "sb_hbar_clip";
219             mouse_events: 0;
220             description { state: "default" 0.0;
221                rel1.to: "elm.dragable.hbar";
222                rel2.to: "elm.dragable.hbar";
223                image { normal: "bt_sm_shine.png";
224                   border: 6 6 6 0;
225                }
226             }
227          }
228       }
229       programs {
230          program { name: "load";
231             signal: "load";
232             source: "";
233             script {
234                set_state(PART:"sb_vbar_clip", "hidden", 0.0);
235                set_state(PART:"sb_hbar_clip", "hidden", 0.0);
236                set_int(sbvis_v, 0);
237                set_int(sbvis_h, 0);
238                set_int(sbalways_v, 0);
239                set_int(sbalways_h, 0);
240                set_int(sbvis_timer, 0);
241             }
242          }
243          program { name: "vbar_show";
244             signal: "elm,action,show,vbar";
245             source: "elm";
246             action: STATE_SET "default" 0.0;
247             target: "sb_vbar_clip_master";
248          }
249          program { name: "vbar_hide";
250             signal: "elm,action,hide,vbar";
251             source: "elm";
252             action:  STATE_SET "hidden" 0.0;
253             target: "sb_vbar_clip_master";
254          }
255          program { name: "vbar_show_always";
256             signal: "elm,action,show_always,vbar";
257             source: "elm";
258             script {
259                new v;
260                v = get_int(sbvis_v);
261                v |= get_int(sbalways_v);
262                if (!v) {
263                   set_int(sbalways_v, 1);
264                   emit("do-show-vbar", "");
265                   set_int(sbvis_v, 1);
266                }
267             }
268          }
269          program { name: "vbar_show_notalways";
270             signal: "elm,action,show_notalways,vbar";
271             source: "elm";
272             script {
273                new v;
274                v = get_int(sbalways_v);
275                if (v) {
276                   set_int(sbalways_v, 0);
277                   v = get_int(sbvis_v);
278                   if (!v) {
279                      emit("do-hide-vbar", "");
280                      set_int(sbvis_v, 0);
281                   }
282                }
283             }
284          }
285          program { name: "sb_vbar_show";
286             signal: "do-show-vbar";
287             source: "";
288             action: STATE_SET "default" 0.0;
289             transition: LINEAR 1.0;
290             target: "sb_vbar_clip";
291          }
292          program { name: "sb_vbar_hide";
293             signal: "do-hide-vbar";
294             source: "";
295             action: STATE_SET "hidden" 0.0;
296             transition: LINEAR 1.0;
297             target: "sb_vbar_clip";
298          }
299          program { name: "hbar_show";
300             signal: "elm,action,show,hbar";
301             source: "elm";
302             action: STATE_SET "default" 0.0;
303             target: "sb_hbar_clip_master";
304          }
305          program { name: "hbar_hide";
306             signal: "elm,action,hide,hbar";
307             source: "elm";
308             action:  STATE_SET "hidden" 0.0;
309             target: "sb_hbar_clip_master";
310          }
311          program { name: "hbar_show_always";
312             signal: "elm,action,show_always,hbar";
313             source: "elm";
314             script {
315                new v;
316                v = get_int(sbvis_h);
317                v |= get_int(sbalways_h);
318                if (!v) {
319                   set_int(sbalways_h, 1);
320                   emit("do-show-hbar", "");
321                   set_int(sbvis_h, 1);
322                }
323             }
324          }
325          program { name: "hbar_show_notalways";
326             signal: "elm,action,show_notalways,hbar";
327             source: "elm";
328             script {
329                new v;
330                v = get_int(sbalways_h);
331                if (v) {
332                   set_int(sbalways_h, 0);
333                   v = get_int(sbvis_h);
334                   if (!v) {
335                      emit("do-hide-hbar", "");
336                      set_int(sbvis_h, 0);
337                   }
338                }
339             }
340          }
341          program { name: "sb_hbar_show";
342             signal: "do-show-hbar";
343             source: "";
344             action: STATE_SET "default" 0.0;
345             transition: LINEAR 1.0;
346             target: "sb_hbar_clip";
347          }
348          program { name: "sb_hbar_hide";
349             signal: "do-hide-hbar";
350             source: "";
351             action: STATE_SET "hidden" 0.0;
352             transition: LINEAR 1.0;
353             target: "sb_hbar_clip";
354          }
355          program { name: "scroll";
356             signal: "elm,action,scroll";
357             source: "elm";
358             script {
359                new v;
360                v = get_int(sbvis_v);
361                v |= get_int(sbalways_v);
362                if (!v) {
363                   emit("do-show-vbar", "")
364                   set_int(sbvis_v, 1);
365                }
366                v = get_int(sbvis_h);
367                v |= get_int(sbalways_h);
368                if (!v) {
369                   emit("do-show-hbar", "");
370                   set_int(sbvis_h, 1);
371                }
372                v = get_int(sbvis_timer);
373                if (v > 0) cancel_timer(v);
374                v = timer(1.0, "timer0", 0);
375                set_int(sbvis_timer, v);
376             }
377          }
378          program { name: "highlight_show";
379             signal: "elm,action,focus_highlight,show";
380             source: "elm";
381             action: STATE_SET "enabled" 0.0;
382             transition: ACCELERATE 0.3;
383             target: "focus_highlight";
384           }
385          program { name: "highlight_hide";
386             signal: "elm,action,focus_highlight,hide";
387             source: "elm";
388             action: STATE_SET "default" 0.0;
389             transition: DECELERATE 0.3;
390             target: "focus_highlight";
391          }
392       }
393    }
394 ///////////////////////////////////////////////////////////////////////////////
395    group { name: "elm/ctxpopup/bg/default";
396       parts {
397          part { name: "ctxpopup_bg";
398             type: RECT;
399             mouse_events: 1;
400             description { state: "default" 0.0;
401                color: 0 0 0 0;
402             }
403             description { state: "visible" 0.0;
404                inherit: "default" 0.0;
405                color: 0 0 0 64;
406             }
407          }
408       }
409       programs {
410          program { name: "clicked_event";
411             signal: "mouse,clicked,1";
412             source: "ctxpopup_bg";
413             action: SIGNAL_EMIT "elm,action,click" "";
414          }
415          program { name: "show";
416             signal: "elm,state,show";
417             source: "elm";
418             action: STATE_SET "visible" 0.0;
419             target: "ctxpopup_bg";
420          }
421          program { name: "hide";
422             signal: "elm,state,hide";
423             source: "elm";
424             action: STATE_SET "default" 0.0;
425             target: "ctxpopup_bg";
426          }
427       }
428    }
429 ///////////////////////////////////////////////////////////////////////////////
430    group { name: "elm/ctxpopup/base/default";
431       images {
432          image: "bt_base2.png" COMP;
433          image: "bt_hilight.png" COMP;
434          image: "bt_shine.png" COMP;
435       }
436       parts {
437          part { name: "arrow_area_left";
438             type: RECT;
439             mouse_events: 0;
440             description { state: "default" 0.0;
441                visible: 0;
442                min: 20 0;
443                fixed: 1 1;
444                align: 1 0.5;
445                rel1 {
446                   to_y: "base";
447                }
448                rel2 {
449                   relative:0 1;
450                   to:"base";
451                }
452             }
453          }
454          part { name: "arrow_area_right";
455             type: RECT;
456             mouse_events: 0;
457             description { state: "default" 0.0;
458                visible: 0;
459                min: 20 0;
460                fixed: 1 1;
461                align: 0 0.5;
462                rel1 {
463                   relative: 1 0;
464                   to:"base";
465                }
466                rel2 {
467                   to_y: "base";
468                }
469             }
470          }
471          part { name: "arrow_area_up";
472             type: RECT;
473             mouse_events: 0;
474             description { state: "default" 0.0;
475                visible: 0;
476                min: 0 20;
477                fixed: 1 1;
478                align: 0.5 1;
479                rel1 {
480                   to_x: "base";
481                }
482                rel2 {
483                   relative: 1 0;
484                   to:"base";
485                }
486             }
487          }
488          part { name: "arrow_area_down";
489             type: RECT;
490             mouse_events: 0;
491             description { state: "default" 0.0;
492                visible: 0;
493                min: 0 20;
494                fixed: 1 1;
495                align: 0.5 0;
496                rel1 {
497                   relative: 0 1;
498                   to:"base";
499                }
500                rel2 {
501                   to_x: "base";
502                }
503             }
504          }
505          part { name: "elm.swallow.arrow_up";
506             type: SWALLOW;
507             mouse_events: 0;
508             scale: 1;
509             dragable {
510                x: 1 1 0;
511                y: 1 1 0;
512                confine: "arrow_area_up";
513             }
514             description { state: "default" 0.0;
515                min: 36 20;
516                fixed: 1 1;
517                visible: 1;
518             }
519          }
520          part { name: "elm.swallow.arrow_down";
521             type: SWALLOW;
522             mouse_events: 0;
523             scale: 1;
524             dragable {
525                x: 1 1 0;
526                y: 1 1 0;
527                confine: "arrow_area_down";
528             }
529             description { state: "default" 0.0;
530                min: 36 20;
531                fixed: 1 1;
532                visible: 1;
533             }
534          }
535          part { name: "elm.swallow.arrow_left";
536             type: SWALLOW;
537             mouse_events: 0;
538             scale: 1;
539             dragable {
540                x: 1 1 0;
541                y: 1 1 0;
542                confine: "arrow_area_left";
543             }
544             description { state: "default" 0.0;
545                min: 20 36;
546                fixed: 1 1;
547                visible: 1;
548             }
549          }
550          part { name: "elm.swallow.arrow_right";
551             type: SWALLOW;
552             mouse_events: 0;
553             scale: 1;
554             dragable {
555                x: 1 1 0;
556                y: 1 1 0;
557                confine: "arrow_area_right";
558             }
559             description { state: "default" 0.0;
560                min: 20 36;
561                fixed: 1 1;
562                visible: 1;
563             }
564          }
565          part { name: "base";
566             scale: 1;
567             description { state: "default" 0.0;
568                rel1.offset: -3 -3;
569                rel2.offset: 3 3;
570                image { normal: "bt_base2.png";
571                   border: 7 7 7 7;
572                }
573             }
574          }
575          part { name: "over1";
576             scale: 1;
577             description { state: "default" 0.0;
578                rel1.to: "base";
579                rel2.to: "base";
580                rel2.relative: 1.0 0.5;
581                image { normal: "bt_hilight.png";
582                   border: 7 7 7 0;
583                }
584             }
585          }
586          part { name: "over2";
587             scale: 1;
588             description { state: "default" 0.0;
589                rel1.to: "base";
590                rel2.to: "base";
591                image { normal: "bt_shine.png";
592                   border: 7 7 7 7;
593                }
594             }
595          }
596          part { name: "elm.swallow.content";
597             type: SWALLOW;
598             description { state: "default" 0.0;
599                rel1 { to:"base"; offset: 4 4; }
600                rel2 { to:"base"; offset: -5 -5; }
601             }
602          }
603       }
604    }
605 ///////////////////////////////////////////////////////////////////////////////
606    group { name: "elm/ctxpopup/arrow/default";
607       images {
608          image: "ctxpopup_arrow_left.png" COMP;
609          image: "ctxpopup_arrow_right.png" COMP;
610          image: "ctxpopup_arrow_up.png" COMP;
611          image: "ctxpopup_arrow_down.png" COMP;
612       }
613       parts {
614          part { name: "ctxpopup_arrow";
615             type: IMAGE;
616             scale: 1;
617             description {
618                state: "default" 0.0;
619                min: 36 36;
620                fixed: 1 1;
621                visible: 0;
622                align: 0.5 0.5;
623             }
624             description {
625                state: "left" 0.0;
626                min: 20 36;
627                fixed: 1 1;
628                align: 0.0 0.5;
629                rel1 { offset: 3 0; }
630                rel2 { offset: 2 -1; }
631                image { normal: "ctxpopup_arrow_left.png"; }
632             }
633             description { state: "right" 0.0;
634                min: 20 36;
635                fixed: 1 1;
636                align: 1.0 0.5;
637                rel1 { offset: -5 0; }
638                rel2 { offset: -6 -1; }
639                image { normal: "ctxpopup_arrow_right.png"; }
640             }
641             description { state: "top" 0.0;
642                min: 36 20;
643                fixed: 1 1;
644                align: 0.5 0.0;
645                rel1 { offset: 0 5; }
646                rel2 { offset: -1 4; }
647                image { normal: "ctxpopup_arrow_up.png"; }
648             }
649             description { state: "bottom" 0.0;
650                min: 36 20;
651                fixed: 1 1;
652                align: 0.5 1.0;
653                rel1 { offset: 0 -5; }
654                rel2 { offset: -1 -6; }
655                image { normal: "ctxpopup_arrow_down.png"; }
656             }
657          }
658       }
659       programs {
660          program { name: "enable_left_arrow";
661             signal: "elm,state,left";
662             source: "elm";
663             action: STATE_SET "left" 0.0;
664             target: "ctxpopup_arrow";
665          }
666          program { name: "enable_right_arrow";
667             signal: "elm,state,right";
668             source: "elm";
669             action: STATE_SET "right" 0.0;
670             target: "ctxpopup_arrow";
671          }
672          program { name: "enable_top_arrow";
673             signal: "elm,state,top";
674             source: "elm";
675             action: STATE_SET "top" 0.0;
676             target: "ctxpopup_arrow";
677          }
678          program { name: "enable_bottom_arrow";
679             signal: "elm,state,bottom";
680             source: "elm";
681             action: STATE_SET "bottom" 0.0;
682             target: "ctxpopup_arrow";
683          }
684       }
685    }
686 ///////////////////////////////////////////////////////////////////////////////
687    group {
688       name: "elm/ctxpopup/icon_text_style_item/default";
689         alias: "elm/ctxpopup/text_style_item/default";
690         alias: "elm/ctxpopup/icon_style_item/default";
691       images {
692          image: "hoversel_entry_bg.png" COMP;
693       }
694       parts {
695          part { name: "event";
696             mouse_events: 1;
697             description { state: "default" 0.0;
698             }
699          }
700          part { name: "bg";
701             mouse_events: 0;
702             description { state: "default" 0.0;
703                rel1.offset: 2 2;
704                rel2.offset: -3 -3;
705                image { normal:"hoversel_entry_bg.png";
706                   border: 0 0 2 2;
707                }
708                fill.smooth: 0;
709                color: 255 255 255 0;
710             }
711             description { state: "clicked" 0.0;
712                inherit: "default" 0.0;
713                color: 255 255 255 255;
714             }
715          }
716          part { name: "elm.swallow.icon";
717             type: SWALLOW;
718             clip_to: "disclip";
719             scale: 1;
720             description { state: "default" 0.0;
721                min: 25 25;
722                max: 25 25;
723                align: 0 0.5;
724                aspect: 1.0 1.0;
725                rel1 { offset: 10 10; }
726                                         rel2 { offset: 0 -10; }
727             }
728          }
729          part { name: "elm.text";
730             type: TEXT;
731             mouse_events: 0;
732             clip_to: "disclip";
733             scale: 1;
734             description { state: "default" 0.0;
735                min: 1 40;
736                fixed: 0 1;
737                align: 0.5 0.5;
738                rel1 { relative: 1.0 0.0; to: "elm.swallow.icon"; offset: 10 0; }
739                rel2 { relative: 1.0 1.0; offset: -11 -1; }
740                color: 255 255 255 255;
741                text {
742                   font: "Sans";
743                   size: 10;
744                   align: 0.0 0.5;
745                   min: 1 1;
746                }
747             }
748             description { state: "clicked" 0.0;
749                inherit: "default" 0.0;
750                color: 0 0 0 255;
751             }
752          }
753          part { name: "over1";
754             mouse_events: 1;
755             repeat_events: 1;
756             ignore_flags: ON_HOLD;
757             description { state: "default" 0.0;
758                color: 255 255 255 0;
759             }
760             description { state: "clicked" 0.0;
761                inherit: "default" 0.0;
762                color: 255 255 255 255;
763             }
764          }
765          part { name: "over2";
766             mouse_events: 1;
767             repeat_events: 1;
768             description { state: "default" 0.0;
769                color: 255 255 255 0;
770             }
771             description { state: "clicked" 0.0;
772                inherit: "default" 0.0;
773                color: 255 255 255 255;
774             }
775          }
776          part { name: "disclip";
777             type: RECT;
778             description { state: "default" 0.0;
779                color: 255 255 255 255;
780             }
781             description { state: "enabled" 0.0;
782                color: 127 127 127 127;
783             }
784          }
785          part { name: "blocker";
786             description { state: "default" 0.0;
787                visible: 0;
788             }
789             description { state: "enabled" 0.0;
790                visible: 1;
791                color: 0 0 0 0;
792             }
793          }
794       }
795       programs {
796          program {
797             name: "item_unclick";
798             signal: "mouse,up,1";
799             source: "over1";
800             action: SIGNAL_EMIT "elm,action,click" "";
801          }
802          program { name: "disable";
803             signal: "elm,state,disabled";
804             source: "elm";
805             action: STATE_SET "enabled" 0.0;
806             target: "disclip";
807             target: "blocker";
808          }
809          program { name: "enable";
810             signal: "elm,state,enabled";
811             source: "elm";
812             action: STATE_SET "default" 0.0;
813             target: "disclip";
814             target: "blocker";
815          }
816          program { name: "item_click2";
817             signal: "mouse,down,1";
818             source: "over2";
819             script {
820                set_state(PART:"elm.text", "clicked", 0.0);
821                set_state(PART:"bg", "clicked", 0.0);
822             }
823          }
824          program { name: "item_unclick2";
825             signal: "mouse,up,1";
826             source: "over2";
827             script {
828                set_state(PART:"elm.text", "default", 0.0);
829                set_state(PART:"bg", "default", 0.0);
830             }
831          }
832       }
833    }