use elm,action,click in notify like all other widgets
[framework/uifw/elementary.git] / data / themes / widgets / toolbar.edc
1 group { name: "elm/toolbar/base/default";
2    images {
3       image: "bt_dis_base.png" COMP;
4       image: "bt_dis_hilight.png" COMP;
5       image: "bt_dis_shine.png" COMP;
6       image: "icon_left_arrow.png" COMP;
7       image: "icon_right_arrow.png" COMP;
8    }
9    parts {
10       part { name: "base";
11          mouse_events: 1;
12          description { state: "default" 0.0;
13             rel1 {
14                relative: 0.0 0.0;
15                offset: 2 2;
16             }
17             rel2.offset: -3 -3;
18             image {
19                normal: "bt_dis_base.png";
20                border: 4 4 4 4;
21             }
22             image.middle: SOLID;
23          }
24       }
25       part { name: "clipper";
26          type: RECT;
27          mouse_events: 0;
28          description {
29             state: "default" 0.0;
30             rel1 {
31                to: "base";
32                offset: 2 2;
33             }
34             rel2 {
35                to: "base";
36                offset: -3 -3;
37             }
38          }
39       }
40       part { name: "elm.swallow.content";
41          clip_to: "clipper";
42          type: SWALLOW;
43          description {
44             state: "default" 0.0;
45             rel1.to: "clipper";
46             rel2.to: "clipper";
47          }
48       }
49       part { name: "over2";
50          mouse_events: 0;
51          description { state: "default" 0.0;
52             rel1.to: "base";
53             rel2.to: "base";
54             image {
55                normal: "bt_dis_shine.png";
56                border: 4 4 4 4;
57             }
58          }
59       }
60       part { name: "over1";
61          mouse_events: 0;
62          description { state: "default" 0.0;
63             rel1.to: "base";
64             rel2.to: "base";
65             rel2.relative: 1.0 0.5;
66             image {
67                normal: "bt_dis_hilight.png";
68                border: 4 4 4 0;
69             }
70             color: 255 255 255 128;
71          }
72       }
73       part { name: "left_arrow";
74          mouse_events: 0;
75          description { state: "default" 0.0;
76             image.normal: "icon_left_arrow.png";
77             aspect: 1.0 1.0;
78             aspect_preference: VERTICAL;
79             align: 0.0 0.5;
80             min: 32 32;
81             max: 32 32;
82          }
83          description { state: "hidden" 0.0;
84             inherit: "default" 0.0;
85             visible: 0;
86             color: 255 255 255 0;
87          }
88       }
89       part { name: "right_arrow";
90          mouse_events: 0;
91          description { state: "default" 0.0;
92             image.normal: "icon_right_arrow.png";
93             aspect: 1.0 1.0;
94             aspect_preference: VERTICAL;
95             align: 1.0 0.5;
96             min: 32 32;
97             max: 32 32;
98          }
99          description { state: "hidden" 0.0;
100             inherit: "default" 0.0;
101             visible: 0;
102             color: 255 255 255 0;
103          }
104       }
105       part { name: "event";
106          type: RECT;
107          mouse_events: 1;
108          repeat_events: 1;
109          description { state: "default" 0.0;
110             color: 0 0 0 0;
111          }
112       }
113    }
114    programs {
115       program { name: "sb_hbar_show";
116          signal: "elm,action,show,hbar";
117          source: "elm";
118          action:  STATE_SET "default" 0.0;
119          transition: LINEAR 0.5;
120          target: "left_arrow";
121          target: "right_arrow";
122       }
123       program { name: "sb_hbar_hide";
124          signal: "elm,action,hide,hbar";
125          source: "elm";
126          action:  STATE_SET "hidden" 0.0;
127          target: "left_arrow";
128          target: "right_arrow";
129          transition: LINEAR 0.5;
130       }
131    }
132 }
133
134 group { name: "elm/toolbar/item/default";
135    images {
136       image: "toolbar_sel.png" COMP;
137    }
138    data.item: "transition_animation_on" "1";
139    parts {
140       part { name: "label2";
141          type: TEXT;
142          mouse_events:  0;
143          scale: 1;
144          clip_to: "elm.text.clipper";
145          description { state: "default" 0.0;
146             align: 0.5 1.0;
147             fixed: 0 1;
148             rel1.to: "elm.text";
149             rel2.to: "elm.text";
150             color: 0 0 0 255;
151             text {
152                font: "Sans";
153                text_source: "elm.text";
154                size: 10;
155                min: 1 1;
156                align: 0.5 0.5;
157                text_class: "toolbar_item";
158             }
159          }
160          description { state: "selected" 0.0;
161             inherit: "default" 0.0;
162             visible: 0;
163          }
164          description { state: "disabled" 0.0;
165             inherit: "default" 0.0;
166             color: 0 0 0 128;
167             color3: 0 0 0 0;
168          }
169          description { state: "disabled_visible" 0.0;
170             inherit: "default" 0.0;
171             color: 0 0 0 128;
172             color3: 0 0 0 0;
173             visible: 1;
174             text.min: 1 1;
175          }
176       }
177       part { name: "label2_new";
178          type: TEXT;
179          mouse_events:  0;
180          scale: 1;
181          clip_to: "elm.text_new.clipper";
182          description { state: "default" 0.0;
183             align: 0.5 1.0;
184             fixed: 0 1;
185             rel1.to: "elm.text_new";
186             rel2.to: "elm.text_new";
187             color: 0 0 0 255;
188             text {
189                font: "Sans";
190                text_source: "elm.text_new";
191                size: 10;
192                min: 1 1;
193                align: 0.5 0.5;
194                text_class: "toolbar_item";
195             }
196          }
197          description { state: "selected" 0.0;
198             inherit: "default" 0.0;
199             visible: 0;
200          }
201          description { state: "disabled" 0.0;
202             inherit: "default" 0.0;
203             color: 0 0 0 128;
204             color3: 0 0 0 0;
205          }
206          description { state: "disabled_visible" 0.0;
207             inherit: "default" 0.0;
208             color: 0 0 0 128;
209             color3: 0 0 0 0;
210             visible: 1;
211             text.min: 1 1;
212          }
213       }
214       part { name: "bg";
215          mouse_events: 0;
216          description { state: "default" 0.0;
217             visible: 0;
218             color: 255 255 255 0;
219             image {
220                normal: "toolbar_sel.png";
221                border: 3 3 0 0;
222             }
223             image.middle: SOLID;
224             fill.smooth: 0;
225          }
226          description { state: "selected" 0.0;
227             inherit: "default" 0.0;
228             visible: 1;
229             color: 255 255 255 255;
230          }
231          description { state: "disabled" 0.0;
232             inherit: "default" 0.0;
233             visible: 0;
234             color: 255 255 255 0;
235          }
236       }
237       part { name: "elm.swallow.icon";
238          type: SWALLOW;
239          clip_to: "elm.icon.clipper";
240          description { state: "default" 0.0;
241             align: 0.5 0.5;
242             fixed: 0 0;
243             rel1 {
244                relative: 0.0 0.0;
245                offset: 2 2;
246             }
247             rel2 {
248                to_y: "elm.text";
249                relative: 1.0 0.0;
250                offset: -3 -1;
251             }
252             color: 0 0 0 0;
253          }
254       }
255       part { name: "elm.swallow.icon_new";
256          type: SWALLOW;
257          clip_to: "elm.icon_new.clipper";
258          description { state: "default" 0.0;
259             align: 0.5 0.5;
260             fixed: 0 0;
261             rel1 {
262                relative: 0.0 0.0;
263                offset: 2 2;
264             }
265             rel2 {
266                to_y: "elm.text_new";
267                relative: 1.0 0.0;
268                offset: -3 -1;
269             }
270             color: 0 0 0 0;
271          }
272       }
273       part { name: "elm.text";
274          type: TEXT;
275          effect: SOFT_SHADOW;
276          mouse_events:  0;
277          scale: 1;
278          clip_to: "elm.text.clipper";
279          description { state: "default" 0.0;
280             align: 0.5 1.0;
281             fixed: 0 1;
282             rel1 {
283                relative: 0.0 1.0;
284                offset:   0 -1;
285             }
286             rel2 {
287                relative: 1.0 1.0;
288                offset:   -1 -1;
289             }
290             visible: 0;
291             color: 224 224 224 255;
292             color3: 0 0 0 32;
293             text {
294                font: "Sans:style=Bold";
295                size: 10;
296                min: 1 1;
297                align: 0.5 0.5;
298                text_class: "toolbar_item";
299             }
300          }
301          description { state: "selected" 0.0;
302             inherit: "default" 0.0;
303             visible: 1;
304          }
305          description { state: "visible" 0.0;
306             inherit: "default" 0.0;
307             visible: 1;
308             text.min: 1 1;
309          }
310          description { state: "disabled" 0.0;
311             inherit: "default" 0.0;
312             color: 0 0 0 128;
313             color3: 0 0 0 0;
314          }
315          description { state: "disabled_visible" 0.0;
316             inherit: "default" 0.0;
317             color: 0 0 0 128;
318             color3: 0 0 0 0;
319             visible: 1;
320             text.min: 1 1;
321          }
322       }
323       part { name: "elm.text_new";
324          type: TEXT;
325          effect: SOFT_SHADOW;
326          mouse_events:  0;
327          clip_to: "elm.text_new.clipper";
328          scale: 1;
329          description { state: "default" 0.0;
330             align: 0.5 1.0;
331             fixed: 0 1;
332             rel1 {
333                relative: 0.0 1.0;
334                offset:   0 -1;
335             }
336             rel2 {
337                relative: 1.0 1.0;
338                offset:   -1 -1;
339             }
340             visible: 0;
341             color: 224 224 224 255;
342             color3: 0 0 0 32;
343             text {
344                font: "Sans:style=Bold";
345                size: 10;
346                min: 1 1;
347                align: 0.5 0.5;
348                text_class: "toolbar_item";
349             }
350          }
351          description { state: "selected" 0.0;
352             inherit: "default" 0.0;
353             visible: 1;
354          }
355          description { state: "visible" 0.0;
356             inherit: "default" 0.0;
357             visible: 1;
358             text.min: 1 1;
359          }
360          description { state: "disabled" 0.0;
361             inherit: "default" 0.0;
362             color: 0 0 0 128;
363             color3: 0 0 0 0;
364          }
365          description { state: "disabled_visible" 0.0;
366             inherit: "default" 0.0;
367             color: 0 0 0 128;
368             color3: 0 0 0 0;
369             visible: 1;
370             text.min: 1 1;
371          }
372       }
373       part { name: "elm.text.clipper";
374          type: RECT;
375          description { state: "default" 0.0;
376             color: 255 255 255 255;
377          }
378          description { state: "animation" 0.0;
379             color: 255 255 255 0;
380          }
381       }
382       part { name: "elm.text_new.clipper";
383          type: RECT;
384          description { state: "default" 0.0;
385             color: 255 255 255 0;
386          }
387          description { state: "animation" 0.0;
388             color: 255 255 255 255;
389          }
390       }
391       part { name: "elm.icon.clipper";
392          type: RECT;
393          description { state: "default" 0.0;
394             color: 255 255 255 255;
395          }
396          description { state: "animation" 0.0;
397             color: 255 255 255 0;
398          }
399       }
400       part { name: "elm.icon_new.clipper";
401          type: RECT;
402          description { state: "default" 0.0;
403             color: 255 255 255 0;
404          }
405          description { state: "animation" 0.0;
406             color: 255 255 255 255;
407          }
408       }
409       part { name: "event";
410          type: RECT;
411          mouse_events: 1;
412          ignore_flags: ON_HOLD;
413          description { state: "default" 0.0;
414             color: 0 0 0 0;
415          }
416       }
417    }
418    programs {
419       program { name: "go_active";
420          signal:  "elm,state,selected";
421          source:  "elm";
422          action:  STATE_SET "selected" 0.0;
423          target:  "bg";
424          target:  "elm.text";
425          target:  "label2";
426          target:  "elm.text_new";
427          target:  "label2_new";
428          transition: LINEAR 0.2;
429       }
430       program { name: "go_passive";
431          signal:  "elm,state,unselected";
432          source:  "elm";
433          action:  STATE_SET "default" 0.0;
434          target:  "bg";
435          target:  "elm.text";
436          target:  "label2";
437          target:  "elm.text_new";
438          target:  "label2_new";
439          transition: LINEAR 0.1;
440       }
441       program { name: "go";
442          signal:  "mouse,up,1";
443          source:  "event";
444          action:  SIGNAL_EMIT "elm,action,click" "elm";
445       }
446       program { name: "mouse,in";
447          signal:  "mouse,in";
448          source:  "event";
449          action:  SIGNAL_EMIT "elm,mouse,in" "elm";
450       }
451       program { name: "mouse,out";
452          signal:  "mouse,out";
453          source:  "event";
454          action:  SIGNAL_EMIT "elm,mouse,out" "elm";
455       }
456       program { name: "disable";
457          signal: "elm,state,disabled";
458          source: "elm";
459          action: STATE_SET "disabled" 0.0;
460          target: "label2";
461          target: "label2_new";
462          target: "bg";
463          after: "disable_text";
464       }
465       program { name: "disable_text";
466          script {
467             new st[31];
468             new Float:vl;
469             get_state(PART:"elm.text", st, 30, vl);
470             if (!strcmp(st, "visible"))
471             {
472                set_state(PART:"elm.text", "disabled_visible", 0.0);
473                set_state(PART:"elm.text_new", "disabled_visible", 0.0);
474             }
475             else
476             {
477                set_state(PART:"elm.text", "disabled", 0.0);
478                set_state(PART:"elm.text_new", "disabled", 0.0);
479             }
480          }
481       }
482       program { name: "enable";
483          signal: "elm,state,enabled";
484          source: "elm";
485          action: STATE_SET "default" 0.0;
486          target: "label2";
487          target: "label2_new";
488          target: "bg";
489          after: "enable_text";
490       }
491       program { name: "enable_text";
492          script {
493             new st[31];
494             new Float:vl;
495             get_state(PART:"elm.text", st, 30, vl);
496             if (!strcmp(st, "disabled_visible"))
497             {
498                set_state(PART:"elm.text", "visible", 0.0);
499                set_state(PART:"elm.text_new", "visible", 0.0);
500             }
501             else
502             {
503                set_state(PART:"elm.text", "default", 0.0);
504                set_state(PART:"elm.text_new", "default", 0.0);
505             }
506          }
507       }
508       program { name: "label_set,animation,forward";
509          signal: "elm,state,label_set,forward";
510          source: "elm";
511          after: "label_set,animation";
512       }
513       program { name: "label_set,animation,backward";
514          signal: "elm,state,label_set,backward";
515          source: "elm";
516          after: "label_set,animation";
517       }
518       program { name: "label_set,animation";
519          signal: "elm,state,label_set";
520          source: "elm";
521          action: STATE_SET "animation" 0.0;
522          target: "elm.text.clipper";
523          target: "elm.text_new.clipper";
524          transition: LINEAR 0.2;
525          after: "label_set,animation,done";
526       }
527       program { name: "label_set,animation,done";
528          action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
529       }
530       program { name: "label,reset";
531          signal: "elm,state,label,reset";
532          source: "elm";
533          action: STATE_SET "default" 0.0;
534          target: "elm.text.clipper";
535          target: "elm.text_new.clipper";
536       }
537       program { name: "icon_set,animation,forward";
538          signal: "elm,state,icon_set,forward";
539          source: "elm";
540          after: "icon_set,animation";
541       }
542       program { name: "icon_set,animation,backward";
543          signal: "elm,state,icon_set,backward";
544          source: "elm";
545          after: "icon_set,animation";
546       }
547       program { name: "icon_set,animation";
548          signal: "elm,state,icon_set";
549          source: "elm";
550          action: STATE_SET "animation" 0.0;
551          target: "elm.icon.clipper";
552          target: "elm.icon_new.clipper";
553          transition: LINEAR 0.2;
554          after: "icon_set,animation,done";
555       }
556       program { name: "icon_set,animation,done";
557          action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
558       }
559       program { name: "icon,reset";
560          signal: "elm,state,icon,reset";
561          source: "elm";
562          action: STATE_SET "default" 0.0;
563          target: "elm.icon.clipper";
564          target: "elm.icon_new.clipper";
565       }
566    }
567 }
568
569 group { name: "elm/toolbar/item/item_horizontal";
570     inherit: "elm/toolbar/item/default";
571     parts.part { name: "elm.swallow.icon";
572             description { state: "default" 0.0;
573                 align: 0.0 0.5;
574                 rel1.offset: 3 3;
575                 rel1.relative: 0 0;
576                 rel2.offset: -4 -4;
577                 rel2.relative: 1 1;
578                 color: 0 0 0 0;
579             }
580         }
581     parts.part { name: "elm.text";
582             description { state: "default" 0.0;
583                align: 1 0.5;
584                min: 0 1;
585                rel1.offset: 1 0;
586                rel1.relative: 1 0.5;
587                rel1.to_x: "elm.swallow.icon";
588                text.align: 0 0.5;
589             }
590         }
591 }
592
593 group { name: "elm/toolbar/separator/default";
594    images {
595       image: "toolbar_separator_v.png" COMP;
596    }
597    parts {
598       part { name: "separator"; // separator group
599          description { state: "default" 0.0;
600             min: 2 2;
601             max: 2 9999;
602             rel1.offset: 4 4;
603             rel2.offset: -5 -5;
604             image {
605                normal: "toolbar_separator_v.png";
606             }
607             fill {
608                smooth: 0;
609             }
610          }
611       }
612    }
613 }
614