[Button.edc] Added button_icon_expand_closed and opened styles,which are added as...
[framework/uifw/efl-theme-tizen.git] / themes / widgets / button.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved 
3  *
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of SAMSUNG
7  * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
8  * software is owned by Samsung and you shall not disclose such Confidential
9  * Information and shall use it only in accordance with the terms of the license
10  * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
11  * representations or warranties about the suitability of the software, either
12  * express or implied, including but not limited to the implied warranties of
13  * merchantability, fitness for a particular purpose, or non-infringement.
14  * SAMSUNG shall not be liable for any damages suffered by licensee arising out
15  * of or releated to this software.
16  *
17  */
18
19 #define BUTTON_STATE_ENABLED 0
20 #define BUTTON_STATE_DISABLED 1
21
22 ///////////////////////////////////////////////////////////////////////////////////////
23    group { name: "elm/button/base/style1";
24       alias: "elm/button/base/text_only/style1";
25       alias: "elm/button/base/center";
26       alias: "elm/button/base/icon_and_text/center";
27       alias: "elm/button/base/nocontents/search_button";
28       images {
29          image: "00_button_01_normal.png" COMP;
30          image: "00_button_01_normal_press.png" COMP;
31          image: "00_button_01_normal_dim.png" COMP;
32       }
33       script {
34          public button_state = BUTTON_STATE_ENABLED;
35       }
36       parts {
37          part { name: "button_image";
38             scale: 1;
39             description { state: "default" 0.0;
40                image {
41                   normal: "00_button_01_normal.png";
42                   border: BUTTON_TEXT_STYLE1_BG_BORDER_INC;
43                   border_scale: 1;
44                }
45             }
46             description { state: "clicked" 0.0;
47                inherit: "default" 0.0;
48                image.normal: "00_button_01_normal_press.png";
49             }
50             description { state: "disabled" 0.0;
51                inherit: "default" 0.0;
52                image.normal: "00_button_01_normal_dim.png";
53             }
54             description { state: "focused" 0.0;
55                inherit: "default" 0.0;
56                image.normal: "00_button_01_normal_press.png";
57             }
58          }
59          part { name: "padding_left_top";
60             type: RECT;
61             scale: 1;
62             mouse_events: 0;
63             description { state: "default" 0.0;
64                align: 0.0 0.0;
65                rel2.relative: 0.0 0.0;
66                min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC;
67                fixed: 1 1;
68                visible: 0;
69             }
70          }
71          part { name: "bg";
72             type: RECT;
73             scale: 1;
74             mouse_events: 0;
75             description { state: "default" 0.0;
76                min: BUTTON_TEXT_STYLE1_BG_MIN_INC;
77                visible: 0;
78             }
79             description { state: "visible" 0.0;
80                inherit: "default" 0.0;
81                min: BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC;
82             }
83             description { state: "icononly" 0.0;
84                inherit: "default" 0.0;
85                min: BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC;
86             }
87          }
88          part { name: "padding_right_bottom";
89             type: RECT;
90             scale: 1;
91             mouse_events: 0;
92             description { state: "default" 0.0;
93                align: 1.0 1.0;
94                rel1.relative: 1.0 1.0;
95                min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC;
96                fixed: 1 1;
97                visible: 0;
98             }
99          }
100          part { name: "icon_rect";
101             type: RECT;
102             scale: 1;
103             mouse_events: 0;
104             description { state: "default" 0.0;
105                visible: 0;
106                min: 0 0;
107                fixed: 1 0;
108                rel1 {
109                   relative: 1.0 1.0;
110                   to: "padding_left_top";
111                }
112                rel2 {
113                   relative: 1.0 0.0;
114                   to_x: "padding_left_top";
115                   to_y: "padding_right_bottom";
116                }
117                align: 0.0 0.5;
118             }
119             description { state: "visible" 0.0;
120                visible: 0;
121                min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC;
122                max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC;
123                fixed: 1 0;
124                rel1 {
125                   relative: 1.0 1.0;
126                   to: "padding_left_top";
127                }
128                rel2 {
129                   relative: 1.0 0.0;
130                   to_x: "padding_left_top";
131                   to_y: "padding_right_bottom";
132                }
133                align: 0.0 0.5;
134             }
135             description { state: "icononly" 0.0;
136                inherit: "default" 0.0;
137             }
138          }
139          part { name: "padding_after_icon";
140             type: RECT;
141             scale: 1;
142             mouse_events: 0;
143             description { state: "default" 0.0; //when only icon or no icon is there
144                align: 0.0 0.0;
145                rel1 {
146                   relative: 1.0 0.0;
147                   to: "icon_rect";
148                }
149                rel2.to: "icon_rect";
150                fixed: 1 0;
151                min: 0 0;
152                visible: 0;
153             }
154             description { state: "visible" 0.0;
155                visible: 0;
156                align: 0.0 0.0;
157                rel1 {
158                   relative: 1.0 0.0;
159                   to: "icon_rect";
160                }
161                rel2.to: "icon_rect";
162                fixed: 1 0;
163                min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
164             }
165             description { state: "icononly" 0.0;
166                inherit: "default" 0.0;
167             }
168          }
169          part { name: "padding_before_text";
170             type: RECT;
171             scale: 1;
172             mouse_events: 0;
173             description { state: "default" 0.0; //when only icon or no icon is there
174                align: 1.0 0.5;
175                rel1 {
176                   relative: 0.0 1.0;
177                   to_x: "elm.text";
178                   to_y: "padding_left_top";
179                }
180                rel2 {
181                   relative: 0.0 0.0;
182                   to_x: "elm.text";
183                   to_y: "padding_right_bottom";
184                }
185                fixed: 1 0;
186                min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
187                visible: 0;
188             }
189          }
190          part { name: "elm.swallow.content";
191             type: SWALLOW;
192             scale: 1;
193             clip_to: "clipper";
194             description { state: "default" 0.0;
195                visible: 0;
196                align: 0.0 0.5;
197                rel1 {
198                   relative: 1.0 1.0;
199                   to: "padding_left_top";
200                }
201                rel2 {
202                   relative: 1.0 0.0;
203                   to_x: "padding_left_top";
204                   to_y: "padding_right_bottom";
205                }
206                fixed: 1 0;
207             }
208             description { state: "visible" 0.0;
209                fixed: 1 0;
210                min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC;
211                max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC;
212                align: 1.0 0.5;
213                rel1 {
214                   relative: 0.0 1.0;
215                   to_x: "padding_before_text";
216                   to_y: "padding_left_top";
217                }
218                rel2 {
219                   relative: 0.0 0.0;
220                   to_x: "padding_before_text";
221                   to_y: "padding_right_bottom";
222                }
223             }
224             description { state: "icononly" 0.0;
225                min: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC;
226                max: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC;
227             }
228          }
229          part { name: "elm.text";
230             type: TEXT;
231             mouse_events: 0;
232             scale: 1;
233             clip_to: "clipper";
234             description { state: "default" 0.0;
235                visible: 0;
236                rel1 {
237                   relative: 1.0 1.0;
238                   to_x: "padding_after_icon";
239                   to_y: "padding_left_top";
240                }
241                rel2 {
242                   relative: 0.0 0.0;
243                   to: "padding_right_bottom";
244                }
245                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
246                text {
247                   font: "SLP:style=Medium";
248                   size: BUTTON_TEXT_STYLE1_FONT_SIZE_INC;
249                   min: 0 0;
250                   max: 1 0;
251                }
252             }
253             description { state: "visible" 0.0;
254                inherit: "default" 0.0;
255                visible: 1;
256             }
257             description { state: "clicked" 0.0;
258                inherit: "default" 0.0;
259                visible: 1;
260                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
261             }
262             description { state: "disabled" 0.0;
263                inherit: "default" 0.0;
264                color: 0 0 0 128;
265             }
266             description { state: "disabled_visible" 0.0;
267                inherit: "default" 0.0;
268                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
269                visible: 1;
270             }
271             description { state: "focused" 0.0;
272                inherit: "default" 0.0;
273                visible: 1;
274                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
275             }
276          }
277          part { name: "over2";
278             type: RECT;
279             repeat_events: 1;
280             ignore_flags: ON_HOLD;
281             description { state: "default" 0.0;
282                color: 0 0 0 0;
283             }
284          }
285          part { name: "over3";
286             type: RECT;
287             repeat_events: 1;
288             description { state: "default" 0.0;
289                color: 0 0 0 0;
290             }
291          }
292          part { name: "clipper";
293             type: RECT;
294             description { state: "default" 0.0;
295                color: 255 255 255 255;
296             }
297          }
298          part { name: "disabler";
299             type: RECT;
300             description { state: "default" 0.0;
301                color: 0 0 0 0;
302                visible: 0;
303             }
304             description { state: "disabled" 0.0;
305                inherit: "default" 0.0;
306                visible: 1;
307             }
308          }
309       }
310       programs {
311          program { name: "button_click";
312             signal: "mouse,down,1";
313             source: "over2";
314             action: SIGNAL_EMIT "elm,action,press" "";
315             after: "button_click_anim";
316          }
317          program { name: "button_click_anim";
318             action: STATE_SET "clicked" 0.0;
319             target: "button_image";
320             after: "text_clicked";
321          }
322          program { name: "text_clicked";
323             script {
324                new st[31];
325                new Float:vl;
326                get_state(PART:"elm.text", st, 30, vl);
327                if (!strcmp(st, "visible"))
328                  set_state(PART:"elm.text", "clicked", 0.0);
329             }
330          }
331          program { name: "button_unpress";
332             action: SIGNAL_EMIT "elm,action,unpress" "";
333          }
334          program { name: "button_mouseout_clicked";
335             signal: "mouse,up,1";
336             source: "over3";
337             script {
338                new st[31];
339                new Float:vl;
340                get_state(PART:"elm.swallow.content", st, 30, vl);
341                if (strcmp(st, "icononly"))
342                  {
343                     emit("elm,action,default,text,set", "");
344                     set_state(PART:"elm.text", "visible", 0.0);
345                  }
346                if (get_int(button_state) != BUTTON_STATE_DISABLED)
347                  set_state(PART:"button_image", "default", 0.0);
348             }
349             after: button_unpress;
350          }
351          program { name: "button_unclick3";
352             signal: "mouse,clicked,1";
353             source: "over2";
354             action: SIGNAL_EMIT "elm,action,click" "";
355          }
356          program { name: "text_show";
357             signal: "elm,state,text,visible";
358             source: "elm";
359             script {
360                new st[31];
361                new Float:vl;
362                get_state(PART:"elm.swallow.content", st, 30, vl);
363                if (!strcmp(st, "icononly"))
364                  {
365                     set_state(PART:"elm.swallow.content", "visible", 0.0);
366                     set_state(PART:"icon_rect", "visible", 0.0);
367                     set_state(PART:"padding_after_icon", "visible", 0.0);
368                     set_state(PART:"bg", "visible", 0.0);
369                  }
370                if (get_int(button_state) != BUTTON_STATE_DISABLED)
371                  set_state(PART:"elm.text", "visible", 0.0);
372                else
373                  set_state(PART:"elm.text", "disabled_visible", 0.0);
374             }
375          }
376          program { name: "text_hide";
377             signal: "elm,state,text,hidden";
378             source: "elm";
379             script {
380                new st[31];
381                new Float:vl;
382                get_state(PART:"elm.swallow.content", st, 30, vl);
383                if (!strcmp(st, "visible"))
384                  {
385                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
386                     set_state(PART:"icon_rect", "icononly", 0.0);
387                     set_state(PART:"padding_after_icon", "icononly", 0.0);
388                     set_state(PART:"bg", "icononly", 0.0);
389                  }
390                set_state(PART:"elm.text", "default", 0.0);
391             }
392          }
393          program { name: "icon_show";
394             signal: "elm,state,icon,visible";
395             source: "elm";
396             script {
397                new st[31];
398                new Float:vl;
399                get_state(PART:"elm.text", st, 30, vl);
400                if (!strcmp(st, "visible"))
401                  {
402                     set_state(PART:"elm.swallow.content", "visible", 0.0);
403                     set_state(PART:"icon_rect", "visible", 0.0);
404                     set_state(PART:"padding_after_icon", "visible", 0.0);
405                     set_state(PART:"bg", "visible", 0.0);
406                  }
407                else
408                  {
409                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
410                     set_state(PART:"icon_rect", "icononly", 0.0);
411                     set_state(PART:"padding_after_icon", "icononly", 0.0);
412                     set_state(PART:"bg", "icononly", 0.0);
413                  }
414             }
415          }
416          program { name: "icon_hide";
417             signal: "elm,state,icon,hidden";
418             source: "elm";
419             action: STATE_SET "default" 0.0;
420             target: "elm.swallow.content";
421             target: "padding_after_icon";
422             target: "icon_rect";
423             target: "bg";
424          }
425          program { name: "disable";
426             signal: "elm,state,disabled";
427             source: "elm";
428             action: STATE_SET "disabled" 0.0;
429             target: "button_image";
430             target: "disabler";
431             after: "disable_text";
432          }
433          program { name: "disable_text";
434             script {
435                new st[31];
436                new Float:vl;
437                get_state(PART:"elm.text", st, 30, vl);
438                if (!strcmp(st, "visible"))
439                  set_state(PART:"elm.text", "disabled_visible", 0.0);
440                else
441                  set_state(PART:"elm.text", "disabled", 0.0);
442                set_int(button_state, BUTTON_STATE_DISABLED);
443             }
444          }
445          program { name: "enable";
446             signal: "elm,state,enabled";
447             source: "elm";
448             action: STATE_SET "default" 0.0;
449             target: "button_image";
450             target: "disabler";
451             after: "enable_text";
452          }
453          program { name: "enable_text";
454             script {
455                new st[31];
456                new Float:vl;
457                get_state(PART:"elm.text", st, 30, vl);
458                if (!strcmp(st, "disabled_visible"))
459                  set_state(PART:"elm.text", "visible", 0.0);
460                else
461                  set_state(PART:"elm.text", "default", 0.0);
462                set_int(button_state, BUTTON_STATE_ENABLED);
463             }
464          }
465          program { name: "focused";
466             //signal: "elm,action,focus";
467             //source: "elm";
468             action: STATE_SET "focused" 0.0;
469             target: "button_image";
470             target: "elm.text";
471          }
472          program { name: "unfocused";
473             //signal: "elm,action,unfocus";
474             //source: "elm";
475             action: STATE_SET "default" 0.0;
476             target: "button_image";
477             after: "unfocus_text";
478          }
479          program { name: "unfocus_text";
480             action: STATE_SET "visible" 0.0;
481             target: "elm.text";
482          }
483       }
484    }
485
486 ///////////////////////////////////////////////////////////////////////////////////////
487    group { name: "elm/button/base/style2";
488       alias: "elm/button/base/text_only/style2";
489       images {
490          image: "00_button_04_normal.png" COMP;
491          image: "00_button_04_press.png" COMP;
492          image: "00_button_04_dim.png" COMP;
493       }
494       script {
495          public button_state = BUTTON_STATE_ENABLED;
496       }
497       parts {
498          part { name: "button_image";
499             scale: 1;
500             description { state: "default" 0.0;
501                image {
502                   normal: "00_button_04_normal.png";
503                   border: BUTTON_TEXT_STYLE2_BG_BORDER_INC;
504                   border_scale: 1;
505                }
506             }
507             description { state: "clicked" 0.0;
508                inherit: "default" 0.0;
509                image.normal: "00_button_04_press.png";
510             }
511             description { state: "disabled" 0.0;
512                inherit: "default" 0.0;
513                image.normal: "00_button_04_dim.png";
514             }
515             description { state: "focused" 0.0;
516                inherit: "default" 0.0;
517                image.normal: "00_button_04_press.png";
518             }
519          }
520          part { name: "padding_left_top";
521             type: RECT;
522             scale: 1;
523             mouse_events: 0;
524             description { state: "default" 0.0;
525                align: 0.0 0.0;
526                rel2.relative: 0.0 0.0;
527                min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC;
528                fixed: 1 1;
529                visible: 0;
530             }
531          }
532          part { name: "bg";
533             type: RECT;
534             scale: 1;
535             mouse_events: 0;
536             description { state: "default" 0.0;
537                min: BUTTON_TEXT_STYLE2_BG_MIN_INC;
538                visible: 0;
539             }
540             description { state: "visible" 0.0;
541                inherit: "default" 0.0;
542                min: BUTTON_TEXT_STYLE2_VISIBLE_BG_MIN_INC;
543             }
544             description { state: "icononly" 0.0;
545                inherit: "default" 0.0;
546                min: BUTTON_TEXT_STYLE2_ICONONLY_BG_MIN_INC;
547             }
548          }
549          part { name: "padding_right_bottom";
550             type: RECT;
551             scale: 1;
552             mouse_events: 0;
553             description { state: "default" 0.0;
554                align: 1.0 1.0;
555                rel1.relative: 1.0 1.0;
556                min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC;
557                fixed: 1 1;
558                visible: 0;
559             }
560          }
561          part { name: "icon_rect";
562             type: RECT;
563             scale: 1;
564             mouse_events: 0;
565             description { state: "default" 0.0;
566                visible: 0;
567                min: 0 0;
568                fixed: 1 0;
569                rel1 {
570                   relative: 1.0 1.0;
571                   to: "padding_left_top";
572                }
573                rel2 {
574                   relative: 1.0 0.0;
575                   to_x: "padding_left_top";
576                   to_y: "padding_right_bottom";
577                }
578                align: 0.0 0.5;
579             }
580             description { state: "visible" 0.0;
581                visible: 0;
582                min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC;
583                max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC;
584                fixed: 1 0;
585                rel1 {
586                   relative: 1.0 1.0;
587                   to: "padding_left_top";
588                }
589                rel2 {
590                   relative: 1.0 0.0;
591                   to_x: "padding_left_top";
592                   to_y: "padding_right_bottom";
593                }
594                align: 0.0 0.5;
595             }
596             description { state: "icononly" 0.0;
597                inherit: "default" 0.0;
598             }
599          }
600          part { name: "padding_after_icon";
601             type: RECT;
602             scale: 1;
603             mouse_events: 0;
604             description { state: "default" 0.0; //when only icon or no icon is there
605                align: 0.0 0.0;
606                rel1 {
607                   relative: 1.0 0.0;
608                   to: "icon_rect";
609                }
610                rel2.to: "icon_rect";
611                fixed: 1 0;
612                min: 0 0;
613                visible: 0;
614             }
615             description { state: "visible" 0.0;
616                visible: 0;
617                align: 0.0 0.0;
618                rel1 {
619                   relative: 1.0 0.0;
620                   to: "icon_rect";
621                }
622                rel2.to: "icon_rect";
623                fixed: 1 0;
624                min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
625             }
626             description { state: "icononly" 0.0;
627                inherit: "default" 0.0;
628             }
629          }
630          part { name: "padding_before_text";
631             type: RECT;
632             scale: 1;
633             mouse_events: 0;
634             description { state: "default" 0.0; //when only icon or no icon is there
635                align: 1.0 0.5;
636                rel1 {
637                   relative: 0.0 1.0;
638                   to_x: "elm.text";
639                   to_y: "padding_left_top";
640                }
641                rel2 {
642                   relative: 0.0 0.0;
643                   to_x: "elm.text";
644                   to_y: "padding_right_bottom";
645                }
646                fixed: 1 0;
647                min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
648                visible: 0;
649             }
650          }
651          part { name: "elm.swallow.content";
652             type: SWALLOW;
653             scale: 1;
654             clip_to: "clipper";
655             description { state: "default" 0.0;
656                visible: 0;
657                align: 0.0 0.5;
658                rel1 {
659                   relative: 1.0 1.0;
660                   to: "padding_left_top";
661                }
662                rel2 {
663                   relative: 1.0 0.0;
664                   to_x: "padding_left_top";
665                   to_y: "padding_right_bottom";
666                }
667                fixed: 1 0;
668             }
669             description { state: "visible" 0.0;
670                fixed: 1 0;
671                min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC;
672                max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC;
673                align: 1.0 0.5;
674                rel1 {
675                   relative: 0.0 1.0;
676                   to_x: "padding_before_text";
677                   to_y: "padding_left_top";
678                }
679                rel2 {
680                   relative: 0.0 0.0;
681                   to_x: "padding_before_text";
682                   to_y: "padding_right_bottom";
683                }
684             }
685             description { state: "icononly" 0.0;
686                min: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC;
687                max: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC;
688             }
689          }
690          part { name: "elm.text";
691             type: TEXT;
692             mouse_events: 0;
693             scale: 1;
694             clip_to: "clipper";
695             description { state: "default" 0.0;
696                visible: 0;
697                rel1 {
698                   relative: 1.0 1.0;
699                   to_x: "padding_after_icon";
700                   to_y: "padding_left_top";
701                }
702                rel2 {
703                   relative: 0.0 0.0;
704                   to: "padding_right_bottom";
705                }
706                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
707                text {
708                   font: "SLP:style=Medium";
709                   size: BUTTON_TEXT_STYLE2_FONT_SIZE_INC;
710                   min: 0 0;
711                   max: 1 0;
712                }
713             }
714             description { state: "visible" 0.0;
715                inherit: "default" 0.0;
716                visible: 1;
717             }
718             description { state: "clicked" 0.0;
719                inherit: "default" 0.0;
720                visible: 1;
721                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
722             }
723             description { state: "disabled" 0.0;
724                inherit: "default" 0.0;
725                color: 0 0 0 128;
726             }
727             description { state: "disabled_visible" 0.0;
728                inherit: "default" 0.0;
729                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
730                visible: 1;
731             }
732             description { state: "focused" 0.0;
733                inherit: "default" 0.0;
734                visible: 1;
735                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
736             }
737          }
738          part { name: "over2";
739             type: RECT;
740             repeat_events: 1;
741             ignore_flags: ON_HOLD;
742             description { state: "default" 0.0;
743                color: 0 0 0 0;
744             }
745          }
746          part { name: "over3";
747             type: RECT;
748             repeat_events: 1;
749             description { state: "default" 0.0;
750                color: 0 0 0 0;
751             }
752          }
753          part { name: "clipper";
754             type: RECT;
755             description { state: "default" 0.0;
756                color: 255 255 255 255;
757             }
758          }
759          part { name: "disabler";
760             type: RECT;
761             description { state: "default" 0.0;
762                color: 0 0 0 0;
763                visible: 0;
764             }
765             description { state: "disabled" 0.0;
766                inherit: "default" 0.0;
767                visible: 1;
768             }
769          }
770       }
771       programs {
772          program { name: "button_click";
773             signal: "mouse,down,1";
774             source: "over2";
775             action: SIGNAL_EMIT "elm,action,press" "";
776             after: "button_click_anim";
777          }
778          program { name: "button_click_anim";
779             action: STATE_SET "clicked" 0.0;
780             target: "button_image";
781             after: "text_clicked";
782          }
783          program { name: "text_clicked";
784             script {
785                new st[31];
786                new Float:vl;
787                get_state(PART:"elm.text", st, 30, vl);
788                if (!strcmp(st, "visible"))
789                  set_state(PART:"elm.text", "clicked", 0.0);
790             }
791          }
792          program { name: "button_unpress";
793             action: SIGNAL_EMIT "elm,action,unpress" "";
794          }
795          program { name: "button_mouseout_clicked";
796             signal: "mouse,up,1";
797             source: "over3";
798             script {
799                new st[31];
800                new Float:vl;
801                get_state(PART:"elm.swallow.content", st, 30, vl);
802                if (strcmp(st, "icononly"))
803                  {
804                     emit("elm,action,default,text,set", "");
805                     set_state(PART:"elm.text", "visible", 0.0);
806                  }
807                if (get_int(button_state) != BUTTON_STATE_DISABLED)
808                  set_state(PART:"button_image", "default", 0.0);
809             }
810             after: button_unpress;
811          }
812          program { name: "button_unclick3";
813             signal: "mouse,clicked,1";
814             source: "over2";
815             action: SIGNAL_EMIT "elm,action,click" "";
816          }
817          program { name: "text_show";
818             signal: "elm,state,text,visible";
819             source: "elm";
820             script {
821                new st[31];
822                new Float:vl;
823                get_state(PART:"elm.swallow.content", st, 30, vl);
824                if (!strcmp(st, "icononly"))
825                  {
826                     set_state(PART:"elm.swallow.content", "visible", 0.0);
827                     set_state(PART:"icon_rect", "visible", 0.0);
828                     set_state(PART:"padding_after_icon", "visible", 0.0);
829                     set_state(PART:"bg", "visible", 0.0);
830                  }
831                if (get_int(button_state) != BUTTON_STATE_DISABLED)
832                  set_state(PART:"elm.text", "visible", 0.0);
833                else
834                  set_state(PART:"elm.text", "disabled_visible", 0.0);
835             }
836          }
837          program { name: "text_hide";
838             signal: "elm,state,text,hidden";
839             source: "elm";
840             script {
841                new st[31];
842                new Float:vl;
843                get_state(PART:"elm.swallow.content", st, 30, vl);
844                if (!strcmp(st, "visible"))
845                  {
846                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
847                     set_state(PART:"icon_rect", "icononly", 0.0);
848                     set_state(PART:"padding_after_icon", "icononly", 0.0);
849                     set_state(PART:"bg", "icononly", 0.0);
850                  }
851                set_state(PART:"elm.text", "default", 0.0);
852             }
853          }
854          program { name: "icon_show";
855             signal: "elm,state,icon,visible";
856             source: "elm";
857             script {
858                new st[31];
859                new Float:vl;
860                get_state(PART:"elm.text", st, 30, vl);
861                if (!strcmp(st, "visible"))
862                  {
863                     set_state(PART:"elm.swallow.content", "visible", 0.0);
864                     set_state(PART:"icon_rect", "visible", 0.0);
865                     set_state(PART:"padding_after_icon", "visible", 0.0);
866                     set_state(PART:"bg", "visible", 0.0);
867                  }
868                else
869                  {
870                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
871                     set_state(PART:"icon_rect", "icononly", 0.0);
872                     set_state(PART:"padding_after_icon", "icononly", 0.0);
873                     set_state(PART:"bg", "icononly", 0.0);
874                  }
875             }
876          }
877          program { name: "icon_hide";
878             signal: "elm,state,icon,hidden";
879             source: "elm";
880             action: STATE_SET "default" 0.0;
881             target: "elm.swallow.content";
882             target: "padding_after_icon";
883             target: "icon_rect";
884             target: "bg";
885          }
886          program { name: "disable";
887             signal: "elm,state,disabled";
888             source: "elm";
889             action: STATE_SET "disabled" 0.0;
890             target: "button_image";
891             target: "disabler";
892             after: "disable_text";
893          }
894          program { name: "disable_text";
895             script {
896                new st[31];
897                new Float:vl;
898                get_state(PART:"elm.text", st, 30, vl);
899                if (!strcmp(st, "visible"))
900                  set_state(PART:"elm.text", "disabled_visible", 0.0);
901                else
902                  set_state(PART:"elm.text", "disabled", 0.0);
903                set_int(button_state, BUTTON_STATE_DISABLED);
904             }
905          }
906          program { name: "enable";
907             signal: "elm,state,enabled";
908             source: "elm";
909             action: STATE_SET "default" 0.0;
910             target: "button_image";
911             target: "disabler";
912             after: "enable_text";
913          }
914          program { name: "enable_text";
915             script {
916                new st[31];
917                new Float:vl;
918                get_state(PART:"elm.text", st, 30, vl);
919                if (!strcmp(st, "disabled_visible"))
920                  set_state(PART:"elm.text", "visible", 0.0);
921                else
922                  set_state(PART:"elm.text", "default", 0.0);
923                set_int(button_state, BUTTON_STATE_ENABLED);
924             }
925          }
926          program { name: "focused";
927             //signal: "elm,action,focus";
928             //source: "elm";
929             action: STATE_SET "focused" 0.0;
930             target: "button_image";
931             target: "elm.text";
932          }
933          program { name: "unfocused";
934             //signal: "elm,action,unfocus";
935             //source: "elm";
936             action: STATE_SET "default" 0.0;
937             target: "button_image";
938             after: "unfocus_text";
939          }
940          program { name: "unfocus_text";
941             action: STATE_SET "visible" 0.0;
942             target: "elm.text";
943          }
944       }
945    }
946
947 ///////////////////////////////////////////////////////////////////////////////////////
948    group { name: "elm/button/base/sweep";
949       alias: "elm/button/base/text_only/sweep";
950       images {
951          image: "00_button_sweep.png" COMP;
952          image: "00_button_sweep_press.png" COMP;//focus image is missing, so using press
953          image: "00_button_sweep_dim.png" COMP;
954       }
955       script {
956          public button_state = BUTTON_STATE_ENABLED;
957       }
958       parts {
959          part { name: "button_image";
960             scale: 1;
961             description { state: "default" 0.0;
962                min: BUTTON_SWEEP_BG_NORMAL_MIN_INC;
963                image {
964                   normal: "00_button_sweep.png";
965                   border: BUTTON_SWEEP_BG_BORDER_INC;
966                   border_scale: 1;
967                }
968             }
969             description { state: "clicked" 0.0;
970                inherit: "default" 0.0;
971                image.normal: "00_button_sweep_press.png";
972             }
973             description { state: "disabled" 0.0;
974                inherit: "default" 0.0;
975                image.normal: "00_button_sweep_dim.png";
976             }
977             description { state: "focused" 0.0;
978                inherit: "default" 0.0;
979                image.normal: "00_button_sweep_press.png";
980             }
981          }
982          part { name: "padding_left_top";
983             type: RECT;
984             scale: 1;
985             mouse_events: 0;
986             description { state: "default" 0.0;
987                align: 0.0 0.0;
988                rel2.relative: 0.0 0.0;
989                min: BUTTON_SWEEP_PADDING_MIN_INC;
990                fixed: 1 1;
991                visible: 0;
992             }
993          }
994          part { name: "padding_right_bottom";
995             type: RECT;
996             scale: 1;
997             mouse_events: 0;
998             description { state: "default" 0.0;
999                align: 1.0 1.0;
1000                rel1.relative: 1.0 1.0;
1001                min: BUTTON_SWEEP_PADDING_MIN_INC;
1002                fixed: 1 1;
1003                visible: 0;
1004             }
1005          }
1006          part { name: "icon_rect";
1007             type: RECT;
1008             scale: 1;
1009             mouse_events: 0;
1010             description { state: "default" 0.0;
1011                min: BUTTON_SWEEP_ICON_RECT_MIN_INC;
1012                fixed: 1 0;
1013                rel1 {
1014                   relative: 0.0 1.0;
1015                   to_x: "elm.swallow.content";
1016                   to_y: "padding_left_top";
1017                }
1018                rel2 {
1019                   relative: 1.0 0.0;
1020                   to_x: "elm.swallow.content";
1021                   to_y: "padding_right_bottom";
1022                }
1023                align: 0.0 0.5;
1024                color: 0 0 0 0;
1025             }
1026          }
1027          part { name: "padding_icon_text";
1028             type: RECT;
1029             scale: 1;
1030             mouse_events: 0;
1031             description { state: "default" 0.0; //when only icon or no icon is there
1032                align: 0.0 0.0;
1033                rel1 {
1034                   relative: 1.0 0.0;
1035                   to: "icon_rect";
1036                }
1037                rel2.to: "icon_rect";
1038                fixed: 1 0;
1039                min: 0 0;
1040                color: 0 0 0 0;
1041             }
1042             description { state: "icononly" 0.0;
1043                inherit: "default" 0.0;
1044             }
1045             description { state: "visible" 0.0; //when icon is visible
1046                align: 0.0 0.0;
1047                rel1 {
1048                   relative: 1.0 0.0;
1049                   to: "icon_rect";
1050                }
1051                rel2.to: "icon_rect";
1052                fixed: 1 0;
1053                min: BUTTON_SWEEP_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
1054                color: 0 0 0 0;
1055             }
1056          }
1057          part { name: "elm.swallow.content";
1058             type: SWALLOW;
1059             scale: 1;
1060             clip_to: "clipper";
1061             description { state: "default" 0.0;
1062                visible: 0;
1063                align: 0.0 0.5;
1064                rel1 {
1065                   relative: 1.0 1.0;
1066                   to: "padding_left_top";
1067                }
1068                rel2 {
1069                   relative: 1.0 0.0;
1070                   to_x: "padding_left_top";
1071                   to_y: "padding_right_bottom";
1072                }
1073                fixed: 1 0;
1074             }
1075             description { state: "visible" 0.0;
1076                fixed: 1 0;
1077                align: 0.0 0.5;
1078                rel1 {
1079                   relative: 1.0 1.0;
1080                   to: "padding_left_top";
1081                }
1082                rel2 {
1083                   relative: 1.0 0.0;
1084                   to_x: "padding_left_top";
1085                   to_y: "padding_right_bottom";
1086                }
1087                aspect: 1.0 1.0;
1088                aspect_preference: VERTICAL;
1089             }
1090             description { state: "icononly" 0.0;
1091                min: BUTTON_SWEEP_ICONONLY_ICON_MIN_INC;
1092                rel1 {
1093                   relative: 1.0 1.0;
1094                   to: "padding_left_top";
1095                }
1096                rel2 {
1097                   relative: 1.0 0.0;
1098                   to_x: "padding_left_top";
1099                   to_y: "padding_right_bottom";
1100                }
1101             }
1102          }
1103          part { name: "elm.text";
1104             type: TEXT;
1105             mouse_events: 0;
1106             scale: 1;
1107             clip_to: "clipper";
1108             description { state: "default" 0.0;
1109                visible: 0;
1110                rel1 {
1111                   relative: 1.0 1.0;
1112                   to_x: "padding_icon_text";
1113                   to_y: "padding_left_top";
1114                }
1115                rel2 {
1116                   relative: 0.0 0.0;
1117                   to: "padding_right_bottom";
1118                }
1119                color: BUTTON_SWEEP_BUTTON_TEXT_NORMAL_COLOR_INC;
1120                text {
1121                   font: "SLP:style=Medium";
1122                   size: BUTTON_SWEEP_FONT_SIZE_INC;
1123                   min: 0 0;
1124                }
1125             }
1126             description { state: "visible" 0.0;
1127                inherit: "default" 0.0;
1128                visible: 1;
1129                min: BUTTON_SWEEP_TEXT_MIN_INC;
1130             }
1131             description { state: "clicked" 0.0;
1132                inherit: "default" 0.0;
1133                visible: 1;
1134                min: 0 0;
1135                color: BUTTON_SWEEP_BUTTON_TEXT_PRESSED_COLOR_INC;
1136             }
1137             description { state: "disabled" 0.0;
1138                inherit: "default" 0.0;
1139                color: 0 0 0 128;
1140             }
1141             description { state: "disabled_visible" 0.0;
1142                inherit: "default" 0.0;
1143                color: BUTTON_SWEEP_BUTTON_TEXT_DISABLED_COLOR_INC;
1144                visible: 1;
1145                min: BUTTON_SWEEP_TEXT_MIN_INC;
1146             }
1147             description { state: "focused" 0.0;
1148                inherit: "default" 0.0;
1149                visible: 1;
1150                min: 0 0;
1151                color: BUTTON_SWEEP_BUTTON_TEXT_FOCUSED_COLOR_INC;
1152             }
1153          }
1154          part { name: "over2";
1155             type: RECT;
1156             repeat_events: 1;
1157             ignore_flags: ON_HOLD;
1158             description { state: "default" 0.0;
1159                color: 0 0 0 0;
1160             }
1161          }
1162          part { name: "over3";
1163             type: RECT;
1164             repeat_events: 1;
1165             description { state: "default" 0.0;
1166                color: 0 0 0 0;
1167             }
1168          }
1169          part { name: "clipper";
1170             type: RECT;
1171             description { state: "default" 0.0;
1172                color: 255 255 255 255;
1173             }
1174          }
1175          part { name: "disabler";
1176             type: RECT;
1177             description { state: "default" 0.0;
1178                color: 0 0 0 0;
1179                visible: 0;
1180             }
1181             description { state: "disabled" 0.0;
1182                inherit: "default" 0.0;
1183                visible: 1;
1184             }
1185          }
1186       }
1187       programs {
1188          program { name: "button_click";
1189             signal: "mouse,down,1";
1190             source: "over2";
1191             action: SIGNAL_EMIT "elm,action,press" "";
1192             after: "button_click_anim";
1193          }
1194          program { name: "button_click_anim";
1195             action: STATE_SET "clicked" 0.0;
1196             target: "button_image";
1197             after: "text_clicked";
1198          }
1199          program { name: "text_clicked";
1200             script {
1201                new st[31];
1202                new Float:vl;
1203                get_state(PART:"elm.text", st, 30, vl);
1204                if (!strcmp(st, "visible"))
1205                  set_state(PART:"elm.text", "clicked", 0.0);
1206             }
1207          }
1208          program { name: "button_unpress";
1209             action: SIGNAL_EMIT "elm,action,unpress" "";
1210          }
1211          program { name: "button_mouseout_clicked";
1212             signal: "mouse,up,1";
1213             source: "over3";
1214             script {
1215                new st[31];
1216                new Float:vl;
1217                get_state(PART:"elm.swallow.content", st, 30, vl);
1218                if (strcmp(st, "icononly"))
1219                  {
1220                     emit("elm,action,default,text,set", "");
1221                     set_state(PART:"elm.text", "visible", 0.0);
1222                  }
1223                if (get_int(button_state) != BUTTON_STATE_DISABLED)
1224                  set_state(PART:"button_image", "default", 0.0);
1225             }
1226             after: button_unpress;
1227          }
1228          program { name: "button_unclick3";
1229             signal: "mouse,clicked,1";
1230             source: "over2";
1231             action: SIGNAL_EMIT "elm,action,click" "";
1232          }
1233          program { name: "text_show";
1234             signal: "elm,state,text,visible";
1235             source: "elm";
1236             script {
1237                new st[31];
1238                new Float:vl;
1239                get_state(PART:"elm.swallow.content", st, 30, vl);
1240                if (!strcmp(st, "icononly"))
1241                  {
1242                     set_state(PART:"elm.swallow.content", "visible", 0.0);
1243                     set_state(PART:"padding_icon_text", "visible", 0.0);
1244                  }
1245                if (get_int(button_state) != BUTTON_STATE_DISABLED)
1246                  set_state(PART:"elm.text", "visible", 0.0);
1247                else
1248                  set_state(PART:"elm.text", "disabled_visible", 0.0);
1249             }
1250          }
1251          program { name: "text_hide";
1252             signal: "elm,state,text,hidden";
1253             source: "elm";
1254             script {
1255                new st[31];
1256                new Float:vl;
1257                get_state(PART:"elm.swallow.content", st, 30, vl);
1258                if (!strcmp(st, "visible"))
1259                  {
1260                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
1261                     set_state(PART:"padding_icon_text", "icononly", 0.0);
1262                  }
1263                set_state(PART:"elm.text", "default", 0.0);
1264             }
1265          }
1266          program { name: "icon_show";
1267             signal: "elm,state,icon,visible";
1268             source: "elm";
1269             script {
1270                new st[31];
1271                new Float:vl;
1272                get_state(PART:"elm.text", st, 30, vl);
1273                if (!strcmp(st, "visible"))
1274                  {
1275                     set_state(PART:"elm.swallow.content", "visible", 0.0);
1276                     set_state(PART:"padding_icon_text", "visible", 0.0);
1277                  }
1278                else
1279                  {
1280                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
1281                     set_state(PART:"padding_icon_text", "icononly", 0.0);
1282                  }
1283             }
1284          }
1285          program { name: "icon_hide";
1286             signal: "elm,state,icon,hidden";
1287             source: "elm";
1288             action: STATE_SET "default" 0.0;
1289             target: "elm.swallow.content";
1290             target: "padding_icon_text";
1291          }
1292          program { name: "disable";
1293             signal: "elm,state,disabled";
1294             source: "elm";
1295             action: STATE_SET "disabled" 0.0;
1296             target: "button_image";
1297             target: "disabler";
1298             after: "disable_text";
1299          }
1300          program { name: "disable_text";
1301             script {
1302                new st[31];
1303                new Float:vl;
1304                get_state(PART:"elm.text", st, 30, vl);
1305                if (!strcmp(st, "visible"))
1306                  set_state(PART:"elm.text", "disabled_visible", 0.0);
1307                else
1308                  set_state(PART:"elm.text", "disabled", 0.0);
1309                set_int(button_state, BUTTON_STATE_DISABLED);
1310             }
1311          }
1312          program { name: "enable";
1313             signal: "elm,state,enabled";
1314             source: "elm";
1315             action: STATE_SET "default" 0.0;
1316             target: "button_image";
1317             target: "disabler";
1318             after: "enable_text";
1319          }
1320          program { name: "enable_text";
1321             script {
1322                new st[31];
1323                new Float:vl;
1324                get_state(PART:"elm.text", st, 30, vl);
1325                if (!strcmp(st, "disabled_visible"))
1326                  set_state(PART:"elm.text", "visible", 0.0);
1327                else
1328                  set_state(PART:"elm.text", "default", 0.0);
1329                set_int(button_state, BUTTON_STATE_ENABLED);
1330             }
1331          }
1332          program { name: "focused";
1333             //signal: "elm,action,focus";
1334             //source: "elm";
1335             action: STATE_SET "focused" 0.0;
1336             target: "button_image";
1337             target: "elm.text";
1338          }
1339          program { name: "unfocused";
1340             //signal: "elm,action,unfocus";
1341             //source: "elm";
1342             action: STATE_SET "default" 0.0;
1343             target: "button_image";
1344             after: "unfocus_text";
1345          }
1346          program { name: "unfocus_text";
1347             action: STATE_SET "visible" 0.0;
1348             target: "elm.text";
1349          }
1350       }
1351    }
1352 ///////////////////////////////////////////////////////////////////////////////////////
1353 group { name: "elm/button/base/searchbar/default";
1354       images {
1355          image: "00_search_input_field_bg.png" COMP;
1356          image: "00_button_sweep_press.png" COMP;//focus image is missing, so using press
1357          image: "00_button_sweep_dim.png" COMP;
1358       }
1359       script {
1360          public button_state = BUTTON_STATE_ENABLED;
1361       }
1362       parts {
1363          part { name: "button_image";
1364             scale: 1;
1365             description { state: "default" 0.0;
1366                min: BUTTON_SEARCHBAR_BG_NORMAL_MIN_INC;
1367                image {
1368                   normal: "00_search_input_field_bg.png";
1369                   border: BUTTON_SEARCHBAR_BG_BORDER_INC;
1370                   border_scale: 1;
1371                }
1372             }
1373             description { state: "clicked" 0.0;
1374                inherit: "default" 0.0;
1375                image {
1376                   normal: "00_button_sweep_press.png";
1377                   border: BUTTON_SWEEP_BG_BORDER_INC;
1378                   border_scale: 1;
1379                }
1380             }
1381             description { state: "disabled" 0.0;
1382                inherit: "default" 0.0;
1383                image {
1384                   normal: "00_button_sweep_dim.png";
1385                   border: BUTTON_SWEEP_BG_BORDER_INC;
1386                   border_scale: 1;
1387                }
1388             }
1389             description { state: "focused" 0.0;
1390                inherit: "default" 0.0;
1391                image {
1392                   normal: "00_button_sweep_press.png";
1393                   border: BUTTON_SWEEP_BG_BORDER_INC;
1394                   border_scale: 1;
1395                }
1396             }
1397          }
1398          part { name: "padding_left_top";
1399             type: RECT;
1400             scale: 1;
1401             mouse_events: 0;
1402             description { state: "default" 0.0;
1403                align: 0.0 0.0;
1404                rel2.relative: 0.0 0.0;
1405                min: BUTTON_SEARCHBAR_PADDING_MIN_INC;
1406                fixed: 1 1;
1407                visible: 0;
1408             }
1409          }
1410          part { name: "padding_right_bottom";
1411             type: RECT;
1412             scale: 1;
1413             mouse_events: 0;
1414             description { state: "default" 0.0;
1415                align: 1.0 1.0;
1416                rel1.relative: 1.0 1.0;
1417                min: BUTTON_SEARCHBAR_PADDING_MIN_INC;
1418                fixed: 1 1;
1419                visible: 0;
1420             }
1421          }
1422          part { name: "icon_rect";
1423             type: RECT;
1424             scale: 1;
1425             mouse_events: 0;
1426             description { state: "default" 0.0;
1427                min: BUTTON_SEARCHBAR_ICON_RECT_MIN_INC;
1428                fixed: 1 0;
1429                rel1 {
1430                   relative: 0.0 1.0;
1431                   to_x: "elm.swallow.content";
1432                   to_y: "padding_left_top";
1433                }
1434                rel2 {
1435                   relative: 1.0 0.0;
1436                   to_x: "elm.swallow.content";
1437                   to_y: "padding_right_bottom";
1438                }
1439                align: 0.0 0.5;
1440                color: 0 0 0 0;
1441             }
1442          }
1443          part { name: "padding_icon_text";
1444             type: RECT;
1445             scale: 1;
1446             mouse_events: 0;
1447             description { state: "default" 0.0; //when only icon or no icon is there
1448                align: 0.0 0.0;
1449                rel1 {
1450                   relative: 1.0 0.0;
1451                   to: "icon_rect";
1452                }
1453                rel2.to: "icon_rect";
1454                fixed: 1 0;
1455                min: 0 0;
1456                color: 0 0 0 0;
1457             }
1458             description { state: "icononly" 0.0;
1459                inherit: "default" 0.0;
1460             }
1461             description { state: "visible" 0.0; //when icon is visible
1462                align: 0.0 0.0;
1463                rel1 {
1464                   relative: 1.0 0.0;
1465                   to: "icon_rect";
1466                }
1467                rel2.to: "icon_rect";
1468                fixed: 1 0;
1469                min: BUTTON_SEARCHBAR_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
1470                color: 0 0 0 0;
1471             }
1472          }
1473          part { name: "elm.swallow.content";
1474             type: SWALLOW;
1475             scale: 1;
1476             clip_to: "clipper";
1477             description { state: "default" 0.0;
1478                visible: 0;
1479                align: 0.0 0.5;
1480                rel1 {
1481                   relative: 1.0 1.0;
1482                   to: "padding_left_top";
1483                }
1484                rel2 {
1485                   relative: 1.0 0.0;
1486                   to_x: "padding_left_top";
1487                   to_y: "padding_right_bottom";
1488                }
1489                fixed: 1 0;
1490             }
1491             description { state: "visible" 0.0;
1492                fixed: 1 0;
1493                align: 0.0 0.5;
1494                rel1 {
1495                   relative: 1.0 1.0;
1496                   to: "padding_left_top";
1497                }
1498                rel2 {
1499                   relative: 1.0 0.0;
1500                   to_x: "padding_left_top";
1501                   to_y: "padding_right_bottom";
1502                }
1503                aspect: 1.0 1.0;
1504                aspect_preference: VERTICAL;
1505             }
1506             description { state: "icononly" 0.0;
1507                min: BUTTON_SEARCHBAR_ICONONLY_ICON_MIN_INC;
1508                rel1 {
1509                   relative: 1.0 1.0;
1510                   to: "padding_left_top";
1511                }
1512                rel2 {
1513                   relative: 1.0 0.0;
1514                   to_x: "padding_left_top";
1515                   to_y: "padding_right_bottom";
1516                }
1517             }
1518          }
1519          part { name: "elm.text";
1520             type: TEXT;
1521             mouse_events: 0;
1522             scale: 1;
1523             clip_to: "clipper";
1524             description { state: "default" 0.0;
1525                visible: 0;
1526                rel1 {
1527                   relative: 1.0 1.0;
1528                   to_x: "padding_icon_text";
1529                   to_y: "padding_left_top";
1530                }
1531                rel2 {
1532                   relative: 0.0 0.0;
1533                   to: "padding_right_bottom";
1534                }
1535                color: BUTTON_SWEEP_BUTTON_TEXT_NORMAL_COLOR_INC;
1536                text {
1537                   font: "SLP:style=Medium";
1538                   size: BUTTON_SEARCHBAR_FONT_SIZE_INC;
1539                   min: 0 0;
1540                }
1541             }
1542             description { state: "visible" 0.0;
1543                inherit: "default" 0.0;
1544                visible: 1;
1545                min: BUTTON_SEARCHBAR_TEXT_MIN_INC;
1546             }
1547             description { state: "clicked" 0.0;
1548                inherit: "default" 0.0;
1549                visible: 1;
1550                min: 0 0;
1551                color: BUTTON_SWEEP_BUTTON_TEXT_PRESSED_COLOR_INC;
1552             }
1553             description { state: "disabled" 0.0;
1554                inherit: "default" 0.0;
1555                color: 0 0 0 128;
1556             }
1557             description { state: "disabled_visible" 0.0;
1558                inherit: "default" 0.0;
1559                color: BUTTON_SWEEP_BUTTON_TEXT_DISABLED_COLOR_INC;
1560                visible: 1;
1561                min: BUTTON_SWEEP_TEXT_MIN_INC;
1562             }
1563             description { state: "focused" 0.0;
1564                inherit: "default" 0.0;
1565                visible: 1;
1566                min: 0 0;
1567                color: BUTTON_SWEEP_BUTTON_TEXT_FOCUSED_COLOR_INC;
1568             }
1569          }
1570          part { name: "over2";
1571             type: RECT;
1572             repeat_events: 1;
1573             ignore_flags: ON_HOLD;
1574             description { state: "default" 0.0;
1575                color: 0 0 0 0;
1576             }
1577          }
1578          part { name: "over3";
1579             type: RECT;
1580             repeat_events: 1;
1581             description { state: "default" 0.0;
1582                color: 0 0 0 0;
1583             }
1584          }
1585          part { name: "clipper";
1586             type: RECT;
1587             description { state: "default" 0.0;
1588                color: 255 255 255 255;
1589             }
1590          }
1591          part { name: "disabler";
1592             type: RECT;
1593             description { state: "default" 0.0;
1594                color: 0 0 0 0;
1595                visible: 0;
1596             }
1597             description { state: "disabled" 0.0;
1598                inherit: "default" 0.0;
1599                visible: 1;
1600             }
1601          }
1602       }
1603       programs {
1604          program { name: "button_click";
1605             signal: "mouse,down,1";
1606             source: "over2";
1607             action: SIGNAL_EMIT "elm,action,press" "";
1608             after: "button_click_anim";
1609          }
1610          program { name: "button_click_anim";
1611             action: STATE_SET "clicked" 0.0;
1612             target: "button_image";
1613             after: "text_clicked";
1614          }
1615          program { name: "text_clicked";
1616             script {
1617                new st[31];
1618                new Float:vl;
1619                get_state(PART:"elm.text", st, 30, vl);
1620                if (!strcmp(st, "visible"))
1621                  set_state(PART:"elm.text", "clicked", 0.0);
1622             }
1623          }
1624          program { name: "button_unpress";
1625             action: SIGNAL_EMIT "elm,action,unpress" "";
1626          }
1627          program { name: "button_mouseout_clicked";
1628             signal: "mouse,up,1";
1629             source: "over3";
1630             script {
1631                new st[31];
1632                new Float:vl;
1633                get_state(PART:"elm.swallow.content", st, 30, vl);
1634                if (strcmp(st, "icononly"))
1635                  {
1636                     emit("elm,action,default,text,set", "");
1637                     set_state(PART:"elm.text", "visible", 0.0);
1638                  }
1639                if (get_int(button_state) != BUTTON_STATE_DISABLED)
1640                  set_state(PART:"button_image", "default", 0.0);
1641             }
1642             after: button_unpress;
1643          }
1644          program { name: "button_unclick3";
1645             signal: "mouse,clicked,1";
1646             source: "over2";
1647             action: SIGNAL_EMIT "elm,action,click" "";
1648          }
1649          program { name: "text_show";
1650             signal: "elm,state,text,visible";
1651             source: "elm";
1652             script {
1653                new st[31];
1654                new Float:vl;
1655                get_state(PART:"elm.swallow.content", st, 30, vl);
1656                if (!strcmp(st, "icononly"))
1657                  {
1658                     set_state(PART:"elm.swallow.content", "visible", 0.0);
1659                     set_state(PART:"padding_icon_text", "visible", 0.0);
1660                  }
1661                if (get_int(button_state) != BUTTON_STATE_DISABLED)
1662                  set_state(PART:"elm.text", "visible", 0.0);
1663                else
1664                  set_state(PART:"elm.text", "disabled_visible", 0.0);
1665             }
1666          }
1667          program { name: "text_hide";
1668             signal: "elm,state,text,hidden";
1669             source: "elm";
1670             script {
1671                new st[31];
1672                new Float:vl;
1673                get_state(PART:"elm.swallow.content", st, 30, vl);
1674                if (!strcmp(st, "visible"))
1675                  {
1676                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
1677                     set_state(PART:"padding_icon_text", "icononly", 0.0);
1678                  }
1679                set_state(PART:"elm.text", "default", 0.0);
1680             }
1681          }
1682          program { name: "icon_show";
1683             signal: "elm,state,icon,visible";
1684             source: "elm";
1685             script {
1686                new st[31];
1687                new Float:vl;
1688                get_state(PART:"elm.text", st, 30, vl);
1689                if (!strcmp(st, "visible"))
1690                  {
1691                     set_state(PART:"elm.swallow.content", "visible", 0.0);
1692                     set_state(PART:"padding_icon_text", "visible", 0.0);
1693                  }
1694                else
1695                  {
1696                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
1697                     set_state(PART:"padding_icon_text", "icononly", 0.0);
1698                  }
1699             }
1700          }
1701          program { name: "icon_hide";
1702             signal: "elm,state,icon,hidden";
1703             source: "elm";
1704             action: STATE_SET "default" 0.0;
1705             target: "elm.swallow.content";
1706             target: "padding_icon_text";
1707          }
1708          program { name: "disable";
1709             signal: "elm,state,disabled";
1710             source: "elm";
1711             action: STATE_SET "disabled" 0.0;
1712             target: "button_image";
1713             target: "disabler";
1714             after: "disable_text";
1715          }
1716          program { name: "disable_text";
1717             script {
1718                new st[31];
1719                new Float:vl;
1720                get_state(PART:"elm.text", st, 30, vl);
1721                if (!strcmp(st, "visible"))
1722                  set_state(PART:"elm.text", "disabled_visible", 0.0);
1723                else
1724                  set_state(PART:"elm.text", "disabled", 0.0);
1725                set_int(button_state, BUTTON_STATE_DISABLED);
1726             }
1727          }
1728          program { name: "enable";
1729             signal: "elm,state,enabled";
1730             source: "elm";
1731             action: STATE_SET "default" 0.0;
1732             target: "button_image";
1733             target: "disabler";
1734             after: "enable_text";
1735          }
1736          program { name: "enable_text";
1737             script {
1738                new st[31];
1739                new Float:vl;
1740                get_state(PART:"elm.text", st, 30, vl);
1741                if (!strcmp(st, "disabled_visible"))
1742                  set_state(PART:"elm.text", "visible", 0.0);
1743                else
1744                  set_state(PART:"elm.text", "default", 0.0);
1745                set_int(button_state, BUTTON_STATE_ENABLED);
1746             }
1747          }
1748          program { name: "focused";
1749             //signal: "elm,action,focus";
1750             //source: "elm";
1751             action: STATE_SET "focused" 0.0;
1752             target: "button_image";
1753             target: "elm.text";
1754          }
1755          program { name: "unfocused";
1756             //signal: "elm,action,unfocus";
1757             //source: "elm";
1758             action: STATE_SET "default" 0.0;
1759             target: "button_image";
1760             after: "unfocus_text";
1761          }
1762          program { name: "unfocus_text";
1763             action: STATE_SET "visible" 0.0;
1764             target: "elm.text";
1765          }
1766       }
1767    }
1768
1769 ///////////////////////////////////////////////////////////////////////////////////////
1770    group { name: "elm/button/base/sweep/delete";
1771       images {
1772          image: "00_button_sweep.png" COMP;
1773          image: "00_button_sweep_press.png" COMP;//focus image is missing, so using press
1774          image: "00_button_sweep_dim.png" COMP;
1775          image: "00_button_sweep_delete.png" COMP;
1776       }
1777       script {
1778          public button_state = BUTTON_STATE_ENABLED;
1779       }
1780       parts {
1781          part { name: "button_image";
1782             scale: 1;
1783             description { state: "default" 0.0;
1784                min: BUTTON_SWEEP_BG_NORMAL_MIN_INC;
1785                image {
1786                   normal: "00_button_sweep_delete.png";
1787                   border: BUTTON_SWEEP_BG_BORDER_INC;
1788                   border_scale: 1;
1789                }
1790             }
1791             description { state: "clicked" 0.0;
1792                inherit: "default" 0.0;
1793                image.normal: "00_button_sweep_press.png";
1794             }
1795             description { state: "disabled" 0.0;
1796                inherit: "default" 0.0;
1797                image.normal: "00_button_sweep_dim.png";
1798             }
1799             description { state: "focused" 0.0;
1800                inherit: "default" 0.0;
1801                image.normal: "00_button_sweep_press.png";
1802             }
1803          }
1804          part { name: "padding_left_top";
1805             type: RECT;
1806             scale: 1;
1807             mouse_events: 0;
1808             description { state: "default" 0.0;
1809                align: 0.0 0.0;
1810                rel2.relative: 0.0 0.0;
1811                min: BUTTON_SWEEP_PADDING_MIN_INC;
1812                fixed: 1 1;
1813                visible: 0;
1814             }
1815          }
1816          part { name: "padding_right_bottom";
1817             type: RECT;
1818             scale: 1;
1819             mouse_events: 0;
1820             description { state: "default" 0.0;
1821                align: 1.0 1.0;
1822                rel1.relative: 1.0 1.0;
1823                min: BUTTON_SWEEP_PADDING_MIN_INC;
1824                fixed: 1 1;
1825                visible: 0;
1826             }
1827          }
1828          part { name: "icon_rect";
1829             type: RECT;
1830             scale: 1;
1831             mouse_events: 0;
1832             description { state: "default" 0.0;
1833                min: BUTTON_SWEEP_ICON_RECT_MIN_INC;
1834                fixed: 1 0;
1835                rel1 {
1836                   relative: 0.0 1.0;
1837                   to_x: "elm.swallow.content";
1838                   to_y: "padding_left_top";
1839                }
1840                rel2 {
1841                   relative: 1.0 0.0;
1842                   to_x: "elm.swallow.content";
1843                   to_y: "padding_right_bottom";
1844                }
1845                align: 0.0 0.5;
1846                color: 0 0 0 0;
1847             }
1848          }
1849          part { name: "padding_icon_text";
1850             type: RECT;
1851             scale: 1;
1852             mouse_events: 0;
1853             description { state: "default" 0.0; //when only icon or no icon is there
1854                align: 0.0 0.0;
1855                rel1 {
1856                   relative: 1.0 0.0;
1857                   to: "icon_rect";
1858                }
1859                rel2.to: "icon_rect";
1860                fixed: 1 0;
1861                min: 0 0;
1862                color: 0 0 0 0;
1863             }
1864             description { state: "icononly" 0.0;
1865                inherit: "default" 0.0;
1866             }
1867             description { state: "visible" 0.0; //when icon is visible
1868                align: 0.0 0.0;
1869                rel1 {
1870                   relative: 1.0 0.0;
1871                   to: "icon_rect";
1872                }
1873                rel2.to: "icon_rect";
1874                fixed: 1 0;
1875                min: BUTTON_SWEEP_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
1876                color: 0 0 0 0;
1877             }
1878          }
1879          part { name: "elm.swallow.content";
1880             type: SWALLOW;
1881             scale: 1;
1882             clip_to: "clipper";
1883             description { state: "default" 0.0;
1884                visible: 0;
1885                align: 0.0 0.5;
1886                rel1 {
1887                   relative: 1.0 1.0;
1888                   to: "padding_left_top";
1889                }
1890                rel2 {
1891                   relative: 1.0 0.0;
1892                   to_x: "padding_left_top";
1893                   to_y: "padding_right_bottom";
1894                }
1895                fixed: 1 0;
1896             }
1897             description { state: "visible" 0.0;
1898                fixed: 1 0;
1899                align: 0.0 0.5;
1900                rel1 {
1901                   relative: 1.0 1.0;
1902                   to: "padding_left_top";
1903                }
1904                rel2 {
1905                   relative: 1.0 0.0;
1906                   to_x: "padding_left_top";
1907                   to_y: "padding_right_bottom";
1908                }
1909                aspect: 1.0 1.0;
1910                aspect_preference: VERTICAL;
1911             }
1912             description { state: "icononly" 0.0;
1913                min: BUTTON_SWEEP_ICONONLY_ICON_MIN_INC;
1914                rel1 {
1915                   relative: 1.0 1.0;
1916                   to: "padding_left_top";
1917                }
1918                rel2 {
1919                   relative: 1.0 0.0;
1920                   to_x: "padding_left_top";
1921                   to_y: "padding_right_bottom";
1922                }
1923             }
1924          }
1925          part { name: "elm.text";
1926             type: TEXT;
1927             mouse_events: 0;
1928             scale: 1;
1929             clip_to: "clipper";
1930             description { state: "default" 0.0;
1931                rel1 {
1932                   relative: 1.0 1.0;
1933                   to_x: "padding_icon_text";
1934                   to_y: "padding_left_top";
1935                }
1936                rel2 {
1937                   relative: 0.0 0.0;
1938                   to: "padding_right_bottom";
1939                }
1940                color: BUTTON_SWEEP_BUTTON_TEXT_NORMAL_COLOR_INC;
1941                text {
1942                   font: "SLP:style=Medium";
1943                   size: BUTTON_SWEEP_FONT_SIZE_INC;
1944                   min: 1 0;
1945                   text: "Delete";
1946                   max: 1 0;
1947                }
1948             }
1949             description { state: "visible" 0.0;
1950                inherit: "default" 0.0;
1951             }
1952             description { state: "clicked" 0.0;
1953                inherit: "default" 0.0;
1954                color: BUTTON_SWEEP_BUTTON_TEXT_PRESSED_COLOR_INC;
1955             }
1956             description { state: "disabled" 0.0;
1957                inherit: "default" 0.0;
1958                color: 0 0 0 128;
1959             }
1960             description { state: "disabled_visible" 0.0;
1961                inherit: "default" 0.0;
1962                color: BUTTON_SWEEP_BUTTON_TEXT_DISABLED_COLOR_INC;
1963             }
1964             description { state: "focused" 0.0;
1965                inherit: "default" 0.0;
1966                visible: 1;
1967                min: 0 0;
1968                color: BUTTON_SWEEP_BUTTON_TEXT_FOCUSED_COLOR_INC;
1969             }
1970          }
1971          part { name: "over2";
1972             type: RECT;
1973             repeat_events: 1;
1974             ignore_flags: ON_HOLD;
1975             description { state: "default" 0.0;
1976                color: 0 0 0 0;
1977             }
1978          }
1979          part { name: "over3";
1980             type: RECT;
1981             repeat_events: 1;
1982             description { state: "default" 0.0;
1983                color: 0 0 0 0;
1984             }
1985          }
1986          part { name: "clipper";
1987             type: RECT;
1988             description { state: "default" 0.0;
1989                color: 255 255 255 255;
1990             }
1991          }
1992          part { name: "disabler";
1993             type: RECT;
1994             description { state: "default" 0.0;
1995                color: 0 0 0 0;
1996                visible: 0;
1997             }
1998             description { state: "disabled" 0.0;
1999                inherit: "default" 0.0;
2000                visible: 1;
2001             }
2002          }
2003       }
2004       programs {
2005          program { name: "button_click";
2006             signal: "mouse,down,1";
2007             source: "over2";
2008             action: SIGNAL_EMIT "elm,action,press" "";
2009             after: "button_click_anim";
2010          }
2011          program { name: "button_click_anim";
2012             action: STATE_SET "clicked" 0.0;
2013             target: "button_image";
2014             after: "text_clicked";
2015          }
2016          program { name: "text_clicked";
2017             script {
2018                new st[31];
2019                new Float:vl;
2020                get_state(PART:"elm.text", st, 30, vl);
2021                if (!strcmp(st, "visible"))
2022                  set_state(PART:"elm.text", "clicked", 0.0);
2023             }
2024          }
2025          program { name: "button_unpress";
2026             action: SIGNAL_EMIT "elm,action,unpress" "";
2027          }
2028          program { name: "button_mouseout_clicked";
2029             signal: "mouse,up,1";
2030             source: "over3";
2031             script {
2032                new st[31];
2033                new Float:vl;
2034                get_state(PART:"elm.swallow.content", st, 30, vl);
2035                if (strcmp(st, "icononly"))
2036                  {
2037                     emit("elm,action,default,text,set", "");
2038                     set_state(PART:"elm.text", "visible", 0.0);
2039                  }
2040                if (get_int(button_state) != BUTTON_STATE_DISABLED)
2041                  set_state(PART:"button_image", "default", 0.0);
2042             }
2043             after: button_unpress;
2044          }
2045          program { name: "button_unclick3";
2046             signal: "mouse,clicked,1";
2047             source: "over2";
2048             action: SIGNAL_EMIT "elm,action,click" "";
2049          }
2050          program { name: "text_show";
2051             signal: "elm,state,text,visible";
2052             source: "elm";
2053             script {
2054                new st[31];
2055                new Float:vl;
2056                get_state(PART:"elm.swallow.content", st, 30, vl);
2057                if (!strcmp(st, "icononly"))
2058                  {
2059                     set_state(PART:"elm.swallow.content", "visible", 0.0);
2060                     set_state(PART:"padding_icon_text", "visible", 0.0);
2061                  }
2062                if (get_int(button_state) != BUTTON_STATE_DISABLED)
2063                  set_state(PART:"elm.text", "visible", 0.0);
2064                else
2065                  set_state(PART:"elm.text", "disabled_visible", 0.0);
2066             }
2067          }
2068          program { name: "text_hide";
2069             signal: "elm,state,text,hidden";
2070             source: "elm";
2071             script {
2072                new st[31];
2073                new Float:vl;
2074                get_state(PART:"elm.swallow.content", st, 30, vl);
2075                if (!strcmp(st, "visible"))
2076                  {
2077                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
2078                     set_state(PART:"padding_icon_text", "icononly", 0.0);
2079                  }
2080                set_state(PART:"elm.text", "default", 0.0);
2081             }
2082          }
2083          program { name: "icon_show";
2084             signal: "elm,state,icon,visible";
2085             source: "elm";
2086             script {
2087                new st[31];
2088                new Float:vl;
2089                get_state(PART:"elm.text", st, 30, vl);
2090                if (!strcmp(st, "visible"))
2091                  {
2092                     set_state(PART:"elm.swallow.content", "visible", 0.0);
2093                     set_state(PART:"padding_icon_text", "visible", 0.0);
2094                  }
2095                else
2096                  {
2097                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
2098                     set_state(PART:"padding_icon_text", "icononly", 0.0);
2099                  }
2100             }
2101          }
2102          program { name: "icon_hide";
2103             signal: "elm,state,icon,hidden";
2104             source: "elm";
2105             action: STATE_SET "default" 0.0;
2106             target: "elm.swallow.content";
2107             target: "padding_icon_text";
2108          }
2109          program { name: "disable";
2110             signal: "elm,state,disabled";
2111             source: "elm";
2112             action: STATE_SET "disabled" 0.0;
2113             target: "button_image";
2114             target: "disabler";
2115             after: "disable_text";
2116          }
2117          program { name: "disable_text";
2118             script {
2119                new st[31];
2120                new Float:vl;
2121                get_state(PART:"elm.text", st, 30, vl);
2122                if (!strcmp(st, "visible"))
2123                  set_state(PART:"elm.text", "disabled_visible", 0.0);
2124                else
2125                  set_state(PART:"elm.text", "disabled", 0.0);
2126                set_int(button_state, BUTTON_STATE_DISABLED);
2127             }
2128          }
2129          program { name: "enable";
2130             signal: "elm,state,enabled";
2131             source: "elm";
2132             action: STATE_SET "default" 0.0;
2133             target: "button_image";
2134             target: "disabler";
2135             after: "enable_text";
2136          }
2137          program { name: "enable_text";
2138             script {
2139                new st[31];
2140                new Float:vl;
2141                get_state(PART:"elm.text", st, 30, vl);
2142                if (!strcmp(st, "disabled_visible"))
2143                  set_state(PART:"elm.text", "visible", 0.0);
2144                else
2145                  set_state(PART:"elm.text", "default", 0.0);
2146                set_int(button_state, BUTTON_STATE_ENABLED);
2147             }
2148          }
2149          program { name: "focused";
2150             //signal: "elm,action,focus";
2151             //source: "elm";
2152             action: STATE_SET "focused" 0.0;
2153             target: "button_image";
2154             target: "elm.text";
2155          }
2156          program { name: "unfocused";
2157             //signal: "elm,action,unfocus";
2158             //source: "elm";
2159             action: STATE_SET "default" 0.0;
2160             target: "button_image";
2161             after: "unfocus_text";
2162          }
2163          program { name: "unfocus_text";
2164             action: STATE_SET "visible" 0.0;
2165             target: "elm.text";
2166          }
2167       }
2168    }
2169
2170 ///////////////////////////////////////////////////////////////////////////////////////
2171    group { name: "elm/button/base/popup_button/default";
2172       alias: "elm/button/base/popup_button/menustyle";
2173       alias: "elm/button/base/popup_button/liststyle";
2174       alias: "elm/button/base/popup_button/volumebarstyle";
2175       alias: "elm/button/base/popup_button/customstyle";
2176       alias: "elm/button/base/popup_button/verticalbuttonstyle";
2177       images {
2178          image: "00_button_popup_normal.png" COMP;
2179          image: "00_button_popup_press.png" COMP;
2180          image: "00_button_popup_focus.png" COMP;
2181          image: "00_button_popup_dim.png" COMP;
2182       }
2183       script {
2184          public button_state = BUTTON_STATE_ENABLED;
2185       }
2186       parts {
2187          part { name: "button_image";
2188             scale: 1;
2189             description { state: "default" 0.0;
2190                min: BUTTON_POPUP_BG_NORMAL_MIN_INC;
2191                image {
2192                   normal: "00_button_popup_normal.png";
2193                   border: BUTTON_POPUP_BG_BORDER_INC;
2194                   border_scale: 1;
2195                }
2196             }
2197             description { state: "clicked" 0.0;
2198                inherit: "default" 0.0;
2199                image.normal: "00_button_popup_press.png";
2200             }
2201             description { state: "disabled" 0.0;
2202                inherit: "default" 0.0;
2203                image.normal: "00_button_popup_dim.png";
2204             }
2205             description { state: "focused" 0.0;
2206                inherit: "default" 0.0;
2207                image.normal: "00_button_popup_focus.png";
2208             }
2209          }
2210          part { name: "padding_left_top";
2211             type: RECT;
2212             scale: 1;
2213             mouse_events: 0;
2214             description { state: "default" 0.0;
2215                align: 0.0 0.0;
2216                rel2.relative: 0.0 0.0;
2217                min: BUTTON_POPUP_PADDING_MIN_INC;
2218                fixed: 1 1;
2219                visible: 0;
2220             }
2221          }
2222          part { name: "padding_right_bottom";
2223             type: RECT;
2224             scale: 1;
2225             description { state: "default" 0.0;
2226                align: 1.0 0.0;
2227                rel1.relative: 1.0 1.0;
2228                min: BUTTON_POPUP_PADDING_MIN_INC;
2229                fixed: 1 1;
2230                visible: 0;
2231             }
2232          }
2233          part { name: "padding_icon_text";
2234             type: RECT;
2235             scale: 1;
2236             description { state: "default" 0.0; //when only icon or no icon is there
2237                align: 0.0 0.0;
2238                rel1 {
2239                   relative: 1.0 0.0;
2240                   to: "elm.swallow.content";
2241                }
2242                rel2.to: "elm.swallow.content";
2243                fixed: 1 0;
2244                min: 0 0;
2245                visible: 0;
2246             }
2247             description { state: "icononly" 0.0;
2248                inherit: "default" 0.0;
2249             }
2250             description { state: "visible" 0.0; //when icon is visible
2251                inherit: "default" 0.0;
2252                min: BUTTON_POPUP_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
2253             }
2254          }
2255          part { name: "elm.swallow.content";
2256             type: SWALLOW;
2257             scale: 1;
2258             clip_to: "clipper";
2259             description { state: "default" 0.0;
2260                visible: 0;
2261                align: 0.0 0.5;
2262                rel1 {
2263                   relative: 1.0 1.0;
2264                   to: "padding_left_top";
2265                }
2266                rel2 {
2267                   relative: 1.0 0.0;
2268                   to_x: "padding_left_top";
2269                   to_y: "padding_right_bottom";
2270                }
2271                fixed: 1 0;
2272             }
2273             description { state: "visible" 0.0;
2274                inherit: "default" 0.0;
2275                fixed: 1 0;
2276                visible: 1;
2277                aspect: 1.0 1.0;
2278                aspect_preference: VERTICAL;
2279             }
2280             description { state: "icononly" 0.0;
2281                min: BUTTON_POPUP_ICON_ICONONLY_MIN_INC;
2282                rel1 {
2283                   relative: 1.0 1.0;
2284                   to: "padding_left_top";
2285                }
2286                rel2 {
2287                   relative: 1.0 0.0;
2288                   to_x: "padding_left_top";
2289                   to_y: "padding_right_bottom";
2290                }
2291             }
2292          }
2293          part { name: "elm.text";
2294             type: TEXT;
2295             mouse_events: 0;
2296             scale: 1;
2297             clip_to: "clipper";
2298             description { state: "default" 0.0;
2299                visible: 0;
2300                rel1 {
2301                   relative: 1.0 1.0;
2302                   to_x: "padding_icon_text";
2303                   to_y: "padding_left_top";
2304                }
2305                rel2 {
2306                   relative: 0.0 0.0;
2307                   to: "padding_right_bottom";
2308                }
2309                color: BUTTON_POPUP_BUTTON_TEXT_NORMAL_COLOR_INC;
2310                text {
2311                   font: "SLP:style=Medium";
2312                   size: BUTTON_POPUP_TEXT_FONT_SIZE_INC;
2313                   min: 0 0;
2314                }
2315             }
2316             description { state: "visible" 0.0;
2317                inherit: "default" 0.0;
2318                visible: 1;
2319                min: BUTTON_POPUP_TEXT_MIN_INC;
2320             }
2321             description { state: "clicked" 0.0;
2322                inherit: "default" 0.0;
2323                visible: 1;
2324                min: 0 0;
2325                color: BUTTON_POPUP_BUTTON_TEXT_PRESSED_COLOR_INC;
2326             }
2327             description { state: "disabled" 0.0;
2328                inherit: "default" 0.0;
2329                color: 0 0 0 128;
2330             }
2331             description { state: "disabled_visible" 0.0;
2332                inherit: "default" 0.0;
2333                color: BUTTON_POPUP_BUTTON_TEXT_DISABLED_COLOR_INC;
2334                visible: 1;
2335                min: BUTTON_POPUP_TEXT_MIN_INC;
2336             }
2337             description { state: "focused" 0.0;
2338                inherit: "default" 0.0;
2339                visible: 1;
2340                min: 0 0;
2341                color: BUTTON_POPUP_BUTTON_TEXT_FOCUSED_COLOR_INC;
2342             }
2343          }
2344          part { name: "over2";
2345             type: RECT;
2346             repeat_events: 1;
2347             ignore_flags: ON_HOLD;
2348             description { state: "default" 0.0;
2349                color: 0 0 0 0;
2350             }
2351          }
2352          part { name: "over3";
2353             type: RECT;
2354             repeat_events: 1;
2355             description { state: "default" 0.0;
2356                color: 0 0 0 0;
2357             }
2358          }
2359          part { name: "clipper";
2360             type: RECT;
2361             description { state: "default" 0.0;
2362                color: 255 255 255 255;
2363             }
2364          }
2365          part { name: "disabler";
2366             type: RECT;
2367             description { state: "default" 0.0;
2368                color: 0 0 0 0;
2369                visible: 0;
2370             }
2371             description { state: "disabled" 0.0;
2372                inherit: "default" 0.0;
2373                visible: 1;
2374             }
2375          }
2376       }
2377       programs {
2378          program { name: "button_click";
2379             signal: "mouse,down,1";
2380             source: "over2";
2381             action: SIGNAL_EMIT "elm,action,press" "";
2382             after: "button_click_anim";
2383          }
2384          program { name: "button_click_anim";
2385             action: STATE_SET "clicked" 0.0;
2386             target: "button_image";
2387             after: "text_clicked";
2388          }
2389          program { name: "text_clicked";
2390             script {
2391                new st[31];
2392                new Float:vl;
2393                get_state(PART:"elm.text", st, 30, vl);
2394                if (!strcmp(st, "visible"))
2395                  set_state(PART:"elm.text", "clicked", 0.0);
2396             }
2397          }
2398          program { name: "button_unpress";
2399             action: SIGNAL_EMIT "elm,action,unpress" "";
2400          }
2401          program { name: "button_mouseout_clicked";
2402             signal: "mouse,up,1";
2403             source: "over3";
2404             script {
2405                new st[31];
2406                new Float:vl;
2407                get_state(PART:"elm.swallow.content", st, 30, vl);
2408                if (strcmp(st, "icononly"))
2409                  {
2410                     emit("elm,action,default,text,set", "");
2411                     set_state(PART:"elm.text", "visible", 0.0);
2412                  }
2413                if (get_int(button_state) != BUTTON_STATE_DISABLED)
2414                  set_state(PART:"button_image", "default", 0.0);
2415             }
2416             after: button_unpress;
2417          }
2418          program { name: "button_unclick3";
2419             signal: "mouse,clicked,1";
2420             source: "over2";
2421             action: SIGNAL_EMIT "elm,action,click" "";
2422          }
2423          program { name: "text_show";
2424             signal: "elm,state,text,visible";
2425             source: "elm";
2426             script {
2427                new st[31];
2428                new Float:vl;
2429                get_state(PART:"elm.swallow.content", st, 30, vl);
2430                if (!strcmp(st, "icononly"))
2431                  {
2432                     set_state(PART:"elm.swallow.content", "visible", 0.0);
2433                     set_state(PART:"padding_icon_text", "visible", 0.0);
2434                  }
2435                if (get_int(button_state) != BUTTON_STATE_DISABLED)
2436                  set_state(PART:"elm.text", "visible", 0.0);
2437                else
2438                  set_state(PART:"elm.text", "disabled_visible", 0.0);
2439             }
2440          }
2441          program { name: "text_hide";
2442             signal: "elm,state,text,hidden";
2443             source: "elm";
2444             script {
2445                new st[31];
2446                new Float:vl;
2447                get_state(PART:"elm.swallow.content", st, 30, vl);
2448                if (!strcmp(st, "visible"))
2449                  {
2450                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
2451                     set_state(PART:"padding_icon_text", "icononly", 0.0);
2452                  }
2453                set_state(PART:"elm.text", "default", 0.0);
2454             }
2455          }
2456          program { name: "icon_show";
2457             signal: "elm,state,icon,visible";
2458             source: "elm";
2459             script {
2460                new st[31];
2461                new Float:vl;
2462                get_state(PART:"elm.text", st, 30, vl);
2463                if (!strcmp(st, "visible"))
2464                  {
2465                     set_state(PART:"elm.swallow.content", "visible", 0.0);
2466                     set_state(PART:"padding_icon_text", "visible", 0.0);
2467                  }
2468                else
2469                  {
2470                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
2471                     set_state(PART:"padding_icon_text", "icononly", 0.0);
2472                  }
2473             }
2474          }
2475          program { name: "icon_hide";
2476             signal: "elm,state,icon,hidden";
2477             source: "elm";
2478             action: STATE_SET "default" 0.0;
2479             target: "elm.swallow.content";
2480             target: "padding_icon_text";
2481          }
2482          program { name: "disable";
2483             signal: "elm,state,disabled";
2484             source: "elm";
2485             action: STATE_SET "disabled" 0.0;
2486             target: "button_image";
2487             target: "disabler";
2488             after: "disable_text";
2489          }
2490          program { name: "disable_text";
2491             script {
2492                new st[31];
2493                new Float:vl;
2494                get_state(PART:"elm.text", st, 30, vl);
2495                if (!strcmp(st, "visible"))
2496                  set_state(PART:"elm.text", "disabled_visible", 0.0);
2497                else
2498                  set_state(PART:"elm.text", "disabled", 0.0);
2499                set_int(button_state, BUTTON_STATE_DISABLED);
2500             }
2501          }
2502          program { name: "enable";
2503             signal: "elm,state,enabled";
2504             source: "elm";
2505             action: STATE_SET "default" 0.0;
2506             target: "button_image";
2507             target: "disabler";
2508             after: "enable_text";
2509          }
2510          program { name: "enable_text";
2511             script {
2512                new st[31];
2513                new Float:vl;
2514                get_state(PART:"elm.text", st, 30, vl);
2515                if (!strcmp(st, "disabled_visible"))
2516                  set_state(PART:"elm.text", "visible", 0.0);
2517                else
2518                  set_state(PART:"elm.text", "default", 0.0);
2519                set_int(button_state, BUTTON_STATE_ENABLED);
2520             }
2521          }
2522          program { name: "focused";
2523             action: STATE_SET "focused" 0.0;
2524             target: "button_image";
2525             target: "elm.text";
2526          }
2527          program { name: "unfocused";
2528             action: STATE_SET "default" 0.0;
2529             target: "button_image";
2530             after: "unfocus_text";
2531          }
2532          program { name: "unfocus_text";
2533             action: STATE_SET "visible" 0.0;
2534             target: "elm.text";
2535          }
2536       }
2537    }
2538
2539 ///////////////////////////////////////////////////////////////////////////////////////
2540 #define BUTTON_CIRCLE_STYLES(style_name, image_normal, image_press, min_width, min_height) \
2541    group { name: "elm/button/base/"style_name; \
2542       images { \
2543          image: "00_btn_circle_bg_normal.png" COMP; \
2544          image: "00_btn_circle_bg_press.png" COMP; \
2545          image: image_normal COMP; \
2546          image: image_press COMP; \
2547       } \
2548       parts { \
2549          part { name: "button_image"; \
2550             scale: 1; \
2551             description { state: "default" 0.0; \
2552                min: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; \
2553                max: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; \
2554                image.normal: "00_btn_circle_bg_normal.png"; \
2555                color: 255 255 255 255; \
2556             } \
2557             description { \
2558                state: "clicked" 0.0; \
2559                inherit: "default" 0.0; \
2560                image.normal: "00_btn_circle_bg_press.png"; \
2561             } \
2562             description { \
2563                state: "disabled" 0.0; \
2564                inherit: "default" 0.0; \
2565                color: 255 255 255 128; \
2566             } \
2567          } \
2568          part { name: "button_center_part"; \
2569             scale: 1; \
2570             description { state: "default" 0.0; \
2571                min: BUTTON_CIRCLE_STYLE_IMAGE_MIN_MAX_INC; \
2572                max: BUTTON_CIRCLE_STYLE_IMAGE_MIN_MAX_INC; \
2573                image.normal: image_normal; \
2574                color: 255 255 255 255; \
2575             } \
2576             description { \
2577                state: "clicked" 0.0; \
2578                inherit: "default" 0.0; \
2579                image.normal: image_press; \
2580             } \
2581             description { \
2582                state: "disabled" 0.0; \
2583                inherit: "default" 0.0; \
2584                color: 255 255 255 128; \
2585             } \
2586          } \
2587          part { name: "over1"; \
2588             type: RECT; \
2589             ignore_flags: ON_HOLD; \
2590             description { state: "default" 0.0; \
2591                color: 0 0 0 0; \
2592                min: min_width min_height; \
2593             } \
2594          } \
2595          part { name: "over2"; \
2596             repeat_events: 1; \
2597             description { state: "default" 0.0; \
2598                color: 0 0 0 0; \
2599             } \
2600          } \
2601          part { name: "disabler"; \
2602             type: RECT; \
2603             description { state: "default" 0.0; \
2604                color: 0 0 0 0; \
2605                visible: 0; \
2606             } \
2607             description { state: "disabled" 0.0; \
2608                inherit: "default" 0.0; \
2609                visible: 1; \
2610             } \
2611          } \
2612       } \
2613       programs { \
2614          program { name: "button_click"; \
2615             signal: "mouse,down,1"; \
2616             source: "over1"; \
2617             action: SIGNAL_EMIT "elm,action,press" ""; \
2618             after: "button_click_anim"; \
2619          } \
2620          program { name: "button_click_anim"; \
2621             action: STATE_SET "clicked" 0.0; \
2622             target: "button_image"; \
2623             target: "button_center_part"; \
2624          } \
2625          program { name: "button_unclick"; \
2626             signal: "mouse,up,1"; \
2627             source: "over2"; \
2628             action: SIGNAL_EMIT "elm,action,unpress" ""; \
2629             after: "button_unclick_anim"; \
2630          } \
2631          program { name: "button_unclick_anim"; \
2632             action: STATE_SET "default" 0.0; \
2633             target: "button_image"; \
2634             target: "button_center_part"; \
2635          } \
2636          program { name: "button_unclick2"; \
2637             signal: "mouse,clicked,1"; \
2638             source: "over1"; \
2639             action: SIGNAL_EMIT "elm,action,click" ""; \
2640          } \
2641          program { name: "disable"; \
2642             signal: "elm,state,disabled"; \
2643             source: "elm"; \
2644             action: STATE_SET "disabled" 0.0; \
2645             target: "disabler"; \
2646             target: "button_image"; \
2647             target: "button_center_part"; \
2648          } \
2649          program { name: "enable"; \
2650             signal: "elm,state,enabled"; \
2651             source: "elm"; \
2652             action: STATE_SET "default" 0.0; \
2653             target: "disabler"; \
2654             target: "button_image"; \
2655             target: "button_center_part"; \
2656          } \
2657       } \
2658    }
2659
2660 ///////////////////////////////////////////////////////////////////////////////////////
2661    BUTTON_CIRCLE_STYLES("reveal", "00_button_reveal.png", "00_button_reveal_press.png", 40, 40)
2662
2663 ///////////////////////////////////////////////////////////////////////////////////////
2664    BUTTON_CIRCLE_STYLES("reveal/extended", "00_button_reveal.png", "00_button_reveal_press.png", 60, 70)
2665
2666 ///////////////////////////////////////////////////////////////////////////////////////
2667    BUTTON_CIRCLE_STYLES("expand/closed", "00_button_expand_closed.png", "00_button_expand_closed_press.png", 40, 40)
2668
2669 ///////////////////////////////////////////////////////////////////////////////////////
2670    BUTTON_CIRCLE_STYLES("expand/closed/extended", "00_button_expand_closed.png", "00_button_expand_closed_press.png", 60, 70)
2671
2672 ///////////////////////////////////////////////////////////////////////////////////////
2673    BUTTON_CIRCLE_STYLES("expand/opened", "00_button_expand_opened.png", "00_button_expand_opened_press.png", 40, 40)
2674
2675 ///////////////////////////////////////////////////////////////////////////////////////
2676    BUTTON_CIRCLE_STYLES("expand/opened/extended", "00_button_expand_opened.png", "00_button_expand_opened_press.png", 60, 70)
2677
2678 ///////////////////////////////////////////////////////////////////////////////////////
2679    BUTTON_CIRCLE_STYLES("info", "00_button_info.png", "00_button_info_press.png", 40, 40)
2680
2681 ///////////////////////////////////////////////////////////////////////////////////////
2682    BUTTON_CIRCLE_STYLES("info/extended", "00_button_info.png", "00_button_info_press.png", 60, 70)
2683
2684 ///////////////////////////////////////////////////////////////////////////////////////
2685    BUTTON_CIRCLE_STYLES("rename", "00_button_rename.png", "00_button_rename_press.png", 40, 40)
2686
2687 ///////////////////////////////////////////////////////////////////////////////////////
2688    BUTTON_CIRCLE_STYLES("rename/extended", "00_button_rename.png", "00_button_rename_press.png", 60, 70)
2689
2690 ///////////////////////////////////////////////////////////////////////////////////////
2691    BUTTON_CIRCLE_STYLES("call", "00_button_call.png", "00_button_call_press.png", 40, 40)
2692
2693 ///////////////////////////////////////////////////////////////////////////////////////
2694    BUTTON_CIRCLE_STYLES("call/extended", "00_button_call.png", "00_button_call_press.png", 60, 70)
2695
2696 ///////////////////////////////////////////////////////////////////////////////////////
2697    BUTTON_CIRCLE_STYLES("warning", "00_button_warning.png", "00_button_warning_press.png", 40, 40)
2698
2699 ///////////////////////////////////////////////////////////////////////////////////////
2700    BUTTON_CIRCLE_STYLES("warning/extended", "00_button_warning.png", "00_button_warning_press.png", 60, 70)
2701
2702 ///////////////////////////////////////////////////////////////////////////////////////
2703    BUTTON_CIRCLE_STYLES("plus", "00_button_plus.png", "00_button_plus_press.png", 40, 40)
2704
2705 ///////////////////////////////////////////////////////////////////////////////////////
2706    BUTTON_CIRCLE_STYLES("plus/extended", "00_button_plus.png", "00_button_plus_press.png", 60, 70)
2707
2708 ///////////////////////////////////////////////////////////////////////////////////////
2709    BUTTON_CIRCLE_STYLES("minus", "00_button_minus.png", "00_button_minus_press.png", 40, 40)
2710
2711 ///////////////////////////////////////////////////////////////////////////////////////
2712    BUTTON_CIRCLE_STYLES("minus/extended", "00_button_minus.png", "00_button_minus_press.png", 60, 70)
2713
2714 ///////////////////////////////////////////////////////////////////////////////////////
2715    BUTTON_CIRCLE_STYLES("cancel", "00_button_cancel.png", "00_button_cancel_press.png", 40, 40)
2716
2717 ///////////////////////////////////////////////////////////////////////////////////////
2718    BUTTON_CIRCLE_STYLES("cancel/extended", "00_button_cancel.png", "00_button_cancel_press.png", 60, 70)
2719
2720 ///////////////////////////////////////////////////////////////////////////////////////
2721    BUTTON_CIRCLE_STYLES("send", "00_button_send.png", "00_button_send_press.png", 40, 40)
2722
2723 ///////////////////////////////////////////////////////////////////////////////////////
2724    BUTTON_CIRCLE_STYLES("send/extended", "00_button_send.png", "00_button_send_press.png", 60, 70)
2725 ///////////////////////////////////////////////////////////////////////////////////////
2726    group { name: "elm/button/base/circle/empty";
2727       images {
2728          image: "00_btn_circle_bg_normal.png" COMP;
2729          image: "00_btn_circle_bg_press.png" COMP;
2730       }
2731       parts {
2732          part { name: "button_image";
2733             scale: 1;
2734             description { state: "default" 0.0;
2735                min: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC;
2736                max: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC;
2737                fixed: 1 1;
2738                image.normal: "00_btn_circle_bg_normal.png";
2739                color: 255 255 255 255;
2740             }
2741             description { state: "clicked" 0.0;
2742                inherit: "default" 0.0;
2743                image.normal: "00_btn_circle_bg_press.png";
2744             }
2745             description { state: "disabled" 0.0;
2746                inherit: "default" 0.0;
2747                color: 255 255 255 128;
2748             }
2749          }
2750          part { name: "elm.swallow.content";
2751             type: SWALLOW;
2752             scale: 1;
2753             description { state: "default" 0.0;
2754                min: BUTTON_CIRCLE_STYLE_CONTENT_MIN_MAX_INC;
2755                max: BUTTON_CIRCLE_STYLE_CONTENT_MIN_MAX_INC;
2756                fixed: 1 1;
2757                color: 255 255 255 255;
2758             }
2759             description {
2760                state: "disabled" 0.0;
2761                inherit: "default" 0.0;
2762                color: 255 255 255 128;
2763             }
2764          }
2765          part { name: "over1";
2766             type: RECT;
2767             ignore_flags: ON_HOLD;
2768             description { state: "default" 0.0;
2769                color: 0 0 0 0;
2770             }
2771          }
2772          part { name: "over2";
2773             repeat_events: 1;
2774             description { state: "default" 0.0;
2775                color: 0 0 0 0;
2776             }
2777          }
2778          part { name: "disabler";
2779             type: RECT;
2780             description { state: "default" 0.0;
2781                color: 0 0 0 0;
2782                visible: 0;
2783             }
2784             description { state: "disabled" 0.0;
2785                inherit: "default" 0.0;
2786                visible: 1;
2787             }
2788          }
2789       }
2790       programs {
2791          program { name: "button_click";
2792             signal: "mouse,down,1";
2793             source: "over1";
2794             action: SIGNAL_EMIT "elm,action,press" "";
2795             after: "button_click_anim";
2796          }
2797          program { name: "button_click_anim";
2798             action: STATE_SET "clicked" 0.0;
2799             target: "button_image";
2800          }
2801          program { name: "button_unclick";
2802             signal: "mouse,up,1";
2803             source: "over2";
2804             action: SIGNAL_EMIT "elm,action,unpress" "";
2805             after: "button_unclick_anim";
2806          }
2807          program { name: "button_unclick_anim";
2808             action: STATE_SET "default" 0.0;
2809             target: "button_image";
2810          }
2811          program { name: "button_unclick2";
2812             signal: "mouse,clicked,1";
2813             source: "over1";
2814             action: SIGNAL_EMIT "elm,action,click" "";
2815          }
2816          program { name: "disable";
2817             signal: "elm,state,disabled";
2818             source: "elm";
2819             action: STATE_SET "disabled" 0.0;
2820             target: "disabler";
2821             target: "button_image";
2822          }
2823          program { name: "enable";
2824             signal: "elm,state,enabled";
2825             source: "elm";
2826             action: STATE_SET "default" 0.0;
2827             target: "disabler";
2828             target: "button_image";
2829          }
2830          program { name: "icon_show";
2831             signal: "elm,state,icon,visible";
2832             source: "elm";
2833             action:  STATE_SET "visible" 0.0;
2834             target: "elm.swallow.content";
2835          }
2836          program { name: "icon_hide";
2837             signal: "elm,state,icon,hidden";
2838             source: "elm";
2839             action:  STATE_SET "default" 0.0;
2840             target: "elm.swallow.content";
2841          }
2842       }
2843    }
2844
2845 ///////////////////////////////////////////////////////////////////////////////////////
2846 #define BUTTON_EDIT_STYLES(style_name, image_normal, image_press, min_width, min_height) \
2847    group { name: "elm/button/base/contacts/"style_name; \
2848    alias: "elm/button/base/"style_name; \
2849       images { \
2850          image: image_normal COMP; \
2851          image: image_press COMP; \
2852          image: "00_button_edit.png" COMP; \
2853          image: "00_button_edit_press.png" COMP; \
2854          image: "00_button_edit_dim.png" COMP; \
2855       } \
2856       parts { \
2857          part { name: "button_image"; \
2858             scale: 1; \
2859             description { state: "default" 0.0; \
2860                min: BUTTON_EDIT_STYLE_BG_NORMAL_MIN_MAX_INC; \
2861                max: BUTTON_EDIT_STYLE_BG_NORMAL_MIN_MAX_INC; \
2862                image { \
2863                   normal: "00_button_edit.png"; \
2864                   border: BUTTON_EDIT_STYLE_BORDER_INC; \
2865                   border_scale: 1; \
2866                } \
2867             } \
2868             description { \
2869                state: "clicked" 0.0; \
2870                inherit: "default" 0.0; \
2871                image.normal: "00_button_edit_press.png"; \
2872             } \
2873             description { \
2874                state: "disabled" 0.0; \
2875                inherit: "default" 0.0; \
2876                image.normal: "00_button_edit_dim.png"; \
2877             } \
2878          } \
2879          part { name: "button_center_part"; \
2880             mouse_events: 0; \
2881             scale: 1; \
2882             description { state: "default" 0.0; \
2883                min: BUTTON_EDIT_STYLE_IMAGE_NORMAL_MIN_MAX_INC; \
2884                max: BUTTON_EDIT_STYLE_IMAGE_NORMAL_MIN_MAX_INC; \
2885                image { \
2886                   normal: image_normal; \
2887                   border: BUTTON_EDIT_STYLE_BORDER_INC; \
2888                   border_scale: 1; \
2889                } \
2890             } \
2891             description { \
2892                state: "clicked" 0.0; \
2893                inherit: "default" 0.0; \
2894                image.normal: image_press; \
2895             } \
2896          } \
2897          part { name: "over1"; \
2898             type: RECT; \
2899             repeat_events: 1; \
2900             ignore_flags: ON_HOLD; \
2901             description { state: "default" 0.0; \
2902                color: 0 0 0 0; \
2903                min: min_width min_height; \
2904             } \
2905          } \
2906          part { name: "over2"; \
2907             repeat_events: 1; \
2908             description { state: "default" 0.0; \
2909                color: 0 0 0 0; \
2910             } \
2911          } \
2912          part { name: "disabler"; \
2913             type: RECT; \
2914             description { state: "default" 0.0; \
2915                color: 0 0 0 0; \
2916                visible: 0; \
2917             } \
2918             description { state: "disabled" 0.0; \
2919                inherit: "default" 0.0; \
2920                visible: 1; \
2921             } \
2922          } \
2923       } \
2924       programs { \
2925          program { name: "button_click"; \
2926             signal: "mouse,down,1"; \
2927             source: "over1"; \
2928             action: SIGNAL_EMIT "elm,action,press" ""; \
2929             after: "button_click_anim"; \
2930          } \
2931          program { name: "button_click_anim"; \
2932             action: STATE_SET "clicked" 0.0; \
2933             target: "button_image"; \
2934             target: "button_center_part"; \
2935          } \
2936          program { name: "button_unclick"; \
2937             signal: "mouse,up,1"; \
2938             source: "over2"; \
2939             action: SIGNAL_EMIT "elm,action,unpress" ""; \
2940             after: "button_unclick_anim"; \
2941          } \
2942          program { name: "button_unclick_anim"; \
2943             action: STATE_SET "default" 0.0; \
2944             target: "button_image"; \
2945             target: "button_center_part"; \
2946          } \
2947          program { name: "button_unclick2"; \
2948             signal: "mouse,clicked,1"; \
2949             source: "over1"; \
2950             action: SIGNAL_EMIT "elm,action,click" ""; \
2951          } \
2952          program { name: "disable"; \
2953             signal: "elm,state,disabled"; \
2954             source: "elm"; \
2955             action: STATE_SET "disabled" 0.0; \
2956             target: "disabler"; \
2957             target: "button_image"; \
2958          } \
2959          program { name: "enable"; \
2960             signal: "elm,state,enabled"; \
2961             source: "elm"; \
2962             action: STATE_SET "default" 0.0; \
2963             target: "disabler"; \
2964             target: "button_image"; \
2965          } \
2966       } \
2967    }
2968 ///////////////////////////////////////////////////////////////////////////////////////
2969    BUTTON_EDIT_STYLES("icon_plus", "00_button_icon_plus.png", "00_button_icon_plus_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC)
2970
2971 ///////////////////////////////////////////////////////////////////////////////////////
2972    BUTTON_EDIT_STYLES("icon_plus/extended", "00_button_icon_plus.png", "00_button_icon_plus_press.png", BUTTON_EDIT_EXTENDED_MIN_WIDTH_INC, BUTTON_EDIT_EXTENDED_MIN_HEIGHT_INC)
2973
2974 ///////////////////////////////////////////////////////////////////////////////////////
2975    BUTTON_EDIT_STYLES("icon_minus", "00_button_icon_minus.png", "00_button_icon_minus_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC)
2976
2977 ///////////////////////////////////////////////////////////////////////////////////////
2978    BUTTON_EDIT_STYLES("icon_minus/extended", "00_button_icon_minus.png", "00_button_icon_minus_press.png", BUTTON_EDIT_EXTENDED_MIN_WIDTH_INC, BUTTON_EDIT_EXTENDED_MIN_HEIGHT_INC)
2979
2980 ///////////////////////////////////////////////////////////////////////////////////////
2981    BUTTON_EDIT_STYLES("icon_expand", "00_button_icon_expand.png", "00_button_icon_expand_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC)
2982
2983 ///////////////////////////////////////////////////////////////////////////////////////
2984    BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_button_icon_expand_press.png", BUTTON_EDIT_EXTENDED_MIN_WIDTH_INC, BUTTON_EDIT_EXTENDED_MIN_HEIGHT_INC)
2985
2986 ///////////////////////////////////////////////////////////////////////////////////////
2987    BUTTON_EDIT_STYLES("icon_expand_closed", "00_button_icon_expand_closed.png", "00_button_icon_expand_closed_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC)
2988
2989 ///////////////////////////////////////////////////////////////////////////////////////
2990    BUTTON_EDIT_STYLES("icon_expand_opened", "00_button_icon_expand_opened.png", "00_button_icon_expand_opened_press.png", BUTTON_EDIT_NORMAL_MIN_WIDTH_INC, BUTTON_EDIT_NORMAL_MIN_HEIGHT_INC)
2991
2992 ///////////////////////////////////////////////////////////////////////////////////////
2993    group { name: "elm/button/base/contacts/delete";
2994       images {
2995          image: "00_button_edit.png" COMP;
2996          image: "00_button_edit_press.png" COMP;
2997          image: "00_button_edit_dim.png" COMP;
2998       }
2999       script {
3000          public button_state = BUTTON_STATE_ENABLED;
3001       }
3002       parts {
3003          part { name: "button_image";
3004             scale: 1;
3005             description { state: "default" 0.0;
3006                min: BUTTON_CONTACT_DELETE_BG_NORMAL_MIN_INC;
3007                image {
3008                   normal: "00_button_edit.png";
3009                   border: BUTTON_CONTACT_DELETE_BG_BORDER_INC;
3010                   border_scale: 1;
3011                }
3012             }
3013             description { state: "clicked" 0.0;
3014                inherit: "default" 0.0;
3015                image.normal: "00_button_edit_press.png";
3016             }
3017             description { state: "disabled" 0.0;
3018                inherit: "default" 0.0;
3019                image.normal: "00_button_edit_dim.png";
3020             }
3021             description { state: "focused" 0.0;
3022                inherit: "default" 0.0;
3023                image.normal: "00_button_edit_press.png";
3024             }
3025          }
3026          part { name: "padding_left_top";
3027             type: RECT;
3028             scale: 1;
3029             mouse_events: 0;
3030             description { state: "default" 0.0;
3031                align: 0.0 0.0;
3032                rel2.relative: 0.0 0.0;
3033                min: BUTTON_CONTACT_DELETE_PADDING_LEFT_TOP_MIN_INC;
3034                fixed: 1 1;
3035                visible: 0;
3036             }
3037          }
3038          part { name: "padding_right_bottom";
3039             type: RECT;
3040             scale: 1;
3041             mouse_events: 0;
3042             description { state: "default" 0.0;
3043                align: 1.0 1.0;
3044                rel1.relative: 1.0 1.0;
3045                min: BUTTON_CONTACT_DELETE_PADDING_RIGHT_BOTTOM_MIN_INC;
3046                fixed: 1 1;
3047                visible: 0;
3048             }
3049          }
3050          part { name: "padding_icon_text";
3051             type: RECT;
3052             scale: 1;
3053             mouse_events: 0;
3054             description { state: "default" 0.0; //when only icon or no icon is there
3055                align: 0.0 0.0;
3056                rel1 {
3057                   relative: 1.0 0.0;
3058                   to: "elm.swallow.content";
3059                }
3060                rel2.to: "elm.swallow.content";
3061                fixed: 1 0;
3062                min: 0 0;
3063                visible: 0;
3064             }
3065             description { state: "icononly" 0.0;
3066                inherit: "default" 0.0;
3067             }
3068             description { state: "visible" 0.0; //when icon is visible
3069                inherit: "default" 0.0;
3070                min: BUTTON_CONTACT_DELETE_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
3071             }
3072          }
3073          part { name: "elm.swallow.content";
3074             type: SWALLOW;
3075             scale: 1;
3076             clip_to: "clipper";
3077             description { state: "default" 0.0;
3078                visible: 0;
3079                align: 0.0 0.5;
3080                rel1 {
3081                   relative: 1.0 1.0;
3082                   to: "padding_left_top";
3083                }
3084                rel2 {
3085                   relative: 1.0 0.0;
3086                   to_x: "padding_left_top";
3087                   to_y: "padding_right_bottom";
3088                }
3089                fixed: 1 0;
3090             }
3091             description { state: "visible" 0.0;
3092                fixed: 1 0;
3093                align: 0.0 0.5;
3094                rel1 {
3095                   relative: 1.0 1.0;
3096                   to: "padding_left_top";
3097                }
3098                rel2 {
3099                   relative: 1.0 0.0;
3100                   to_x: "padding_left_top";
3101                   to_y: "padding_right_bottom";
3102                }
3103                aspect: 1.0 1.0;
3104                aspect_preference: VERTICAL;
3105             }
3106             description { state: "icononly" 0.0;
3107                min: BUTTON_CONTACT_DELETE_ICON_ICONONLY_MIN_INC;
3108                rel1 {
3109                   relative: 1.0 1.0;
3110                   to: "padding_left_top";
3111                }
3112                rel2 {
3113                   relative: 0.0 0.0;
3114                   to: "padding_right_bottom";
3115                }
3116                aspect: 1.0 1.0;
3117                aspect_preference: VERTICAL;
3118             }
3119          }
3120          part { name: "elm.text";
3121             type: TEXT;
3122             mouse_events: 0;
3123             scale: 1;
3124             clip_to: "clipper";
3125             description { state: "default" 0.0;
3126                rel1 {
3127                   relative: 1.0 1.0;
3128                   to_x: "padding_icon_text";
3129                   to_y: "padding_left_top";
3130                }
3131                rel2 {
3132                   relative: 0.0 0.0;
3133                   to: "padding_right_bottom";
3134                }
3135                color: BUTTON_TEXT_CONTACTS_DELETE_NORMAL_COLOR_INC;
3136                text {
3137                   font: "SLP:style=Medium";
3138                   size: BUTTON_CONTACT_DELETE_FONT_SIZE_INC;
3139                   min: 1 0;
3140                   text: "Delete";
3141                   max: 1 0;
3142                }
3143             }
3144             description { state: "visible" 0.0;
3145                inherit: "default" 0.0;
3146             }
3147             description { state: "clicked" 0.0;
3148                inherit: "default" 0.0;
3149                color: BUTTON_TEXT_CONTACTS_DELETE_PRESSED_COLOR_INC;
3150             }
3151             description { state: "disabled" 0.0;
3152                inherit: "default" 0.0;
3153                color: 0 0 0 128;
3154             }
3155             description { state: "disabled_visible" 0.0;
3156                inherit: "default" 0.0;
3157                color: BUTTON_TEXT_CONTACTS_DELETE_DISABLED_COLOR_INC;
3158             }
3159             description { state: "focused" 0.0;
3160                inherit: "default" 0.0;
3161                min: 0 0;
3162                color: BUTTON_TEXT_CONTACTS_DELETE_PRESSED_COLOR_INC;
3163             }
3164          }
3165          part { name: "over2";
3166             type: RECT;
3167             repeat_events: 1;
3168             ignore_flags: ON_HOLD;
3169             description { state: "default" 0.0;
3170                color: 0 0 0 0;
3171             }
3172          }
3173          part { name: "over3";
3174             type: RECT;
3175             repeat_events: 1;
3176             description { state: "default" 0.0;
3177                color: 0 0 0 0;
3178             }
3179          }
3180          part { name: "clipper";
3181             type: RECT;
3182             description { state: "default" 0.0;
3183                color: 255 255 255 255;
3184             }
3185          }
3186          part { name: "disabler";
3187             type: RECT;
3188             description { state: "default" 0.0;
3189                color: 0 0 0 0;
3190                visible: 0;
3191             }
3192             description { state: "disabled" 0.0;
3193                inherit: "default" 0.0;
3194                visible: 1;
3195             }
3196          }
3197       }
3198       programs {
3199          program { name: "button_click";
3200             signal: "mouse,down,1";
3201             source: "over2";
3202             action: SIGNAL_EMIT "elm,action,press" "";
3203             after: "button_click_anim";
3204          }
3205          program { name: "button_click_anim";
3206             action: STATE_SET "clicked" 0.0;
3207             target: "button_image";
3208             after: "text_clicked";
3209          }
3210          program { name: "text_clicked";
3211             script {
3212                new st[31];
3213                new Float:vl;
3214                get_state(PART:"elm.text", st, 30, vl);
3215                if (!strcmp(st, "visible"))
3216                  set_state(PART:"elm.text", "clicked", 0.0);
3217             }
3218          }
3219          program { name: "button_unpress";
3220             action: SIGNAL_EMIT "elm,action,unpress" "";
3221          }
3222          program { name: "button_mouseout_clicked";
3223             signal: "mouse,up,1";
3224             source: "over3";
3225             script {
3226                new st[31];
3227                new Float:vl;
3228                get_state(PART:"elm.swallow.content", st, 30, vl);
3229                if (strcmp(st, "icononly"))
3230                  {
3231                     emit("elm,action,default,text,set", "");
3232                     set_state(PART:"elm.text", "visible", 0.0);
3233                  }
3234                if (get_int(button_state) != BUTTON_STATE_DISABLED)
3235                  set_state(PART:"button_image", "default", 0.0);
3236             }
3237             after: button_unpress;
3238          }
3239          program { name: "button_unclick3";
3240             signal: "mouse,clicked,1";
3241             source: "over2";
3242             action: SIGNAL_EMIT "elm,action,click" "";
3243          }
3244          program { name: "text_show";
3245             signal: "elm,state,text,visible";
3246             source: "elm";
3247             script {
3248                new st[31];
3249                new Float:vl;
3250                get_state(PART:"elm.swallow.content", st, 30, vl);
3251                if (!strcmp(st, "icononly"))
3252                  {
3253                     set_state(PART:"elm.swallow.content", "visible", 0.0);
3254                     set_state(PART:"padding_icon_text", "visible", 0.0);
3255                  }
3256                if (get_int(button_state) != BUTTON_STATE_DISABLED)
3257                  set_state(PART:"elm.text", "visible", 0.0);
3258                else
3259                  set_state(PART:"elm.text", "disabled_visible", 0.0);
3260             }
3261          }
3262          program { name: "text_hide";
3263             signal: "elm,state,text,hidden";
3264             source: "elm";
3265             script {
3266                new st[31];
3267                new Float:vl;
3268                get_state(PART:"elm.swallow.content", st, 30, vl);
3269                if (!strcmp(st, "visible"))
3270                  {
3271                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
3272                     set_state(PART:"padding_icon_text", "icononly", 0.0);
3273                  }
3274                set_state(PART:"elm.text", "default", 0.0);
3275             }
3276          }
3277          program { name: "icon_show";
3278             signal: "elm,state,icon,visible";
3279             source: "elm";
3280             script {
3281                new st[31];
3282                new Float:vl;
3283                get_state(PART:"elm.text", st, 30, vl);
3284                if (!strcmp(st, "visible"))
3285                  {
3286                     set_state(PART:"elm.swallow.content", "visible", 0.0);
3287                     set_state(PART:"padding_icon_text", "visible", 0.0);
3288                  }
3289                else
3290                  {
3291                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
3292                     set_state(PART:"padding_icon_text", "icononly", 0.0);
3293                  }
3294             }
3295          }
3296          program { name: "icon_hide";
3297             signal: "elm,state,icon,hidden";
3298             source: "elm";
3299             action: STATE_SET "default" 0.0;
3300             target: "elm.swallow.content";
3301             target: "padding_icon_text";
3302          }
3303          program { name: "disable";
3304             signal: "elm,state,disabled";
3305             source: "elm";
3306             action: STATE_SET "disabled" 0.0;
3307             target: "button_image";
3308             target: "disabler";
3309             after: "disable_text";
3310          }
3311          program { name: "disable_text";
3312             script {
3313                new st[31];
3314                new Float:vl;
3315                get_state(PART:"elm.text", st, 30, vl);
3316                if (!strcmp(st, "visible"))
3317                  set_state(PART:"elm.text", "disabled_visible", 0.0);
3318                else
3319                  set_state(PART:"elm.text", "disabled", 0.0);
3320                set_int(button_state, BUTTON_STATE_DISABLED);
3321             }
3322          }
3323          program { name: "enable";
3324             signal: "elm,state,enabled";
3325             source: "elm";
3326             action: STATE_SET "default" 0.0;
3327             target: "button_image";
3328             target: "disabler";
3329             after: "enable_text";
3330          }
3331          program { name: "enable_text";
3332             script {
3333                new st[31];
3334                new Float:vl;
3335                get_state(PART:"elm.text", st, 30, vl);
3336                if (!strcmp(st, "disabled_visible"))
3337                  set_state(PART:"elm.text", "visible", 0.0);
3338                else
3339                  set_state(PART:"elm.text", "default", 0.0);
3340                set_int(button_state, BUTTON_STATE_ENABLED);
3341             }
3342          }
3343          program { name: "focused";
3344             //signal: "elm,action,focus";
3345             //source: "elm";
3346             action: STATE_SET "focused" 0.0;
3347             target: "button_image";
3348             target: "elm.text";
3349          }
3350          program { name: "unfocused";
3351             //signal: "elm,action,unfocus";
3352             //source: "elm";
3353             action: STATE_SET "default" 0.0;
3354             target: "button_image";
3355             after: "unfocus_text";
3356          }
3357          program { name: "unfocus_text";
3358             action: STATE_SET "visible" 0.0;
3359             target: "elm.text";
3360          }
3361       }
3362    }
3363
3364 ///////////////////////////////////////////////////////////////////////////////////////
3365    group { name: "elm/button/base/multiline";
3366       alias: "elm/button/base/text_only/multiline";
3367       images {
3368          image: "00_button_04_normal.png" COMP;
3369          image: "00_button_04_press.png" COMP;
3370          image: "00_button_04_dim.png" COMP;
3371       }
3372       script {
3373          public button_state = BUTTON_STATE_ENABLED;
3374       }
3375       styles{
3376          style { name: "btn_multiline_style";
3377             base: "font=SLP:style=Medium font_size=18 align=center color=#ffffff wrap=mixed";
3378             tag: "br" "\n";
3379             tag: "ps" "ps";
3380             tag: "tab" "\t";
3381          }
3382       }
3383       parts {
3384          part { name: "button_image";
3385             scale: 1;
3386             description { state: "default" 0.0;
3387                min: 10 46;
3388                image {
3389                   normal: "00_button_04_normal.png";
3390                   border: 4 4 3 3;
3391                   border_scale: 1;
3392                }
3393             }
3394             description { state: "clicked" 0.0;
3395                inherit: "default" 0.0;
3396                image.normal: "00_button_04_press.png";
3397             }
3398             description { state: "disabled" 0.0;
3399                inherit: "default" 0.0;
3400                image.normal: "00_button_04_dim.png";
3401             }
3402             description { state: "focused" 0.0;
3403                inherit: "default" 0.0;
3404                image.normal: "00_button_04_press.png";
3405             }
3406          }
3407          part { name: "padding_left_top";
3408             type: RECT;
3409             scale: 1;
3410             mouse_events: 0;
3411             description { state: "default" 0.0;
3412                align: 0.0 0.0;
3413                rel2.relative: 0.0 0.0;
3414                min: 2 2;
3415                fixed: 1 1;
3416                visible: 0;
3417             }
3418          }
3419          part { name: "padding_right_bottom";
3420             type: RECT;
3421             scale: 1;
3422             mouse_events: 0;
3423             description { state: "default" 0.0;
3424                align: 1.0 1.0;
3425                rel1.relative: 1.0 1.0;
3426                min: 2 2;
3427                fixed: 1 1;
3428                visible: 0;
3429             }
3430          }
3431          part { name: "icon_rect";
3432             type: RECT;
3433             scale: 1;
3434             mouse_events: 0;
3435             description { state: "default" 0.0;
3436                visible: 1;
3437                min: 0 40;
3438                fixed: 1 0;
3439                rel1 {
3440                   relative: 0.0 1.0;
3441                   to_x: "elm.swallow.content";
3442                   to_y: "padding_left_top";
3443                }
3444                rel2 {
3445                   relative: 1.0 0.0;
3446                   to_x: "elm.swallow.content";
3447                   to_y: "padding_right_bottom";
3448                }
3449                align: 0.0 0.5;
3450                color: 0 0 0 0;
3451             }
3452          }
3453          part { name: "padding_icon_text";
3454             type: RECT;
3455             scale: 1;
3456             mouse_events: 0;
3457             description { state: "default" 0.0; //when only icon or no icon is there
3458                align: 0.0 0.0;
3459                rel1 {
3460                   relative: 1.0 0.0;
3461                   to: "icon_rect";
3462                }
3463                rel2.to: "icon_rect";
3464                fixed: 1 0;
3465                min: 0 0;
3466                color: 0 0 0 0;
3467             }
3468             description { state: "icononly" 0.0;
3469                inherit: "default" 0.0;
3470             }
3471             description { state: "visible" 0.0; //when icon is visible
3472                align: 0.0 0.0;
3473                rel1 {
3474                   relative: 1.0 0.0;
3475                   to: "icon_rect";
3476                }
3477                rel2.to: "icon_rect";
3478                fixed: 1 0;
3479                min: 5 0;
3480                color: 0 0 0 0;
3481             }
3482          }
3483          part { name: "elm.swallow.content";
3484             type: SWALLOW;
3485             scale: 1;
3486             clip_to: "clipper";
3487             description { state: "default" 0.0;
3488                visible: 0;
3489                align: 0.0 0.5;
3490                rel1 {
3491                   relative: 1.0 1.0;
3492                   to: "padding_left_top";
3493                }
3494                rel2 {
3495                   relative: 1.0 0.0;
3496                   to_x: "padding_left_top";
3497                   to_y: "padding_right_bottom";
3498                }
3499                fixed: 1 0;
3500             }
3501             description { state: "visible" 0.0;
3502                fixed: 1 0;
3503                align: 0.0 0.5;
3504                rel1 {
3505                   relative: 1.0 1.0;
3506                   to: "padding_left_top";
3507                }
3508                rel2 {
3509                   relative: 1.0 0.0;
3510                   to_x: "padding_left_top";
3511                   to_y: "padding_right_bottom";
3512                }
3513                aspect: 1.0 1.0;
3514                aspect_preference: VERTICAL;
3515             }
3516             description { state: "icononly" 0.0;
3517                min: 40 40;
3518                rel1 {
3519                   relative: 1.0 1.0;
3520                   to: "padding_left_top";
3521                }
3522                rel2 {
3523                   relative: 0.0 0.0;
3524                   to: "padding_right_bottom";
3525                }
3526                aspect: 1.0 1.0;
3527                aspect_preference: VERTICAL;
3528             }
3529          }
3530          part { name: "elm.text";
3531             type: TEXTBLOCK;
3532             mouse_events: 0;
3533             scale: 1;
3534             clip_to: "clipper";
3535             description { state: "default" 0.0;
3536                visible: 0;
3537                rel1 {
3538                   relative: 1.0 1.0;
3539                   to_x: "padding_icon_text";
3540                   to_y: "padding_left_top";
3541                }
3542                rel2 {
3543                   relative: 0.0 0.0;
3544                   to: "padding_right_bottom";
3545                }
3546                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
3547                text {
3548                   style: "btn_multiline_style";
3549                   min: 0 0;
3550                   max: 0 1;
3551                }
3552             }
3553             description { state: "visible" 0.0;
3554                inherit: "default" 0.0;
3555                visible: 1;
3556                min: 80 0;
3557             }
3558             description { state: "clicked" 0.0;
3559                inherit: "default" 0.0;
3560                visible: 1;
3561                min: 0 0;
3562                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
3563             }
3564             description { state: "disabled" 0.0;
3565                inherit: "default" 0.0;
3566                color: 0 0 0 128;
3567             }
3568             description { state: "disabled_visible" 0.0;
3569                inherit: "default" 0.0;
3570                color: BUTTON_TEXT_STYLE1_TEXT_DISABLED_COLOR_INC;
3571                visible: 1;
3572                min: 80 0;
3573             }
3574             description { state: "focused" 0.0;
3575                inherit: "default" 0.0;
3576                visible: 1;
3577                min: 0 0;
3578                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
3579             }
3580          }
3581          part { name: "over2";
3582             type: RECT;
3583             repeat_events: 1;
3584             ignore_flags: ON_HOLD;
3585             description { state: "default" 0.0;
3586                color: 0 0 0 0;
3587             }
3588          }
3589          part { name: "over3";
3590             type: RECT;
3591             repeat_events: 1;
3592             description { state: "default" 0.0;
3593                color: 0 0 0 0;
3594             }
3595          }
3596          part { name: "clipper";
3597             type: RECT;
3598             description { state: "default" 0.0;
3599                color: 255 255 255 255;
3600             }
3601          }
3602          part { name: "disabler";
3603             type: RECT;
3604             description { state: "default" 0.0;
3605                color: 0 0 0 0;
3606                visible: 0;
3607             }
3608             description { state: "disabled" 0.0;
3609                inherit: "default" 0.0;
3610                visible: 1;
3611             }
3612          }
3613       }
3614       programs {
3615          program { name: "button_click";
3616             signal: "mouse,down,1";
3617             source: "over2";
3618             action: SIGNAL_EMIT "elm,action,press" "";
3619             after: "button_click_anim";
3620          }
3621          program { name: "button_click_anim";
3622             action: STATE_SET "clicked" 0.0;
3623             target: "button_image";
3624             after: "text_clicked";
3625          }
3626          program { name: "text_clicked";
3627             script {
3628                new st[31];
3629                new Float:vl;
3630                get_state(PART:"elm.text", st, 30, vl);
3631                if (!strcmp(st, "visible"))
3632                  set_state(PART:"elm.text", "clicked", 0.0);
3633             }
3634          }
3635          program { name: "button_unpress";
3636             action: SIGNAL_EMIT "elm,action,unpress" "";
3637          }
3638          program { name: "button_mouseout_clicked";
3639             signal: "mouse,up,1";
3640             source: "over3";
3641             script {
3642                new st[31];
3643                new Float:vl;
3644                get_state(PART:"elm.swallow.content", st, 30, vl);
3645                if (strcmp(st, "icononly"))
3646                  {
3647                     emit("elm,action,default,text,set", "");
3648                     set_state(PART:"elm.text", "visible", 0.0);
3649                  }
3650                if (get_int(button_state) != BUTTON_STATE_DISABLED)
3651                  set_state(PART:"button_image", "default", 0.0);
3652             }
3653             after: button_unpress;
3654          }
3655          program { name: "button_unclick3";
3656             signal: "mouse,clicked,1";
3657             source: "over2";
3658             action: SIGNAL_EMIT "elm,action,click" "";
3659          }
3660          program { name: "text_show";
3661             signal: "elm,state,text,visible";
3662             source: "elm";
3663             script {
3664                new st[31];
3665                new Float:vl;
3666                get_state(PART:"elm.swallow.content", st, 30, vl);
3667                if (!strcmp(st, "icononly"))
3668                  {
3669                     set_state(PART:"elm.swallow.content", "visible", 0.0);
3670                     set_state(PART:"padding_icon_text", "visible", 0.0);
3671                  }
3672                if (get_int(button_state) != BUTTON_STATE_DISABLED)
3673                  set_state(PART:"elm.text", "visible", 0.0);
3674                else
3675                  set_state(PART:"elm.text", "disabled_visible", 0.0);
3676             }
3677          }
3678          program { name: "text_hide";
3679             signal: "elm,state,text,hidden";
3680             source: "elm";
3681             script {
3682                new st[31];
3683                new Float:vl;
3684                get_state(PART:"elm.swallow.content", st, 30, vl);
3685                if (!strcmp(st, "visible"))
3686                  {
3687                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
3688                     set_state(PART:"padding_icon_text", "icononly", 0.0);
3689                  }
3690                set_state(PART:"elm.text", "default", 0.0);
3691             }
3692          }
3693          program { name: "icon_show";
3694             signal: "elm,state,icon,visible";
3695             source: "elm";
3696             script {
3697                new st[31];
3698                new Float:vl;
3699                get_state(PART:"elm.text", st, 30, vl);
3700                if (!strcmp(st, "visible"))
3701                  {
3702                     set_state(PART:"elm.swallow.content", "visible", 0.0);
3703                     set_state(PART:"padding_icon_text", "visible", 0.0);
3704                  }
3705                else
3706                  {
3707                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
3708                     set_state(PART:"padding_icon_text", "icononly", 0.0);
3709                  }
3710             }
3711          }
3712          program { name: "icon_hide";
3713             signal: "elm,state,icon,hidden";
3714             source: "elm";
3715             action: STATE_SET "default" 0.0;
3716             target: "elm.swallow.content";
3717             target: "padding_icon_text";
3718          }
3719          program { name: "disable";
3720             signal: "elm,state,disabled";
3721             source: "elm";
3722             action: STATE_SET "disabled" 0.0;
3723             target: "button_image";
3724             target: "disabler";
3725             after: "disable_text";
3726          }
3727          program { name: "disable_text";
3728             script {
3729                new st[31];
3730                new Float:vl;
3731                get_state(PART:"elm.text", st, 30, vl);
3732                if (!strcmp(st, "visible"))
3733                  set_state(PART:"elm.text", "disabled_visible", 0.0);
3734                else
3735                  set_state(PART:"elm.text", "disabled", 0.0);
3736                set_int(button_state, BUTTON_STATE_DISABLED);
3737             }
3738          }
3739          program { name: "enable";
3740             signal: "elm,state,enabled";
3741             source: "elm";
3742             action: STATE_SET "default" 0.0;
3743             target: "button_image";
3744             target: "disabler";
3745             after: "enable_text";
3746          }
3747          program { name: "enable_text";
3748             script {
3749                new st[31];
3750                new Float:vl;
3751                get_state(PART:"elm.text", st, 30, vl);
3752                if (!strcmp(st, "disabled_visible"))
3753                  set_state(PART:"elm.text", "visible", 0.0);
3754                else
3755                  set_state(PART:"elm.text", "default", 0.0);
3756                set_int(button_state, BUTTON_STATE_ENABLED);
3757             }
3758          }
3759          program { name: "focused";
3760             //signal: "elm,action,focus";
3761             //source: "elm";
3762             action: STATE_SET "focused" 0.0;
3763             target: "button_image";
3764             target: "elm.text";
3765          }
3766          program { name: "unfocused";
3767             //signal: "elm,action,unfocus";
3768             //source: "elm";
3769             action: STATE_SET "default" 0.0;
3770             target: "button_image";
3771             after: "unfocus_text";
3772          }
3773          program { name: "unfocus_text";
3774             action: STATE_SET "visible" 0.0;
3775             target: "elm.text";
3776          }
3777       }
3778    }
3779
3780 ///////////////////////////////////////////////////////////////////////////////////////
3781    group { name: "elm/button/base/default";
3782       images {
3783          image: "00_button_01_normal.png" COMP;
3784          image: "00_button_01_normal_press.png" COMP;
3785          image: "00_button_01_normal_dim.png" COMP;
3786       }
3787       script {
3788          public button_state = BUTTON_STATE_ENABLED;
3789       }
3790       parts {
3791          part { name: "button_image";
3792             scale: 1;
3793             description { state: "default" 0.0;
3794                min: BUTTON_DEFAULT_STYLE_BG_MIN_INC;
3795                image {
3796                   normal: "00_button_01_normal.png";
3797                   border: BUTTON_DEFAULT_STYLE_BG_BORDER_INC;
3798                   border_scale: 1;
3799                }
3800             }
3801             description { state: "clicked" 0.0;
3802                inherit: "default" 0.0;
3803                image.normal: "00_button_01_normal_press.png";
3804             }
3805             description { state: "disabled" 0.0;
3806                inherit: "default" 0.0;
3807                image.normal: "00_button_01_normal_dim.png";
3808             }
3809             description { state: "focused" 0.0;
3810                inherit: "default" 0.0;
3811                image.normal: "00_button_01_normal_press.png";
3812             }
3813          }
3814          part { name: "padding_left_top";
3815             type: RECT;
3816             scale: 1;
3817             mouse_events: 0;
3818             description { state: "default" 0.0;
3819                align: 0.0 0.0;
3820                rel2.relative: 0.0 0.0;
3821                min: BUTTON_DEFAULT_STYLE_PADDING_MIN_INC;
3822                fixed: 1 1;
3823                visible: 0;
3824             }
3825          }
3826          part { name: "padding_right_bottom";
3827             type: RECT;
3828             scale: 1;
3829             mouse_events: 0;
3830             description { state: "default" 0.0;
3831                align: 1.0 1.0;
3832                rel1.relative: 1.0 1.0;
3833                min: BUTTON_DEFAULT_STYLE_PADDING_MIN_INC;
3834                fixed: 1 1;
3835                visible: 0;
3836             }
3837          }
3838          part { name: "padding_icon_text";
3839             type: RECT;
3840             scale: 1;
3841             mouse_events: 0;
3842             description { state: "default" 0.0; //when only icon or no icon is there
3843                align: 0.0 0.0;
3844                visible: 0;
3845                rel1 {
3846                   relative: 1.0 0.0;
3847                   to: "elm.swallow.content";
3848                }
3849                rel2.to: "elm.swallow.content";
3850                fixed: 1 0;
3851                min: 0 0;
3852             }
3853             description { state: "icononly" 0.0;
3854                inherit: "default" 0.0;
3855             }
3856             description { state: "visible" 0.0; //when icon is visible
3857                inherit: "default" 0.0;
3858                min: BUTTON_DEFAULT_STYLE_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
3859             }
3860          }
3861          part { name: "elm.swallow.content";
3862             type: SWALLOW;
3863             scale: 1;
3864             clip_to: "clipper";
3865             description { state: "default" 0.0;
3866                visible: 0;
3867                align: 0.0 0.5;
3868                rel1 {
3869                   relative: 1.0 1.0;
3870                   to: "padding_left_top";
3871                }
3872                rel2 {
3873                   relative: 1.0 0.0;
3874                   to_x: "padding_left_top";
3875                   to_y: "padding_right_bottom";
3876                }
3877                fixed: 1 0;
3878             }
3879             description { state: "visible" 0.0;
3880                fixed: 1 0;
3881                align: 0.0 0.5;
3882                rel1 {
3883                   relative: 1.0 1.0;
3884                   to: "padding_left_top";
3885                }
3886                rel2 {
3887                   relative: 1.0 0.0;
3888                   to_x: "padding_left_top";
3889                   to_y: "padding_right_bottom";
3890                }
3891                aspect: 1.0 1.0;
3892                aspect_preference: VERTICAL;
3893             }
3894             description { state: "icononly" 0.0;
3895                min: BUTTON_DEFAULT_STYLE_ICONONLY_ICON_MIN_INC;
3896                rel1 {
3897                   relative: 1.0 0.0;
3898                   to_x: "padding_left_top";
3899                }
3900                rel2 {
3901                   relative: 0.0 1.0;
3902                   to_x: "padding_right_bottom";
3903                }
3904                aspect: 1.0 1.0;
3905                aspect_preference: VERTICAL;
3906             }
3907          }
3908          part { name: "elm.text";
3909             type: TEXT;
3910             mouse_events: 0;
3911             scale: 1;
3912             clip_to: "clipper";
3913             description { state: "default" 0.0;
3914                visible: 0;
3915                align: 0.0 0.5;
3916                rel1 {
3917                   relative: 1.0 1.0;
3918                   to_x: "padding_icon_text";
3919                   to_y: "padding_left_top";
3920                }
3921                rel2 {
3922                   relative: 0.0 0.0;
3923                   to: "padding_right_bottom";
3924                }
3925                color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_NORMAL_COLOR_INC;
3926                text {
3927                   font: "SLP:style=Medium";
3928                   size: BUTTON_DEFAULT_STYLE_FONT_SIZE_INC;
3929                   min: 0 0;
3930                }
3931             }
3932             description { state: "visible" 0.0;
3933                inherit: "default" 0.0;
3934                visible: 1;
3935                min: BUTTON_DEFAULT_STYLE_TEXT_MIN_INC;
3936             }
3937             description { state: "clicked" 0.0;
3938                inherit: "default" 0.0;
3939                visible: 1;
3940                min: BUTTON_DEFAULT_STYLE_TEXT_MIN_INC;
3941                color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_PRESSED_COLOR_INC;
3942             }
3943             description { state: "disabled" 0.0;
3944                inherit: "default" 0.0;
3945             }
3946             description { state: "disabled_visible" 0.0;
3947                inherit: "default" 0.0;
3948                color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_DISABLED_COLOR_INC;
3949                visible: 1;
3950                min: BUTTON_DEFAULT_STYLE_TEXT_MIN_INC;
3951             }
3952             description { state: "focused" 0.0;
3953                inherit: "default" 0.0;
3954                visible: 1;
3955                min: 0 0;
3956                color: BUTTON_DEFAULT_STYLE_BUTTON_TEXT_FOCUSED_COLOR_INC;
3957             }
3958          }
3959          part { name: "over2";
3960             type: RECT;
3961             repeat_events: 1;
3962             ignore_flags: ON_HOLD;
3963             description { state: "default" 0.0;
3964                color: 0 0 0 0;
3965             }
3966          }
3967          part { name: "over3";
3968             type: RECT;
3969             repeat_events: 1;
3970             description { state: "default" 0.0;
3971                color: 0 0 0 0;
3972             }
3973          }
3974          part { name: "clipper";
3975             type: RECT;
3976             description { state: "default" 0.0;
3977                color: 255 255 255 255;
3978             }
3979          }
3980          part { name: "disabler";
3981             type: RECT;
3982             description { state: "default" 0.0;
3983                color: 0 0 0 0;
3984                visible: 0;
3985             }
3986             description { state: "disabled" 0.0;
3987                inherit: "default" 0.0;
3988                visible: 1;
3989             }
3990          }
3991       }
3992       programs {
3993          program { name: "button_click";
3994             signal: "mouse,down,1";
3995             source: "over2";
3996             action: SIGNAL_EMIT "elm,action,press" "";
3997             after: "button_click_anim";
3998          }
3999          program { name: "button_click_anim";
4000             action: STATE_SET "clicked" 0.0;
4001             target: "button_image";
4002             after: "text_clicked";
4003          }
4004          program { name: "text_clicked";
4005             script {
4006                new st[31];
4007                new Float:vl;
4008                get_state(PART:"elm.text", st, 30, vl);
4009                if (!strcmp(st, "visible"))
4010                  set_state(PART:"elm.text", "clicked", 0.0);
4011             }
4012          }
4013          program { name: "button_unpress";
4014             action: SIGNAL_EMIT "elm,action,unpress" "";
4015          }
4016          program { name: "button_mouseout_clicked";
4017             signal: "mouse,up,1";
4018             source: "over3";
4019             script {
4020                new st[31];
4021                new Float:vl;
4022                get_state(PART:"elm.swallow.content", st, 30, vl);
4023                if (strcmp(st, "icononly"))
4024                  {
4025                     emit("elm,action,default,text,set", "");
4026                     set_state(PART:"elm.text", "visible", 0.0);
4027                  }
4028                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4029                  set_state(PART:"button_image", "default", 0.0);
4030             }
4031             after: button_unpress;
4032          }
4033          program { name: "button_unclick3";
4034             signal: "mouse,clicked,1";
4035             source: "over2";
4036             action: SIGNAL_EMIT "elm,action,click" "";
4037          }
4038          program { name: "text_show";
4039             signal: "elm,state,text,visible";
4040             source: "elm";
4041             script {
4042                new st[31];
4043                new Float:vl;
4044                get_state(PART:"elm.swallow.content", st, 30, vl);
4045                if (!strcmp(st, "icononly"))
4046                  {
4047                     set_state(PART:"elm.swallow.content", "visible", 0.0);
4048                     set_state(PART:"padding_icon_text", "visible", 0.0);
4049                  }
4050                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4051                  set_state(PART:"elm.text", "visible", 0.0);
4052                else
4053                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4054             }
4055          }
4056          program { name: "text_hide";
4057             signal: "elm,state,text,hidden";
4058             source: "elm";
4059             script {
4060                new st[31];
4061                new Float:vl;
4062                get_state(PART:"elm.swallow.content", st, 30, vl);
4063                if (!strcmp(st, "visible"))
4064                  {
4065                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
4066                     set_state(PART:"padding_icon_text", "icononly", 0.0);
4067                  }
4068                set_state(PART:"elm.text", "default", 0.0);
4069             }
4070          }
4071          program { name: "icon_show";
4072             signal: "elm,state,icon,visible";
4073             source: "elm";
4074             script {
4075                new st[31];
4076                new Float:vl;
4077                get_state(PART:"elm.text", st, 30, vl);
4078                if (!strcmp(st, "visible"))
4079                  {
4080                     set_state(PART:"elm.swallow.content", "visible", 0.0);
4081                     set_state(PART:"padding_icon_text", "visible", 0.0);
4082                  }
4083                else
4084                  {
4085                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
4086                     set_state(PART:"padding_icon_text", "icononly", 0.0);
4087                  }
4088             }
4089          }
4090          program { name: "icon_hide";
4091             signal: "elm,state,icon,hidden";
4092             source: "elm";
4093             action: STATE_SET "default" 0.0;
4094             target: "elm.swallow.content";
4095             target: "padding_icon_text";
4096          }
4097          program { name: "disable";
4098             signal: "elm,state,disabled";
4099             source: "elm";
4100             action: STATE_SET "disabled" 0.0;
4101             target: "button_image";
4102             target: "disabler";
4103             after: "disable_text";
4104          }
4105          program { name: "disable_text";
4106             script {
4107                new st[31];
4108                new Float:vl;
4109                get_state(PART:"elm.text", st, 30, vl);
4110                if (!strcmp(st, "visible"))
4111                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4112                else
4113                  set_state(PART:"elm.text", "disabled", 0.0);
4114                set_int(button_state, BUTTON_STATE_DISABLED);
4115             }
4116          }
4117          program { name: "enable";
4118             signal: "elm,state,enabled";
4119             source: "elm";
4120             action: STATE_SET "default" 0.0;
4121             target: "button_image";
4122             target: "disabler";
4123             after: "enable_text";
4124          }
4125          program { name: "enable_text";
4126             script {
4127                new st[31];
4128                new Float:vl;
4129                get_state(PART:"elm.text", st, 30, vl);
4130                if (!strcmp(st, "disabled_visible"))
4131                  set_state(PART:"elm.text", "visible", 0.0);
4132                else
4133                  set_state(PART:"elm.text", "default", 0.0);
4134                set_int(button_state, BUTTON_STATE_ENABLED);
4135             }
4136          }
4137          program { name: "focused";
4138             //signal: "elm,action,focus";
4139             //source: "elm";
4140             action: STATE_SET "focused" 0.0;
4141             target: "button_image";
4142             target: "elm.text";
4143          }
4144          program { name: "unfocused";
4145             //signal: "elm,action,unfocus";
4146             //source: "elm";
4147             action: STATE_SET "default" 0.0;
4148             target: "button_image";
4149             after: "unfocus_text";
4150          }
4151          program { name: "unfocus_text";
4152             action: STATE_SET "visible" 0.0;
4153             target: "elm.text";
4154          }
4155       }
4156    }
4157
4158 ///////////////////////////////////////////////////////////////////////////////////////
4159 #define BUTTON_COLORSELECTOR_STYLES(style_name, image_normal, image_press,image_disable) \
4160    group { name: "elm/button/base/"style_name; \
4161       images { \
4162          image: image_normal COMP; \
4163          image: image_press COMP; \
4164          image: image_disable COMP; \
4165       } \
4166       script { \
4167          public button_state = BUTTON_STATE_ENABLED; \
4168       } \
4169       parts { \
4170          part { name: "button_image"; \
4171             scale: 1; \
4172             description { state: "default" 0.0; \
4173                min: BUTTON_COLORSELECTOR_BG_DEFAULT_MIN_INC; \
4174                image { \
4175                   normal: image_normal; \
4176                   border: COLORSELECTOR_BUTTON_BORDER; \
4177                   border_scale: 1; \
4178                } \
4179             } \
4180             description { state: "clicked" 0.0; \
4181                inherit: "default" 0.0; \
4182                image.normal: image_press; \
4183             } \
4184             description { state: "disabled" 0.0; \
4185                inherit: "default" 0.0; \
4186                image.normal: image_disable; \
4187             } \
4188             description { state: "focused" 0.0; \
4189                inherit: "default" 0.0; \
4190                image.normal: image_press; \
4191             } \
4192          } \
4193          part { name: "over2"; \
4194             type: RECT; \
4195             repeat_events: 1; \
4196             ignore_flags: ON_HOLD; \
4197             description { state: "default" 0.0; \
4198                color: 0 0 0 0; \
4199             } \
4200          } \
4201          part { name: "over3"; \
4202             type: RECT; \
4203             repeat_events: 1; \
4204             description { state: "default" 0.0; \
4205                color: 0 0 0 0; \
4206             } \
4207          } \
4208          part { name: "disabler"; \
4209             type: RECT; \
4210             description { state: "default" 0.0; \
4211                color: 0 0 0 0; \
4212                visible: 0; \
4213             } \
4214             description { state: "disabled" 0.0; \
4215                inherit: "default" 0.0; \
4216                visible: 1; \
4217             } \
4218          } \
4219       } \
4220       programs { \
4221          program { name: "button_click"; \
4222             signal: "mouse,down,1"; \
4223             source: "over2"; \
4224             action: SIGNAL_EMIT "elm,action,press" ""; \
4225             after: "button_click_anim"; \
4226          } \
4227          program { name: "button_click_anim"; \
4228             action: STATE_SET "clicked" 0.0; \
4229             target: "button_image"; \
4230          } \
4231          program { name: "button_unpress"; \
4232             action: SIGNAL_EMIT "elm,action,unpress" ""; \
4233          } \
4234          program { name: "button_mouseout_clicked"; \
4235             signal: "mouse,up,1"; \
4236             source: "over3"; \
4237             script { \
4238                if (get_int(button_state) != BUTTON_STATE_DISABLED) \
4239                  set_state(PART:"button_image", "default", 0.0); \
4240             } \
4241             after: button_unpress; \
4242          } \
4243          program { name: "button_unclick3"; \
4244             signal: "mouse,clicked,1"; \
4245             source: "over2"; \
4246             action: SIGNAL_EMIT "elm,action,click" ""; \
4247          } \
4248          program { name: "disable"; \
4249             signal: "elm,state,disabled"; \
4250             source: "elm"; \
4251             action: STATE_SET "disabled" 0.0; \
4252             target: "button_image"; \
4253             target: "disabler"; \
4254             script { \
4255                set_int(button_state, BUTTON_STATE_DISABLED); \
4256             } \
4257          } \
4258          program { name: "enable"; \
4259             signal: "elm,state,enabled"; \
4260             source: "elm"; \
4261             action: STATE_SET "default" 0.0; \
4262             target: "button_image"; \
4263             target: "disabler"; \
4264             script { \
4265                set_int(button_state, BUTTON_STATE_ENABLED); \
4266             } \
4267          } \
4268       } \
4269    }
4270 ///////////////////////////////////////////////////////////////////////////////////////
4271    BUTTON_COLORSELECTOR_STYLES("colorselector/left/default", "00_color_picker_btn_left.png", "00_color_picker_btn_left_press.png", "00_color_picker_btn_left_dim.png")
4272 ///////////////////////////////////////////////////////////////////////////////////////
4273    BUTTON_COLORSELECTOR_STYLES("colorselector/right/default", "00_color_picker_btn_right.png", "00_color_picker_btn_right_press.png", "00_color_picker_btn_right_dim.png")
4274 ///////////////////////////////////////////////////////////////////////////////////////
4275    group { name: "elm/button/base/hidden";
4276       images {
4277          image: "00_button_sweep.png" COMP;
4278          image: "00_button_sweep_press.png" COMP;//focus image is missing, so using press
4279       }
4280       script {
4281          public button_state = BUTTON_STATE_ENABLED;
4282       }
4283       parts {
4284          part { name: "button_image";
4285             scale: 1;
4286             description { state: "default" 0.0;
4287                min: BUTTON_HIDDEN_BG_NORMAL_MIN_INC;
4288                image {
4289                   normal: "00_button_sweep.png";
4290                   border: BUTTON_HIDDEN_BG_BORDER_INC;
4291                   border_scale: 1;
4292                }
4293             }
4294             description { state: "clicked" 0.0;
4295                inherit: "default" 0.0;
4296                image.normal: "00_button_sweep_press.png";
4297             }
4298             description { state: "disabled" 0.0;
4299                inherit: "default" 0.0;
4300             }
4301             description { state: "focused" 0.0;
4302                inherit: "default" 0.0;
4303                image.normal: "00_button_sweep_press.png";
4304             }
4305          }
4306          part { name: "padding_left_top";
4307             type: RECT;
4308             scale: 1;
4309             mouse_events: 0;
4310             description { state: "default" 0.0;
4311                align: 0.0 0.0;
4312                rel2.relative: 0.0 0.0;
4313                min: BUTTON_HIDDEN_PADDING_MIN_INC;
4314                fixed: 1 1;
4315                visible: 0;
4316             }
4317          }
4318          part { name: "padding_right_bottom";
4319             type: RECT;
4320             scale: 1;
4321             mouse_events: 0;
4322             description { state: "default" 0.0;
4323                align: 1.0 1.0;
4324                rel1.relative: 1.0 1.0;
4325                min: BUTTON_HIDDEN_PADDING_MIN_INC;
4326                fixed: 1 1;
4327                visible: 0;
4328             }
4329          }
4330          part { name: "icon_rect";
4331             type: RECT;
4332             scale: 1;
4333             mouse_events: 0;
4334             description { state: "default" 0.0;
4335                min: BUTTON_HIDDEN_ICON_RECT_MIN_INC;
4336                fixed: 1 0;
4337                rel1 {
4338                   relative: 0.0 1.0;
4339                   to_x: "elm.swallow.content";
4340                   to_y: "padding_left_top";
4341                }
4342                rel2 {
4343                   relative: 1.0 0.0;
4344                   to_x: "elm.swallow.content";
4345                   to_y: "padding_right_bottom";
4346                }
4347                align: 0.0 0.5;
4348                color: 0 0 0 0;
4349             }
4350          }
4351          part { name: "padding_icon_text";
4352             type: RECT;
4353             scale: 1;
4354             mouse_events: 0;
4355             description { state: "default" 0.0; //when only icon or no icon is there
4356                align: 0.0 0.0;
4357                rel1 {
4358                   relative: 1.0 0.0;
4359                   to: "icon_rect";
4360                }
4361                rel2.to: "icon_rect";
4362                fixed: 1 0;
4363                min: 0 0;
4364                color: 0 0 0 0;
4365             }
4366             description { state: "icononly" 0.0;
4367                inherit: "default" 0.0;
4368             }
4369             description { state: "visible" 0.0; //when icon is visible
4370                align: 0.0 0.0;
4371                rel1 {
4372                   relative: 1.0 0.0;
4373                   to: "icon_rect";
4374                }
4375                rel2.to: "icon_rect";
4376                fixed: 1 0;
4377                min: BUTTON_HIDDEN_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
4378                color: 0 0 0 0;
4379             }
4380          }
4381          part { name: "elm.swallow.content";
4382             type: SWALLOW;
4383             scale: 1;
4384             clip_to: "clipper";
4385             description { state: "default" 0.0;
4386                visible: 0;
4387                align: 0.0 0.5;
4388                rel1 {
4389                   relative: 1.0 1.0;
4390                   to: "padding_left_top";
4391                }
4392                rel2 {
4393                   relative: 1.0 0.0;
4394                   to_x: "padding_left_top";
4395                   to_y: "padding_right_bottom";
4396                }
4397                fixed: 1 0;
4398             }
4399             description { state: "visible" 0.0;
4400                fixed: 1 0;
4401                align: 0.0 0.5;
4402                rel1 {
4403                   relative: 1.0 1.0;
4404                   to: "padding_left_top";
4405                }
4406                rel2 {
4407                   relative: 1.0 0.0;
4408                   to_x: "padding_left_top";
4409                   to_y: "padding_right_bottom";
4410                }
4411                aspect: 1.0 1.0;
4412                aspect_preference: VERTICAL;
4413             }
4414             description { state: "icononly" 0.0;
4415                min: BUTTON_HIDDEN_ICON_ICONONLY_MIN_INC;
4416                rel1 {
4417                   relative: 1.0 1.0;
4418                   to: "padding_left_top";
4419                }
4420                rel2 {
4421                   relative: 1.0 0.0;
4422                   to_x: "padding_left_top";
4423                   to_y: "padding_right_bottom";
4424                }
4425                aspect: 1.0 1.0;
4426                aspect_preference: VERTICAL;
4427             }
4428          }
4429          part { name: "elm.text";
4430             type: TEXT;
4431             mouse_events: 0;
4432             scale: 1;
4433             clip_to: "clipper";
4434             description { state: "default" 0.0;
4435                visible: 0;
4436                rel1 {
4437                   relative: 1.0 1.0;
4438                   to_x: "padding_icon_text";
4439                   to_y: "padding_left_top";
4440                }
4441                rel2 {
4442                   relative: 0.0 0.0;
4443                   to: "padding_right_bottom";
4444                }
4445                color: BUTTON_HIDDEN_BUTTON_TEXT_NORMAL_COLOR_INC;
4446                text {
4447                   font: "SLP:style=Medium";
4448                   size: BUTTON_HIDDEN_FONT_SIZE_INC;
4449                   min: 0 0;
4450                }
4451             }
4452             description { state: "visible" 0.0;
4453                inherit: "default" 0.0;
4454                visible: 1;
4455                min: BUTTON_HIDDEN_TEXT_MIN_INC;
4456             }
4457             description { state: "clicked" 0.0;
4458                inherit: "default" 0.0;
4459                visible: 1;
4460                min: 0 0;
4461                color: BUTTON_HIDDEN_BUTTON_TEXT_PRESSED_COLOR_INC;
4462             }
4463             description { state: "disabled" 0.0;
4464                inherit: "default" 0.0;
4465                color: 0 0 0 128;
4466             }
4467             description { state: "disabled_visible" 0.0;
4468                inherit: "default" 0.0;
4469                color: BUTTON_HIDDEN_BUTTON_TEXT_DISABLED_COLOR_INC;
4470                visible: 1;
4471                min: BUTTON_HIDDEN_TEXT_MIN_INC;
4472             }
4473             description { state: "focused" 0.0;
4474                inherit: "default" 0.0;
4475                visible: 1;
4476                min: 0 0;
4477                color: BUTTON_HIDDEN_BUTTON_TEXT_FOCUSED_COLOR_INC;
4478             }
4479          }
4480          part { name: "over2";
4481             type: RECT;
4482             repeat_events: 1;
4483             ignore_flags: ON_HOLD;
4484             description { state: "default" 0.0;
4485                color: 0 0 0 0;
4486             }
4487          }
4488          part { name: "over3";
4489             type: RECT;
4490             repeat_events: 1;
4491             description { state: "default" 0.0;
4492                color: 0 0 0 0;
4493             }
4494          }
4495          part { name: "clipper";
4496             type: RECT;
4497             description { state: "default" 0.0;
4498                color: 255 255 255 255;
4499             }
4500          }
4501          part { name: "disabler";
4502             type: RECT;
4503             description { state: "default" 0.0;
4504                color: 0 0 0 0;
4505                visible: 0;
4506             }
4507             description { state: "disabled" 0.0;
4508                inherit: "default" 0.0;
4509                visible: 1;
4510             }
4511          }
4512       }
4513       programs {
4514          program { name: "button_click";
4515             signal: "mouse,down,1";
4516             source: "over2";
4517             action: SIGNAL_EMIT "elm,action,press" "";
4518             after: "button_click_anim";
4519          }
4520          program { name: "button_click_anim";
4521             action: STATE_SET "clicked" 0.0;
4522             target: "button_image";
4523             after: "text_clicked";
4524          }
4525          program { name: "text_clicked";
4526             script {
4527                new st[31];
4528                new Float:vl;
4529                get_state(PART:"elm.text", st, 30, vl);
4530                if (!strcmp(st, "visible"))
4531                  set_state(PART:"elm.text", "clicked", 0.0);
4532             }
4533          }
4534          program { name: "button_unpress";
4535             action: SIGNAL_EMIT "elm,action,unpress" "";
4536          }
4537          program { name: "button_mouseout_clicked";
4538             signal: "mouse,up,1";
4539             source: "over3";
4540             script {
4541                new st[31];
4542                new Float:vl;
4543                get_state(PART:"elm.swallow.content", st, 30, vl);
4544                if (strcmp(st, "icononly"))
4545                  {
4546                     emit("elm,action,default,text,set", "");
4547                     set_state(PART:"elm.text", "visible", 0.0);
4548                  }
4549                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4550                  set_state(PART:"button_image", "default", 0.0);
4551             }
4552             after: button_unpress;
4553          }
4554          program { name: "button_unclick3";
4555             signal: "mouse,clicked,1";
4556             source: "over2";
4557             action: SIGNAL_EMIT "elm,action,click" "";
4558          }
4559          program { name: "text_show";
4560             signal: "elm,state,text,visible";
4561             source: "elm";
4562             script {
4563                new st[31];
4564                new Float:vl;
4565                get_state(PART:"elm.swallow.content", st, 30, vl);
4566                if (!strcmp(st, "icononly"))
4567                  {
4568                     set_state(PART:"elm.swallow.content", "visible", 0.0);
4569                     set_state(PART:"padding_icon_text", "visible", 0.0);
4570                  }
4571                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4572                  set_state(PART:"elm.text", "visible", 0.0);
4573                else
4574                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4575             }
4576          }
4577          program { name: "text_hide";
4578             signal: "elm,state,text,hidden";
4579             source: "elm";
4580             script {
4581                new st[31];
4582                new Float:vl;
4583                get_state(PART:"elm.swallow.content", st, 30, vl);
4584                if (!strcmp(st, "visible"))
4585                  {
4586                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
4587                     set_state(PART:"padding_icon_text", "icononly", 0.0);
4588                  }
4589                set_state(PART:"elm.text", "default", 0.0);
4590             }
4591          }
4592          program { name: "icon_show";
4593             signal: "elm,state,icon,visible";
4594             source: "elm";
4595             script {
4596                new st[31];
4597                new Float:vl;
4598                get_state(PART:"elm.text", st, 30, vl);
4599                if (!strcmp(st, "visible"))
4600                  {
4601                     set_state(PART:"elm.swallow.content", "visible", 0.0);
4602                     set_state(PART:"padding_icon_text", "visible", 0.0);
4603                  }
4604                else
4605                  {
4606                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
4607                     set_state(PART:"padding_icon_text", "icononly", 0.0);
4608                  }
4609             }
4610          }
4611          program { name: "icon_hide";
4612             signal: "elm,state,icon,hidden";
4613             source: "elm";
4614             action: STATE_SET "default" 0.0;
4615             target: "elm.swallow.content";
4616             target: "padding_icon_text";
4617          }
4618          program { name: "disable";
4619             signal: "elm,state,disabled";
4620             source: "elm";
4621             action: STATE_SET "disabled" 0.0;
4622             target: "button_image";
4623             target: "disabler";
4624             after: "disable_text";
4625          }
4626          program { name: "disable_text";
4627             script {
4628                new st[31];
4629                new Float:vl;
4630                get_state(PART:"elm.text", st, 30, vl);
4631                if (!strcmp(st, "visible"))
4632                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4633                else
4634                  set_state(PART:"elm.text", "disabled", 0.0);
4635                set_int(button_state, BUTTON_STATE_DISABLED);
4636             }
4637          }
4638          program { name: "enable";
4639             signal: "elm,state,enabled";
4640             source: "elm";
4641             action: STATE_SET "default" 0.0;
4642             target: "button_image";
4643             target: "disabler";
4644             after: "enable_text";
4645          }
4646          program { name: "enable_text";
4647             script {
4648                new st[31];
4649                new Float:vl;
4650                get_state(PART:"elm.text", st, 30, vl);
4651                if (!strcmp(st, "disabled_visible"))
4652                  set_state(PART:"elm.text", "visible", 0.0);
4653                else
4654                  set_state(PART:"elm.text", "default", 0.0);
4655                set_int(button_state, BUTTON_STATE_ENABLED);
4656             }
4657          }
4658          program { name: "focused";
4659             //signal: "elm,action,focus";
4660             //source: "elm";
4661             action: STATE_SET "focused" 0.0;
4662             target: "button_image";
4663             target: "elm.text";
4664          }
4665          program { name: "unfocused";
4666             //signal: "elm,action,unfocus";
4667             //source: "elm";
4668             action: STATE_SET "default" 0.0;
4669             target: "button_image";
4670             after: "unfocus_text";
4671          }
4672          program { name: "unfocus_text";
4673             action: STATE_SET "visible" 0.0;
4674             target: "elm.text";
4675          }
4676       }
4677    }
4678
4679 ///////////////////////////////////////////////////////////////////////////////////////
4680    group { name: "elm/button/base/picker/bar/default";
4681       images {
4682          image: "00_picker_btn_normal.png" COMP;
4683          image: "00_picker_btn_press.png" COMP;
4684       }
4685       script {
4686          public button_state = BUTTON_STATE_ENABLED;
4687       }
4688       parts {
4689          part { name: "button_image";
4690             scale: 1;
4691             description { state: "default" 0.0;
4692                min: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_MIN_INC;
4693                image {
4694                   normal: "00_picker_btn_normal.png";
4695                   border: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_IMAGE_BORDER_INC;
4696                   border_scale: 1;
4697                }
4698             }
4699             description { state: "clicked" 0.0;
4700                inherit: "default" 0.0;
4701                image.normal: "00_picker_btn_press.png";
4702             }
4703             description { state: "disabled" 0.0;
4704                inherit: "default" 0.0;
4705             }
4706             description { state: "focused" 0.0;
4707                inherit: "default" 0.0;
4708                image.normal: "00_picker_btn_press.png";
4709             }
4710          }
4711          part { name: "padding_left_top";
4712             type: RECT;
4713             scale: 1;
4714             mouse_events: 0;
4715             description { state: "default" 0.0;
4716                align: 0.0 0.0;
4717                rel2.relative: 0.0 0.0;
4718                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC;
4719                fixed: 1 1;
4720                visible: 0;
4721             }
4722          }
4723          part { name: "padding_right_bottom";
4724             type: RECT;
4725             scale: 1;
4726             mouse_events: 0;
4727             description { state: "default" 0.0;
4728                align: 1.0 1.0;
4729                rel1.relative: 1.0 1.0;
4730                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC;
4731                fixed: 1 1;
4732                visible: 0;
4733             }
4734          }
4735          part { name: "icon_rect";
4736             type: RECT;
4737             scale: 1;
4738             mouse_events: 0;
4739             description { state: "default" 0.0;
4740                min: BUTTON_PICKER_BAR_DEFAULT_ICON_RECT_DEFAULT_MIN_INC;
4741                fixed: 1 0;
4742                rel1 {
4743                   relative: 0.0 1.0;
4744                   to_x: "elm.swallow.content";
4745                   to_y: "padding_left_top";
4746                }
4747                rel2 {
4748                   relative: 1.0 0.0;
4749                   to_x: "elm.swallow.content";
4750                   to_y: "padding_right_bottom";
4751                }
4752                align: 0.0 0.5;
4753                color: 0 0 0 0;
4754             }
4755          }
4756          part { name: "padding_icon_text";
4757             type: RECT;
4758             scale: 1;
4759             mouse_events: 0;
4760             description { state: "default" 0.0; //when only icon or no icon is there
4761                align: 0.0 0.0;
4762                rel1 {
4763                   relative: 1.0 0.0;
4764                   to: "icon_rect";
4765                }
4766                rel2.to: "icon_rect";
4767                fixed: 1 0;
4768                min: 0 0;
4769                color: 0 0 0 0;
4770             }
4771             description { state: "icononly" 0.0;
4772                inherit: "default" 0.0;
4773             }
4774             description { state: "visible" 0.0; //when icon is visible
4775                align: 0.0 0.0;
4776                rel1 {
4777                   relative: 1.0 0.0;
4778                   to: "icon_rect";
4779                }
4780                rel2.to: "icon_rect";
4781                fixed: 1 0;
4782                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC;
4783                color: 0 0 0 0;
4784             }
4785          }
4786          part { name: "elm.swallow.content";
4787             type: SWALLOW;
4788             scale: 1;
4789             clip_to: "clipper";
4790             description { state: "default" 0.0;
4791                visible: 0;
4792                align: 0.0 0.5;
4793                rel1 {
4794                   relative: 1.0 1.0;
4795                   to: "padding_left_top";
4796                }
4797                rel2 {
4798                   relative: 1.0 0.0;
4799                   to_x: "padding_left_top";
4800                   to_y: "padding_right_bottom";
4801                }
4802                fixed: 1 0;
4803             }
4804             description { state: "visible" 0.0;
4805                fixed: 1 0;
4806                align: 0.0 0.5;
4807                rel1 {
4808                   relative: 1.0 1.0;
4809                   to: "padding_left_top";
4810                }
4811                rel2 {
4812                   relative: 1.0 0.0;
4813                   to_x: "padding_left_top";
4814                   to_y: "padding_right_bottom";
4815                }
4816                aspect: 1.0 1.0;
4817                aspect_preference: VERTICAL;
4818             }
4819             description { state: "icononly" 0.0;
4820                min: BUTTON_PICKER_BAR_DEFAULT_CONTENT_ICONONLY_MIN_INC;
4821                rel1 {
4822                   relative: 1.0 1.0;
4823                   to: "padding_left_top";
4824                }
4825                rel2 {
4826                   relative: 1.0 0.0;
4827                   to_x: "padding_left_top";
4828                   to_y: "padding_right_bottom";
4829                }
4830                aspect: 1.0 1.0;
4831                aspect_preference: VERTICAL;
4832             }
4833          }
4834          part { name: "elm.text";
4835             type: TEXT;
4836             mouse_events: 0;
4837             scale: 1;
4838             clip_to: "clipper";
4839             description { state: "default" 0.0;
4840                visible: 0;
4841                rel1 {
4842                   relative: 1.0 1.0;
4843                   to_x: "padding_icon_text";
4844                   to_y: "padding_left_top";
4845                }
4846                rel2 {
4847                   relative: 0.0 0.0;
4848                   to: "padding_right_bottom";
4849                }
4850                color: BUTTON_PICKER_TEXT_DEFAULT_COLOR_INC;
4851                text {
4852                   font: "SLP:style=Medium";
4853                   size: BUTTON_PICKER_BAR_DEFAULT_TEXT_FONT_SIZE_INC;
4854                   min: 1 0;
4855                   max: 0 0;
4856                }
4857             }
4858             description { state: "visible" 0.0;
4859                inherit: "default" 0.0;
4860                visible: 1;
4861                min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC;
4862             }
4863             description { state: "clicked" 0.0;
4864                inherit: "default" 0.0;
4865                visible: 1;
4866                min: 0 0;
4867                color: BUTTON_PICKER_TEXT_CLICKED_COLOR_INC;
4868             }
4869             description { state: "disabled" 0.0;
4870                inherit: "default" 0.0;
4871                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
4872             }
4873             description { state: "disabled_visible" 0.0;
4874                inherit: "default" 0.0;
4875                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
4876                visible: 1;
4877                min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC;
4878             }
4879             description { state: "focused" 0.0;
4880                inherit: "default" 0.0;
4881                visible: 1;
4882                min: 0 0;
4883                color: BUTTON_PICKER_TEXT_FOCUSED_COLOR_INC;
4884             }
4885          }
4886          part { name: "over2";
4887             type: RECT;
4888             repeat_events: 1;
4889             ignore_flags: ON_HOLD;
4890             description { state: "default" 0.0;
4891                color: 0 0 0 0;
4892             }
4893          }
4894          part { name: "over3";
4895             type: RECT;
4896             repeat_events: 1;
4897             description { state: "default" 0.0;
4898                color: 0 0 0 0;
4899             }
4900          }
4901          part { name: "clipper";
4902             type: RECT;
4903             description { state: "default" 0.0;
4904                color: 255 255 255 255;
4905             }
4906          }
4907          part { name: "disabler";
4908             type: RECT;
4909             description { state: "default" 0.0;
4910                color: 0 0 0 0;
4911                visible: 0;
4912             }
4913             description { state: "disabled" 0.0;
4914                inherit: "default" 0.0;
4915                visible: 1;
4916             }
4917          }
4918       }
4919       programs {
4920          program { name: "button_click";
4921             signal: "mouse,down,1";
4922             source: "over2";
4923             action: SIGNAL_EMIT "elm,action,press" "";
4924             after: "button_click_anim";
4925          }
4926          program { name: "button_click_anim";
4927             action: STATE_SET "clicked" 0.0;
4928             target: "button_image";
4929             after: "text_clicked";
4930          }
4931          program { name: "text_clicked";
4932             script {
4933                new st[31];
4934                new Float:vl;
4935                get_state(PART:"elm.text", st, 30, vl);
4936                if (!strcmp(st, "visible"))
4937                  set_state(PART:"elm.text", "clicked", 0.0);
4938             }
4939          }
4940          program { name: "button_unpress";
4941             action: SIGNAL_EMIT "elm,action,unpress" "";
4942          }
4943          program { name: "button_mouseout_clicked";
4944             signal: "mouse,up,1";
4945             source: "over3";
4946             script {
4947                new st[31];
4948                new Float:vl;
4949                get_state(PART:"elm.swallow.content", st, 30, vl);
4950                if (strcmp(st, "icononly"))
4951                  {
4952                     emit("elm,action,default,text,set", "");
4953                     set_state(PART:"elm.text", "visible", 0.0);
4954                  }
4955                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4956                  set_state(PART:"button_image", "default", 0.0);
4957             }
4958             after: button_unpress;
4959          }
4960          program { name: "button_unclick3";
4961             signal: "mouse,clicked,1";
4962             source: "over2";
4963             action: SIGNAL_EMIT "elm,action,click" "";
4964          }
4965          program { name: "text_show";
4966             signal: "elm,state,text,visible";
4967             source: "elm";
4968             script {
4969                new st[31];
4970                new Float:vl;
4971                get_state(PART:"elm.swallow.content", st, 30, vl);
4972                if (!strcmp(st, "icononly"))
4973                  {
4974                     set_state(PART:"elm.swallow.content", "visible", 0.0);
4975                     set_state(PART:"padding_icon_text", "visible", 0.0);
4976                  }
4977                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4978                  set_state(PART:"elm.text", "visible", 0.0);
4979                else
4980                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4981             }
4982          }
4983          program { name: "text_hide";
4984             signal: "elm,state,text,hidden";
4985             source: "elm";
4986             script {
4987                new st[31];
4988                new Float:vl;
4989                get_state(PART:"elm.swallow.content", st, 30, vl);
4990                if (!strcmp(st, "visible"))
4991                  {
4992                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
4993                     set_state(PART:"padding_icon_text", "icononly", 0.0);
4994                  }
4995                set_state(PART:"elm.text", "default", 0.0);
4996             }
4997          }
4998          program { name: "icon_show";
4999             signal: "elm,state,icon,visible";
5000             source: "elm";
5001             script {
5002                new st[31];
5003                new Float:vl;
5004                get_state(PART:"elm.text", st, 30, vl);
5005                if (!strcmp(st, "visible"))
5006                  {
5007                     set_state(PART:"elm.swallow.content", "visible", 0.0);
5008                     set_state(PART:"padding_icon_text", "visible", 0.0);
5009                  }
5010                else
5011                  {
5012                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
5013                     set_state(PART:"padding_icon_text", "icononly", 0.0);
5014                  }
5015             }
5016          }
5017          program { name: "icon_hide";
5018             signal: "elm,state,icon,hidden";
5019             source: "elm";
5020             action: STATE_SET "default" 0.0;
5021             target: "elm.swallow.content";
5022             target: "padding_icon_text";
5023          }
5024          program { name: "disable";
5025             signal: "elm,state,disabled";
5026             source: "elm";
5027             action: STATE_SET "disabled" 0.0;
5028             target: "button_image";
5029             target: "disabler";
5030             after: "disable_text";
5031          }
5032          program { name: "disable_text";
5033             script {
5034                new st[31];
5035                new Float:vl;
5036                get_state(PART:"elm.text", st, 30, vl);
5037                if (!strcmp(st, "visible"))
5038                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5039                else
5040                  set_state(PART:"elm.text", "disabled", 0.0);
5041                set_int(button_state, BUTTON_STATE_DISABLED);
5042             }
5043          }
5044          program { name: "enable";
5045             signal: "elm,state,enabled";
5046             source: "elm";
5047             action: STATE_SET "default" 0.0;
5048             target: "button_image";
5049             target: "disabler";
5050             after: "enable_text";
5051          }
5052          program { name: "enable_text";
5053             script {
5054                new st[31];
5055                new Float:vl;
5056                get_state(PART:"elm.text", st, 30, vl);
5057                if (!strcmp(st, "disabled_visible"))
5058                  set_state(PART:"elm.text", "visible", 0.0);
5059                else
5060                  set_state(PART:"elm.text", "default", 0.0);
5061                set_int(button_state, BUTTON_STATE_ENABLED);
5062             }
5063          }
5064          program { name: "focused";
5065             //signal: "elm,action,focus";
5066             //source: "elm";
5067             action: STATE_SET "focused" 0.0;
5068             target: "button_image";
5069             target: "elm.text";
5070          }
5071          program { name: "unfocused";
5072             //signal: "elm,action,unfocus";
5073             //source: "elm";
5074             action: STATE_SET "default" 0.0;
5075             target: "button_image";
5076             after: "unfocus_text";
5077          }
5078          program { name: "unfocus_text";
5079             action: STATE_SET "visible" 0.0;
5080             target: "elm.text";
5081          }
5082       }
5083    }
5084
5085 ///////////////////////////////////////////////////////////////////////////////////////
5086    group { name: "elm/button/base/picker/prev/text/default";
5087       alias: "elm/button/base/picker/next/text/default";
5088       images {
5089          image: "00_picker_btn_normal.png" COMP;
5090          image: "00_picker_btn_press.png" COMP;
5091       }
5092       script {
5093          public button_state = BUTTON_STATE_ENABLED;
5094       }
5095       parts {
5096          part { name: "button_image";
5097             scale: 1;
5098             description { state: "default" 0.0;
5099                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_MIN_INC;
5100                image {
5101                   normal: "00_picker_btn_normal.png";
5102                   border: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_BORDER_INC;
5103                   border_scale: 1;
5104                }
5105             }
5106             description { state: "clicked" 0.0;
5107                inherit: "default" 0.0;
5108                image.normal: "00_picker_btn_press.png";
5109             }
5110             description { state: "disabled" 0.0;
5111                inherit: "default" 0.0;
5112             }
5113             description { state: "focused" 0.0;
5114                inherit: "default" 0.0;
5115                image.normal: "00_picker_btn_press.png";
5116             }
5117          }
5118          part { name: "padding_left_top";
5119             type: RECT;
5120             scale: 1;
5121             mouse_events: 0;
5122             description { state: "default" 0.0;
5123                align: 0.0 0.0;
5124                rel2.relative: 0.0 0.0;
5125                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC;
5126                fixed: 1 1;
5127                visible: 0;
5128             }
5129          }
5130          part { name: "padding_right_bottom";
5131             type: RECT;
5132             scale: 1;
5133             mouse_events: 0;
5134             description { state: "default" 0.0;
5135                align: 1.0 1.0;
5136                rel1.relative: 1.0 1.0;
5137                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC;
5138                fixed: 1 1;
5139                visible: 0;
5140             }
5141          }
5142          part { name: "icon_rect";
5143             type: RECT;
5144             scale: 1;
5145             mouse_events: 0;
5146             description { state: "default" 0.0;
5147                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_ICON_RECT_MIN_INC;
5148                fixed: 1 0;
5149                rel1 {
5150                   relative: 0.0 1.0;
5151                   to_x: "elm.swallow.content";
5152                   to_y: "padding_left_top";
5153                }
5154                rel2 {
5155                   relative: 1.0 0.0;
5156                   to_x: "elm.swallow.content";
5157                   to_y: "padding_right_bottom";
5158                }
5159                align: 0.0 0.5;
5160                color: 0 0 0 0;
5161             }
5162          }
5163          part { name: "padding_icon_text";
5164             type: RECT;
5165             scale: 1;
5166             mouse_events: 0;
5167             description { state: "default" 0.0; //when only icon or no icon is there
5168                align: 0.0 0.0;
5169                rel1 {
5170                   relative: 1.0 0.0;
5171                   to: "icon_rect";
5172                }
5173                rel2.to: "icon_rect";
5174                fixed: 1 0;
5175                min: 0 0;
5176                color: 0 0 0 0;
5177             }
5178             description { state: "icononly" 0.0;
5179                inherit: "default" 0.0;
5180             }
5181             description { state: "visible" 0.0; //when icon is visible
5182                align: 0.0 0.0;
5183                rel1 {
5184                   relative: 1.0 0.0;
5185                   to: "icon_rect";
5186                }
5187                rel2.to: "icon_rect";
5188                fixed: 1 0;
5189                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC;
5190                color: 0 0 0 0;
5191             }
5192          }
5193          part { name: "elm.swallow.content";
5194             type: SWALLOW;
5195             scale: 1;
5196             clip_to: "clipper";
5197             description { state: "default" 0.0;
5198                visible: 0;
5199                align: 0.0 0.5;
5200                rel1 {
5201                   relative: 1.0 1.0;
5202                   to: "padding_left_top";
5203                }
5204                rel2 {
5205                   relative: 1.0 0.0;
5206                   to_x: "padding_left_top";
5207                   to_y: "padding_right_bottom";
5208                }
5209                fixed: 1 0;
5210             }
5211             description { state: "visible" 0.0;
5212                fixed: 1 0;
5213                align: 0.0 0.5;
5214                rel1 {
5215                   relative: 1.0 1.0;
5216                   to: "padding_left_top";
5217                }
5218                rel2 {
5219                   relative: 1.0 0.0;
5220                   to_x: "padding_left_top";
5221                   to_y: "padding_right_bottom";
5222                }
5223                aspect: 1.0 1.0;
5224                aspect_preference: VERTICAL;
5225             }
5226             description { state: "icononly" 0.0;
5227                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_CONTENT_ICON_ONLY_MIN_INC;
5228                rel1 {
5229                   relative: 1.0 1.0;
5230                   to: "padding_left_top";
5231                }
5232                rel2 {
5233                   relative: 1.0 0.0;
5234                   to_x: "padding_left_top";
5235                   to_y: "padding_right_bottom";
5236                }
5237                aspect: 1.0 1.0;
5238                aspect_preference: VERTICAL;
5239             }
5240          }
5241          part { name: "elm.text";
5242             type: TEXT;
5243             mouse_events: 0;
5244             scale: 1;
5245             clip_to: "clipper";
5246             description { state: "default" 0.0;
5247                visible: 0;
5248                rel1 {
5249                   relative: 1.0 1.0;
5250                   to_x: "padding_icon_text";
5251                   to_y: "padding_left_top";
5252                }
5253                rel2 {
5254                   relative: 0.0 0.0;
5255                   to: "padding_right_bottom";
5256                }
5257                color: BUTTON_PICKER_TEXT_DEFAULT_COLOR_INC;
5258                text {
5259                   font: "SLP:style=Medium";
5260                   size: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_FONT_SIZE_INC;
5261                   min: 1 0;
5262                   max: 1 0;
5263                }
5264             }
5265             description { state: "visible" 0.0;
5266                inherit: "default" 0.0;
5267                visible: 1;
5268                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC;
5269             }
5270             description { state: "clicked" 0.0;
5271                inherit: "default" 0.0;
5272                visible: 1;
5273                min: 0 0;
5274                color: BUTTON_PICKER_TEXT_CLICKED_COLOR_INC;
5275             }
5276             description { state: "disabled" 0.0;
5277                inherit: "default" 0.0;
5278                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
5279             }
5280             description { state: "disabled_visible" 0.0;
5281                inherit: "default" 0.0;
5282                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
5283                visible: 1;
5284                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC;
5285             }
5286             description { state: "focused" 0.0;
5287                inherit: "default" 0.0;
5288                visible: 1;
5289                min: 0 0;
5290                color: BUTTON_PICKER_TEXT_FOCUSED_COLOR_INC;
5291             }
5292          }
5293          part { name: "over2";
5294             type: RECT;
5295             repeat_events: 1;
5296             ignore_flags: ON_HOLD;
5297             description { state: "default" 0.0;
5298                color: 0 0 0 0;
5299             }
5300          }
5301          part { name: "over3";
5302             type: RECT;
5303             repeat_events: 1;
5304             description { state: "default" 0.0;
5305                color: 0 0 0 0;
5306             }
5307          }
5308          part { name: "clipper";
5309             type: RECT;
5310             description { state: "default" 0.0;
5311                color: 255 255 255 255;
5312             }
5313          }
5314          part { name: "disabler";
5315             type: RECT;
5316             description { state: "default" 0.0;
5317                color: 0 0 0 0;
5318                visible: 0;
5319             }
5320             description { state: "disabled" 0.0;
5321                inherit: "default" 0.0;
5322                visible: 1;
5323             }
5324          }
5325       }
5326       programs {
5327          program { name: "button_click";
5328             signal: "mouse,down,1";
5329             source: "over2";
5330             action: SIGNAL_EMIT "elm,action,press" "";
5331             after: "button_click_anim";
5332          }
5333          program { name: "button_click_anim";
5334             action: STATE_SET "clicked" 0.0;
5335             target: "button_image";
5336             after: "text_clicked";
5337          }
5338          program { name: "text_clicked";
5339             script {
5340                new st[31];
5341                new Float:vl;
5342                get_state(PART:"elm.text", st, 30, vl);
5343                if (!strcmp(st, "visible"))
5344                  set_state(PART:"elm.text", "clicked", 0.0);
5345             }
5346          }
5347          program { name: "button_unpress";
5348             action: SIGNAL_EMIT "elm,action,unpress" "";
5349          }
5350          program { name: "button_mouseout_clicked";
5351             signal: "mouse,up,1";
5352             source: "over3";
5353             script {
5354                new st[31];
5355                new Float:vl;
5356                get_state(PART:"elm.swallow.content", st, 30, vl);
5357                if (strcmp(st, "icononly"))
5358                  {
5359                     emit("elm,action,default,text,set", "");
5360                     set_state(PART:"elm.text", "visible", 0.0);
5361                  }
5362                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5363                  set_state(PART:"button_image", "default", 0.0);
5364             }
5365             after: button_unpress;
5366          }
5367          program { name: "button_unclick3";
5368             signal: "mouse,clicked,1";
5369             source: "over2";
5370             action: SIGNAL_EMIT "elm,action,click" "";
5371          }
5372          program { name: "text_show";
5373             signal: "elm,state,text,visible";
5374             source: "elm";
5375             script {
5376                new st[31];
5377                new Float:vl;
5378                get_state(PART:"elm.swallow.content", st, 30, vl);
5379                if (!strcmp(st, "icononly"))
5380                  {
5381                     set_state(PART:"elm.swallow.content", "visible", 0.0);
5382                     set_state(PART:"padding_icon_text", "visible", 0.0);
5383                  }
5384                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5385                  set_state(PART:"elm.text", "visible", 0.0);
5386                else
5387                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5388             }
5389          }
5390          program { name: "text_hide";
5391             signal: "elm,state,text,hidden";
5392             source: "elm";
5393             script {
5394                new st[31];
5395                new Float:vl;
5396                get_state(PART:"elm.swallow.content", st, 30, vl);
5397                if (!strcmp(st, "visible"))
5398                  {
5399                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
5400                     set_state(PART:"padding_icon_text", "icononly", 0.0);
5401                  }
5402                set_state(PART:"elm.text", "default", 0.0);
5403             }
5404          }
5405          program { name: "icon_show";
5406             signal: "elm,state,icon,visible";
5407             source: "elm";
5408             script {
5409                new st[31];
5410                new Float:vl;
5411                get_state(PART:"elm.text", st, 30, vl);
5412                if (!strcmp(st, "visible"))
5413                  {
5414                     set_state(PART:"elm.swallow.content", "visible", 0.0);
5415                     set_state(PART:"padding_icon_text", "visible", 0.0);
5416                  }
5417                else
5418                  {
5419                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
5420                     set_state(PART:"padding_icon_text", "icononly", 0.0);
5421                  }
5422             }
5423          }
5424          program { name: "icon_hide";
5425             signal: "elm,state,icon,hidden";
5426             source: "elm";
5427             action: STATE_SET "default" 0.0;
5428             target: "elm.swallow.content";
5429             target: "padding_icon_text";
5430          }
5431          program { name: "disable";
5432             signal: "elm,state,disabled";
5433             source: "elm";
5434             action: STATE_SET "disabled" 0.0;
5435             target: "button_image";
5436             target: "disabler";
5437             after: "disable_text";
5438          }
5439          program { name: "disable_text";
5440             script {
5441                new st[31];
5442                new Float:vl;
5443                get_state(PART:"elm.text", st, 30, vl);
5444                if (!strcmp(st, "visible"))
5445                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5446                else
5447                  set_state(PART:"elm.text", "disabled", 0.0);
5448                set_int(button_state, BUTTON_STATE_DISABLED);
5449             }
5450          }
5451          program { name: "enable";
5452             signal: "elm,state,enabled";
5453             source: "elm";
5454             action: STATE_SET "default" 0.0;
5455             target: "button_image";
5456             target: "disabler";
5457             after: "enable_text";
5458          }
5459          program { name: "enable_text";
5460             script {
5461                new st[31];
5462                new Float:vl;
5463                get_state(PART:"elm.text", st, 30, vl);
5464                if (!strcmp(st, "disabled_visible"))
5465                  set_state(PART:"elm.text", "visible", 0.0);
5466                else
5467                  set_state(PART:"elm.text", "default", 0.0);
5468                set_int(button_state, BUTTON_STATE_ENABLED);
5469             }
5470          }
5471          program { name: "focused";
5472             //signal: "elm,action,focus";
5473             //source: "elm";
5474             action: STATE_SET "focused" 0.0;
5475             target: "button_image";
5476             target: "elm.text";
5477          }
5478          program { name: "unfocused";
5479             //signal: "elm,action,unfocus";
5480             //source: "elm";
5481             action: STATE_SET "default" 0.0;
5482             target: "button_image";
5483             after: "unfocus_text";
5484          }
5485          program { name: "unfocus_text";
5486             action: STATE_SET "visible" 0.0;
5487             target: "elm.text";
5488          }
5489       }
5490    }
5491
5492 ///////////////////////////////////////////////////////////////////////////////////////
5493    group { name: "elm/button/base/contact";
5494       alias: "elm/button/base/text_only/contact";
5495       script {
5496          public button_state = BUTTON_STATE_ENABLED;
5497       }
5498       parts {
5499          part { name: "button_image";
5500             type: RECT;
5501             scale: 1;
5502             description { state: "default" 0.0;
5503                rel1 {
5504                   to_x: "padding.left";
5505                   to_y: "elm.text";
5506                }
5507                rel2 {
5508                   to_x: "padding.right";
5509                   to_y: "elm.text";
5510                }
5511                min: BUTTON_CONTACT_BG_NORMAL_MIN_INC;
5512                color: BUTTON_CONTACT_BUTTON_BG_NORMAL_COLOR_INC;
5513             }
5514             description { state: "clicked" 0.0;
5515                inherit: "default" 0.0;
5516                color: BUTTON_CONTACT_BUTTON_BG_PRESSED_COLOR_INC ;
5517             }
5518             description { state: "disabled" 0.0;
5519                inherit: "default" 0.0;
5520             }
5521             description { state: "focused" 0.0;
5522                inherit: "default" 0.0;
5523             }
5524          }
5525          part { name: "padding.left";
5526             type: RECT;
5527             scale: 1;
5528             description { state: "default" 0.0;
5529                visible: 0;
5530                min: BUTTON_CONTACT_PADDING_MIN_INC;
5531                fixed: 1 0;
5532                color: 0 0 0 0;
5533                rel2 {
5534                   relative: 0.0 1.0;
5535                   to_x: "elm.text";
5536                }
5537                align: 1.0 0.0;
5538             }
5539          }
5540          part { name: "padding.right";
5541             type: RECT;
5542             scale: 1;
5543             description { state: "default" 0.0;
5544                visible: 0;
5545                min: BUTTON_CONTACT_PADDING_MIN_INC;
5546                fixed: 1 0;
5547                color: 0 0 0 0;
5548                rel1 {
5549                   relative: 1.0 0.0;
5550                   to_x: "elm.text";
5551                }
5552                align: 0.0 0.0;
5553             }
5554          }
5555          part {   name: "elm.text";
5556             type: TEXT;
5557             mouse_events: 0;
5558             scale: 1;
5559             description { state: "default" 0.0;
5560                visible: 0;
5561                fixed: 1 1;
5562                color: BUTTON_CONTACT_BUTTON_TEXT_NORMAL_COLOR_INC;
5563                text {
5564                   font: "SLP:style=Medium";
5565                   size: BUTTON_CONTACT_FONT_SIZE_INC;
5566                   min: 1 1;
5567                }
5568             }
5569             description { state: "visible" 0.0;
5570                inherit: "default" 0.0;
5571                visible: 1;
5572                min: 1 1;
5573             }
5574             description { state: "clicked" 0.0;
5575                inherit: "default" 0.0;
5576                visible: 1;
5577                min: 1 1;
5578                color: BUTTON_CONTACT_BUTTON_TEXT_PRESSED_COLOR_INC;
5579             }
5580             description { state: "disabled" 0.0;
5581                inherit: "default" 0.0;
5582                color: 0 0 0 128;
5583             }
5584             description { state: "disabled_visible" 0.0;
5585                inherit: "default" 0.0;
5586                color: BUTTON_CONTACT_BUTTON_TEXT_DISABLED_COLOR_INC;
5587                visible: 1;
5588                min: 1 1;
5589             }
5590             description { state: "focused" 0.0;
5591                inherit: "default" 0.0;
5592                visible: 1;
5593                min: 1 1;
5594                color: BUTTON_CONTACT_BUTTON_TEXT_FOCUSED_COLOR_INC;
5595             }
5596          }
5597          part { name: "over1";
5598             mouse_events: 0;
5599             description { state: "default" 0.0;
5600                rel2.relative: 1.0 0.5;
5601             }
5602          }
5603          part { name: "over2";
5604             repeat_events: 1;
5605             ignore_flags: ON_HOLD;
5606             description { state: "default" 0.0;
5607                rel1.to: "button_image";
5608                rel2.to: "button_image";
5609             }
5610          }
5611          part { name: "over3";
5612             repeat_events: 1;
5613             description { state: "default" 0.0;
5614                rel1.to: "button_image";
5615                rel2.to: "button_image";
5616                color: 0 0 0 0;
5617             }
5618          }
5619          part { name: "disabler";
5620             type: RECT;
5621             description { state: "default" 0.0;
5622                rel1.to: "button_image";
5623                rel2.to: "button_image";
5624                color: 0 0 0 0;
5625                visible: 0;
5626             }
5627             description { state: "disabled" 0.0;
5628                inherit: "default" 0.0;
5629                visible: 1;
5630             }
5631          }
5632       }
5633       programs {
5634          program { name: "button_click";
5635             signal: "mouse,down,1";
5636             source: "over2";
5637             action: SIGNAL_EMIT "elm,action,press" "";
5638             after: "button_click_anim";
5639          }
5640          program { name: "button_click_anim";
5641             action: STATE_SET "clicked" 0.0;
5642             target: "button_image";
5643             target: "elm.text";
5644          }
5645          program { name: "button_unpress";
5646             action: SIGNAL_EMIT "elm,action,unpress" "";
5647          }
5648          program { name: "button_mouseout_clicked";
5649             signal: "mouse,up,1";
5650             source: "over3";
5651             script {
5652                new st[31];
5653                new Float:vl;
5654                get_state(PART:"elm.text", st, 30, vl);
5655                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
5656                  {
5657                     emit("elm,action,default,text,set", "");
5658                     set_state(PART:"elm.text", "visible", 0.0);
5659                  }
5660                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5661                  set_state(PART:"button_image", "default", 0.0);
5662             }
5663             after: button_unpress;
5664          }
5665          program { name: "button_unclick3";
5666             signal: "mouse,clicked,1";
5667             source: "over2";
5668             action: SIGNAL_EMIT "elm,action,click" "";
5669          }
5670          program { name: "text_show";
5671             signal: "elm,state,text,visible";
5672             source: "elm";
5673             script {
5674                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5675                  set_state(PART:"elm.text", "visible", 0.0);
5676                else
5677                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5678             }
5679          }
5680          program { name: "text_hide";
5681             signal: "elm,state,text,hidden";
5682             source: "elm";
5683             action: STATE_SET "default" 0.0;
5684             target: "elm.text";
5685          }
5686          program { name: "disable";
5687             signal: "elm,state,disabled";
5688             source: "elm";
5689             action: STATE_SET "disabled" 0.0;
5690             target: "button_image";
5691             target: "disabler";
5692             after: "disable_text";
5693          }
5694          program { name: "disable_text";
5695             script {
5696                new st[31];
5697                new Float:vl;
5698                get_state(PART:"elm.text", st, 30, vl);
5699                if (!strcmp(st, "visible"))
5700                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5701                else
5702                  set_state(PART:"elm.text", "disabled", 0.0);
5703                set_int(button_state, BUTTON_STATE_DISABLED);
5704             }
5705          }
5706          program { name: "enable";
5707             signal: "elm,state,enabled";
5708             source: "elm";
5709             action: STATE_SET "default" 0.0;
5710             target: "button_image";
5711             target: "disabler";
5712             after: "enable_text";
5713          }
5714          program { name: "enable_text";
5715             script {
5716                new st[31];
5717                new Float:vl;
5718                get_state(PART:"elm.text", st, 30, vl);
5719                if (!strcmp(st, "disabled_visible"))
5720                  set_state(PART:"elm.text", "visible", 0.0);
5721                else
5722                  set_state(PART:"elm.text", "default", 0.0);
5723                set_int(button_state, BUTTON_STATE_ENABLED);
5724             }
5725          }
5726          program { name: "focused";
5727             //signal: "elm,action,focus";
5728             //source: "elm";
5729             action: STATE_SET "focused" 0.0;
5730             target: "button_image";
5731             target: "elm.text";
5732          }
5733          program { name: "unfocused";
5734             //signal: "elm,action,unfocus";
5735             //source: "elm";
5736             action: STATE_SET "default" 0.0;
5737             target: "button_image";
5738             action: STATE_SET "visible" 0.0;
5739             target: "elm.text";
5740          }
5741       }
5742    }
5743
5744 ///////////////////////////////////////////////////////////////////////////////////////
5745    group { name: "elm/button/base/naviframe/back_btn/default";
5746       alias: "elm/button/base/naviframe/prev_btn/default";
5747       alias: "elm/button/base/naviframe/end_btn/default";
5748       images {
5749          image: "00_winset_Back_btn_normal.png" COMP;
5750          image: "00_winset_Back_btn_press.png" COMP;
5751          image: "00_winset_Back.png" COMP;
5752       }
5753       script {
5754          public button_state = BUTTON_STATE_ENABLED;
5755       }
5756       parts {
5757          part { name: "button_image";
5758             scale: 1;
5759             description { state: "default" 0.0;
5760                min: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC;
5761                max: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC;
5762                image {
5763                   normal: "00_winset_Back_btn_normal.png";
5764                   border: BUTTON_NAVIFRAME_BACK_BUTTON_BG_BORDER_INC;
5765                   border_scale: 1;
5766                }
5767             }
5768             description { state: "clicked" 0.0;
5769                inherit: "default" 0.0;
5770                image.normal: "00_winset_Back_btn_press.png";
5771             }
5772             description { state: "disabled" 0.0;
5773                inherit: "default" 0.0;
5774             }
5775             description { state: "focused" 0.0;
5776                inherit: "default" 0.0;
5777                image.normal: "00_winset_Back_btn_press.png";
5778             }
5779          }
5780          part { name: "back_button";
5781             scale: 1;
5782             mouse_events: 0;
5783             description { state: "default" 0.0;
5784                min: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC;
5785                max: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC;
5786                rel1.to: "button_image";
5787                rel2.to: "button_image";
5788                image.normal: "00_winset_Back.png";
5789             }
5790             description { state: "clicked" 0.0;
5791                inherit: "default" 0.0;
5792             }
5793          }
5794          part { name: "over2";
5795             type: RECT;
5796             repeat_events: 1;
5797             ignore_flags: ON_HOLD;
5798             description { state: "default" 0.0;
5799                color: 0 0 0 0;
5800             }
5801          }
5802          part { name: "over3";
5803             type: RECT;
5804             repeat_events: 1;
5805             description { state: "default" 0.0;
5806                color: 0 0 0 0;
5807             }
5808          }
5809          part { name: "disabler";
5810             type: RECT;
5811             description { state: "default" 0.0;
5812                color: 0 0 0 0;
5813                visible: 0;
5814             }
5815             description { state: "disabled" 0.0;
5816                inherit: "default" 0.0;
5817                visible: 1;
5818             }
5819          }
5820       }
5821       programs {
5822          program { name: "button_click";
5823             signal: "mouse,down,1";
5824             source: "over2";
5825             action: SIGNAL_EMIT "elm,action,press" "";
5826             after: "button_click_anim";
5827          }
5828          program { name: "button_click_anim";
5829             action: STATE_SET "clicked" 0.0;
5830             target: "button_image";
5831          }
5832          program { name: "button_unpress";
5833             action: SIGNAL_EMIT "elm,action,unpress" "";
5834          }
5835          program { name: "button_mouseout_clicked";
5836             signal: "mouse,up,1";
5837             source: "over3";
5838             script {
5839                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5840                  set_state(PART:"button_image", "default", 0.0);
5841             }
5842             after: button_unpress;
5843          }
5844          program { name: "button_unclick3";
5845             signal: "mouse,clicked,1";
5846             source: "over2";
5847             action: SIGNAL_EMIT "elm,action,click" "";
5848          }
5849          program { name: "disable";
5850             signal: "elm,state,disabled";
5851             source: "elm";
5852             action: STATE_SET "disabled" 0.0;
5853             target: "button_image";
5854             target: "disabler";
5855             after: "disable_button";
5856          }
5857          program { name: "disable_button";
5858             script {
5859                set_int(button_state, BUTTON_STATE_DISABLED);
5860             }
5861          }
5862          program { name: "enable";
5863             signal: "elm,state,enabled";
5864             source: "elm";
5865             action: STATE_SET "default" 0.0;
5866             target: "button_image";
5867             target: "disabler";
5868             after: "enable_button";
5869          }
5870          program { name: "enable_button";
5871             script {
5872                set_int(button_state, BUTTON_STATE_ENABLED);
5873             }
5874          }
5875       }
5876    }
5877
5878 ///////////////////////////////////////////////////////////////////////////////////////
5879    group { name: "elm/button/base/picker/prev/icon/default";
5880       images {
5881          image: "00_picker_btn_normal.png" COMP;
5882          image: "00_picker_btn_press.png" COMP;
5883          image: "00_picker_arrow_left.png" COMP;
5884          image: "00_picker_arrow_left_press.png" COMP;
5885       }
5886       script {
5887          public button_state = BUTTON_STATE_ENABLED;
5888       }
5889       parts {
5890          part { name: "button_image";
5891             scale: 1;
5892             description { state: "default" 0.0;
5893                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
5894                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
5895                image {
5896                   normal: "00_picker_btn_normal.png";
5897                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
5898                   border_scale: 1;
5899                }
5900             }
5901             description { state: "clicked" 0.0;
5902                inherit: "default" 0.0;
5903                image.normal: "00_picker_btn_press.png";
5904             }
5905             description { state: "disabled" 0.0;
5906                inherit: "default" 0.0;
5907             }
5908             description { state: "focused" 0.0;
5909                inherit: "default" 0.0;
5910                image.normal: "00_picker_btn_press.png";
5911             }
5912          }
5913          part { name: "padding_left_top";
5914             type: RECT;
5915             scale: 1;
5916             mouse_events: 0;
5917             description { state: "default" 0.0;
5918                align: 0.0 0.0;
5919                rel2.relative: 0.0 0.0;
5920                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
5921                fixed: 1 1;
5922                visible: 0;
5923             }
5924          }
5925          part { name: "padding_right_bottom";
5926             type: RECT;
5927             scale: 1;
5928             mouse_events: 0;
5929             description { state: "default" 0.0;
5930                align: 1.0 1.0;
5931                rel1.relative: 1.0 1.0;
5932                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
5933                fixed: 1 1;
5934                visible: 0;
5935             }
5936          }
5937          part { name: "left_arrow";
5938             scale: 1;
5939             mouse_events: 0;
5940             description { state: "default" 0.0;
5941                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
5942                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
5943                rel1 {
5944                   relative: 1.0 1.0;
5945                   to: "padding_left_top";
5946                }
5947                rel2 {
5948                   relative: 0.0 0.0;
5949                   to: "padding_right_bottom";
5950                }
5951                image.normal: "00_picker_arrow_left.png";
5952             }
5953             description { state: "clicked" 0.0;
5954                inherit: "default" 0.0;
5955                image.normal: "00_picker_arrow_left_press.png";
5956             }
5957          }
5958          part { name: "over2";
5959             type: RECT;
5960             repeat_events: 1;
5961             ignore_flags: ON_HOLD;
5962             description { state: "default" 0.0;
5963                color: 0 0 0 0;
5964             }
5965          }
5966          part { name: "over3";
5967             type: RECT;
5968             repeat_events: 1;
5969             description { state: "default" 0.0;
5970                color: 0 0 0 0;
5971             }
5972          }
5973          part { name: "disabler";
5974             type: RECT;
5975             description { state: "default" 0.0;
5976                color: 0 0 0 0;
5977                visible: 0;
5978             }
5979             description { state: "disabled" 0.0;
5980                inherit: "default" 0.0;
5981                visible: 1;
5982             }
5983          }
5984       }
5985       programs {
5986          program { name: "button_click";
5987             signal: "mouse,down,1";
5988             source: "over2";
5989             action: SIGNAL_EMIT "elm,action,press" "";
5990             after: "button_click_anim";
5991          }
5992          program { name: "button_click_anim";
5993             action: STATE_SET "clicked" 0.0;
5994             target: "button_image";
5995          }
5996          program { name: "button_unpress";
5997             action: SIGNAL_EMIT "elm,action,unpress" "";
5998          }
5999          program { name: "button_mouseout_clicked";
6000             signal: "mouse,up,1";
6001             source: "over3";
6002             script {
6003                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6004                  set_state(PART:"button_image", "default", 0.0);
6005             }
6006             after: button_unpress;
6007          }
6008          program { name: "button_unclick3";
6009             signal: "mouse,clicked,1";
6010             source: "over2";
6011             action: SIGNAL_EMIT "elm,action,click" "";
6012          }
6013          program { name: "disable";
6014             signal: "elm,state,disabled";
6015             source: "elm";
6016             action: STATE_SET "disabled" 0.0;
6017             target: "button_image";
6018             target: "disabler";
6019             after: "disable_button";
6020          }
6021          program { name: "disable_button";
6022             script {
6023                set_int(button_state, BUTTON_STATE_DISABLED);
6024             }
6025          }
6026          program { name: "enable";
6027             signal: "elm,state,enabled";
6028             source: "elm";
6029             action: STATE_SET "default" 0.0;
6030             target: "button_image";
6031             target: "disabler";
6032             after: "enable_button";
6033          }
6034          program { name: "enable_button";
6035             script {
6036                set_int(button_state, BUTTON_STATE_ENABLED);
6037             }
6038          }
6039          program { name: "focused";
6040             //signal: "elm,action,focus";
6041             //source: "elm";
6042             action: STATE_SET "focused" 0.0;
6043             target: "button_image";
6044          }
6045          program { name: "unfocused";
6046             //signal: "elm,action,unfocus";
6047             //source: "elm";
6048             action: STATE_SET "default" 0.0;
6049             target: "button_image";
6050          }
6051       }
6052    }
6053
6054 ///////////////////////////////////////////////////////////////////////////////////////
6055    group { name: "elm/button/base/picker/next/icon/default";
6056       images {
6057          image: "00_picker_btn_normal.png" COMP;
6058          image: "00_picker_btn_press.png" COMP;
6059          image: "00_picker_arrow_right.png" COMP;
6060          image: "00_picker_arrow_right_press.png" COMP;
6061       }
6062       script {
6063          public button_state = BUTTON_STATE_ENABLED;
6064       }
6065       parts {
6066          part { name: "button_image";
6067             scale: 1;
6068             description { state: "default" 0.0;
6069                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
6070                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
6071                image {
6072                   normal: "00_picker_btn_normal.png";
6073                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
6074                   border_scale: 1;
6075                }
6076             }
6077             description { state: "clicked" 0.0;
6078                inherit: "default" 0.0;
6079                image.normal: "00_picker_btn_press.png";
6080             }
6081             description { state: "disabled" 0.0;
6082                inherit: "default" 0.0;
6083             }
6084             description { state: "focused" 0.0;
6085                inherit: "default" 0.0;
6086                image.normal: "00_picker_btn_press.png";
6087             }
6088          }
6089          part { name: "padding_left_top";
6090             type: RECT;
6091             scale: 1;
6092             mouse_events: 0;
6093             description { state: "default" 0.0;
6094                align: 0.0 0.0;
6095                rel2.relative: 0.0 0.0;
6096                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
6097                fixed: 1 1;
6098                visible: 0;
6099             }
6100          }
6101          part { name: "padding_right_bottom";
6102             type: RECT;
6103             scale: 1;
6104             mouse_events: 0;
6105             description { state: "default" 0.0;
6106                align: 1.0 1.0;
6107                rel1.relative: 1.0 1.0;
6108                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
6109                fixed: 1 1;
6110                visible: 0;
6111             }
6112          }
6113          part { name: "right_arrow";
6114             scale: 1;
6115             mouse_events: 0;
6116             description { state: "default" 0.0;
6117                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
6118                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
6119                rel1 {
6120                   relative: 1.0 1.0;
6121                   to: "padding_left_top";
6122                }
6123                rel2 {
6124                   relative: 0.0 0.0;
6125                   to: "padding_right_bottom";
6126                }
6127                image.normal: "00_picker_arrow_right.png";
6128             }
6129             description { state: "clicked" 0.0;
6130                inherit: "default" 0.0;
6131                image.normal: "00_picker_arrow_right_press.png";
6132             }
6133          }
6134          part { name: "over2";
6135             type: RECT;
6136             repeat_events: 1;
6137             ignore_flags: ON_HOLD;
6138             description { state: "default" 0.0;
6139                color: 0 0 0 0;
6140             }
6141          }
6142          part { name: "over3";
6143             type: RECT;
6144             repeat_events: 1;
6145             description { state: "default" 0.0;
6146                color: 0 0 0 0;
6147             }
6148          }
6149          part { name: "disabler";
6150             type: RECT;
6151             description { state: "default" 0.0;
6152                color: 0 0 0 0;
6153                visible: 0;
6154             }
6155             description { state: "disabled" 0.0;
6156                inherit: "default" 0.0;
6157                visible: 1;
6158             }
6159          }
6160       }
6161       programs {
6162          program { name: "button_click";
6163             signal: "mouse,down,1";
6164             source: "over2";
6165             action: SIGNAL_EMIT "elm,action,press" "";
6166             after: "button_click_anim";
6167          }
6168          program { name: "button_click_anim";
6169             action: STATE_SET "clicked" 0.0;
6170             target: "button_image";
6171          }
6172          program { name: "button_unpress";
6173             action: SIGNAL_EMIT "elm,action,unpress" "";
6174          }
6175          program { name: "button_mouseout_clicked";
6176             signal: "mouse,up,1";
6177             source: "over3";
6178             script {
6179                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6180                  set_state(PART:"button_image", "default", 0.0);
6181             }
6182             after: button_unpress;
6183          }
6184          program { name: "button_unclick3";
6185             signal: "mouse,clicked,1";
6186             source: "over2";
6187             action: SIGNAL_EMIT "elm,action,click" "";
6188          }
6189          program { name: "disable";
6190             signal: "elm,state,disabled";
6191             source: "elm";
6192             action: STATE_SET "disabled" 0.0;
6193             target: "button_image";
6194             target: "disabler";
6195             after: "disable_button";
6196          }
6197          program { name: "disable_button";
6198             script {
6199                set_int(button_state, BUTTON_STATE_DISABLED);
6200             }
6201          }
6202          program { name: "enable";
6203             signal: "elm,state,enabled";
6204             source: "elm";
6205             action: STATE_SET "default" 0.0;
6206             target: "button_image";
6207             target: "disabler";
6208             after: "enable_button";
6209          }
6210          program { name: "enable_button";
6211             script {
6212                set_int(button_state, BUTTON_STATE_ENABLED);
6213             }
6214          }
6215          program { name: "focused";
6216             //signal: "elm,action,focus";
6217             //source: "elm";
6218             action: STATE_SET "focused" 0.0;
6219             target: "button_image";
6220          }
6221          program { name: "unfocused";
6222             //signal: "elm,action,unfocus";
6223             //source: "elm";
6224             action: STATE_SET "default" 0.0;
6225             target: "button_image";
6226          }
6227       }
6228    }
6229
6230 ///////////////////////////////////////////////////////////////////////////////////////
6231    group { name: "elm/button/base/naviframe_control/default";
6232       alias: "elm/button/base/naviframe_control/center";
6233       script {
6234          public button_state = BUTTON_STATE_ENABLED;
6235       }
6236       images {
6237          image: "00_Option_header_bt.png" COMP;
6238          image: "00_Option_header_bt_dim.png" COMP;
6239          image: "00_Option_header_bt_press.png" COMP;
6240       }
6241       parts {
6242          part { name: "button_image";
6243             scale: 1;
6244             description { state: "default" 0.0;
6245                min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC;
6246                color: 0 0 0 0;
6247                rel1.offset: 0 0;
6248                rel2.offset: -1 -1;
6249                image {
6250                   normal: "00_Option_header_bt.png";
6251                   border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC;
6252                }
6253                color: 255 255 255 255;
6254             }
6255             description { state: "disabled" 0.0;
6256                inherit: "default" 0.0;
6257                image.normal: "00_Option_header_bt_dim.png";
6258             }
6259             description { state: "clicked" 0.0;
6260                inherit: "default" 0.0;
6261                image.normal: "00_Option_header_bt_press.png";
6262             }
6263          }
6264          part { name: "padding_left_top";
6265             type: RECT;
6266             scale: 1;
6267             mouse_events: 0;
6268             description { state: "default" 0.0;
6269                align: 0.0 0.0;
6270                rel2.relative: 0.0 0.0;
6271                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6272                fixed: 1 1;
6273                visible: 0;
6274             }
6275          }
6276          part { name: "padding_right_bottom";
6277             type: RECT;
6278             scale: 1;
6279             mouse_events: 0;
6280             description { state: "default" 0.0;
6281                align: 1.0 1.0;
6282                rel1.relative: 1.0 1.0;
6283                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6284                fixed: 1 1;
6285                visible: 0;
6286             }
6287          }
6288          part { name: "icon_rect";
6289             type: RECT;
6290             scale: 1;
6291             mouse_events: 0;
6292             description { state: "default" 0.0;
6293                min: 0 0;
6294                fixed: 1 0;
6295                rel1 {
6296                   relative: 1.0 1.0;
6297                   to: "padding_left_top";
6298                }
6299                rel2 {
6300                   relative: 1.0 0.0;
6301                   to_x: "padding_left_top";
6302                   to_y: "padding_right_bottom";
6303                }
6304                align: 0.0 0.5;
6305                color: 0 0 0 0;
6306             }
6307             description { state: "visible" 0.0;
6308                min: BUTTON_NAVIFRAME_CENTER_ICON_RECT_VISIBLE_MIN_SIZE;
6309                fixed: 1 0;
6310                rel1 {
6311                   relative: 1.0 1.0;
6312                   to: "padding_left_top";
6313                }
6314                rel2 {
6315                   relative: 1.0 0.0;
6316                   to_x: "padding_left_top";
6317                   to_y: "padding_right_bottom";
6318                }
6319                align: 0.0 0.5;
6320                color: 0 0 0 0;
6321             }
6322             description { state: "icononly" 0.0;
6323                inherit: "default" 0.0;
6324             }
6325          }
6326          part { name: "padding_after_icon";
6327             type: RECT;
6328             scale: 1;
6329             mouse_events: 0;
6330             description { state: "default" 0.0; //when only icon or no icon is there
6331                align: 0.0 0.0;
6332                rel1 {
6333                   relative: 1.0 0.0;
6334                   to: "icon_rect";
6335                }
6336                rel2.to: "icon_rect";
6337                fixed: 1 0;
6338                min: 0 0;
6339                color: 0 0 0 0;
6340             }
6341             description { state: "visible" 0.0;
6342                align: 0.0 0.0;
6343                rel1 {
6344                   relative: 1.0 0.0;
6345                   to: "icon_rect";
6346                }
6347                rel2.to: "icon_rect";
6348                fixed: 1 0;
6349                min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
6350                color: 0 0 0 0;
6351             }
6352             description { state: "icononly" 0.0;
6353                inherit: "default" 0.0;
6354             }
6355          }
6356          part { name: "padding_before_text";
6357             type: RECT;
6358             scale: 1;
6359             mouse_events: 0;
6360             description { state: "default" 0.0; //when only icon or no icon is there
6361                align: 1.0 0.5;
6362                rel1 {
6363                   relative: 0.0 1.0;
6364                   to_x: "elm.text";
6365                   to_y: "padding_left_top";
6366                }
6367                rel2 {
6368                   relative: 0.0 0.0;
6369                   to_x: "elm.text";
6370                   to_y: "padding_right_bottom";
6371                }
6372                fixed: 1 0;
6373                min: BUTTON_NAVIFRAME_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC;
6374                color: 0 0 0 0;
6375             }
6376          }
6377          part { name: "elm.swallow.content";
6378             type: SWALLOW;
6379             scale: 1;
6380             clip_to: "clipper";
6381             description { state: "default" 0.0;
6382                visible: 0;
6383                align: 0.0 0.5;
6384                rel1 {
6385                   relative: 1.0 1.0;
6386                   to: "padding_left_top";
6387                }
6388                rel2 {
6389                   relative: 1.0 0.0;
6390                   to_x: "padding_left_top";
6391                   to_y: "padding_right_bottom";
6392                }
6393                fixed: 1 0;
6394             }
6395             description { state: "visible" 0.0;
6396                fixed: 1 0;
6397                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6398                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6399                align: 1.0 0.5;
6400                rel1 {
6401                   relative: 0.0 1.0;
6402                   to_x: "padding_before_text";
6403                   to_y: "padding_left_top";
6404                }
6405                rel2 {
6406                   relative: 0.0 0.0;
6407                   to_x: "padding_before_text";
6408                   to_y: "padding_right_bottom";
6409                }
6410                aspect: 1.0 1.0;
6411                aspect_preference: VERTICAL;
6412             }
6413             description { state: "icononly" 0.0;
6414                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6415                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6416                rel1 {
6417                   relative: 1.0 1.0;
6418                   to: "padding_left_top";
6419                }
6420                rel2 {
6421                   relative: 0.0 0.0;
6422                   to: "padding_right_bottom";
6423                }
6424                aspect: 1.0 1.0;
6425                aspect_preference: VERTICAL;
6426             }
6427          }
6428          part { name: "elm.text";
6429             type: TEXT;
6430             mouse_events: 0;
6431             scale: 1;
6432             clip_to: "clipper";
6433             description { state: "default" 0.0;
6434                visible: 0;
6435                rel1 {
6436                   relative: 1.0 1.0;
6437                   to_x: "padding_after_icon";
6438                   to_y: "padding_left_top";
6439                }
6440                rel2 {
6441                   relative: 0.0 0.0;
6442                   to: "padding_right_bottom";
6443                }
6444                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
6445                text {
6446                   font: "SLP:style=Medium";
6447                   size: BUTTON_NAVIFRAME_CENTER_TEXT_FONT_SIZE_INC;
6448                   min: 0 0;
6449                   max: 1 0;
6450                }
6451             }
6452             description { state: "visible" 0.0;
6453                inherit: "default" 0.0;
6454                visible: 1;
6455             }
6456             description { state: "clicked" 0.0;
6457                inherit: "default" 0.0;
6458                visible: 1;
6459                min: 0 0;
6460             }
6461             description { state: "focused" 0.0;
6462                inherit: "default" 0.0;
6463                visible: 1;
6464                min: 0 0;
6465                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
6466             }
6467          }
6468          part { name: "over2";
6469             type: RECT;
6470             repeat_events: 1;
6471             ignore_flags: ON_HOLD;
6472             description { state: "default" 0.0;
6473                color: 0 0 0 0;
6474             }
6475          }
6476          part { name: "over3";
6477             type: RECT;
6478             repeat_events: 1;
6479             description { state: "default" 0.0;
6480                color: 0 0 0 0;
6481             }
6482          }
6483          part { name: "clipper";
6484             type: RECT;
6485             description { state: "default" 0.0;
6486                color: 255 255 255 255;
6487             }
6488             description { state: "disabled" 0.0;
6489                color: 255 255 255 127;
6490             }
6491          }
6492          part { name: "disabler";
6493             type: RECT;
6494             description { state: "default" 0.0;
6495                color: 0 0 0 0;
6496                visible: 0;
6497             }
6498             description { state: "disabled" 0.0;
6499                inherit: "default" 0.0;
6500                visible: 1;
6501             }
6502          }
6503       }
6504       programs {
6505          program { name: "button_click";
6506             signal: "mouse,down,1";
6507             source: "over2";
6508             action: SIGNAL_EMIT "elm,action,press" "";
6509             after: "button_click_anim";
6510          }
6511          program { name: "button_click_anim";
6512             action: STATE_SET "clicked" 0.0;
6513             target: "button_image";
6514             after: "text_clicked";
6515          }
6516          program { name: "text_clicked";
6517             script {
6518                new st[31];
6519                new Float:vl;
6520                get_state(PART:"elm.text", st, 30, vl);
6521                if (!strcmp(st, "visible"))
6522                  set_state(PART:"elm.text", "clicked", 0.0);
6523             }
6524          }
6525          program { name: "button_unpress";
6526             action: SIGNAL_EMIT "elm,action,unpress" "";
6527          }
6528          program { name: "button_mouseout_clicked";
6529             signal: "mouse,up,1";
6530             source: "over3";
6531             script {
6532                new st[31];
6533                new Float:vl;
6534                get_state(PART:"elm.swallow.content", st, 30, vl);
6535                if (strcmp(st, "icononly"))
6536                  {
6537                     emit("elm,action,default,text,set", "");
6538                     set_state(PART:"elm.text", "visible", 0.0);
6539                  }
6540                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6541                  set_state(PART:"button_image", "default", 0.0);
6542             }
6543             after: button_unpress;
6544          }
6545          program { name: "button_unclick3";
6546             signal: "mouse,clicked,1";
6547             source: "over2";
6548             action: SIGNAL_EMIT "elm,action,click" "";
6549          }
6550          program { name: "text_show";
6551             signal: "elm,state,text,visible";
6552             source: "elm";
6553             script {
6554                new st[31];
6555                new Float:vl;
6556                get_state(PART:"elm.swallow.content", st, 30, vl);
6557                if (!strcmp(st, "icononly"))
6558                  {
6559                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6560                     set_state(PART:"icon_rect", "visible", 0.0);
6561                     set_state(PART:"padding_after_icon", "visible", 0.0);
6562                  }
6563                set_state(PART:"elm.text", "visible", 0.0);
6564             }
6565          }
6566          program { name: "text_hide";
6567             signal: "elm,state,text,hidden";
6568             source: "elm";
6569             script {
6570                new st[31];
6571                new Float:vl;
6572                get_state(PART:"elm.swallow.content", st, 30, vl);
6573                if (!strcmp(st, "visible"))
6574                  {
6575                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6576                     set_state(PART:"icon_rect", "icononly", 0.0);
6577                     set_state(PART:"padding_after_icon", "icononly", 0.0);
6578                  }
6579                set_state(PART:"elm.text", "default", 0.0);
6580             }
6581          }
6582          program { name: "icon_show";
6583             signal: "elm,state,icon,visible";
6584             source: "elm";
6585             script {
6586                new st[31];
6587                new Float:vl;
6588                get_state(PART:"elm.text", st, 30, vl);
6589                if (!strcmp(st, "visible"))
6590                  {
6591                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6592                     set_state(PART:"icon_rect", "visible", 0.0);
6593                     set_state(PART:"padding_after_icon", "visible", 0.0);
6594                  }
6595                else
6596                  {
6597                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6598                     set_state(PART:"icon_rect", "icononly", 0.0);
6599                     set_state(PART:"padding_after_icon", "icononly", 0.0);
6600                  }
6601             }
6602          }
6603          program { name: "icon_hide";
6604             signal: "elm,state,icon,hidden";
6605             source: "elm";
6606             action: STATE_SET "default" 0.0;
6607             target: "elm.swallow.content";
6608             target: "icon_rect";
6609             target: "padding_after_icon";
6610          }
6611          program { name: "disable";
6612             signal: "elm,state,disabled";
6613             source: "elm";
6614             action: STATE_SET "disabled" 0.0;
6615             target: "button_image";
6616             target: "clipper";
6617             target: "disabler";
6618             after: "disable_text";
6619          }
6620          program { name: "disable_text";
6621             script {
6622                new st[31];
6623                new Float:vl;
6624                set_int(button_state, BUTTON_STATE_DISABLED);
6625                get_state(PART:"elm.text", st, 30, vl);
6626                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
6627                  set_state(PART:"elm.text", "visible", 0.0);
6628             }
6629          }
6630          program { name: "enable";
6631             signal: "elm,state,enabled";
6632             source: "elm";
6633             action: STATE_SET "default" 0.0;
6634             target: "button_image";
6635             target: "clipper";
6636             target: "disabler";
6637             after: "enable_text";
6638          }
6639          program { name: "enable_text";
6640             script {
6641                new st[31];
6642                new Float:vl;
6643                set_int(button_state, BUTTON_STATE_ENABLED);
6644                get_state(PART:"elm.text", st, 30, vl);
6645                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
6646                  set_state(PART:"elm.text", "visible", 0.0);
6647             }
6648          }
6649          program { name: "focused";
6650             action: STATE_SET "focused" 0.0;
6651             target: "button_image";
6652             target: "elm.text";
6653          }
6654          program { name: "unfocused";
6655             action: STATE_SET "default" 0.0;
6656             target: "button_image";
6657             after: "unfocus_text";
6658          }
6659          program { name: "unfocus_text";
6660             action: STATE_SET "visible" 0.0;
6661             target: "elm.text";
6662          }
6663       }
6664    }
6665
6666 ///////////////////////////////////////////////////////////////////////////////////////
6667    group { name: "elm/button/base/naviframe_control/multiline";
6668       script {
6669          public button_state = BUTTON_STATE_ENABLED;
6670       }
6671       images {
6672          image: "00_Option_header_bt.png" COMP;
6673          image: "00_Option_header_bt_dim.png" COMP;
6674          image: "00_Option_header_bt_press.png" COMP;
6675       }
6676       styles{
6677          style { name: "btn_multiline_naviframe_controlbar_style";
6678             base: "font=SLP:style=Medium font_size="BUTTON_NAVIFRAME_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed";
6679             tag: "br" "\n";
6680             tag: "ps" "ps";
6681             tag: "tab" "\t";
6682          }
6683       }
6684       parts {
6685          part { name: "button_image";
6686             scale: 1;
6687             description { state: "default" 0.0;
6688                min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC;
6689                rel1.offset: 0 0;
6690                rel2.offset: -1 -1;
6691                image {
6692                   normal: "00_Option_header_bt.png";
6693                   border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC;
6694                }
6695                color: 255 255 255 255;
6696             }
6697             description { state: "disabled" 0.0;
6698                inherit: "default" 0.0;
6699                image.normal: "00_Option_header_bt_dim.png";
6700             }
6701             description { state: "clicked" 0.0;
6702                inherit: "default" 0.0;
6703                image.normal: "00_Option_header_bt_press.png";
6704             }
6705          }
6706          part { name: "padding_left_top";
6707             type: RECT;
6708             scale: 1;
6709             mouse_events: 0;
6710             description { state: "default" 0.0;
6711                align: 0.0 0.0;
6712                rel2.relative: 0.0 0.0;
6713                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6714                fixed: 1 1;
6715                visible: 0;
6716             }
6717          }
6718          part { name: "padding_right_bottom";
6719             type: RECT;
6720             scale: 1;
6721             mouse_events: 0;
6722             description { state: "default" 0.0;
6723                align: 1.0 1.0;
6724                rel1.relative: 1.0 1.0;
6725                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6726                fixed: 1 1;
6727                visible: 0;
6728             }
6729          }
6730          part { name: "icon_rect";
6731             type: RECT;
6732             scale: 1;
6733             mouse_events: 0;
6734             description { state: "default" 0.0;
6735                visible: 0;
6736                min: 0 0;
6737                fixed: 1 0;
6738                rel1 {
6739                   relative: 0.0 1.0;
6740                   to_x: "elm.swallow.content";
6741                   to_y: "padding_left_top";
6742                }
6743                rel2 {
6744                   relative: 1.0 0.0;
6745                   to_x: "elm.swallow.content";
6746                   to_y: "padding_right_bottom";
6747                }
6748                align: 0.0 0.5;
6749             }
6750          }
6751          part { name: "padding_icon_text";
6752             type: RECT;
6753             scale: 1;
6754             mouse_events: 0;
6755             description { state: "default" 0.0; //when only icon or no icon is there
6756                visible: 0;
6757                align: 0.0 0.0;
6758                rel1 {
6759                   relative: 1.0 0.0;
6760                   to: "icon_rect";
6761                }
6762                rel2 {
6763                   relative: 1.0 1.0;
6764                   to: "icon_rect";
6765                }
6766                fixed: 1 0;
6767                min: 0 0;
6768             }
6769             description { state: "visible" 0.0;
6770                inherit: "default" 0.0;
6771                min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
6772                rel1 {
6773                   relative: 1.0 0.0;
6774                   to: "icon_rect";
6775                }
6776                rel2 {
6777                   relative: 1.0 1.0;
6778                   to: "icon_rect";
6779                }
6780            }
6781             description { state: "icononly" 0.0;
6782                inherit: "default" 0.0;
6783             }
6784          }
6785          part { name: "elm.swallow.content";
6786             type: SWALLOW;
6787             scale: 1;
6788             clip_to: "clipper";
6789             description { state: "default" 0.0;
6790                visible: 0;
6791                align: 0.0 0.5;
6792                rel1 {
6793                   relative: 1.0 1.0;
6794                   to: "padding_left_top";
6795                }
6796                rel2 {
6797                   relative: 1.0 0.0;
6798                   to_x: "padding_left_top";
6799                   to_y: "padding_right_bottom";
6800                }
6801                fixed: 1 0;
6802             }
6803             description { state: "visible" 0.0;
6804                fixed: 1 0;
6805                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6806                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6807                align: 0.0 0.5;
6808                rel1 {
6809                   relative: 1.0 1.0;
6810                   to: "padding_left_top";
6811                }
6812                rel2 {
6813                   relative: 0.0 0.0;
6814                   to_x: "padding_left_top";
6815                   to_y: "padding_right_bottom";
6816                }
6817             }
6818             description { state: "icononly" 0.0;
6819                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6820                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6821                rel1 {
6822                   relative: 1.0 1.0;
6823                   to: "padding_left_top";
6824                }
6825                rel2 {
6826                   relative: 0.0 0.0;
6827                   to: "padding_right_bottom";
6828                }
6829             }
6830          }
6831          part { name: "elm.text";
6832             type: TEXTBLOCK;
6833             mouse_events: 0;
6834             scale: 1;
6835             clip_to: "clipper";
6836             description { state: "default" 0.0;
6837                visible: 0;
6838                rel1 {
6839                   relative: 1.0 1.0;
6840                   to_x: "padding_icon_text";
6841                   to_y: "padding_left_top";
6842                }
6843                rel2 {
6844                    relative: 0.0 0.0;
6845                    to: "padding_right_bottom";
6846                }
6847                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
6848                text {
6849                   style: "btn_multiline_naviframe_controlbar_style";
6850                   min: 0 0;
6851                   max: 0 1;
6852                }
6853             }
6854             description { state: "visible" 0.0;
6855                inherit: "default" 0.0;
6856                visible: 1;
6857                min: 80 0;
6858             }
6859             description { state: "clicked" 0.0;
6860                inherit: "default" 0.0;
6861                visible: 1;
6862                min: 0 0;
6863             }
6864             description { state: "focused" 0.0;
6865                inherit: "default" 0.0;
6866                visible: 1;
6867                min: 0 0;
6868                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
6869             }
6870          }
6871          part { name: "over2";
6872             type: RECT;
6873             repeat_events: 1;
6874             ignore_flags: ON_HOLD;
6875             description { state: "default" 0.0;
6876                color: 0 0 0 0;
6877             }
6878          }
6879          part { name: "over3";
6880             type: RECT;
6881             repeat_events: 1;
6882             description { state: "default" 0.0;
6883                color: 0 0 0 0;
6884             }
6885          }
6886          part { name: "clipper";
6887             type: RECT;
6888             description { state: "default" 0.0;
6889                color: 255 255 255 255;
6890             }
6891             description { state: "disabled" 0.0;
6892                color: 255 255 255 127;
6893             }
6894          }
6895          part { name: "disabler";
6896             type: RECT;
6897             description { state: "default" 0.0;
6898                color: 0 0 0 0;
6899                visible: 0;
6900             }
6901             description { state: "disabled" 0.0;
6902                inherit: "default" 0.0;
6903                visible: 1;
6904             }
6905          }
6906       }
6907       programs {
6908          program { name: "button_click";
6909             signal: "mouse,down,1";
6910             source: "over2";
6911             action: SIGNAL_EMIT "elm,action,press" "";
6912             after: "button_click_anim";
6913          }
6914          program { name: "button_click_anim";
6915             action: STATE_SET "clicked" 0.0;
6916             target: "button_image";
6917             after: "text_clicked";
6918          }
6919          program { name: "text_clicked";
6920             script {
6921                new st[31];
6922                new Float:vl;
6923                get_state(PART:"elm.text", st, 30, vl);
6924                if (!strcmp(st, "visible"))
6925                  set_state(PART:"elm.text", "clicked", 0.0);
6926             }
6927          }
6928          program { name: "button_unpress";
6929             action: SIGNAL_EMIT "elm,action,unpress" "";
6930          }
6931          program { name: "button_mouseout_clicked";
6932             signal: "mouse,up,1";
6933             source: "over3";
6934             script {
6935                new st[31];
6936                new Float:vl;
6937                get_state(PART:"elm.swallow.content", st, 30, vl);
6938                if (strcmp(st, "icononly"))
6939                  {
6940                     emit("elm,action,default,text,set", "");
6941                     set_state(PART:"elm.text", "visible", 0.0);
6942                  }
6943                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6944                  set_state(PART:"button_image", "default", 0.0);
6945             }
6946             after: button_unpress;
6947          }
6948          program { name: "button_unclick3";
6949             signal: "mouse,clicked,1";
6950             source: "over2";
6951             action: SIGNAL_EMIT "elm,action,click" "";
6952          }
6953          program { name: "text_show";
6954             signal: "elm,state,text,visible";
6955             source: "elm";
6956             script {
6957                new st[31];
6958                new Float:vl;
6959                get_state(PART:"elm.swallow.content", st, 30, vl);
6960                if (!strcmp(st, "icononly"))
6961                  {
6962                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6963                     set_state(PART:"padding_icon_text", "visible", 0.0);
6964                  }
6965                set_state(PART:"elm.text", "visible", 0.0);
6966             }
6967          }
6968          program { name: "text_hide";
6969             signal: "elm,state,text,hidden";
6970             source: "elm";
6971             script {
6972                new st[31];
6973                new Float:vl;
6974                get_state(PART:"elm.swallow.content", st, 30, vl);
6975                if (!strcmp(st, "visible"))
6976                  {
6977                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6978                     set_state(PART:"padding_icon_text", "icononly", 0.0);
6979                  }
6980                set_state(PART:"elm.text", "default", 0.0);
6981             }
6982          }
6983          program { name: "icon_show";
6984             signal: "elm,state,icon,visible";
6985             source: "elm";
6986             script {
6987                new st[31];
6988                new Float:vl;
6989                get_state(PART:"elm.text", st, 30, vl);
6990                if (!strcmp(st, "visible"))
6991                  {
6992                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6993                     set_state(PART:"padding_icon_text", "visible", 0.0);
6994                  }
6995                else
6996                  {
6997                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6998                     set_state(PART:"padding_icon_text", "icononly", 0.0);
6999                  }
7000             }
7001          }
7002          program { name: "icon_hide";
7003             signal: "elm,state,icon,hidden";
7004             source: "elm";
7005             action: STATE_SET "default" 0.0;
7006             target: "elm.swallow.content";
7007             target: "padding_icon_text";
7008          }
7009          program { name: "disable";
7010             signal: "elm,state,disabled";
7011             source: "elm";
7012             action: STATE_SET "disabled" 0.0;
7013             target: "button_image";
7014             target: "clipper";
7015             target: "disabler";
7016             after: "disable_text";
7017          }
7018          program { name: "disable_text";
7019             script {
7020                new st[31];
7021                new Float:vl;
7022                set_int(button_state, BUTTON_STATE_DISABLED);
7023                get_state(PART:"elm.text", st, 30, vl);
7024                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
7025                  set_state(PART:"elm.text", "visible", 0.0);
7026             }
7027          }
7028          program { name: "enable";
7029             signal: "elm,state,enabled";
7030             source: "elm";
7031             action: STATE_SET "default" 0.0;
7032             target: "button_image";
7033             target: "clipper";
7034             target: "disabler";
7035             after: "enable_text";
7036          }
7037          program { name: "enable_text";
7038             script {
7039                new st[31];
7040                new Float:vl;
7041                set_int(button_state, BUTTON_STATE_ENABLED);
7042                get_state(PART:"elm.text", st, 30, vl);
7043                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
7044                  set_state(PART:"elm.text", "visible", 0.0);
7045             }
7046          }
7047          program { name: "focused";
7048             action: STATE_SET "focused" 0.0;
7049             target: "button_image";
7050             target: "elm.text";
7051          }
7052          program { name: "unfocused";
7053             action: STATE_SET "default" 0.0;
7054             target: "button_image";
7055             after: "unfocus_text";
7056          }
7057          program { name: "unfocus_text";
7058             action: STATE_SET "visible" 0.0;
7059             target: "elm.text";
7060          }
7061       }
7062    }
7063
7064 //////////////////////////////////////////////////////////////
7065    group { name: "elm/button/base/naviframe/title/default";
7066       images {
7067          image: "00_Title_btn.png" COMP;
7068          image: "00_Title_btn_press.png" COMP;
7069       }
7070       script {
7071          public button_state = BUTTON_STATE_ENABLED;
7072       }
7073       parts {
7074          part { name: "button_image";
7075             scale: 1;
7076             description { state: "default" 0.0;
7077                min: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;
7078                max: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;
7079                image {
7080                   normal: "00_Title_btn.png";
7081                   border: BUTTON_NAVIFRAME_BG_BORDER_INC;
7082                   border_scale: 1;
7083                }
7084             }
7085             description { state: "clicked" 0.0;
7086                inherit: "default" 0.0;
7087                image.normal: "00_Title_btn_press.png";
7088             }
7089             description { state: "disabled" 0.0;
7090                inherit: "default" 0.0;
7091             }
7092             description { state: "focused" 0.0;
7093                inherit: "default" 0.0;
7094                image.normal: "00_Title_btn_press.png";
7095             }
7096          }
7097          part { name: "padding_left_top";
7098             type: RECT;
7099             scale: 1;
7100             mouse_events: 0;
7101             description { state: "default" 0.0;
7102                align: 0.0 0.0;
7103                rel2.relative: 0.0 0.0;
7104                min: BUTTON_NAVIFRAME_PADDING_MIN_INC;
7105                fixed: 1 1;
7106                visible: 0;
7107             }
7108          }
7109          part { name: "bg";
7110             type: RECT;
7111             scale: 1;
7112             mouse_events: 0;
7113             description { state: "default" 0.0;
7114                min: BUTTON_NAVIFRAME_BG_MIN_INC;
7115                visible: 0;
7116             }
7117             description { state: "visible" 0.0;
7118                inherit: "default" 0.0;
7119                min: BUTTON_NAVIFRAME_VISIBLE_BG_MIN_INC;
7120             }
7121             description { state: "icononly" 0.0;
7122                inherit: "default" 0.0;
7123                min: BUTTON_NAVIFRAME_ICONONLY_BG_MIN_INC;
7124             }
7125          }
7126          part { name: "padding_right_bottom";
7127             type: RECT;
7128             scale: 1;
7129             mouse_events: 0;
7130             description { state: "default" 0.0;
7131                align: 1.0 1.0;
7132                rel1.relative: 1.0 1.0;
7133                min: BUTTON_NAVIFRAME_PADDING_MIN_INC;
7134                fixed: 1 1;
7135                visible: 0;
7136             }
7137          }
7138          part { name: "icon_rect";
7139             type: RECT;
7140             scale: 1;
7141             mouse_events: 0;
7142             description { state: "default" 0.0;
7143                visible: 0;
7144                min: 0 0;
7145                fixed: 1 0;
7146                rel1 {
7147                   relative: 1.0 1.0;
7148                   to: "padding_left_top";
7149                }
7150                rel2 {
7151                   relative: 1.0 0.0;
7152                   to_x: "padding_left_top";
7153                   to_y: "padding_right_bottom";
7154                }
7155                align: 0.0 0.5;
7156             }
7157             description { state: "visible" 0.0;
7158                visible: 0;
7159                min: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;
7160                max: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;
7161                fixed: 1 0;
7162                rel1 {
7163                   relative: 1.0 1.0;
7164                   to: "padding_left_top";
7165                }
7166                rel2 {
7167                   relative: 1.0 0.0;
7168                   to_x: "padding_left_top";
7169                   to_y: "padding_right_bottom";
7170                }
7171                align: 0.0 0.5;
7172             }
7173             description { state: "icononly" 0.0;
7174                inherit: "default" 0.0;
7175             }
7176          }
7177          part { name: "padding_after_icon";
7178             type: RECT;
7179             scale: 1;
7180             mouse_events: 0;
7181             description { state: "default" 0.0; //when only icon or no icon is there
7182                align: 0.0 0.0;
7183                rel1 {
7184                   relative: 1.0 0.0;
7185                   to: "icon_rect";
7186                }
7187                rel2.to: "icon_rect";
7188                fixed: 1 0;
7189                min: 0 0;
7190                visible: 0;
7191             }
7192             description { state: "visible" 0.0;
7193                visible: 0;
7194                align: 0.0 0.0;
7195                rel1 {
7196                   relative: 1.0 0.0;
7197                   to: "icon_rect";
7198                }
7199                rel2.to: "icon_rect";
7200                fixed: 1 0;
7201                min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
7202             }
7203             description { state: "icononly" 0.0;
7204                inherit: "default" 0.0;
7205             }
7206          }
7207          part { name: "padding_before_text";
7208             type: RECT;
7209             scale: 1;
7210             mouse_events: 0;
7211             description { state: "default" 0.0; //when only icon or no icon is there
7212                align: 1.0 0.5;
7213                rel1 {
7214                   relative: 0.0 1.0;
7215                   to_x: "elm.text";
7216                   to_y: "padding_left_top";
7217                }
7218                rel2 {
7219                   relative: 0.0 0.0;
7220                   to_x: "elm.text";
7221                   to_y: "padding_right_bottom";
7222                }
7223                fixed: 1 0;
7224                min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
7225                visible: 0;
7226             }
7227          }
7228          part { name: "elm.swallow.content";
7229             type: SWALLOW;
7230             scale: 1;
7231             clip_to: "clipper";
7232             description { state: "default" 0.0;
7233                visible: 0;
7234                align: 0.0 0.5;
7235                rel1 {
7236                   relative: 1.0 1.0;
7237                   to: "padding_left_top";
7238                }
7239                rel2 {
7240                   relative: 1.0 0.0;
7241                   to_x: "padding_left_top";
7242                   to_y: "padding_right_bottom";
7243                }
7244                fixed: 1 0;
7245             }
7246             description { state: "visible" 0.0;
7247                fixed: 1 0;
7248                min: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;
7249                max: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;
7250                align: 1.0 0.5;
7251                rel1 {
7252                   relative: 0.0 1.0;
7253                   to_x: "padding_before_text";
7254                   to_y: "padding_left_top";
7255                }
7256                rel2 {
7257                   relative: 0.0 0.0;
7258                   to_x: "padding_before_text";
7259                   to_y: "padding_right_bottom";
7260                }
7261             }
7262             description { state: "icononly" 0.0;
7263                min: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;
7264                max: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;
7265             }
7266          }
7267          part { name: "elm.text";
7268             type: TEXT;
7269             mouse_events: 0;
7270             scale: 1;
7271             clip_to: "clipper";
7272             description { state: "default" 0.0;
7273                visible: 0;
7274                rel1 {
7275                   relative: 1.0 1.0;
7276                   to_x: "padding_after_icon";
7277                   to_y: "padding_left_top";
7278                }
7279                rel2 {
7280                   relative: 0.0 0.0;
7281                   to: "padding_right_bottom";
7282                }
7283                color: BUTTON_TEXT_NAVIFRAME_NORMAL_COLOR_INC;
7284                text {
7285                   font: "SLP:style=Medium";
7286                   size: BUTTON_TEXT_NAVIFRAME_FONT_SIZE_INC;
7287                   min: 0 0;
7288                   max: 1 0;
7289                }
7290             }
7291             description { state: "visible" 0.0;
7292                inherit: "default" 0.0;
7293                visible: 1;
7294             }
7295             description { state: "clicked" 0.0;
7296                inherit: "default" 0.0;
7297                visible: 1;
7298                color: BUTTON_TEXT_NAVIFRAME_PRESSED_COLOR_INC;
7299             }
7300             description { state: "disabled" 0.0;
7301                inherit: "default" 0.0;
7302                color: 0 0 0 128;
7303             }
7304             description { state: "disabled_visible" 0.0;
7305                inherit: "default" 0.0;
7306                color: BUTTON_TEXT_NAVIFRAME_DISABLED_COLOR_INC;
7307                visible: 1;
7308             }
7309             description { state: "focused" 0.0;
7310                inherit: "default" 0.0;
7311                visible: 1;
7312                color: BUTTON_TEXT_NAVIFRAME_FOCUSED_COLOR_INC;
7313             }
7314          }
7315          part { name: "over2";
7316             type: RECT;
7317             repeat_events: 1;
7318             ignore_flags: ON_HOLD;
7319             description { state: "default" 0.0;
7320                color: 0 0 0 0;
7321             }
7322          }
7323          part { name: "over3";
7324             type: RECT;
7325             repeat_events: 1;
7326             description { state: "default" 0.0;
7327                color: 0 0 0 0;
7328             }
7329          }
7330          part { name: "clipper";
7331             type: RECT;
7332             description { state: "default" 0.0;
7333                color: 255 255 255 255;
7334             }
7335          }
7336          part { name: "disabler";
7337             type: RECT;
7338             description { state: "default" 0.0;
7339                color: 0 0 0 0;
7340                visible: 0;
7341             }
7342             description { state: "disabled" 0.0;
7343                inherit: "default" 0.0;
7344                visible: 1;
7345             }
7346          }
7347       }
7348       programs {
7349          program { name: "button_click";
7350             signal: "mouse,down,1";
7351             source: "over2";
7352             action: SIGNAL_EMIT "elm,action,press" "";
7353             after: "button_click_anim";
7354          }
7355          program { name: "button_click_anim";
7356             action: STATE_SET "clicked" 0.0;
7357             target: "button_image";
7358             after: "text_clicked";
7359          }
7360          program { name: "text_clicked";
7361             script {
7362                new st[31];
7363                new Float:vl;
7364                get_state(PART:"elm.text", st, 30, vl);
7365                if (!strcmp(st, "visible"))
7366                  set_state(PART:"elm.text", "clicked", 0.0);
7367             }
7368          }
7369          program { name: "button_unpress";
7370             action: SIGNAL_EMIT "elm,action,unpress" "";
7371          }
7372          program { name: "button_mouseout_clicked";
7373             signal: "mouse,up,1";
7374             source: "over3";
7375             script {
7376                new st[31];
7377                new Float:vl;
7378                get_state(PART:"elm.swallow.content", st, 30, vl);
7379                if (strcmp(st, "icononly"))
7380                  {
7381                     emit("elm,action,default,text,set", "");
7382                     set_state(PART:"elm.text", "visible", 0.0);
7383                  }
7384                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7385                  set_state(PART:"button_image", "default", 0.0);
7386             }
7387             after: button_unpress;
7388          }
7389          program { name: "button_unclick3";
7390             signal: "mouse,clicked,1";
7391             source: "over2";
7392             action: SIGNAL_EMIT "elm,action,click" "";
7393          }
7394          program { name: "text_show";
7395             signal: "elm,state,text,visible";
7396             source: "elm";
7397             script {
7398                new st[31];
7399                new Float:vl;
7400                get_state(PART:"elm.swallow.content", st, 30, vl);
7401                if (!strcmp(st, "icononly"))
7402                  {
7403                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7404                     set_state(PART:"icon_rect", "visible", 0.0);
7405                     set_state(PART:"padding_after_icon", "visible", 0.0);
7406                     set_state(PART:"bg", "visible", 0.0);
7407                  }
7408                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7409                  set_state(PART:"elm.text", "visible", 0.0);
7410                else
7411                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7412             }
7413          }
7414          program { name: "text_hide";
7415             signal: "elm,state,text,hidden";
7416             source: "elm";
7417             script {
7418                new st[31];
7419                new Float:vl;
7420                get_state(PART:"elm.swallow.content", st, 30, vl);
7421                if (!strcmp(st, "visible"))
7422                  {
7423                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7424                     set_state(PART:"icon_rect", "icononly", 0.0);
7425                     set_state(PART:"padding_after_icon", "icononly", 0.0);
7426                     set_state(PART:"bg", "icononly", 0.0);
7427                  }
7428                set_state(PART:"elm.text", "default", 0.0);
7429             }
7430          }
7431          program { name: "icon_show";
7432             signal: "elm,state,icon,visible";
7433             source: "elm";
7434             script {
7435                new st[31];
7436                new Float:vl;
7437                get_state(PART:"elm.text", st, 30, vl);
7438                if (!strcmp(st, "visible"))
7439                  {
7440                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7441                     set_state(PART:"icon_rect", "visible", 0.0);
7442                     set_state(PART:"padding_after_icon", "visible", 0.0);
7443                     set_state(PART:"bg", "visible", 0.0);
7444                  }
7445                else
7446                  {
7447                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7448                     set_state(PART:"icon_rect", "icononly", 0.0);
7449                     set_state(PART:"padding_after_icon", "icononly", 0.0);
7450                     set_state(PART:"bg", "icononly", 0.0);
7451                  }
7452             }
7453          }
7454          program { name: "icon_hide";
7455             signal: "elm,state,icon,hidden";
7456             source: "elm";
7457             action: STATE_SET "default" 0.0;
7458             target: "elm.swallow.content";
7459             target: "padding_after_icon";
7460             target: "icon_rect";
7461             target: "bg";
7462          }
7463          program { name: "disable";
7464             signal: "elm,state,disabled";
7465             source: "elm";
7466             action: STATE_SET "disabled" 0.0;
7467             target: "button_image";
7468             target: "disabler";
7469             after: "disable_text";
7470          }
7471          program { name: "disable_text";
7472             script {
7473                new st[31];
7474                new Float:vl;
7475                get_state(PART:"elm.text", st, 30, vl);
7476                if (!strcmp(st, "visible"))
7477                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7478                else
7479                  set_state(PART:"elm.text", "disabled", 0.0);
7480                set_int(button_state, BUTTON_STATE_DISABLED);
7481             }
7482          }
7483          program { name: "enable";
7484             signal: "elm,state,enabled";
7485             source: "elm";
7486             action: STATE_SET "default" 0.0;
7487             target: "button_image";
7488             target: "disabler";
7489             after: "enable_text";
7490          }
7491          program { name: "enable_text";
7492             script {
7493                new st[31];
7494                new Float:vl;
7495                get_state(PART:"elm.text", st, 30, vl);
7496                if (!strcmp(st, "disabled_visible"))
7497                  set_state(PART:"elm.text", "visible", 0.0);
7498                else
7499                  set_state(PART:"elm.text", "default", 0.0);
7500                set_int(button_state, BUTTON_STATE_ENABLED);
7501             }
7502          }
7503          program { name: "focused";
7504             //signal: "elm,action,focus";
7505             //source: "elm";
7506             action: STATE_SET "focused" 0.0;
7507             target: "button_image";
7508             target: "elm.text";
7509          }
7510          program { name: "unfocused";
7511             //signal: "elm,action,unfocus";
7512             //source: "elm";
7513             action: STATE_SET "default" 0.0;
7514             target: "button_image";
7515             after: "unfocus_text";
7516          }
7517          program { name: "unfocus_text";
7518             action: STATE_SET "visible" 0.0;
7519             target: "elm.text";
7520          }
7521       }
7522    }
7523
7524 /////////////////////////////////////////////////////////////////////////////////////////
7525    group { name: "elm/button/base/naviframe/more/default";
7526       images {
7527          image: "00_Title_btn.png" COMP;
7528          image: "00_Title_btn_press.png" COMP;
7529          image: "00_winset_more.png" COMP;
7530       }
7531       script {
7532          public button_state = BUTTON_STATE_ENABLED;
7533       }
7534       parts {
7535          part { name: "button_image";
7536             scale: 1;
7537             description { state: "default" 0.0;
7538                min: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC;
7539                max: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC;
7540                image {
7541                   normal: "00_Title_btn.png";
7542                   border: BUTTON_NAVIFRAME_MORE_BG_BORDER_INC;
7543                   border_scale: 1;
7544                }
7545             }
7546             description { state: "clicked" 0.0;
7547                inherit: "default" 0.0;
7548                image.normal: "00_Title_btn_press.png";
7549             }
7550             description { state: "disabled" 0.0;
7551                inherit: "default" 0.0;
7552             }
7553             description { state: "focused" 0.0;
7554                inherit: "default" 0.0;
7555                image.normal: "00_Title_btn_press.png";
7556             }
7557          }
7558          part { name: "more_image";
7559             scale: 1;
7560             mouse_events: 0;
7561             description { state: "default" 0.0;
7562                min: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC;
7563                max: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC;
7564                rel1.to: "button_image";
7565                rel2.to: "button_image";
7566                image.normal: "00_winset_more.png";
7567             }
7568             description { state: "clicked" 0.0;
7569                inherit: "default" 0.0;
7570             }
7571          }
7572          part { name: "over2";
7573             type: RECT;
7574             repeat_events: 1;
7575             ignore_flags: ON_HOLD;
7576             description { state: "default" 0.0;
7577                color: 0 0 0 0;
7578             }
7579          }
7580          part { name: "over3";
7581             type: RECT;
7582             repeat_events: 1;
7583             description { state: "default" 0.0;
7584                color: 0 0 0 0;
7585             }
7586          }
7587          part { name: "disabler";
7588             type: RECT;
7589             description { state: "default" 0.0;
7590                color: 0 0 0 0;
7591                visible: 0;
7592             }
7593             description { state: "disabled" 0.0;
7594                inherit: "default" 0.0;
7595                visible: 1;
7596             }
7597          }
7598       }
7599       programs {
7600          program { name: "button_click";
7601             signal: "mouse,down,1";
7602             source: "over2";
7603             action: SIGNAL_EMIT "elm,action,press" "";
7604             after: "button_click_anim";
7605          }
7606          program { name: "button_click_anim";
7607             action: STATE_SET "clicked" 0.0;
7608             target: "button_image";
7609          }
7610          program { name: "button_unpress";
7611             action: SIGNAL_EMIT "elm,action,unpress" "";
7612          }
7613          program { name: "button_mouseout_clicked";
7614             signal: "mouse,up,1";
7615             source: "over3";
7616             script {
7617                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7618                  set_state(PART:"button_image", "default", 0.0);
7619             }
7620             after: button_unpress;
7621          }
7622          program { name: "button_unclick3";
7623             signal: "mouse,clicked,1";
7624             source: "over2";
7625             action: SIGNAL_EMIT "elm,action,click" "";
7626          }
7627          program { name: "disable";
7628             signal: "elm,state,disabled";
7629             source: "elm";
7630             action: STATE_SET "disabled" 0.0;
7631             target: "button_image";
7632             target: "disabler";
7633             after: "disable_button";
7634          }
7635          program { name: "disable_button";
7636             script {
7637                set_int(button_state, BUTTON_STATE_DISABLED);
7638             }
7639          }
7640          program { name: "enable";
7641             signal: "elm,state,enabled";
7642             source: "elm";
7643             action: STATE_SET "default" 0.0;
7644             target: "button_image";
7645             target: "disabler";
7646             after: "enable_button";
7647          }
7648          program { name: "enable_button";
7649             script {
7650                set_int(button_state, BUTTON_STATE_ENABLED);
7651             }
7652          }
7653       }
7654    }
7655
7656 ///////////////////////////////////////////////////////////////////////////////////////
7657    group { name: "elm/button/base/controlbar/vertical";
7658       script {
7659          public button_state = BUTTON_STATE_ENABLED;
7660       }
7661       styles{
7662          style { name: "controlbar_style";
7663             base: "font=SLP:style=Medium font_size="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC" align=center color="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXTBLOCK_COLOR_INC" wrap=mixed ellipsis=1";
7664             tag: "br" "\n";
7665             tag: "ps" "ps";
7666             tag: "hilight" "+ font=SLP:style=Bold";
7667             tag: "b" "+ font=SLP:style=Bold";
7668             tag: "tab" "\t";
7669          }
7670       }
7671       parts {
7672          part { name: "button_image";
7673             type: RECT;
7674             scale: 1;
7675             description { state: "default" 0.0;
7676                min: 20 30;
7677                rel1.offset: 5 5;
7678                rel2.offset: -6 -6;
7679                color: 0 0 0 0;
7680                visible: 0;
7681             }
7682          }
7683          part { name: "padding_left_top";
7684             type: RECT;
7685             scale: 1;
7686             mouse_events: 0;
7687             description { state: "default" 0.0;
7688                align: 0.0 0.0;
7689                rel2.relative: 0.0 0.0;
7690                min: 10 8;
7691                fixed: 1 1;
7692                visible: 0;
7693             }
7694          }
7695          part { name: "padding_right_bottom";
7696             type: RECT;
7697             scale: 1;
7698             mouse_events: 0;
7699             description { state: "default" 0.0;
7700                align: 1.0 1.0;
7701                rel1.relative: 1.0 1.0;
7702                min: 10 5;
7703                fixed: 1 1;
7704                visible: 0;
7705             }
7706          }
7707          part {
7708             name: "icon_rect";
7709             type: RECT;
7710             scale: 1;
7711             mouse_events: 0;
7712             description { state: "default" 0.0;
7713                min: 0 0;
7714                fixed: 0 1;
7715                rel1 {
7716                   relative: 1.0 1.0;
7717                   to: "padding_left_top";
7718                }
7719                rel2 {
7720                   relative: 0.0 1.0;
7721                   to_x: "padding_right_bottom";
7722                   to_y: "padding_left_top";
7723                }
7724                align: 0.5 0.0;
7725                color: 0 0 0 0;
7726             }
7727             description { state: "visible" 0.0;
7728                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7729                fixed: 0 1;
7730                rel1 {
7731                   relative: 1.0 1.0;
7732                   to: "padding_left_top";
7733                }
7734                rel2 {
7735                   relative: 0.0 1.0;
7736                   to_x: "padding_right_bottom";
7737                   to_y: "padding_left_top";
7738                }
7739                align: 0.5 0.0;
7740                color: 0 0 0 0;
7741             }
7742             description { state: "icononly" 0.0;
7743                inherit: "default" 0.0;
7744             }
7745          }
7746          part { name: "padding_after_icon";
7747             type: RECT;
7748             scale: 1;
7749             mouse_events: 0;
7750             description { state: "default" 0.0; //when only icon or no icon is there
7751                align: 0.0 0.0;
7752                rel1 {
7753                   relative: 0.0 1.0;
7754                   to: "icon_rect";
7755                }
7756                rel2.to: "icon_rect";
7757                fixed: 0 1;
7758                min: 0 0;
7759                color: 0 0 0 0;
7760             }
7761             description { state: "visible" 0.0;
7762                align: 0.0 0.0;
7763                rel1 {
7764                   relative: 0.0 1.0;
7765                   to: "icon_rect";
7766                }
7767                rel2.to: "icon_rect";
7768                fixed: 0 1;
7769                min: 0 0;
7770                color: 0 0 0 0;
7771             }
7772             description { state: "icononly" 0.0;
7773                inherit: "default" 0.0;
7774             }
7775          }
7776          part { name: "padding_before_text";
7777             type: RECT;
7778             scale: 1;
7779             mouse_events: 0;
7780             description { state: "default" 0.0; //when only icon or no icon is there
7781                align: 0.5 1.0;
7782                rel1 {
7783                   relative: 1.0 0.0;
7784                   to_x: "padding_left_top";
7785                   to_y: "elm.text";
7786                }
7787                rel2 {
7788                   relative: 0.0 0.0;
7789                   to_x: "padding_right_bottom";
7790                   to_y: "elm.text";
7791                }
7792                fixed: 0 1;
7793                min: 0 0;
7794                color: 0 0 0 0;
7795             }
7796          }
7797          part { name: "elm.swallow.content";
7798             type: SWALLOW;
7799             scale: 1;
7800             clip_to: "disabler";
7801             description { state: "default" 0.0;
7802                visible: 0;
7803                align: 0.5 0.0;
7804                rel1 {
7805                   relative: 1.0 1.0;
7806                   to: "padding_left_top";
7807                }
7808                rel2 {
7809                   relative: 0.0 1.0;
7810                   to_x: "padding_right_bottom";
7811                   to_y: "padding_left_top";
7812                }
7813                fixed: 0 1;
7814             }
7815             description { state: "visible" 0.0;
7816                fixed: 0 1;
7817                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7818                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7819                rel1 {
7820                   relative: 1.0 1.0;
7821                   to: "padding_left_top";
7822                }
7823                rel2 {
7824                   relative: 0.0 0.0;
7825                   to_x: "padding_right_bottom";
7826                   to_y: "padding_before_text";
7827                }
7828                aspect: 1.0 1.0;
7829                aspect_preference: HORIZONTAL;
7830             }
7831             description { state: "icononly" 0.0;
7832                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7833                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7834                rel1 {
7835                   relative: 1.0 1.0;
7836                   to: "padding_left_top";
7837                }
7838                rel2 {
7839                   relative: 0.0 0.0;
7840                   to: "padding_right_bottom";
7841                }
7842                aspect: 1.0 1.0;
7843                aspect_preference: HORIZONTAL;
7844             }
7845          }
7846          part { name: "elm.text";
7847             type: TEXTBLOCK;
7848             mouse_events: 0;
7849             scale: 1;
7850             clip_to: "disabler";
7851             description { state: "default" 0.0;
7852                visible: 0;
7853                rel1 {
7854                   relative: 1.0 1.0;
7855                   to_x: "padding_left_top";
7856                   to_y: "padding_after_icon";
7857                }
7858                rel2 {
7859                   relative: 0.0 0.0;
7860                   to: "padding_right_bottom";
7861                }
7862                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
7863                fixed: 1 1;
7864                text {
7865                   style: "controlbar_style";
7866                   min: 0 1;
7867                   max: 0 1;
7868                }
7869             }
7870             description { state: "visible" 0.0;
7871                inherit: "default" 0.0;
7872                visible: 1;
7873             }
7874             description { state: "clicked" 0.0;
7875                inherit: "default" 0.0;
7876                visible: 1;
7877                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
7878             }
7879             description { state: "focused" 0.0;
7880                inherit: "default" 0.0;
7881                visible: 1;
7882                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
7883             }
7884          }
7885          part { name: "over2";
7886             type: RECT;
7887             repeat_events: 1;
7888             ignore_flags: ON_HOLD;
7889             description { state: "default" 0.0;
7890                color: 0 0 0 0;
7891             }
7892             description { state: "disabled" 0.0;
7893                inherit: "default" 0.0;
7894                visible: 0;
7895             }
7896          }
7897          part { name: "over3";
7898             type: RECT;
7899             repeat_events: 1;
7900             description { state: "default" 0.0;
7901                color: 0 0 0 0;
7902             }
7903          }
7904          part { name: "disabler";
7905             type: RECT;
7906             description { state: "default" 0.0;
7907                color: 255 255 255 255;
7908                visible: 1;
7909             }
7910             description { state: "disabled" 0.0;
7911                inherit: "default" 0.0;
7912                color: 255 255 255 127;
7913                visible: 1;
7914             }
7915          }
7916       }
7917       programs {
7918          program { name: "button_click";
7919             signal: "mouse,down,1";
7920             source: "over2";
7921             action: SIGNAL_EMIT "elm,action,press" "";
7922             after: "button_click_anim";
7923          }
7924          program { name: "button_click_anim";
7925             action: STATE_SET "clicked" 0.0;
7926             target: "button_image";
7927             after: "text_clicked";
7928          }
7929          program { name: "text_clicked";
7930             script {
7931                new st[31];
7932                new Float:vl;
7933                get_state(PART:"elm.text", st, 30, vl);
7934                if (!strcmp(st, "visible"))
7935                  set_state(PART:"elm.text", "clicked", 0.0);
7936             }
7937          }
7938          program { name: "button_unpress";
7939             action: SIGNAL_EMIT "elm,action,unpress" "";
7940          }
7941          program { name: "button_mouseout_clicked";
7942             signal: "mouse,up,1";
7943             source: "over3";
7944             script {
7945                new st[31];
7946                new Float:vl;
7947                get_state(PART:"elm.swallow.content", st, 30, vl);
7948                if (strcmp(st, "icononly"))
7949                  {
7950                     emit("elm,action,default,text,set", "");
7951                     set_state(PART:"elm.text", "visible", 0.0);
7952                  }
7953                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7954                  set_state(PART:"button_image", "default", 0.0);
7955             }
7956             after: button_unpress;
7957          }
7958          program { name: "button_unclick3";
7959             signal: "mouse,clicked,1";
7960             source: "over2";
7961             action: SIGNAL_EMIT "elm,action,click" "";
7962          }
7963          program { name: "text_show";
7964             signal: "elm,state,text,visible";
7965             source: "elm";
7966             script {
7967                new st[31];
7968                new Float:vl;
7969                get_state(PART:"elm.swallow.content", st, 30, vl);
7970                if (!strcmp(st, "icononly"))
7971                  {
7972                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7973                     set_state(PART:"icon_rect", "visible", 0.0);
7974                     set_state(PART:"padding_after_icon", "visible", 0.0);
7975                  }
7976                set_state(PART:"elm.text", "visible", 0.0);
7977             }
7978          }
7979          program { name: "text_hide";
7980             signal: "elm,state,text,hidden";
7981             source: "elm";
7982             script {
7983                new st[31];
7984                new Float:vl;
7985                get_state(PART:"elm.swallow.content", st, 30, vl);
7986                if (!strcmp(st, "visible"))
7987                  {
7988                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7989                     set_state(PART:"icon_rect", "icononly", 0.0);
7990                     set_state(PART:"padding_after_icon", "icononly", 0.0);
7991                  }
7992                set_state(PART:"elm.text", "default", 0.0);
7993             }
7994          }
7995          program { name: "icon_show";
7996             signal: "elm,state,icon,visible";
7997             source: "elm";
7998             script {
7999                new st[31];
8000                new Float:vl;
8001                get_state(PART:"elm.text", st, 30, vl);
8002                if (!strcmp(st, "visible"))
8003                  {
8004                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8005                     set_state(PART:"icon_rect", "visible", 0.0);
8006                     set_state(PART:"padding_after_icon", "visible", 0.0);
8007                  }
8008                else
8009                  {
8010                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8011                     set_state(PART:"icon_rect", "icononly", 0.0);
8012                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8013                  }
8014             }
8015          }
8016          program { name: "icon_hide";
8017             signal: "elm,state,icon,hidden";
8018             source: "elm";
8019             action: STATE_SET "default" 0.0;
8020             target: "elm.swallow.content";
8021             target: "icon_rect";
8022             target: "padding_after_icon";
8023          }
8024          program { name: "disable";
8025             signal: "elm,state,disabled";
8026             source: "elm";
8027             action: STATE_SET "disabled" 0.0;
8028             target: "over2";
8029             target: "disabler";
8030             after: "disable_text";
8031          }
8032          program { name: "disable_text";
8033             script {
8034                new st[31];
8035                new Float:vl;
8036                set_int(button_state, BUTTON_STATE_DISABLED);
8037                get_state(PART:"elm.text", st, 30, vl);
8038                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8039                  set_state(PART:"elm.text", "visible", 0.0);
8040             }
8041          }
8042          program { name: "enable";
8043             signal: "elm,state,enabled";
8044             source: "elm";
8045             action: STATE_SET "default" 0.0;
8046             target: "over2";
8047             target: "disabler";
8048             after: "enable_text";
8049          }
8050          program { name: "enable_text";
8051             script {
8052                new st[31];
8053                new Float:vl;
8054                set_int(button_state, BUTTON_STATE_ENABLED);
8055                get_state(PART:"elm.text", st, 30, vl);
8056                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8057                  set_state(PART:"elm.text", "visible", 0.0);
8058             }
8059          }
8060          program { name: "focused";
8061             action: STATE_SET "focused" 0.0;
8062             target: "button_image";
8063             target: "elm.text";
8064          }
8065          program { name: "unfocused";
8066             action: STATE_SET "default" 0.0;
8067             target: "button_image";
8068             after: "unfocus_text";
8069          }
8070          program { name: "unfocus_text";
8071             action: STATE_SET "visible" 0.0;
8072             target: "elm.text";
8073          }
8074       }
8075    }
8076
8077 ///////////////////////////////////////////////////////////////////////////////////////
8078    group { name: "elm/button/base/controlbar/horizontal_center";
8079       script {
8080          public button_state = BUTTON_STATE_ENABLED;
8081       }
8082       parts {
8083          part { name: "button_image";
8084             type: RECT;
8085             scale: 1;
8086             description { state: "default" 0.0;
8087                min: 20 30;
8088                rel1.offset: 5 5;
8089                rel2.offset: -6 -6;
8090                color: 0 0 0 0;
8091                visible: 0;
8092             }
8093             description { state: "clicked" 0.0;
8094                inherit: "default" 0.0;
8095                visible: 1;
8096             }
8097          }
8098          part { name: "padding_left_top";
8099             type: RECT;
8100             scale: 1;
8101             mouse_events: 0;
8102             description { state: "default" 0.0;
8103                align: 0.0 0.0;
8104                rel2.relative: 0.0 0.0;
8105                min: 10 5;
8106                fixed: 1 1;
8107                visible: 0;
8108             }
8109          }
8110          part { name: "padding_right_bottom";
8111             type: RECT;
8112             scale: 1;
8113             mouse_events: 0;
8114             description { state: "default" 0.0;
8115                align: 1.0 1.0;
8116                rel1.relative: 1.0 1.0;
8117                min: 10 5;
8118                fixed: 1 1;
8119                visible: 0;
8120             }
8121          }
8122          part { name: "icon_rect";
8123             type: RECT;
8124             scale: 1;
8125             mouse_events: 0;
8126             description { state: "default" 0.0;
8127                min: 0 0;
8128                fixed: 1 0;
8129                rel1 {
8130                   relative: 1.0 1.0;
8131                   to: "padding_left_top";
8132                }
8133                rel2 {
8134                   relative: 1.0 0.0;
8135                   to_x: "padding_left_top";
8136                   to_y: "padding_right_bottom";
8137                }
8138                align: 0.0 0.5;
8139                color: 0 0 0 0;
8140             }
8141             description { state: "visible" 0.0;
8142                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8143                fixed: 1 0;
8144                rel1 {
8145                   relative: 1.0 1.0;
8146                   to: "padding_left_top";
8147                }
8148                rel2 {
8149                   relative: 1.0 0.0;
8150                   to_x: "padding_left_top";
8151                   to_y: "padding_right_bottom";
8152                }
8153                align: 0.0 0.5;
8154                color: 0 0 0 0;
8155             }
8156             description { state: "icononly" 0.0;
8157                inherit: "default" 0.0;
8158                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8159             }
8160          }
8161          part { name: "padding_after_icon";
8162             type: RECT;
8163             scale: 1;
8164             mouse_events: 0;
8165             description { state: "default" 0.0; //when only icon or no icon is there
8166                align: 0.0 0.0;
8167                rel1 {
8168                   relative: 1.0 0.0;
8169                   to: "icon_rect";
8170                }
8171                rel2.to: "icon_rect";
8172                fixed: 1 0;
8173                min: 0 0;
8174                color: 0 0 0 0;
8175             }
8176             description { state: "visible" 0.0;
8177                align: 0.0 0.0;
8178                rel1 {
8179                   relative: 1.0 0.0;
8180                   to: "icon_rect";
8181                }
8182                rel2.to: "icon_rect";
8183                fixed: 1 0;
8184                min: 6 0;
8185                color: 0 0 0 0;
8186             }
8187             description { state: "icononly" 0.0;
8188                inherit: "default" 0.0;
8189             }
8190          }
8191          part { name: "padding_before_text";
8192             type: RECT;
8193             scale: 1;
8194             mouse_events: 0;
8195             description { state: "default" 0.0; //when only icon or no icon is there
8196                align: 1.0 0.5;
8197                rel1 {
8198                   relative: 0.0 1.0;
8199                   to_x: "elm.text";
8200                   to_y: "padding_left_top";
8201                }
8202                rel2 {
8203                   relative: 0.0 0.0;
8204                   to_x: "elm.text";
8205                   to_y: "padding_right_bottom";
8206                }
8207                fixed: 1 0;
8208                min: 6 0;
8209                color: 0 0 0 0;
8210             }
8211          }
8212          part { name: "elm.swallow.content";
8213             type: SWALLOW;
8214             scale: 1;
8215             clip_to: "disabler";
8216             description { state: "default" 0.0;
8217                visible: 0;
8218                align: 0.0 0.5;
8219                rel1 {
8220                   relative: 1.0 1.0;
8221                   to: "padding_left_top";
8222                }
8223                rel2 {
8224                   relative: 1.0 0.0;
8225                   to_x: "padding_left_top";
8226                   to_y: "padding_right_bottom";
8227                }
8228                fixed: 1 0;
8229             }
8230             description { state: "visible" 0.0;
8231                fixed: 1 0;
8232                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8233                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8234                align: 1.0 0.5;
8235                rel1 {
8236                   relative: 0.0 1.0;
8237                   to_x: "padding_before_text";
8238                   to_y: "padding_left_top";
8239                }
8240                rel2 {
8241                   relative: 0.0 0.0;
8242                   to_x: "padding_before_text";
8243                   to_y: "padding_right_bottom";
8244                }
8245                aspect: 1.0 1.0;
8246                aspect_preference: VERTICAL;
8247             }
8248             description { state: "icononly" 0.0;
8249                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8250                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8251                rel1 {
8252                   relative: 1.0 1.0;
8253                   to: "padding_left_top";
8254                }
8255                rel2 {
8256                   relative: 0.0 0.0;
8257                   to: "padding_right_bottom";
8258                }
8259                aspect: 1.0 1.0;
8260                aspect_preference: VERTICAL;
8261             }
8262          }
8263          part { name: "elm.text";
8264             type: TEXT;
8265             mouse_events: 0;
8266             scale: 1;
8267             clip_to: "disabler";
8268             description { state: "default" 0.0;
8269                visible: 0;
8270                rel1 {
8271                   relative: 1.0 1.0;
8272                   to_x: "padding_after_icon";
8273                   to_y: "padding_left_top";
8274                }
8275                rel2 {
8276                   relative: 0.0 0.0;
8277                   to: "padding_right_bottom";
8278                }
8279                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
8280                text {
8281                   font: "SLP:style=Medium";
8282                   size: BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC;
8283                   min: 0 0;
8284                   max: 1 0;
8285                }
8286             }
8287             description { state: "visible" 0.0;
8288                inherit: "default" 0.0;
8289                visible: 1;
8290             }
8291             description { state: "clicked" 0.0;
8292                inherit: "default" 0.0;
8293                visible: 1;
8294                min: 0 0;
8295             }
8296             description { state: "focused" 0.0;
8297                inherit: "default" 0.0;
8298                visible: 1;
8299                min: 0 0;
8300                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
8301             }
8302          }
8303          part { name: "over2";
8304             type: RECT;
8305             repeat_events: 1;
8306             ignore_flags: ON_HOLD;
8307             description { state: "default" 0.0;
8308                color: 0 0 0 0;
8309             }
8310             description { state: "disabled" 0.0;
8311                inherit: "default" 0.0;
8312                visible: 0;
8313             }
8314          }
8315          part { name: "over3";
8316             type: RECT;
8317             repeat_events: 1;
8318             description { state: "default" 0.0;
8319                color: 0 0 0 0;
8320             }
8321          }
8322          part { name: "disabler";
8323             type: RECT;
8324             description { state: "default" 0.0;
8325                color: 255 255 255 255;
8326             }
8327             description { state: "disabled" 0.0;
8328                color: 255 255 255 127;
8329             }
8330          }
8331       }
8332       programs {
8333          program { name: "button_click";
8334             signal: "mouse,down,1";
8335             source: "over2";
8336             action: SIGNAL_EMIT "elm,action,press" "";
8337             after: "button_click_anim";
8338          }
8339          program { name: "button_click_anim";
8340             action: STATE_SET "clicked" 0.0;
8341             target: "button_image";
8342             after: "text_clicked";
8343          }
8344          program { name: "text_clicked";
8345             script {
8346                new st[31];
8347                new Float:vl;
8348                get_state(PART:"elm.text", st, 30, vl);
8349                if (!strcmp(st, "visible"))
8350                  set_state(PART:"elm.text", "clicked", 0.0);
8351             }
8352          }
8353          program { name: "button_unpress";
8354             action: SIGNAL_EMIT "elm,action,unpress" "";
8355          }
8356          program { name: "button_mouseout_clicked";
8357             signal: "mouse,up,1";
8358             source: "over3";
8359             script {
8360                new st[31];
8361                new Float:vl;
8362                get_state(PART:"elm.swallow.content", st, 30, vl);
8363                if (strcmp(st, "icononly"))
8364                  {
8365                     emit("elm,action,default,text,set", "");
8366                     set_state(PART:"elm.text", "visible", 0.0);
8367                  }
8368                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8369                  set_state(PART:"button_image", "default", 0.0);
8370             }
8371             after: button_unpress;
8372          }
8373          program { name: "button_unclick3";
8374             signal: "mouse,clicked,1";
8375             source: "over2";
8376             action: SIGNAL_EMIT "elm,action,click" "";
8377          }
8378          program { name: "text_show";
8379             signal: "elm,state,text,visible";
8380             source: "elm";
8381             script {
8382                new st[31];
8383                new Float:vl;
8384                get_state(PART:"elm.swallow.content", st, 30, vl);
8385                if (!strcmp(st, "icononly"))
8386                  {
8387                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8388                     set_state(PART:"icon_rect", "visible", 0.0);
8389                     set_state(PART:"padding_after_icon", "visible", 0.0);
8390                  }
8391                set_state(PART:"elm.text", "visible", 0.0);
8392             }
8393          }
8394          program { name: "text_hide";
8395             signal: "elm,state,text,hidden";
8396             source: "elm";
8397             script {
8398                new st[31];
8399                new Float:vl;
8400                get_state(PART:"elm.swallow.content", st, 30, vl);
8401                if (!strcmp(st, "visible"))
8402                  {
8403                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8404                     set_state(PART:"icon_rect", "icononly", 0.0);
8405                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8406                  }
8407                set_state(PART:"elm.text", "default", 0.0);
8408             }
8409          }
8410          program { name: "icon_show";
8411             signal: "elm,state,icon,visible";
8412             source: "elm";
8413             script {
8414                new st[31];
8415                new Float:vl;
8416                get_state(PART:"elm.text", st, 30, vl);
8417                if (!strcmp(st, "visible"))
8418                  {
8419                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8420                     set_state(PART:"icon_rect", "visible", 0.0);
8421                     set_state(PART:"padding_after_icon", "visible", 0.0);
8422                  }
8423                else
8424                  {
8425                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8426                     set_state(PART:"icon_rect", "icononly", 0.0);
8427                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8428                  }
8429             }
8430          }
8431          program { name: "icon_hide";
8432             signal: "elm,state,icon,hidden";
8433             source: "elm";
8434             action: STATE_SET "default" 0.0;
8435             target: "elm.swallow.content";
8436             target: "icon_rect";
8437             target: "padding_after_icon";
8438          }
8439          program { name: "disable";
8440             signal: "elm,state,disabled";
8441             source: "elm";
8442             action: STATE_SET "disabled" 0.0;
8443             target: "over2";
8444             target: "disabler";
8445             after: "disable_text";
8446          }
8447          program { name: "disable_text";
8448             script {
8449                new st[31];
8450                new Float:vl;
8451                set_int(button_state, BUTTON_STATE_DISABLED);
8452                get_state(PART:"elm.text", st, 30, vl);
8453                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8454                  set_state(PART:"elm.text", "visible", 0.0);
8455             }
8456          }
8457          program { name: "enable";
8458             signal: "elm,state,enabled";
8459             source: "elm";
8460             action: STATE_SET "default" 0.0;
8461             target: "over2";
8462             target: "disabler";
8463             after: "enable_text";
8464          }
8465          program { name: "enable_text";
8466             script {
8467                new st[31];
8468                new Float:vl;
8469                set_int(button_state, BUTTON_STATE_ENABLED);
8470                get_state(PART:"elm.text", st, 30, vl);
8471                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8472                  set_state(PART:"elm.text", "visible", 0.0);
8473             }
8474          }
8475          program { name: "focused";
8476             action: STATE_SET "focused" 0.0;
8477             target: "button_image";
8478             target: "elm.text";
8479          }
8480          program { name: "unfocused";
8481             action: STATE_SET "default" 0.0;
8482             target: "button_image";
8483             after: "unfocus_text";
8484          }
8485          program { name: "unfocus_text";
8486             action: STATE_SET "visible" 0.0;
8487             target: "elm.text";
8488          }
8489       }
8490    }
8491
8492 ///////////////////////////////////////////////////////////////////////////////////////
8493    group { name: "elm/button/base/controlbar/horizontal_left";
8494       script {
8495          public button_state = BUTTON_STATE_ENABLED;
8496       }
8497       parts {
8498          part { name: "button_image";
8499             type: RECT;
8500             scale: 1;
8501             description { state: "default" 0.0;
8502                min: 20 30;
8503                rel1.offset: 5 5;
8504                rel2.offset: -6 -6;
8505                color: 0 0 0 0;
8506                visible: 0;
8507             }
8508             description { state: "clicked" 0.0;
8509                inherit: "default" 0.0;
8510                visible: 1;
8511             }
8512          }
8513          part { name: "padding_left_top";
8514             type: RECT;
8515             scale: 1;
8516             mouse_events: 0;
8517             description { state: "default" 0.0;
8518                align: 0.0 0.0;
8519                rel2.relative: 0.0 0.0;
8520                min: 10 5;
8521                fixed: 1 1;
8522                visible: 0;
8523             }
8524          }
8525          part { name: "padding_right_bottom";
8526             type: RECT;
8527             scale: 1;
8528             mouse_events: 0;
8529             description { state: "default" 0.0;
8530                align: 1.0 1.0;
8531                rel1.relative: 1.0 1.0;
8532                min: 10 5;
8533                fixed: 1 1;
8534                visible: 0;
8535             }
8536          }
8537          part { name: "icon_rect";
8538             type: RECT;
8539             scale: 1;
8540             mouse_events: 0;
8541             description { state: "default" 0.0;
8542                min: 0 0;
8543                fixed: 1 0;
8544                rel1 {
8545                   relative: 1.0 1.0;
8546                   to: "padding_left_top";
8547                }
8548                rel2 {
8549                   relative: 1.0 0.0;
8550                   to_x: "padding_left_top";
8551                   to_y: "padding_right_bottom";
8552                }
8553                align: 0.0 0.5;
8554                color: 0 0 0 0;
8555             }
8556             description { state: "visible" 0.0;
8557                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8558                fixed: 1 0;
8559                rel1 {
8560                   relative: 1.0 1.0;
8561                   to: "padding_left_top";
8562                }
8563                rel2 {
8564                   relative: 1.0 0.0;
8565                   to_x: "padding_left_top";
8566                   to_y: "padding_right_bottom";
8567                }
8568                align: 0.0 0.5;
8569                color: 0 0 0 0;
8570             }
8571             description { state: "icononly" 0.0;
8572                inherit: "default" 0.0;
8573             }
8574          }
8575          part { name: "padding_after_icon";
8576             type: RECT;
8577             scale: 1;
8578             mouse_events: 0;
8579             description { state: "default" 0.0; //when only icon or no icon is there
8580                align: 0.0 0.0;
8581                rel1 {
8582                   relative: 1.0 0.0;
8583                   to: "icon_rect";
8584                }
8585                rel2.to: "icon_rect";
8586                fixed: 1 0;
8587                min: 0 0;
8588                color: 0 0 0 0;
8589             }
8590             description { state: "visible" 0.0;
8591                align: 0.0 0.0;
8592                rel1 {
8593                   relative: 1.0 0.0;
8594                   to: "icon_rect";
8595                }
8596                rel2.to: "icon_rect";
8597                fixed: 1 0;
8598                min: 6 0;
8599                color: 0 0 0 0;
8600             }
8601             description { state: "icononly" 0.0;
8602                inherit: "default" 0.0;
8603             }
8604          }
8605          part { name: "padding_before_text";
8606             type: RECT;
8607             scale: 1;
8608             mouse_events: 0;
8609             description { state: "default" 0.0; //when only icon or no icon is there
8610                align: 1.0 0.5;
8611                rel1 {
8612                   relative: 0.0 1.0;
8613                   to_x: "elm.text";
8614                   to_y: "padding_left_top";
8615                }
8616                rel2 {
8617                   relative: 0.0 0.0;
8618                   to_x: "elm.text";
8619                   to_y: "padding_right_bottom";
8620                }
8621                fixed: 1 0;
8622                min: 6 0;
8623                color: 0 0 0 0;
8624             }
8625          }
8626          part { name: "elm.swallow.content";
8627             type: SWALLOW;
8628             scale: 1;
8629             clip_to: "disabler";
8630             description { state: "default" 0.0;
8631                visible: 0;
8632                align: 0.0 0.5;
8633                rel1 {
8634                   relative: 1.0 1.0;
8635                   to: "padding_left_top";
8636                }
8637                rel2 {
8638                   relative: 1.0 0.0;
8639                   to_x: "padding_left_top";
8640                   to_y: "padding_right_bottom";
8641                }
8642                fixed: 1 0;
8643             }
8644             description { state: "visible" 0.0;
8645                fixed: 1 0;
8646                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8647                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8648                align: 1.0 0.5;
8649                rel1 {
8650                   relative: 0.0 1.0;
8651                   to_x: "padding_before_text";
8652                   to_y: "padding_left_top";
8653                }
8654                rel2 {
8655                   relative: 0.0 0.0;
8656                   to_x: "padding_before_text";
8657                   to_y: "padding_right_bottom";
8658                }
8659                aspect: 1.0 1.0;
8660                aspect_preference: VERTICAL;
8661             }
8662             description { state: "icononly" 0.0;
8663                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8664                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8665                rel1 {
8666                   relative: 1.0 1.0;
8667                   to: "padding_left_top";
8668                }
8669                rel2 {
8670                   relative: 0.0 0.0;
8671                   to: "padding_right_bottom";
8672                }
8673                aspect: 1.0 1.0;
8674                aspect_preference: VERTICAL;
8675             }
8676          }
8677          part { name: "elm.text";
8678             type: TEXT;
8679             mouse_events: 0;
8680             scale: 1;
8681             clip_to: "disabler";
8682             description { state: "default" 0.0;
8683                visible: 0;
8684                rel1 {
8685                   relative: 1.0 1.0;
8686                   to_x: "padding_after_icon";
8687                   to_y: "padding_left_top";
8688                }
8689                rel2 {
8690                   relative: 0.0 0.0;
8691                   to: "padding_right_bottom";
8692                }
8693                align: 0.0 0.5;
8694                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
8695                text {
8696                   font: "SLP:style=Medium";
8697                   size: 20;
8698                   min: 0 0;
8699                   max: 1 0;
8700                   align: 0.0 0.5;
8701                }
8702             }
8703             description { state: "visible" 0.0;
8704                inherit: "default" 0.0;
8705                visible: 1;
8706             }
8707             description { state: "clicked" 0.0;
8708                inherit: "default" 0.0;
8709                visible: 1;
8710                min: 0 0;
8711             }
8712             description { state: "focused" 0.0;
8713                inherit: "default" 0.0;
8714                visible: 1;
8715                min: 0 0;
8716                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
8717             }
8718          }
8719          part { name: "over2";
8720             type: RECT;
8721             repeat_events: 1;
8722             ignore_flags: ON_HOLD;
8723             description { state: "default" 0.0;
8724                color: 0 0 0 0;
8725             }
8726          }
8727          part { name: "over3";
8728             type: RECT;
8729             repeat_events: 1;
8730             description { state: "default" 0.0;
8731                color: 0 0 0 0;
8732             }
8733          }
8734          part { name: "disabler";
8735             type: RECT;
8736             description { state: "default" 0.0;
8737                color: 255 255 255 255;
8738             }
8739             description { state: "disabled" 0.0;
8740                color: 255 255 255 127;
8741             }
8742          }
8743       }
8744       programs {
8745          program { name: "button_click";
8746             signal: "mouse,down,1";
8747             source: "over2";
8748             action: SIGNAL_EMIT "elm,action,press" "";
8749             after: "button_click_anim";
8750          }
8751          program { name: "button_click_anim";
8752             action: STATE_SET "clicked" 0.0;
8753             target: "button_image";
8754             after: "text_clicked";
8755          }
8756          program { name: "text_clicked";
8757             script {
8758                new st[31];
8759                new Float:vl;
8760                get_state(PART:"elm.text", st, 30, vl);
8761                if (!strcmp(st, "visible"))
8762                  set_state(PART:"elm.text", "clicked", 0.0);
8763             }
8764          }
8765          program { name: "button_unpress";
8766             action: SIGNAL_EMIT "elm,action,unpress" "";
8767          }
8768          program { name: "button_mouseout_clicked";
8769             signal: "mouse,up,1";
8770             source: "over3";
8771             script {
8772                new st[31];
8773                new Float:vl;
8774                get_state(PART:"elm.swallow.content", st, 30, vl);
8775                if (strcmp(st, "icononly"))
8776                  {
8777                     emit("elm,action,default,text,set", "");
8778                     set_state(PART:"elm.text", "visible", 0.0);
8779                  }
8780                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8781                  set_state(PART:"button_image", "default", 0.0);
8782             }
8783             after: button_unpress;
8784          }
8785          program { name: "button_unclick3";
8786             signal: "mouse,clicked,1";
8787             source: "over2";
8788             action: SIGNAL_EMIT "elm,action,click" "";
8789          }
8790          program { name: "text_show";
8791             signal: "elm,state,text,visible";
8792             source: "elm";
8793             script {
8794                new st[31];
8795                new Float:vl;
8796                get_state(PART:"elm.swallow.content", st, 30, vl);
8797                if (!strcmp(st, "icononly"))
8798                  {
8799                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8800                     set_state(PART:"icon_rect", "visible", 0.0);
8801                     set_state(PART:"padding_after_icon", "visible", 0.0);
8802                  }
8803                set_state(PART:"elm.text", "visible", 0.0);
8804             }
8805          }
8806          program { name: "text_hide";
8807             signal: "elm,state,text,hidden";
8808             source: "elm";
8809             script {
8810                new st[31];
8811                new Float:vl;
8812                get_state(PART:"elm.swallow.content", st, 30, vl);
8813                if (!strcmp(st, "visible"))
8814                  {
8815                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8816                     set_state(PART:"icon_rect", "icononly", 0.0);
8817                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8818                  }
8819                set_state(PART:"elm.text", "default", 0.0);
8820             }
8821          }
8822          program { name: "icon_show";
8823             signal: "elm,state,icon,visible";
8824             source: "elm";
8825             script {
8826                new st[31];
8827                new Float:vl;
8828                get_state(PART:"elm.text", st, 30, vl);
8829                if (!strcmp(st, "visible"))
8830                  {
8831                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8832                     set_state(PART:"icon_rect", "visible", 0.0);
8833                     set_state(PART:"padding_after_icon", "visible", 0.0);
8834                  }
8835                else
8836                  {
8837                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8838                     set_state(PART:"icon_rect", "icononly", 0.0);
8839                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8840                  }
8841             }
8842          }
8843          program { name: "icon_hide";
8844             signal: "elm,state,icon,hidden";
8845             source: "elm";
8846             action: STATE_SET "default" 0.0;
8847             target: "elm.swallow.content";
8848             target: "icon_rect";
8849             target: "padding_after_icon";
8850          }
8851          program { name: "disable";
8852             signal: "elm,state,disabled";
8853             source: "elm";
8854             action: STATE_SET "disabled" 0.0;
8855             target: "disabler";
8856             after: "disable_text";
8857          }
8858          program { name: "disable_text";
8859             script {
8860                new st[31];
8861                new Float:vl;
8862                set_int(button_state, BUTTON_STATE_DISABLED);
8863                get_state(PART:"elm.text", st, 30, vl);
8864                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8865                  set_state(PART:"elm.text", "visible", 0.0);
8866             }
8867          }
8868          program { name: "enable";
8869             signal: "elm,state,enabled";
8870             source: "elm";
8871             action: STATE_SET "default" 0.0;
8872             target: "disabler";
8873             after: "enable_text";
8874          }
8875          program { name: "enable_text";
8876             script {
8877                new st[31];
8878                new Float:vl;
8879                set_int(button_state, BUTTON_STATE_ENABLED);
8880                get_state(PART:"elm.text", st, 30, vl);
8881                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8882                  set_state(PART:"elm.text", "visible", 0.0);
8883             }
8884          }
8885          program { name: "focused";
8886             action: STATE_SET "focused" 0.0;
8887             target: "button_image";
8888             target: "elm.text";
8889          }
8890          program { name: "unfocused";
8891             action: STATE_SET "default" 0.0;
8892             target: "button_image";
8893             after: "unfocus_text";
8894          }
8895          program { name: "unfocus_text";
8896             action: STATE_SET "visible" 0.0;
8897             target: "elm.text";
8898          }
8899       }
8900    }
8901
8902 ///////////////////////////////////////////////////////////////////////////////////////
8903    group { name: "elm/button/base/controlbar/horizontal_right";
8904       script {
8905          public button_state = BUTTON_STATE_ENABLED;
8906       }
8907       parts {
8908          part { name: "button_image";
8909             type: RECT;
8910             scale: 1;
8911             description { state: "default" 0.0;
8912                min: 20 30;
8913                rel1.offset: 5 5;
8914                rel2.offset: -6 -6;
8915                color: 0 0 0 0;
8916                visible: 0;
8917             }
8918             description { state: "clicked" 0.0;
8919                inherit: "default" 0.0;
8920                visible: 1;
8921             }
8922          }
8923          part { name: "padding_left_top";
8924             type: RECT;
8925             scale: 1;
8926             mouse_events: 0;
8927             description { state: "default" 0.0;
8928                align: 0.0 0.0;
8929                rel2.relative: 0.0 0.0;
8930                min: 10 5;
8931                fixed: 1 1;
8932                visible: 0;
8933             }
8934          }
8935          part { name: "padding_right_bottom";
8936             type: RECT;
8937             scale: 1;
8938             mouse_events: 0;
8939             description { state: "default" 0.0;
8940                align: 1.0 1.0;
8941                rel1.relative: 1.0 1.0;
8942                min: 10 5;
8943                fixed: 1 1;
8944                visible: 0;
8945             }
8946          }
8947          part { name: "icon_rect";
8948             type: RECT;
8949             scale: 1;
8950             mouse_events: 0;
8951             description { state: "default" 0.0;
8952                min: 0 0;
8953                fixed: 1 0;
8954                rel1 {
8955                   relative: 1.0 1.0;
8956                   to: "padding_left_top";
8957                }
8958                rel2 {
8959                   relative: 1.0 0.0;
8960                   to_x: "padding_left_top";
8961                   to_y: "padding_right_bottom";
8962                }
8963                align: 0.0 0.5;
8964                color: 0 0 0 0;
8965             }
8966             description { state: "visible" 0.0;
8967                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8968                fixed: 1 0;
8969                rel1 {
8970                   relative: 1.0 1.0;
8971                   to: "padding_left_top";
8972                }
8973                rel2 {
8974                   relative: 1.0 0.0;
8975                   to_x: "padding_left_top";
8976                   to_y: "padding_right_bottom";
8977                }
8978                align: 0.0 0.5;
8979                color: 0 0 0 0;
8980             }
8981             description { state: "icononly" 0.0;
8982                inherit: "default" 0.0;
8983             }
8984          }
8985          part { name: "padding_after_icon";
8986             type: RECT;
8987             scale: 1;
8988             mouse_events: 0;
8989             description { state: "default" 0.0; //when only icon or no icon is there
8990                align: 0.0 0.0;
8991                rel1 {
8992                   relative: 1.0 0.0;
8993                   to: "icon_rect";
8994                }
8995                rel2.to: "icon_rect";
8996                fixed: 1 0;
8997                min: 0 0;
8998                color: 0 0 0 0;
8999             }
9000             description { state: "visible" 0.0;
9001                align: 0.0 0.0;
9002                rel1 {
9003                   relative: 1.0 0.0;
9004                   to: "icon_rect";
9005                }
9006                rel2.to: "icon_rect";
9007                fixed: 1 0;
9008                min: 6 0;
9009                color: 0 0 0 0;
9010             }
9011             description { state: "icononly" 0.0;
9012                inherit: "default" 0.0;
9013             }
9014          }
9015          part { name: "padding_before_text";
9016             type: RECT;
9017             scale: 1;
9018             mouse_events: 0;
9019             description { state: "default" 0.0; //when only icon or no icon is there
9020                align: 1.0 0.5;
9021                rel1 {
9022                   relative: 0.0 1.0;
9023                   to_x: "elm.text";
9024                   to_y: "padding_left_top";
9025                }
9026                rel2 {
9027                   relative: 0.0 0.0;
9028                   to_x: "elm.text";
9029                   to_y: "padding_right_bottom";
9030                }
9031                fixed: 1 0;
9032                min: 6 0;
9033                color: 0 0 0 0;
9034             }
9035          }
9036          part { name: "elm.swallow.content";
9037             type: SWALLOW;
9038             scale: 1;
9039             clip_to: "disabler";
9040             description { state: "default" 0.0;
9041                visible: 0;
9042                align: 0.0 0.5;
9043                rel1 {
9044                   relative: 1.0 1.0;
9045                   to: "padding_left_top";
9046                }
9047                rel2 {
9048                   relative: 1.0 0.0;
9049                   to_x: "padding_left_top";
9050                   to_y: "padding_right_bottom";
9051                }
9052                fixed: 1 0;
9053             }
9054             description { state: "visible" 0.0;
9055                fixed: 1 0;
9056                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9057                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9058                align: 1.0 0.5;
9059                rel1 {
9060                   relative: 0.0 1.0;
9061                   to_x: "padding_before_text";
9062                   to_y: "padding_left_top";
9063                }
9064                rel2 {
9065                   relative: 0.0 0.0;
9066                   to_x: "padding_before_text";
9067                   to_y: "padding_right_bottom";
9068                }
9069                aspect: 1.0 1.0;
9070                aspect_preference: VERTICAL;
9071             }
9072             description { state: "icononly" 0.0;
9073                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9074                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9075                rel1 {
9076                   relative: 1.0 1.0;
9077                   to: "padding_left_top";
9078                }
9079                rel2 {
9080                   relative: 0.0 0.0;
9081                   to: "padding_right_bottom";
9082                }
9083                aspect: 1.0 1.0;
9084                aspect_preference: VERTICAL;
9085             }
9086          }
9087          part { name: "elm.text";
9088             type: TEXT;
9089             mouse_events: 0;
9090             scale: 1;
9091             clip_to: "disabler";
9092             description { state: "default" 0.0;
9093                visible: 0;
9094                rel1 {
9095                   relative: 1.0 1.0;
9096                   to_x: "padding_after_icon";
9097                   to_y: "padding_left_top";
9098                }
9099                rel2 {
9100                   relative: 0.0 0.0;
9101                   to: "padding_right_bottom";
9102                }
9103                align: 1.0 0.5;
9104                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
9105                text {
9106                   font: "SLP:style=Medium";
9107                   size: 20;
9108                   min: 0 0;
9109                   max: 1 0;
9110                   align: 1.0 0.5;
9111                }
9112             }
9113             description { state: "visible" 0.0;
9114                inherit: "default" 0.0;
9115                visible: 1;
9116             }
9117             description { state: "clicked" 0.0;
9118                inherit: "default" 0.0;
9119                visible: 1;
9120                min: 0 0;
9121             }
9122             description { state: "focused" 0.0;
9123                inherit: "default" 0.0;
9124                visible: 1;
9125                min: 0 0;
9126                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
9127             }
9128          }
9129          part { name: "over2";
9130             type: RECT;
9131             repeat_events: 1;
9132             ignore_flags: ON_HOLD;
9133             description { state: "default" 0.0;
9134                color: 0 0 0 0;
9135             }
9136          }
9137          part { name: "over3";
9138             type: RECT;
9139             repeat_events: 1;
9140             description { state: "default" 0.0;
9141                color: 0 0 0 0;
9142             }
9143          }
9144          part { name: "disabler";
9145             type: RECT;
9146             description { state: "default" 0.0;
9147                color: 255 255 255 255;
9148             }
9149             description { state: "disabled" 0.0;
9150                color: 255 255 255 127;
9151             }
9152          }
9153       }
9154       programs {
9155          program { name: "button_click";
9156             signal: "mouse,down,1";
9157             source: "over2";
9158             action: SIGNAL_EMIT "elm,action,press" "";
9159             after: "button_click_anim";
9160          }
9161          program { name: "button_click_anim";
9162             action: STATE_SET "clicked" 0.0;
9163             target: "button_image";
9164             after: "text_clicked";
9165          }
9166          program { name: "text_clicked";
9167             script {
9168                new st[31];
9169                new Float:vl;
9170                get_state(PART:"elm.text", st, 30, vl);
9171                if (!strcmp(st, "visible"))
9172                  set_state(PART:"elm.text", "clicked", 0.0);
9173             }
9174          }
9175          program { name: "button_unpress";
9176             action: SIGNAL_EMIT "elm,action,unpress" "";
9177          }
9178          program { name: "button_mouseout_clicked";
9179             signal: "mouse,up,1";
9180             source: "over3";
9181             script {
9182                new st[31];
9183                new Float:vl;
9184                get_state(PART:"elm.swallow.content", st, 30, vl);
9185                if (strcmp(st, "icononly"))
9186                  {
9187                     emit("elm,action,default,text,set", "");
9188                     set_state(PART:"elm.text", "visible", 0.0);
9189                  }
9190                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9191                  set_state(PART:"button_image", "default", 0.0);
9192             }
9193             after: button_unpress;
9194          }
9195          program { name: "button_unclick3";
9196             signal: "mouse,clicked,1";
9197             source: "over2";
9198             action: SIGNAL_EMIT "elm,action,click" "";
9199          }
9200          program { name: "text_show";
9201             signal: "elm,state,text,visible";
9202             source: "elm";
9203             script {
9204                new st[31];
9205                new Float:vl;
9206                get_state(PART:"elm.swallow.content", st, 30, vl);
9207                if (!strcmp(st, "icononly"))
9208                  {
9209                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9210                     set_state(PART:"icon_rect", "visible", 0.0);
9211                     set_state(PART:"padding_after_icon", "visible", 0.0);
9212                  }
9213                set_state(PART:"elm.text", "visible", 0.0);
9214             }
9215          }
9216          program { name: "text_hide";
9217             signal: "elm,state,text,hidden";
9218             source: "elm";
9219             script {
9220                new st[31];
9221                new Float:vl;
9222                get_state(PART:"elm.swallow.content", st, 30, vl);
9223                if (!strcmp(st, "visible"))
9224                  {
9225                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9226                     set_state(PART:"icon_rect", "icononly", 0.0);
9227                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9228                  }
9229                set_state(PART:"elm.text", "default", 0.0);
9230             }
9231          }
9232          program { name: "icon_show";
9233             signal: "elm,state,icon,visible";
9234             source: "elm";
9235             script {
9236                new st[31];
9237                new Float:vl;
9238                get_state(PART:"elm.text", st, 30, vl);
9239                if (!strcmp(st, "visible"))
9240                  {
9241                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9242                     set_state(PART:"icon_rect", "visible", 0.0);
9243                     set_state(PART:"padding_after_icon", "visible", 0.0);
9244                  }
9245                else
9246                  {
9247                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9248                     set_state(PART:"icon_rect", "icononly", 0.0);
9249                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9250                  }
9251             }
9252          }
9253          program { name: "icon_hide";
9254             signal: "elm,state,icon,hidden";
9255             source: "elm";
9256             action: STATE_SET "default" 0.0;
9257             target: "elm.swallow.content";
9258             target: "icon_rect";
9259             target: "padding_after_icon";
9260          }
9261          program { name: "disable";
9262             signal: "elm,state,disabled";
9263             source: "elm";
9264             action: STATE_SET "disabled" 0.0;
9265             target: "disabler";
9266             after: "disable_text";
9267          }
9268          program { name: "disable_text";
9269             script {
9270                new st[31];
9271                new Float:vl;
9272                set_int(button_state, BUTTON_STATE_DISABLED);
9273                get_state(PART:"elm.text", st, 30, vl);
9274                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9275                  set_state(PART:"elm.text", "visible", 0.0);
9276             }
9277          }
9278          program { name: "enable";
9279             signal: "elm,state,enabled";
9280             source: "elm";
9281             action: STATE_SET "default" 0.0;
9282             target: "disabler";
9283             after: "enable_text";
9284          }
9285          program { name: "enable_text";
9286             script {
9287                new st[31];
9288                new Float:vl;
9289                set_int(button_state, BUTTON_STATE_ENABLED);
9290                get_state(PART:"elm.text", st, 30, vl);
9291                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9292                  set_state(PART:"elm.text", "visible", 0.0);
9293             }
9294          }
9295          program { name: "focused";
9296             action: STATE_SET "focused" 0.0;
9297             target: "button_image";
9298             target: "elm.text";
9299          }
9300          program { name: "unfocused";
9301             action: STATE_SET "default" 0.0;
9302             target: "button_image";
9303             after: "unfocus_text";
9304          }
9305          program { name: "unfocus_text";
9306             action: STATE_SET "visible" 0.0;
9307             target: "elm.text";
9308          }
9309       }
9310    }
9311
9312 ///////////////////////////////////////////////////////////////////////////////////////
9313    group { name: "elm/button/base/tickernoti";
9314       images {
9315          image: "00_button_06_normal.png" COMP;
9316          image: "00_button_06_press.png" COMP;
9317          image: "00_button_06_dim.png" COMP;
9318       }
9319       script {
9320          public button_state = BUTTON_STATE_ENABLED;
9321       }
9322       parts {
9323          part { name: "button_image";
9324             scale: 1;
9325             description { state: "default" 0.0;
9326                image {
9327                   normal: "00_button_06_normal.png";
9328                   border: BUTTON_TICKERNOTI_BG_BORDER_INC;
9329                   border_scale: 1;
9330                }
9331             }
9332             description { state: "clicked" 0.0;
9333                inherit: "default" 0.0;
9334                image.normal: "00_button_06_press.png";
9335             }
9336             description { state: "disabled" 0.0;
9337                inherit: "default" 0.0;
9338                image.normal: "00_button_06_dim.png";
9339             }
9340             description { state: "focused" 0.0;
9341                inherit: "default" 0.0;
9342                image.normal: "00_button_06_press.png";
9343             }
9344          }
9345          part { name: "padding_left_top";
9346             type: RECT;
9347             scale: 1;
9348             mouse_events: 0;
9349             description { state: "default" 0.0;
9350                align: 0.0 0.0;
9351                rel2.relative: 0.0 0.0;
9352                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
9353                fixed: 1 1;
9354                visible: 0;
9355             }
9356          }
9357          part { name: "bg";
9358             type: RECT;
9359             scale: 1;
9360             mouse_events: 0;
9361             description { state: "default" 0.0;
9362                min: BUTTON_TICKERNOTI_BG_MIN_INC;
9363                visible: 0;
9364             }
9365             description { state: "visible" 0.0;
9366                inherit: "default" 0.0;
9367                min: BUTTON_TICKERNOTI_VISIBLE_BG_MIN_INC;
9368             }
9369             description { state: "icononly" 0.0;
9370                inherit: "default" 0.0;
9371                min: BUTTON_TICKERNOTI_ICONONLY_BG_MIN_INC;
9372             }
9373          }
9374          part { name: "padding_right_bottom";
9375             type: RECT;
9376             scale: 1;
9377             mouse_events: 0;
9378             description { state: "default" 0.0;
9379                align: 1.0 1.0;
9380                rel1.relative: 1.0 1.0;
9381                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
9382                fixed: 1 1;
9383                visible: 0;
9384             }
9385          }
9386          part { name: "icon_rect";
9387             type: RECT;
9388             scale: 1;
9389             mouse_events: 0;
9390             description { state: "default" 0.0;
9391                visible: 0;
9392                min: 0 0;
9393                fixed: 1 0;
9394                rel1 {
9395                   relative: 1.0 1.0;
9396                   to: "padding_left_top";
9397                }
9398                rel2 {
9399                   relative: 1.0 0.0;
9400                   to_x: "padding_left_top";
9401                   to_y: "padding_right_bottom";
9402                }
9403                align: 0.0 0.5;
9404             }
9405             description { state: "visible" 0.0;
9406                visible: 0;
9407                min: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
9408                max: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
9409                fixed: 1 0;
9410                rel1 {
9411                   relative: 1.0 1.0;
9412                   to: "padding_left_top";
9413                }
9414                rel2 {
9415                   relative: 1.0 0.0;
9416                   to_x: "padding_left_top";
9417                   to_y: "padding_right_bottom";
9418                }
9419                align: 0.0 0.5;
9420             }
9421             description { state: "icononly" 0.0;
9422                inherit: "default" 0.0;
9423             }
9424          }
9425          part { name: "padding_after_icon";
9426             type: RECT;
9427             scale: 1;
9428             mouse_events: 0;
9429             description { state: "default" 0.0; //when only icon or no icon is there
9430                align: 0.0 0.0;
9431                rel1 {
9432                   relative: 1.0 0.0;
9433                   to: "icon_rect";
9434                }
9435                rel2.to: "icon_rect";
9436                fixed: 1 0;
9437                min: 0 0;
9438                visible: 0;
9439             }
9440             description { state: "visible" 0.0;
9441                visible: 0;
9442                align: 0.0 0.0;
9443                rel1 {
9444                   relative: 1.0 0.0;
9445                   to: "icon_rect";
9446                }
9447                rel2.to: "icon_rect";
9448                fixed: 1 0;
9449                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
9450             }
9451             description { state: "icononly" 0.0;
9452                inherit: "default" 0.0;
9453             }
9454          }
9455          part { name: "padding_before_text";
9456             type: RECT;
9457             scale: 1;
9458             mouse_events: 0;
9459             description { state: "default" 0.0; //when only icon or no icon is there
9460                align: 1.0 0.5;
9461                rel1 {
9462                   relative: 0.0 1.0;
9463                   to_x: "elm.text";
9464                   to_y: "padding_left_top";
9465                }
9466                rel2 {
9467                   relative: 0.0 0.0;
9468                   to_x: "elm.text";
9469                   to_y: "padding_right_bottom";
9470                }
9471                fixed: 1 0;
9472                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
9473                visible: 0;
9474             }
9475          }
9476          part { name: "elm.swallow.content";
9477             type: SWALLOW;
9478             scale: 1;
9479             clip_to: "clipper";
9480             description { state: "default" 0.0;
9481                visible: 0;
9482                align: 0.0 0.5;
9483                rel1 {
9484                   relative: 1.0 1.0;
9485                   to: "padding_left_top";
9486                }
9487                rel2 {
9488                   relative: 1.0 0.0;
9489                   to_x: "padding_left_top";
9490                   to_y: "padding_right_bottom";
9491                }
9492                fixed: 1 0;
9493             }
9494             description { state: "visible" 0.0;
9495                fixed: 1 0;
9496                min: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
9497                max: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
9498                align: 1.0 0.5;
9499                rel1 {
9500                   relative: 0.0 1.0;
9501                   to_x: "padding_before_text";
9502                   to_y: "padding_left_top";
9503                }
9504                rel2 {
9505                   relative: 0.0 0.0;
9506                   to_x: "padding_before_text";
9507                   to_y: "padding_right_bottom";
9508                }
9509             }
9510             description { state: "icononly" 0.0;
9511                min: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
9512                max: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
9513             }
9514          }
9515          part { name: "elm.text";
9516             type: TEXT;
9517             mouse_events: 0;
9518             scale: 1;
9519             clip_to: "clipper";
9520             description { state: "default" 0.0;
9521                visible: 0;
9522                rel1 {
9523                   relative: 1.0 1.0;
9524                   to_x: "padding_after_icon";
9525                   to_y: "padding_left_top";
9526                }
9527                rel2 {
9528                   relative: 0.0 0.0;
9529                   to: "padding_right_bottom";
9530                }
9531                color: BUTTON_TICKERNOTI_NORMAL_COLOR_INC;
9532                text {
9533                   font: "SLP:style=Medium";
9534                   size: BUTTON_TICKERNOTI_FONT_SIZE_INC;
9535                   min: 1 0;
9536                   max: 1 0;
9537                }
9538             }
9539             description { state: "visible" 0.0;
9540                inherit: "default" 0.0;
9541                visible: 1;
9542             }
9543             description { state: "clicked" 0.0;
9544                inherit: "default" 0.0;
9545                visible: 1;
9546                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
9547             }
9548             description { state: "disabled" 0.0;
9549                inherit: "default" 0.0;
9550                color: 0 0 0 128;
9551             }
9552             description { state: "disabled_visible" 0.0;
9553                inherit: "default" 0.0;
9554                color: BUTTON_TICKERNOTI_DISABLED_COLOR_INC;
9555                visible: 1;
9556             }
9557             description { state: "focused" 0.0;
9558                inherit: "default" 0.0;
9559                visible: 1;
9560                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
9561             }
9562          }
9563          part { name: "over2";
9564             type: RECT;
9565             repeat_events: 1;
9566             ignore_flags: ON_HOLD;
9567             description { state: "default" 0.0;
9568                color: 0 0 0 0;
9569             }
9570          }
9571          part { name: "over3";
9572             type: RECT;
9573             repeat_events: 1;
9574             description { state: "default" 0.0;
9575                color: 0 0 0 0;
9576             }
9577          }
9578          part { name: "clipper";
9579             type: RECT;
9580             description { state: "default" 0.0;
9581                color: 255 255 255 255;
9582             }
9583          }
9584          part { name: "disabler";
9585             type: RECT;
9586             description { state: "default" 0.0;
9587                color: 0 0 0 0;
9588                visible: 0;
9589             }
9590             description { state: "disabled" 0.0;
9591                inherit: "default" 0.0;
9592                visible: 1;
9593             }
9594          }
9595       }
9596       programs {
9597          program { name: "button_click";
9598             signal: "mouse,down,1";
9599             source: "over2";
9600             action: SIGNAL_EMIT "elm,action,press" "";
9601             after: "button_click_anim";
9602          }
9603          program { name: "button_click_anim";
9604             action: STATE_SET "clicked" 0.0;
9605             target: "button_image";
9606             after: "text_clicked";
9607          }
9608          program { name: "text_clicked";
9609             script {
9610                new st[31];
9611                new Float:vl;
9612                get_state(PART:"elm.text", st, 30, vl);
9613                if (!strcmp(st, "visible"))
9614                  set_state(PART:"elm.text", "clicked", 0.0);
9615             }
9616          }
9617          program { name: "button_unpress";
9618             action: SIGNAL_EMIT "elm,action,unpress" "";
9619          }
9620          program { name: "button_mouseout_clicked";
9621             signal: "mouse,up,1";
9622             source: "over3";
9623             script {
9624                new st[31];
9625                new Float:vl;
9626                get_state(PART:"elm.swallow.content", st, 30, vl);
9627                if (strcmp(st, "icononly"))
9628                  {
9629                     emit("elm,action,default,text,set", "");
9630                     set_state(PART:"elm.text", "visible", 0.0);
9631                  }
9632                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9633                  set_state(PART:"button_image", "default", 0.0);
9634             }
9635             after: button_unpress;
9636          }
9637          program { name: "button_unclick3";
9638             signal: "mouse,clicked,1";
9639             source: "over2";
9640             action: SIGNAL_EMIT "elm,action,click" "";
9641          }
9642          program { name: "text_show";
9643             signal: "elm,state,text,visible";
9644             source: "elm";
9645             script {
9646                new st[31];
9647                new Float:vl;
9648                get_state(PART:"elm.swallow.content", st, 30, vl);
9649                if (!strcmp(st, "icononly"))
9650                  {
9651                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9652                     set_state(PART:"icon_rect", "visible", 0.0);
9653                     set_state(PART:"padding_after_icon", "visible", 0.0);
9654                     set_state(PART:"bg", "visible", 0.0);
9655                  }
9656                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9657                  set_state(PART:"elm.text", "visible", 0.0);
9658                else
9659                  set_state(PART:"elm.text", "disabled_visible", 0.0);
9660             }
9661          }
9662          program { name: "text_hide";
9663             signal: "elm,state,text,hidden";
9664             source: "elm";
9665             script {
9666                new st[31];
9667                new Float:vl;
9668                get_state(PART:"elm.swallow.content", st, 30, vl);
9669                if (!strcmp(st, "visible"))
9670                  {
9671                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9672                     set_state(PART:"icon_rect", "icononly", 0.0);
9673                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9674                     set_state(PART:"bg", "icononly", 0.0);
9675                  }
9676                set_state(PART:"elm.text", "default", 0.0);
9677             }
9678          }
9679          program { name: "icon_show";
9680             signal: "elm,state,icon,visible";
9681             source: "elm";
9682             script {
9683                new st[31];
9684                new Float:vl;
9685                get_state(PART:"elm.text", st, 30, vl);
9686                if (!strcmp(st, "visible"))
9687                  {
9688                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9689                     set_state(PART:"icon_rect", "visible", 0.0);
9690                     set_state(PART:"padding_after_icon", "visible", 0.0);
9691                     set_state(PART:"bg", "visible", 0.0);
9692                  }
9693                else
9694                  {
9695                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9696                     set_state(PART:"icon_rect", "icononly", 0.0);
9697                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9698                     set_state(PART:"bg", "icononly", 0.0);
9699                  }
9700             }
9701          }
9702          program { name: "icon_hide";
9703             signal: "elm,state,icon,hidden";
9704             source: "elm";
9705             action: STATE_SET "default" 0.0;
9706             target: "elm.swallow.content";
9707             target: "padding_after_icon";
9708             target: "icon_rect";
9709             target: "bg";
9710          }
9711          program { name: "disable";
9712             signal: "elm,state,disabled";
9713             source: "elm";
9714             action: STATE_SET "disabled" 0.0;
9715             target: "button_image";
9716             target: "disabler";
9717             after: "disable_text";
9718          }
9719          program { name: "disable_text";
9720             script {
9721                new st[31];
9722                new Float:vl;
9723                get_state(PART:"elm.text", st, 30, vl);
9724                if (!strcmp(st, "visible"))
9725                  set_state(PART:"elm.text", "disabled_visible", 0.0);
9726                else
9727                  set_state(PART:"elm.text", "disabled", 0.0);
9728                set_int(button_state, BUTTON_STATE_DISABLED);
9729             }
9730          }
9731          program { name: "enable";
9732             signal: "elm,state,enabled";
9733             source: "elm";
9734             action: STATE_SET "default" 0.0;
9735             target: "button_image";
9736             target: "disabler";
9737             after: "enable_text";
9738          }
9739          program { name: "enable_text";
9740             script {
9741                new st[31];
9742                new Float:vl;
9743                get_state(PART:"elm.text", st, 30, vl);
9744                if (!strcmp(st, "disabled_visible"))
9745                  set_state(PART:"elm.text", "visible", 0.0);
9746                else
9747                  set_state(PART:"elm.text", "default", 0.0);
9748                set_int(button_state, BUTTON_STATE_ENABLED);
9749             }
9750          }
9751          program { name: "focused";
9752             //signal: "elm,action,focus";
9753             //source: "elm";
9754             action: STATE_SET "focused" 0.0;
9755             target: "button_image";
9756             target: "elm.text";
9757          }
9758          program { name: "unfocused";
9759             //signal: "elm,action,unfocus";
9760             //source: "elm";
9761             action: STATE_SET "default" 0.0;
9762             target: "button_image";
9763             after: "unfocus_text";
9764          }
9765          program { name: "unfocus_text";
9766             action: STATE_SET "visible" 0.0;
9767             target: "elm.text";
9768          }
9769       }
9770    }
9771
9772 ///////////////////////////////////////////////////////////////////////////////////////
9773    group { name: "elm/button/base/expandable_number";
9774       alias: "elm/button/base/text_only/expandable_number";
9775       images {
9776          image: "00_button_05_normal.png" COMP;
9777          image: "00_button_05_press.png" COMP;
9778          image: "00_button_05_dim.png" COMP;
9779          image: "00_arrow_expand.png" COMP;
9780          image: "00_arrow_expand_press.png" COMP;
9781          image: "00_arrow_expand_dim.png" COMP;
9782       }
9783       script {
9784          public button_state = BUTTON_STATE_ENABLED;
9785       }
9786       parts {
9787          part { name: "button_image";
9788             scale: 1;
9789             description { state: "default" 0.0;
9790                min: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
9791                max: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
9792                image {
9793                   normal: "00_button_05_normal.png";
9794                   border: BUTTON_EXPANDABLE_NUMBER_BG_BORDER_INC;
9795                   border_scale: 1;
9796                }
9797             }
9798             description { state: "clicked" 0.0;
9799                inherit: "default" 0.0;
9800                image.normal: "00_button_05_press.png";
9801             }
9802             description { state: "disabled" 0.0;
9803                inherit: "default" 0.0;
9804                image.normal: "00_button_05_dim.png";
9805             }
9806             description { state: "focused" 0.0;
9807                inherit: "default" 0.0;
9808                image.normal: "00_button_05_press.png";
9809             }
9810          }
9811          part { name: "padding_left_top";
9812             type: RECT;
9813             scale: 1;
9814             mouse_events: 0;
9815             description { state: "default" 0.0;
9816                align: 0.0 0.0;
9817                rel2.relative: 0.0 0.0;
9818                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
9819                fixed: 1 1;
9820                visible: 0;
9821             }
9822          }
9823          part { name: "padding_right_bottom";
9824             type: RECT;
9825             scale: 1;
9826             mouse_events: 0;
9827             description { state: "default" 0.0;
9828                align: 1.0 1.0;
9829                rel1.relative: 1.0 1.0;
9830                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
9831                fixed: 1 1;
9832                visible: 0;
9833             }
9834          }
9835          part { name: "icon_rect";
9836             type: RECT;
9837             scale: 1;
9838             mouse_events: 0;
9839             description { state: "default" 0.0;
9840                visible: 0;
9841                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9842                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9843                fixed: 1 0;
9844                rel1 {
9845                   relative: 0.0 1.0;
9846                   to_x: "padding_right_bottom";
9847                   to_y: "padding_left_top";
9848                }
9849                rel2 {
9850                   relative: 0.0 0.0;
9851                   to: "padding_right_bottom";
9852                }
9853                align: 1.0 0.5;
9854                color: 0 0 0 0;
9855             }
9856          }
9857          part { name: "arrow_expand";
9858             scale: 1;
9859             mouse_events: 0;
9860             description { state: "default" 0.0;
9861                align: 0.0 0.5;
9862                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9863                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9864                fixed: 0 0;
9865                rel1.to: "icon_rect";
9866                rel2.to: "icon_rect";
9867                image.normal:"00_arrow_expand.png";
9868             }
9869             description { state: "clicked" 0.0;
9870                inherit: "default" 0.0;
9871                image.normal:"00_arrow_expand_press.png";
9872             }
9873             description { state: "disabled" 0.0;
9874                inherit: "default" 0.0;
9875                image.normal:"00_arrow_expand_dim.png";
9876             }
9877          }
9878          part { name: "elm.text";
9879             type: TEXT;
9880             mouse_events: 0;
9881             scale: 1;
9882             description { state: "default" 0.0;
9883                min: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
9884                max: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
9885                fixed:1 0;
9886                rel1 {
9887                   relative: 1.0 1.0;
9888                   to: "padding_left_top";
9889                }
9890                rel2 {
9891                   relative: 1.0 1.0;
9892                   to_x:"padding_left_top";
9893                   to_y:"padding_right_bottom";
9894                }
9895                align: 0.0 0.5;
9896                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
9897                text {
9898                   font: "SLP:style=Medium";
9899                   size: BUTTON_EXPANDABLE_NUMBER_FONT_SIZE_INC;
9900                   min: 0 0;
9901                   fit: 1 1;
9902                   size_range: 14 20;
9903                }
9904             }
9905             description { state: "visible" 0.0;
9906                inherit: "default" 0.0;
9907             }
9908             description { state: "clicked" 0.0;
9909                inherit: "default" 0.0;
9910                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
9911             }
9912             description { state: "disabled" 0.0;
9913                inherit: "default" 0.0;
9914                color: 0 0 0 128;
9915             }
9916             description { state: "disabled_visible" 0.0;
9917                inherit: "default" 0.0;
9918                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
9919             }
9920             description { state: "focused" 0.0;
9921                inherit: "default" 0.0;
9922                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
9923             }
9924          }
9925          part { name: "over2";
9926             type: RECT;
9927             repeat_events: 1;
9928             ignore_flags: ON_HOLD;
9929             description { state: "default" 0.0;
9930                color: 0 0 0 0;
9931             }
9932          }
9933          part { name: "over3";
9934             type: RECT;
9935             repeat_events: 1;
9936             description { state: "default" 0.0;
9937                color: 0 0 0 0;
9938             }
9939          }
9940          part { name: "disabler";
9941             type: RECT;
9942             description { state: "default" 0.0;
9943                color: 0 0 0 0;
9944                visible: 0;
9945             }
9946             description { state: "disabled" 0.0;
9947                inherit: "default" 0.0;
9948                visible: 1;
9949             }
9950          }
9951       }
9952       programs {
9953          program { name: "button_click";
9954             signal: "mouse,down,1";
9955             source: "over2";
9956             action: SIGNAL_EMIT "elm,action,press" "";
9957             after: "button_click_anim";
9958          }
9959          program { name: "button_click_anim";
9960             action: STATE_SET "clicked" 0.0;
9961             target: "button_image";
9962             target: "arrow_expand";
9963             after: "text_clicked";
9964          }
9965          program { name: "text_clicked";
9966             script {
9967                new st[31];
9968                new Float:vl;
9969                get_state(PART:"elm.text", st, 30, vl);
9970                if (!strcmp(st, "visible"))
9971                  set_state(PART:"elm.text", "clicked", 0.0);
9972             }
9973          }
9974          program { name: "button_unpress";
9975             action: SIGNAL_EMIT "elm,action,unpress" "";
9976          }
9977          program { name: "button_mouseout_clicked";
9978             signal: "mouse,up,1";
9979             source: "over3";
9980             script {
9981                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9982                  {
9983                     set_state(PART:"button_image", "default", 0.0);
9984                     set_state(PART:"elm.text", "visible", 0.0);
9985                     set_state(PART:"arrow_expand", "default", 0.0);
9986                  }
9987             }
9988             after: button_unpress;
9989          }
9990          program { name: "button_unclick3";
9991             signal: "mouse,clicked,1";
9992             source: "over2";
9993             action: SIGNAL_EMIT "elm,action,click" "";
9994          }
9995          program { name: "text_show";
9996             signal: "elm,state,text,visible";
9997             source: "elm";
9998             script {
9999                if (get_int(button_state) != BUTTON_STATE_DISABLED)
10000                  set_state(PART:"elm.text", "visible", 0.0);
10001                else
10002                  set_state(PART:"elm.text", "disabled_visible", 0.0);
10003             }
10004          }
10005          program { name: "text_hide";
10006             signal: "elm,state,text,hidden";
10007             source: "elm";
10008             script {
10009                set_state(PART:"elm.text", "default", 0.0);
10010             }
10011          }
10012          program { name: "disable";
10013             signal: "elm,state,disabled";
10014             source: "elm";
10015             action: STATE_SET "disabled" 0.0;
10016             target: "button_image";
10017             target: "disabler";
10018             after: "disable_text";
10019          }
10020          program { name: "disable_text";
10021             script {
10022                new st[31];
10023                new Float:vl;
10024                get_state(PART:"elm.text", st, 30, vl);
10025                if (!strcmp(st, "visible"))
10026                  set_state(PART:"elm.text", "disabled_visible", 0.0);
10027                else
10028                  set_state(PART:"elm.text", "disabled", 0.0);
10029                set_int(button_state, BUTTON_STATE_DISABLED);
10030             }
10031          }
10032          program { name: "enable";
10033             signal: "elm,state,enabled";
10034             source: "elm";
10035             action: STATE_SET "default" 0.0;
10036             target: "button_image";
10037             target: "disabler";
10038             after: "enable_text";
10039          }
10040          program { name: "enable_text";
10041             script {
10042                new st[31];
10043                new Float:vl;
10044                get_state(PART:"elm.text", st, 30, vl);
10045                if (!strcmp(st, "disabled_visible"))
10046                  set_state(PART:"elm.text", "visible", 0.0);
10047                else
10048                  set_state(PART:"elm.text", "default", 0.0);
10049                set_int(button_state, BUTTON_STATE_ENABLED);
10050             }
10051          }
10052          program { name: "focused";
10053             //signal: "elm,action,focus";
10054             //source: "elm";
10055             action: STATE_SET "focused" 0.0;
10056             target: "button_image";
10057             target: "elm.text";
10058          }
10059          program { name: "unfocused";
10060             //signal: "elm,action,unfocus";
10061             //source: "elm";
10062             action: STATE_SET "default" 0.0;
10063             target: "button_image";
10064             after: "unfocus_text";
10065          }
10066          program { name: "unfocus_text";
10067             action: STATE_SET "visible" 0.0;
10068             target: "elm.text";
10069          }
10070       }
10071    }
10072
10073 #undef BUTTON_STATE_ENABLED
10074 #undef BUTTON_STATE_DISABLED