e81b05e7706d7201b5bb502339ed85ccbf38f454
[profile/tv/apps/native/air_infosquare.git] / data / widget / button.edc
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #define TRANSITION_TIME 0.17
18 #define COLOR_ITEM_FOCUS 0 119 246 255
19 #define COLOR_TEXT_INDEX 77 77 77 255
20 #define COLOR_TEXT_FOCUS 255 255 255 255
21
22 group {
23         name: "elm/button/base/category_btn";
24         data.item: "focus_highlight" "on";
25         parts {
26                 part {
27                         name: "bg_text";
28                         type: RECT;
29                         scale: 1;
30                         description {
31                                 state: "default" 0.0;
32                                 rel1.to: "padding.left_top";
33                                 rel2.to: "padding.right_bottom";
34                                 color: 0 0 0 0;
35                         }
36                         description {
37                                 state: "focused" 0.0;
38                                 inherit: "default" 0.0;
39                                 color: COLOR_ITEM_FOCUS;
40                         }
41                 }
42                 part {
43             name: "padding.left_top";
44             type: SPACER;
45             description {
46                 state: "default" 0.0;
47                 rel1.relative: 0.0 0.0;
48                 rel2.relative: 0.0 0.0;
49                 align: 1.0 0.0;
50                 min: 16 16;
51                 fixed: 1 1;
52             }
53         }
54                 part {
55             name: "padding.right_bottom";
56             type: SPACER;
57             description {
58                 state: "default" 0.0;
59                 rel1 {
60                                         to: "elm.text";
61                                         relative: 1.0 1.0;
62                                 }
63                 rel2 {
64                                         to: "elm.text";
65                                         relative: 1.0 1.0;
66                                 }
67                 align: 0.0 0.0;
68                 min: 16 16;
69                 fixed, 1 1;
70             }
71         }
72                 part {
73                         name: "elm.text";
74                         type: TEXT;
75                         scale: 1;
76                         description {
77                                 state: "default" 0.0;
78                                 rel1 {
79                                         to: "padding.left_top";
80                                         relative: 1.0 1.0;
81                                 }
82                                 rel2 {
83                                         to: "padding.left_top";
84                                         relative: 1.0 1.0;
85                                 }
86                                 text {
87                                         font: FONT_LIGHT;
88                                         size: 36;
89                                         min: 1 0;
90                                         align: 0.0 0.7;
91                                         ellipsis: -1;
92                                 }
93                                 min: 0 36;
94                                 align: 0.0 0.0;
95                                 color: COLOR_TEXT_INDEX;
96                                 fixed: 1 1;
97                         }
98                         description {
99                                 state: "focused" 0.0;
100                                 inherit: "default" 0.0;
101                                 text.font: FONT_REGULAR;
102                                 color: COLOR_TEXT_FOCUS;
103                         }
104                 }
105                 part {
106                         name: "event";
107                         type: RECT;
108                         description {
109                                 state: "default" 0.0;
110                                 color: 0 0 0 0;
111                         }
112                 }
113         }
114         programs {
115                 program {
116                         name: "focused";
117                         signal: "elm,action,focus";
118                         source: "elm";
119                         action: STATE_SET "focused" 0.0;
120                         target: "bg_text";
121                         target: "elm.text";
122                         transition: LINEAR TRANSITION_TIME;
123                 }
124                 program {
125                         name: "unfocused";
126                         signal: "elm,action,unfocus";
127                         source: "elm";
128                         action: STATE_SET "default" 0.0;
129                         target: "bg_text";
130                         target: "elm.text";
131                         transition: LINEAR TRANSITION_TIME;
132                 }
133                 program {
134                         name, "mouse_unclick_after";
135                         signal, "mouse,clicked,1";
136                         source, "event";
137                         action, SIGNAL_EMIT "elm,action,click" "";
138                 }
139         }
140 }
141
142 group {
143         data.item: "focus_highlight" "on";
144         name: "elm/button/base/square/notification_item";
145         parts {
146                 part {
147                         name, "border_bg";
148                         type, RECT;
149                         scale, 1;
150                         description {
151                                 state, "default" 0.0;
152                                 min, 490 112;
153                                 color, 51 51 51 255;
154                                 visible, 1;
155                         }
156                         description {
157                                 state, "focused" 0.0;
158                                 inherit, "default" 0.0;
159                                 color, 64 171 233 255;
160                         }
161                 }
162                 part {
163                         name, "bg";
164                         type, RECT;
165                         scale, 1;
166                         description {
167                                 state, "default" 0.0;
168                                 rel1 {
169                                         to, "border_bg";
170                                         relative, 0.5 0.5;
171                                 }
172                                 rel2 {
173                                         to, "border_bg";
174                                         relative, 0.5 0.5;
175                                 }
176                                 min, 486 108;
177                                 color, 0 0 0 255;
178                                 align, 0.5 0.5;
179                                 fixed, 1 1;
180                                 visible, 1;
181                         }
182                         description {
183                                 state, "focused" 0.0;
184                                 inherit, "default" 0.0;
185                                 min, 482 104;
186                                 color, 46 46 46 255;
187                         }
188                 }
189                 part {
190                         name, "padding.icon";
191                         type, SPACER;
192                         scale, 1;
193                         description {
194                                 state, "default" 0.0;
195                                 rel1.relative, 0.0 0.0;
196                                 rel2.relative, 0.0 0.0;
197                                 min, 28 0;
198                                 align, 0.0 0.0;
199                                 fixed, 1 1;
200                         }
201                 }
202                 part {
203                         name, PART_ICON;
204                         type, SWALLOW;
205                         scale, 1;
206                         description {
207                                 state, "default" 0.0;
208                                 rel1 {
209                                         to_x, "padding.icon";
210                                         relative, 1.0 0.5;
211                                 }
212                                 rel2 {
213                                         to_x, "padding.icon";
214                                         relative, 1.0 0.5;
215                                 }
216                                 color, 255 255 255 153;
217                                 align, 0.0 0.5;
218                                 min, 54 54;
219                                 fixed, 1 1;
220                                 visible, 1;
221                         }
222                 }
223                 part {
224                         name, "padding.text";
225                         type, SPACER;
226                         scale, 1;
227                         description {
228                                 state, "default" 0.0;
229                                 rel1 {
230                                         to_x, PART_ICON;
231                                         relative, 1.0 0.5;
232                                 }
233                                 rel2 {
234                                         to_x, PART_ICON;
235                                         relative, 1.0 0.5;
236                                 }
237                                 min, 26 0;
238                                 align, 0.0 0.0;
239                                 fixed, 1 1;
240                         }
241                 }
242                 part {
243                         name, PART_TITLE;
244                         type, TEXT;
245                         scale, 1;
246                         description {
247                                 state, "default" 0.0;
248                                 rel1 {
249                                         to, "padding.text";
250                                         relative, 1.0 0.5;
251                                 }
252                                 rel2 {
253                                         to, "padding.text";
254                                         relative, 1.0 0.5;
255                                 }
256                                 text {
257                                         font, FONT_LIGHT;
258                                         size, 28;
259                                         align, 0.0 0.5;
260                                 }
261                                 color, 255 255 255 128;
262                                 min, 356 0;
263                                 align, 0.0 0.5;
264                                 fixed, 1 1;
265                                 visible, 1;
266                         }
267                         description {
268                                 state, "focused" 0.0;
269                                 inherit, "default" 0.0;
270                                 color, 255 255 255 255;
271                                 text.font, FONT_REGULAR;
272                         }
273                 }
274                 part {
275                         name: "event";
276                         type: RECT;
277                         description {
278                                 state: "default" 0.0;
279                                 color: 0 0 0 0;
280                         }
281                 }
282         }
283         programs {
284                 program {
285                         name, "focused";
286                         signal, SIGNAL_FOCUSED;
287                         source, SOURCE_ELM;
288                         action, STATE_SET "focused" 0.0;
289                         target, "border_bg";
290                         target, "bg";
291                         target, PART_TITLE;
292                 }
293                 program {
294                         name, "unfocused";
295                         signal, SIGNAL_UNFOCUSED;
296                         source, SOURCE_ELM;
297                         action, STATE_SET "default" 0.0;
298                         target, "border_bg";
299                         target, "bg";
300                         target, PART_TITLE;
301                 }
302                 program {
303                         name, "mouse_unclick_after";
304                         signal, "mouse,clicked,1";
305                         source, "event";
306                         action, SIGNAL_EMIT "elm,action,click" "";
307                 }
308         }
309 }
310
311 group {
312         data.item: "focus_highlight" "on";
313         name: "elm/button/base/square/notification_launch";
314         parts {
315                 part {
316                         name, "border_bg";
317                         type, RECT;
318                         scale, 1;
319                         description {
320                                 state, "default" 0.0;
321                                 color, 48 48 48 255;
322                                 align, 0.5 0.5;
323                                 min, 376 66;
324                                 fixed, 1 1;
325                         }
326                         description {
327                                 state, "focused" 0.0;
328                                 inherit, "default" 0.0;
329                                 color, 64 171 233 255;
330                         }
331                 }
332                 part {
333                         name, "bg";
334                         type, RECT;
335                         scale, 1;
336                         description {
337                                 state, "default" 0.0;
338                                 rel1 {
339                                         to, "border_bg";
340                                         relative, 0.5 0.5;
341                                 }
342                                 rel2 {
343                                         to, "border_bg";
344                                         relative, 0.5 0.5;
345                                 }
346                                 color, 48 48 48 255;
347                                 align, 0.5 0.5;
348                                 min, 368 58;
349                                 fixed, 1 1;
350                         }
351                 }
352                 part {
353                         name, PART_TITLE;
354                         type, TEXT;
355                         scale, 1;
356                         description {
357                                 state, "default" 0.0;
358                                 text {
359                                         font, FONT_LIGHT;
360                                         text, STR_SQUARE_TITLE;
361                                         size, 36;
362                                         align, 0.5 0.5;
363                                         min, 1 1;
364                                         ellipsis, -1;
365                                 }
366                                 color, 255 255 255 179;
367                                 align, 0.0 0.0;
368                                 fixed, 1 1;
369                                 visible, 1;
370                         }
371                 }
372                 part {
373                         name: "event";
374                         type: RECT;
375                         description {
376                                 state: "default" 0.0;
377                                 color: 0 0 0 0;
378                         }
379                 }
380         }
381         programs {
382                 program {
383                         name, "disabled";
384                         signal, SIGNAL_DISABLED;
385                         source, SOURCE_ELM;
386                         action, STATE_SET "disabled" 0.0;
387                         target, "border_bg";
388                         target, "bg";
389                         target, PART_TITLE;
390                 }
391                 program {
392                         name, "focused";
393                         signal, SIGNAL_FOCUSED;
394                         source, SOURCE_ELM;
395                         action, STATE_SET "focused" 0.0;
396                         target, "border_bg";
397                         target, "bg";
398                         target, PART_TITLE;
399                 }
400                 program {
401                         name, "unfocused";
402                         signal, SIGNAL_UNFOCUSED;
403                         source, SOURCE_ELM;
404                         action, STATE_SET "default" 0.0;
405                         target, "border_bg";
406                         target, "bg";
407                         target, PART_TITLE;
408                 }
409                 program {
410                         name, "mouse_unclick_after";
411                         signal, "mouse,clicked,1";
412                         source, "event";
413                         action, SIGNAL_EMIT "elm,action,click" "";
414                 }
415         }
416 }
417
418 group {
419         data.item: "focus_highlight" "on";
420         name: "elm/button/base/square/notification_clear";
421         images {
422                 image, "btn_noti_list_clearall_dis.png" COMP;
423                 image, "btn_noti_list_clearall_foc.png" COMP;
424                 image, "btn_noti_list_clearall_nor.png" COMP;
425         }
426         parts {
427                 part {
428                         name, "border_bg";
429                         type, RECT;
430                         scale, 1;
431                         description {
432                                 state, "default" 0.0;
433                                 color, 48 48 48 255;
434                                 align, 0.5 0.5;
435                                 min, 98 66;
436                                 fixed, 1 1;
437                         }
438                         description {
439                                 state, "focused" 0.0;
440                                 inherit, "default" 0.0;
441                                 color, 64 171 233 255;
442                         }
443                 }
444                 part {
445                         name, "bg";
446                         type, RECT;
447                         scale, 1;
448                         description {
449                                 state, "default" 0.0;
450                                 rel1 {
451                                         to, "border_bg";
452                                         relative, 0.5 0.5;
453                                 }
454                                 rel2 {
455                                         to, "border_bg";
456                                         relative, 0.5 0.5;
457                                 }
458                                 color, 48 48 48 255;
459                                 align, 0.5 0.5;
460                                 min, 90 58;
461                                 fixed, 1 1;
462                         }
463                 }
464                 part {
465                         name, PART_ICON;
466                         type, IMAGE;
467                         scale, 1;
468                         description {
469                                 state, "default" 0.0;
470                                 image.normal, "btn_noti_list_clearall_nor.png";
471                                 align, 0.0 0.0;
472                                 fixed, 1 1;
473                                 visible, 1;
474                         }
475                         description {
476                                 state, "disabled" 0.0;
477                                 inherit, "default" 0.0;
478                                 image.normal, "btn_noti_list_clearall_dis.png";
479                         }
480                         description {
481                                 state, "focused" 0.0;
482                                 inherit, "default" 0.0;
483                                 image.normal, "btn_noti_list_clearall_foc.png";
484                         }
485                 }
486                 part {
487                         name: "event";
488                         type: RECT;
489                         description {
490                                 state: "default" 0.0;
491                                 color: 0 0 0 0;
492                         }
493                 }
494         }
495         programs {
496                 program {
497                         name, "disabled";
498                         signal, SIGNAL_DISABLED;
499                         source, SOURCE_ELM;
500                         action, STATE_SET "disabled" 0.0;
501                         target, "border_bg";
502                         target, "bg";
503                         target, PART_ICON;
504                 }
505                 program {
506                         name, "focused";
507                         signal, SIGNAL_FOCUSED;
508                         source, SOURCE_ELM;
509                         action, STATE_SET "focused" 0.0;
510                         target, "border_bg";
511                         target, "bg";
512                         target, PART_ICON;
513                 }
514                 program {
515                         name, "unfocused";
516                         signal, SIGNAL_UNFOCUSED;
517                         source, SOURCE_ELM;
518                         action, STATE_SET "default" 0.0;
519                         target, "border_bg";
520                         target, "bg";
521                         target, PART_ICON;
522                 }
523                 program {
524                         name, "mouse_unclick_after";
525                         signal, "mouse,clicked,1";
526                         source, "event";
527                         action, SIGNAL_EMIT "elm,action,click" "";
528                 }
529         }
530 }
531
532 group {
533         name, "elm/button/base/style.livetv.button";
534         data.item, "focus_highlight" "on";
535         parts {
536                 part {
537                         name, "part.bg";
538                         type, RECT;
539                         scale, 1;
540                         description {
541                                 state, "default" 0.0;
542                                 min, 0 64;
543                         }
544                         description {
545                                 state: "focused" 0.0;
546                                 inherit: "default" 0.0;
547                                 color: 0 119 246 255;
548                         }
549                 }
550
551                 part {
552                         name, "padding.text.left";
553                         type, SPACER;
554                         scale, 1;
555                         description {
556                                 state, "default" 0.0;
557                                 min, 20 0;
558                                 rel1.to, "part.bg";
559                                 rel2 {
560                                         to, "part.bg";
561                                         relative, 0.0 1.0;
562                                 }
563                                 align, 0.0 0.5;
564                                 fixed, 1 0;
565                         }
566                 }
567
568                 part {
569                         name, "padding.text.right";
570                         type, SPACER;
571                         scale, 1;
572                         description {
573                                 state, "default" 0.0;
574                                 min, 20 0;
575                                 rel1 {
576                                         to, "part.bg";
577                                         relative, 1.0 0.0;
578                                 }
579                                 rel2.to, "part.bg";
580                                 align, 1.0 0.5;
581                                 fixed, 1 0;
582                         }
583                 }
584
585                 part {
586                         name, "elm.text";
587                         type, TEXT;
588                         scale, 1;
589                         description {
590                                 state, "default" 0.0;
591                                 color, 87 87 87 255;
592                                 rel1 {
593                                         to, "padding.text.left";
594                                         relative, 1.0 0.0;
595                                 }
596                                 rel2 {
597                                         to, "padding.text.right";
598                                         relative, 0.0 1.0;
599                                 }
600                                 text {
601                                         font, FONT_LIGHT;
602                                         size, 28;
603                                         align, 0.5 0.5;
604                                 }
605                         }
606                         description {
607                                 state: "focused" 0.0;
608                                 inherit: "default" 0.0;
609                                 color: 255 255 255 255;
610                         }
611                         description {
612                                 state: "disabled" 0.0;
613                                 inherit: "default" 0.0;
614                                 color: 87 87 87 128;
615                         }
616                 }
617
618                 part {
619                         name, "part.inside.line.up";
620                         type, RECT;
621                         scale, 1;
622                         description {
623                                 state, "default" 0.0;
624                                 color, 194 194 194 255;
625                                 rel1.to, "part.bg";
626                                 rel2 {
627                                         to, "part.bg";
628                                         relative, 1.0 0.0;
629                                 }
630                                 min, 0 1;
631                                 align, 0.5 0.0;
632                                 fixed, 0 1;
633                         }
634                 }
635
636                 part {
637                         name, "part.inside.line.left";
638                         type, RECT;
639                         scale, 1;
640                         description {
641                                 state, "default" 0.0;
642                                 color, 194 194 194 255;
643                                 rel1 {
644                                         to, "part.inside.line.up";
645                                         relative, 0.0 1.0;
646                                 }
647                                 rel2 {
648                                         to, "part.bg";
649                                         relative, 0.0 1.0;
650                                 }
651                                 min, 1 0;
652                                 align, 0.0 0.5;
653                                 fixed, 1 0;
654                         }
655                 }
656
657                 part {
658                         name, "part.inside.line.down";
659                         type, RECT;
660                         scale, 1;
661                         description {
662                                 state, "default" 0.0;
663                                 color, 194 194 194 255;
664                                 rel1 {
665                                         to, "part.inside.line.left";
666                                         relative, 1.0 1.0;
667                                 }
668                                 rel2.to, "part.bg";
669                                 min, 0 1;
670                                 align, 0.5 1.0;
671                                 fixed, 0 1;
672                         }
673                 }
674
675                 part {
676                         name, "part.inside.line.right";
677                         type, RECT;
678                         scale, 1;
679                         description {
680                                 state, "default" 0.0;
681                                 color, 194 194 194 255;
682                                 rel1 {
683                                         to, "part.inside.line.up";
684                                         relative, 1.0 1.0;
685                                 }
686                                 rel2 {
687                                         to, "part.inside.line.down";
688                                         relative, 1.0 0.0;
689                                 }
690                                 min, 1 0;
691                                 align, 1.0 0.5;
692                                 fixed, 1 0;
693                         }
694                 }
695         }
696         programs {
697                 program {
698                         name: "disabled";
699                         signal: "elm,state,disabled";
700                         source: "elm";
701                         action: STATE_SET "disabled" 0.0;
702                         target: "part.bg";
703                         target: "elm.text";
704                 }
705                 program {
706                         name: "focused";
707                         signal: "elm,action,focus";
708                         source: "elm";
709                         action: STATE_SET "focused" 0.0;
710                         target: "part.bg";
711                         target: "elm.text";
712                 }
713                 program {
714                         name: "unfocused";
715                         signal: "elm,action,unfocus";
716                         source: "elm";
717                         action: STATE_SET "default" 0.0;
718                         target: "part.bg";
719                         target: "elm.text";
720                 }
721         }
722 }
723
724 #define DEFAULT 1
725 #define SELECTED 2
726 #define FOCUSED 3
727 #define DISABLED 4
728
729 group {
730         name, "elm/button/base/style.action.menu.button";
731         data.item, "focus_highlight" "on";
732         script {
733                 public is_toggle, is_selected, is_enabled, is_focused, is_init, cur_state;
734
735                 public init_values() {
736                         if(get_int(is_init)==0)
737                         {
738                                 set_int(is_toggle, 0);
739                                 set_int(is_enabled, 1);
740                                 set_int(is_focused, 0);
741                                 set_int(is_init, 1);
742                                 set_int(cur_state, -1);
743                         }
744                 }
745                 public set_states() {
746                         new togg;
747                         new enab;
748                         new foc;
749                         new sel;
750                         new c_state;
751                         togg = get_int(is_toggle);
752                         enab = get_int(is_enabled);
753                         foc = get_int(is_focused);
754                         sel = get_int(is_selected);
755                         c_state = get_int(cur_state);
756
757                         if(enab == 0)
758                         {
759                                 if(c_state != DISABLED)
760                                 {
761                                         if (togg == 0)
762                                         {
763                                                 run_program(PROGRAM:"do_disable");
764                                                 run_program(PROGRAM:"do_hide.1");
765                                         }
766                                         else {
767                                                 run_program(PROGRAM:"do_disable.1");
768                                                 run_program(PROGRAM:"do_hide");
769                                         }
770                                 }
771                         }
772                         else
773                         {
774                                 if(foc == 1)
775                                 {
776                                         if(c_state != FOCUSED)
777                                         {
778                                                 if (togg == 0)
779                                                 {
780                                                         run_program(PROGRAM:"do_focus");
781                                                         run_program(PROGRAM:"do_hide.1");
782                                                 }
783                                                 else {
784                                                         run_program(PROGRAM:"do_focus.1");
785                                                         run_program(PROGRAM:"do_hide");
786                                                 }
787                                         }
788                                 }
789                                 else if(sel == 1)
790                                 {
791                                         if(c_state != SELECTED)
792                                         {
793                                                 if (togg == 0)
794                                                 {
795                                                         run_program(PROGRAM:"do_select");
796                                                         run_program(PROGRAM:"do_hide.1");
797                                                 }
798                                                 else {
799                                                         run_program(PROGRAM:"do_select.1");
800                                                         run_program(PROGRAM:"do_hide");
801                                                 }
802                                         }
803                                 }
804                                 else
805                                 {
806                                         if(c_state != DEFAULT)
807                                         {
808                                                 if (togg == 0)
809                                                 {
810                                                         run_program(PROGRAM:"do_default");
811                                                         run_program(PROGRAM:"do_hide.1");
812                                                 }
813                                                 else {
814                                                         run_program(PROGRAM:"do_default.1");
815                                                         run_program(PROGRAM:"do_hide");
816                                                 }
817                                         }
818                                 }
819                         }
820                 }
821         }
822         parts {
823                 part {
824                         name, "part.bg";
825                         type, RECT;
826                         scale, 1;
827                         description {
828                                 state, "default" 0.0;
829                                 min, 124 124;
830                                 color, 255 255 255 255;
831                         }
832                         description {
833                                 state, "focused" 0.0;
834                                 inherit, "default" 0.0;
835                                 color, 0 119 246 255;
836                         }
837                 }
838
839                 part {
840                         name, "padding.icon1";
841                         type, SPACER;
842                         scale, 1;
843                         description {
844                                 state, "default" 0.0;
845                                 rel1.to, "part.bg";
846                                 rel2 {
847                                         to, "part.bg";
848                                         relative, 1.0 0.0;
849                                 }
850                                 min, 0 14;
851                                 align, 0.5 0.0;
852                                 fixed, 0 1;
853                         }
854                 }
855
856                 part {
857                         name, "padding.icon2";
858                         type, SPACER;
859                         scale, 1;
860                         description {
861                                 state, "default" 0.0;
862                                 rel1 {
863                                         to, "part.bg";
864                                         relative, 0.0 1.0;
865                                 }
866                                 rel2.to, "part.bg";
867                                 min, 0 50;
868                                 align, 0.5 1.0;
869                                 fixed, 0 1;
870                         }
871                 }
872
873                 part {
874                         name, "part.icon.bg";
875                         type, RECT;
876                         scale, 1;
877                         description {
878                                 state, "default" 0.0;
879                                 rel1 {
880                                         to, "padding.icon1";
881                                         relative, 0.0 1.0;
882                                 }
883                                 rel2 {
884                                         to, "padding.icon2";
885                                         relative, 1.0 0.0;
886                                 }
887                                 align, 0.5 0.5;
888                                 min, 60 60;
889                         }
890                 }
891
892                 part {
893                         name, "elm.swallow.icon";
894                         type, SWALLOW;
895                         scale, 1;
896                         clip_to: "part.icon.bg";
897                         description {
898                                 state, "default" 0.0;
899                                 aspect, 1.0 1.0;
900                                 aspect_preference, BOTH;
901                                 rel1 {
902                                         to, "part.icon.bg";
903                                         relative, 0.5 0.5;
904                                 }
905                                 rel2 {
906                                         to, "part.icon.bg";
907                                         relative, 0.5 0.5;
908                                 }
909                                 align, 0.5 0.5;
910                                 fixed, 1 1;
911                                 min, 60 60;
912                         }
913                         description {
914                                 state, "focused" 0.0;
915                                 inherit, "default" 0.0;
916                                 visible, 0;
917                         }
918                         description {
919                                 state, "selected" 0.0;
920                                 inherit, "default" 0.0;
921                                 visible, 0;
922                         }
923                         description {
924                                 state, "disabled" 0.0;
925                                 inherit, "default" 0.0;
926                                 visible, 0;
927                         }
928                         description {
929                                 state, "invisible" 0.0;
930                                 inherit, "default" 0.0;
931                                 visible, 0;
932                         }
933                 }
934                 part {
935                         name, "elm.swallow.icon.focus";
936                         type, SWALLOW;
937                         scale, 1;
938                         clip_to: "part.icon.bg";
939                         description {
940                                 state, "default" 0.0;
941                                 aspect: 1.0 1.0;
942                                 aspect_preference: BOTH;
943                                 rel1 {
944                                         to, "part.icon.bg";
945                                         relative, 0.5 0.5;
946                                 }
947                                 rel2 {
948                                         to, "part.icon.bg";
949                                         relative, 0.5 0.5;
950                                 }
951                                 align, 0.5 0.5;
952                                 fixed, 1 1;
953                                 min, 60 60;
954                                 visible, 0;
955                         }
956                         description {
957                                 state, "focused" 0.0;
958                                 inherit, "default" 0.0;
959                                 visible, 1;
960                         }
961                         description {
962                                 state, "selected" 0.0;
963                                 inherit, "default" 0.0;
964                                 visible, 0;
965                         }
966                         description {
967                                 state, "disabled" 0.0;
968                                 inherit, "default" 0.0;
969                                 visible, 0;
970                         }
971                         description {
972                                 state, "invisible" 0.0;
973                                 inherit, "default" 0.0;
974                                 visible, 0;
975                         }
976                 }
977                 part {
978                         name, "elm.swallow.icon.select";
979                         type, SWALLOW;
980                         scale, 1;
981                         clip_to: "part.icon.bg";
982                         description {
983                                 state, "default" 0.0;
984                                 aspect: 1.0 1.0;
985                                 aspect_preference: BOTH;
986                                 rel1 {
987                                         to, "part.icon.bg";
988                                         relative, 0.5 0.5;
989                                 }
990                                 rel2 {
991                                         to, "part.icon.bg";
992                                         relative, 0.5 0.5;
993                                 }
994                                 align, 0.5 0.5;
995                                 fixed, 1 1;
996                                 min, 60 60;
997                                 visible, 0;
998                         }
999                         description {
1000                                 state, "focused" 0.0;
1001                                 inherit, "default" 0.0;
1002                                 visible, 0;
1003                         }
1004                         description {
1005                                 state, "selected" 0.0;
1006                                 inherit, "default" 0.0;
1007                                 visible, 1;
1008                         }
1009                         description {
1010                                 state, "disabled" 0.0;
1011                                 inherit, "default" 0.0;
1012                                 visible, 0;
1013                         }
1014                         description {
1015                                 state, "invisible" 0.0;
1016                                 inherit, "default" 0.0;
1017                                 visible, 0;
1018                         }
1019                 }
1020                 part {
1021                         name, "elm.swallow.icon.disable";
1022                         type, SWALLOW;
1023                         scale, 1;
1024                         clip_to: "part.icon.bg";
1025                         description {
1026                                 state, "default" 0.0;
1027                                 aspect: 1.0 1.0;
1028                                 aspect_preference: BOTH;
1029                                 rel1 {
1030                                         to, "part.icon.bg";
1031                                         relative, 0.5 0.5;
1032                                 }
1033                                 rel2 {
1034                                         to, "part.icon.bg";
1035                                         relative, 0.5 0.5;
1036                                 }
1037                                 align, 0.5 0.5;
1038                                 fixed, 1 1;
1039                                 min, 60 60;
1040                                 visible, 0;
1041                         }
1042                         description {
1043                                 state, "focused" 0.0;
1044                                 inherit, "default" 0.0;
1045                                 visible, 0;
1046                         }
1047                         description {
1048                                 state, "selected" 0.0;
1049                                 inherit, "default" 0.0;
1050                                 visible, 0;
1051                         }
1052                         description {
1053                                 state, "disabled" 0.0;
1054                                 inherit, "default" 0.0;
1055                                 visible, 1;
1056                         }
1057                         description {
1058                                 state, "invisible" 0.0;
1059                                 inherit, "default" 0.0;
1060                                 visible, 0;
1061                         }
1062                 }
1063
1064                 part {
1065                         name, "elm.swallow.icon.1";
1066                         type, SWALLOW;
1067                         scale, 1;
1068                         clip_to: "part.icon.bg";
1069                         description {
1070                                 state, "default" 0.0;
1071                                 aspect, 1.0 1.0;
1072                                 aspect_preference, BOTH;
1073                                 rel1 {
1074                                         to, "part.icon.bg";
1075                                         relative, 0.5 0.5;
1076                                 }
1077                                 rel2 {
1078                                         to, "part.icon.bg";
1079                                         relative, 0.5 0.5;
1080                                 }
1081                                 align, 0.5 0.5;
1082                                 fixed, 1 1;
1083                                 min, 60 60;
1084                         }
1085                         description {
1086                                 state, "focused" 0.0;
1087                                 inherit, "default" 0.0;
1088                                 visible, 0;
1089                         }
1090                         description {
1091                                 state, "selected" 0.0;
1092                                 inherit, "default" 0.0;
1093                                 visible, 0;
1094                         }
1095                         description {
1096                                 state, "disabled" 0.0;
1097                                 inherit, "default" 0.0;
1098                                 visible, 0;
1099                         }
1100                         description {
1101                                 state, "invisible" 0.0;
1102                                 inherit, "default" 0.0;
1103                                 visible, 0;
1104                         }
1105                 }
1106                 part {
1107                         name, "elm.swallow.icon.1.focus";
1108                         type, SWALLOW;
1109                         scale, 1;
1110                         clip_to: "part.icon.bg";
1111                         description {
1112                                 state, "default" 0.0;
1113                                 aspect: 1.0 1.0;
1114                                 aspect_preference: BOTH;
1115                                 rel1 {
1116                                         to, "part.icon.bg";
1117                                         relative, 0.5 0.5;
1118                                 }
1119                                 rel2 {
1120                                         to, "part.icon.bg";
1121                                         relative, 0.5 0.5;
1122                                 }
1123                                 align, 0.5 0.5;
1124                                 fixed, 1 1;
1125                                 min, 60 60;
1126                                 visible, 0;
1127                         }
1128                         description {
1129                                 state, "focused" 0.0;
1130                                 inherit, "default" 0.0;
1131                                 visible, 1;
1132                         }
1133                         description {
1134                                 state, "selected" 0.0;
1135                                 inherit, "default" 0.0;
1136                                 visible, 0;
1137                         }
1138                         description {
1139                                 state, "disabled" 0.0;
1140                                 inherit, "default" 0.0;
1141                                 visible, 0;
1142                         }
1143                         description {
1144                                 state, "invisible" 0.0;
1145                                 inherit, "default" 0.0;
1146                                 visible, 0;
1147                         }
1148                 }
1149                 part {
1150                         name, "elm.swallow.icon.1.select";
1151                         type, SWALLOW;
1152                         scale, 1;
1153                         clip_to: "part.icon.bg";
1154                         description {
1155                                 state, "default" 0.0;
1156                                 aspect: 1.0 1.0;
1157                                 aspect_preference: BOTH;
1158                                 rel1 {
1159                                         to, "part.icon.bg";
1160                                         relative, 0.5 0.5;
1161                                 }
1162                                 rel2 {
1163                                         to, "part.icon.bg";
1164                                         relative, 0.5 0.5;
1165                                 }
1166                                 align, 0.5 0.5;
1167                                 fixed, 1 1;
1168                                 min, 60 60;
1169                                 visible, 0;
1170                         }
1171                         description {
1172                                 state, "focused" 0.0;
1173                                 inherit, "default" 0.0;
1174                                 visible, 0;
1175                         }
1176                         description {
1177                                 state, "selected" 0.0;
1178                                 inherit, "default" 0.0;
1179                                 visible, 1;
1180                         }
1181                         description {
1182                                 state, "disabled" 0.0;
1183                                 inherit, "default" 0.0;
1184                                 visible, 0;
1185                         }
1186                         description {
1187                                 state, "invisible" 0.0;
1188                                 inherit, "default" 0.0;
1189                                 visible, 0;
1190                         }
1191                 }
1192                 part {
1193                         name, "elm.swallow.icon.1.disable";
1194                         type, SWALLOW;
1195                         scale, 1;
1196                         clip_to: "part.icon.bg";
1197                         description {
1198                                 state, "default" 0.0;
1199                                 aspect: 1.0 1.0;
1200                                 aspect_preference: BOTH;
1201                                 rel1 {
1202                                         to, "part.icon.bg";
1203                                         relative, 0.5 0.5;
1204                                 }
1205                                 rel2 {
1206                                         to, "part.icon.bg";
1207                                         relative, 0.5 0.5;
1208                                 }
1209                                 align, 0.5 0.5;
1210                                 fixed, 1 1;
1211                                 min, 60 60;
1212                                 visible, 0;
1213                         }
1214                         description {
1215                                 state, "focused" 0.0;
1216                                 inherit, "default" 0.0;
1217                                 visible, 0;
1218                         }
1219                         description {
1220                                 state, "selected" 0.0;
1221                                 inherit, "default" 0.0;
1222                                 visible, 0;
1223                         }
1224                         description {
1225                                 state, "disabled" 0.0;
1226                                 inherit, "default" 0.0;
1227                                 visible, 1;
1228                         }
1229                         description {
1230                                 state, "invisible" 0.0;
1231                                 inherit, "default" 0.0;
1232                                 visible, 0;
1233                         }
1234                 }
1235
1236                 part {
1237                         name, "padding.text";
1238                         type, SPACER;
1239                         scale, 1;
1240                         description {
1241                                 state, "default" 0.0;
1242                                 rel1 {
1243                                         to, "part.bg";
1244                                         relative, 0.0 1.0;
1245                                 }
1246                                 rel2.to, "part.bg";
1247                                 min, 0 24;
1248                                 align, 0.5 1.0;
1249                                 fixed, 0 1;
1250                         }
1251                 }
1252
1253                 part {
1254                         name, "elm.text";
1255                         type, TEXT;
1256                         scale, 1;
1257                         description {
1258                                 state, "default" 0.0;
1259                                 color, 104 104 104 255;
1260                                 rel1.to, "padding.text";
1261                                 rel2 {
1262                                         to, "padding.text";
1263                                         relative, 1.0 0.0;
1264                                 }
1265                                 min, 0 20;
1266                                 align, 0.5 1.0;
1267                                 fixed, 0 1;
1268                                 text {
1269                                         font, FONT_LIGHT;
1270                                         size, 20;
1271                                         align, 0.5 0.5;
1272                                 }
1273                         }
1274                         description {
1275                                 state, "focused" 0.0;
1276                                 inherit, "default" 0.0;
1277                                 color, 255 255 255 255;
1278                         }
1279                         description {
1280                                 state, "selected" 0.0;
1281                                 inherit, "default" 0.0;
1282                                 color, 64 136 211 255;
1283                         }
1284                         description {
1285                                 state: "disabled" 0.0;
1286                                 inherit: "default" 0.0;
1287                                 color: 104 104 104 128;
1288                         }
1289                         description {
1290                                 state, "invisible" 0.0;
1291                                 inherit, "default" 0.0;
1292                                 visible, 0;
1293                         }
1294                 }
1295
1296                 part {
1297                         name, "elm.text.1";
1298                         type, TEXT;
1299                         scale, 1;
1300                         description {
1301                                 state, "default" 0.0;
1302                                 color, 104 104 104 255;
1303                                 rel1.to, "padding.text";
1304                                 rel2 {
1305                                         to, "padding.text";
1306                                         relative, 1.0 0.0;
1307                                 }
1308                                 min, 0 20;
1309                                 align, 0.5 1.0;
1310                                 fixed, 0 1;
1311                                 text {
1312                                         font, FONT_LIGHT;
1313                                         size, 20;
1314                                         align, 0.5 0.5;
1315                                 }
1316                         }
1317                         description {
1318                                 state, "focused" 0.0;
1319                                 inherit, "default" 0.0;
1320                                 color, 255 255 255 255;
1321                         }
1322                         description {
1323                                 state, "selected" 0.0;
1324                                 inherit, "default" 0.0;
1325                                 color, 64 136 211 255;
1326                         }
1327                         description {
1328                                 state: "disabled" 0.0;
1329                                 inherit: "default" 0.0;
1330                                 color: 104 104 104 128;
1331                         }
1332                         description {
1333                                 state, "invisible" 0.0;
1334                                 inherit, "default" 0.0;
1335                                 visible, 0;
1336                         }
1337                 }
1338         }
1339         programs {
1340                 program {
1341                         name: "go_toggle";
1342                         signal: "elm,state,toggle";
1343                         source: "elm";
1344                         script {
1345                                 init_values();
1346                                 set_int(is_toggle, 1);
1347                                 set_states();
1348                         }
1349                 }
1350                 program {
1351                         name: "go_untoggle";
1352                         signal: "elm,state,untoggle";
1353                         source: "elm";
1354                         script {
1355                                 init_values();
1356                                 set_int(is_toggle, 0);
1357                                 set_states();
1358                         }
1359                 }
1360                 program {
1361                         name: "go_focused";
1362                         signal: "elm,action,focus";
1363                         source: "elm";
1364                         script {
1365                                 init_values();
1366                                 set_int(is_focused, 1);
1367                                 set_states();
1368                         }
1369                 }
1370                 program {
1371                         name: "go_unfocused";
1372                         signal: "elm,action,unfocus";
1373                         source: "elm";
1374                         script {
1375                                 init_values();
1376                                 set_int(is_focused, 0);
1377                                 set_states();
1378                         }
1379                 }
1380                 program {
1381                         name: "go_active";
1382                         signal: "elm,state,selected";
1383                         source: "elm";
1384                         script {
1385                                 init_values();
1386                                 set_int(is_selected, 1);
1387                                 set_states();
1388                         }
1389                 }
1390                 program {
1391                         name: "go_passive";
1392                         signal: "elm,state,unselected";
1393                         source: "elm";
1394                         script {
1395                                 init_values();
1396                                 set_int(is_selected, 0);
1397                                 set_states();
1398                         }
1399                 }
1400                 program {
1401                         name: "go_disabled";
1402                         signal: "elm,state,disabled";
1403                         source: "elm";
1404                         script {
1405                                 init_values();
1406                                 set_int(is_enabled, 0);
1407                                 set_states();
1408                         }
1409                 }
1410                 program {
1411                         name: "go_enabled";
1412                         signal: "elm,state,enabled";
1413                         source: "elm";
1414                         script {
1415                                 init_values();
1416                                 set_int(is_enabled, 1);
1417                                 set_states();
1418                         }
1419                 }
1420                 program {
1421                         name: "do_hide";
1422                         action: STATE_SET "invisible" 0.0;
1423                         target: "elm.text";
1424                         target: "elm.swallow.icon";
1425                         target: "elm.swallow.icon.focus";
1426                         target: "elm.swallow.icon.select";
1427                         target: "elm.swallow.icon.disable";
1428                 }
1429                 program {
1430                         name: "do_default";
1431                         action: STATE_SET "default" 0.0;
1432                         target: "part.bg";
1433                         target: "elm.text";
1434                         target: "elm.swallow.icon";
1435                         target: "elm.swallow.icon.focus";
1436                         target: "elm.swallow.icon.select";
1437                         target: "elm.swallow.icon.disable";
1438                 }
1439                 program {
1440                         name: "do_focus";
1441                         action: STATE_SET "focused" 0.0;
1442                         target: "part.bg";
1443                         target: "elm.text";
1444                         target: "elm.swallow.icon";
1445                         target: "elm.swallow.icon.focus";
1446                         target: "elm.swallow.icon.select";
1447                         target: "elm.swallow.icon.disable";
1448                 }
1449
1450                 program {
1451                         name: "do_select";
1452                         action: STATE_SET "selected" 0.0;
1453                         target: "part.bg";
1454                         target: "elm.text";
1455                         target: "elm.swallow.icon";
1456                         target: "elm.swallow.icon.focus";
1457                         target: "elm.swallow.icon.select";
1458                         target: "elm.swallow.icon.disable";
1459                 }
1460
1461                 program {
1462                         name: "do_disable";
1463                         action: STATE_SET "disabled" 0.0;
1464                         target: "part.bg";
1465                         target: "elm.text";
1466                         target: "elm.swallow.icon";
1467                         target: "elm.swallow.icon.focus";
1468                         target: "elm.swallow.icon.select";
1469                         target: "elm.swallow.icon.disable";
1470                 }
1471
1472                 program {
1473                         name: "do_hide.1";
1474                         action: STATE_SET "invisible" 0.0;
1475                         target: "elm.text.1";
1476                         target: "elm.swallow.icon.1";
1477                         target: "elm.swallow.icon.1.focus";
1478                         target: "elm.swallow.icon.1.select";
1479                         target: "elm.swallow.icon.1.disable";
1480                 }
1481
1482                 program {
1483                         name: "do_default.1";
1484                         action: STATE_SET "default" 0.0;
1485                         target: "part.bg";
1486                         target: "elm.text.1";
1487                         target: "elm.swallow.icon.1";
1488                         target: "elm.swallow.icon.1.focus";
1489                         target: "elm.swallow.icon.1.select";
1490                         target: "elm.swallow.icon.1.disable";
1491                 }
1492                 program {
1493                         name: "do_focus.1";
1494                         action: STATE_SET "focused" 0.0;
1495                         target: "part.bg";
1496                         target: "elm.text.1";
1497                         target: "elm.swallow.icon.1";
1498                         target: "elm.swallow.icon.1.focus";
1499                         target: "elm.swallow.icon.1.select";
1500                         target: "elm.swallow.icon.1.disable";
1501                 }
1502
1503                 program {
1504                         name: "do_select.1";
1505                         action: STATE_SET "selected" 0.0;
1506                         target: "part.bg";
1507                         target: "elm.text.1";
1508                         target: "elm.swallow.icon.1";
1509                         target: "elm.swallow.icon.1.focus";
1510                         target: "elm.swallow.icon.1.select";
1511                         target: "elm.swallow.icon.1.disable";
1512                 }
1513
1514                 program {
1515                         name: "do_disable.1";
1516                         action: STATE_SET "disabled" 0.0;
1517                         target: "part.bg";
1518                         target: "elm.text.1";
1519                         target: "elm.swallow.icon.1";
1520                         target: "elm.swallow.icon.1.focus";
1521                         target: "elm.swallow.icon.1.select";
1522                         target: "elm.swallow.icon.1.disable";
1523                 }
1524         }
1525 }