Merge "[Genlist] Modify font color and size properly"
[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                color: 0 0 0 128;
5521             }
5522             description { state: "focused" 0.0;
5523                inherit: "default" 0.0;
5524             }
5525          }
5526          part { name: "padding.left";
5527             type: RECT;
5528             scale: 1;
5529             description { state: "default" 0.0;
5530                visible: 0;
5531                min: BUTTON_CONTACT_PADDING_MIN_INC;
5532                fixed: 1 0;
5533                color: 0 0 0 0;
5534                rel2 {
5535                   relative: 0.0 1.0;
5536                   to_x: "elm.text";
5537                }
5538                align: 1.0 0.0;
5539             }
5540          }
5541          part { name: "padding.right";
5542             type: RECT;
5543             scale: 1;
5544             description { state: "default" 0.0;
5545                visible: 0;
5546                min: BUTTON_CONTACT_PADDING_MIN_INC;
5547                fixed: 1 0;
5548                color: 0 0 0 0;
5549                rel1 {
5550                   relative: 1.0 0.0;
5551                   to_x: "elm.text";
5552                }
5553                align: 0.0 0.0;
5554             }
5555          }
5556          part {   name: "elm.text";
5557             type: TEXT;
5558             mouse_events: 0;
5559             scale: 1;
5560             description { state: "default" 0.0;
5561                visible: 0;
5562                fixed: 1 1;
5563                color: BUTTON_CONTACT_BUTTON_TEXT_NORMAL_COLOR_INC;
5564                text {
5565                   font: "SLP:style=Medium";
5566                   size: BUTTON_CONTACT_FONT_SIZE_INC;
5567                   min: 1 1;
5568                }
5569             }
5570             description { state: "visible" 0.0;
5571                inherit: "default" 0.0;
5572                visible: 1;
5573                min: 1 1;
5574             }
5575             description { state: "clicked" 0.0;
5576                inherit: "default" 0.0;
5577                visible: 1;
5578                min: 1 1;
5579                color: BUTTON_CONTACT_BUTTON_TEXT_PRESSED_COLOR_INC;
5580             }
5581             description { state: "disabled" 0.0;
5582                inherit: "default" 0.0;
5583                color: 0 0 0 128;
5584             }
5585             description { state: "disabled_visible" 0.0;
5586                inherit: "default" 0.0;
5587                color: BUTTON_CONTACT_BUTTON_TEXT_DISABLED_COLOR_INC;
5588                visible: 1;
5589                min: 1 1;
5590             }
5591             description { state: "focused" 0.0;
5592                inherit: "default" 0.0;
5593                visible: 1;
5594                min: 1 1;
5595                color: BUTTON_CONTACT_BUTTON_TEXT_FOCUSED_COLOR_INC;
5596             }
5597          }
5598          part { name: "over1";
5599             mouse_events: 0;
5600             description { state: "default" 0.0;
5601                rel2.relative: 1.0 0.5;
5602             }
5603          }
5604          part { name: "over2";
5605             repeat_events: 1;
5606             ignore_flags: ON_HOLD;
5607             description { state: "default" 0.0;
5608                rel1.to: "button_image";
5609                rel2.to: "button_image";
5610             }
5611          }
5612          part { name: "over3";
5613             repeat_events: 1;
5614             description { state: "default" 0.0;
5615                rel1.to: "button_image";
5616                rel2.to: "button_image";
5617                color: 0 0 0 0;
5618             }
5619          }
5620          part { name: "disabler";
5621             type: RECT;
5622             description { state: "default" 0.0;
5623                rel1.to: "button_image";
5624                rel2.to: "button_image";
5625                color: 0 0 0 0;
5626                visible: 0;
5627             }
5628             description { state: "disabled" 0.0;
5629                inherit: "default" 0.0;
5630                visible: 1;
5631             }
5632          }
5633       }
5634       programs {
5635          program { name: "button_click";
5636             signal: "mouse,down,1";
5637             source: "over2";
5638             action: SIGNAL_EMIT "elm,action,press" "";
5639             after: "button_click_anim";
5640          }
5641          program { name: "button_click_anim";
5642             action: STATE_SET "clicked" 0.0;
5643             target: "button_image";
5644             target: "elm.text";
5645          }
5646          program { name: "button_unpress";
5647             action: SIGNAL_EMIT "elm,action,unpress" "";
5648          }
5649          program { name: "button_mouseout_clicked";
5650             signal: "mouse,up,1";
5651             source: "over3";
5652             script {
5653                new st[31];
5654                new Float:vl;
5655                get_state(PART:"elm.text", st, 30, vl);
5656                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
5657                  {
5658                     emit("elm,action,default,text,set", "");
5659                     set_state(PART:"elm.text", "visible", 0.0);
5660                  }
5661                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5662                  set_state(PART:"button_image", "default", 0.0);
5663             }
5664             after: button_unpress;
5665          }
5666          program { name: "button_unclick3";
5667             signal: "mouse,clicked,1";
5668             source: "over2";
5669             action: SIGNAL_EMIT "elm,action,click" "";
5670          }
5671          program { name: "text_show";
5672             signal: "elm,state,text,visible";
5673             source: "elm";
5674             script {
5675                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5676                  set_state(PART:"elm.text", "visible", 0.0);
5677                else
5678                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5679             }
5680          }
5681          program { name: "text_hide";
5682             signal: "elm,state,text,hidden";
5683             source: "elm";
5684             action: STATE_SET "default" 0.0;
5685             target: "elm.text";
5686          }
5687          program { name: "disable";
5688             signal: "elm,state,disabled";
5689             source: "elm";
5690             action: STATE_SET "disabled" 0.0;
5691             target: "button_image";
5692             target: "disabler";
5693             after: "disable_text";
5694          }
5695          program { name: "disable_text";
5696             script {
5697                new st[31];
5698                new Float:vl;
5699                get_state(PART:"elm.text", st, 30, vl);
5700                if (!strcmp(st, "visible"))
5701                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5702                else
5703                  set_state(PART:"elm.text", "disabled", 0.0);
5704                set_int(button_state, BUTTON_STATE_DISABLED);
5705             }
5706          }
5707          program { name: "enable";
5708             signal: "elm,state,enabled";
5709             source: "elm";
5710             action: STATE_SET "default" 0.0;
5711             target: "button_image";
5712             target: "disabler";
5713             after: "enable_text";
5714          }
5715          program { name: "enable_text";
5716             script {
5717                new st[31];
5718                new Float:vl;
5719                get_state(PART:"elm.text", st, 30, vl);
5720                if (!strcmp(st, "disabled_visible"))
5721                  set_state(PART:"elm.text", "visible", 0.0);
5722                else
5723                  set_state(PART:"elm.text", "default", 0.0);
5724                set_int(button_state, BUTTON_STATE_ENABLED);
5725             }
5726          }
5727          program { name: "focused";
5728             //signal: "elm,action,focus";
5729             //source: "elm";
5730             action: STATE_SET "focused" 0.0;
5731             target: "button_image";
5732             target: "elm.text";
5733          }
5734          program { name: "unfocused";
5735             //signal: "elm,action,unfocus";
5736             //source: "elm";
5737             action: STATE_SET "default" 0.0;
5738             target: "button_image";
5739             action: STATE_SET "visible" 0.0;
5740             target: "elm.text";
5741          }
5742       }
5743    }
5744
5745 ///////////////////////////////////////////////////////////////////////////////////////
5746    group { name: "elm/button/base/naviframe/back_btn/default";
5747       alias: "elm/button/base/naviframe/prev_btn/default";
5748       alias: "elm/button/base/naviframe/end_btn/default";
5749       images {
5750          image: "00_winset_Back_btn_normal.png" COMP;
5751          image: "00_winset_Back_btn_press.png" COMP;
5752          image: "00_winset_Back.png" COMP;
5753       }
5754       script {
5755          public button_state = BUTTON_STATE_ENABLED;
5756       }
5757       parts {
5758          part { name: "button_image";
5759             scale: 1;
5760             description { state: "default" 0.0;
5761                min: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC;
5762                max: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC;
5763                image {
5764                   normal: "00_winset_Back_btn_normal.png";
5765                   border: BUTTON_NAVIFRAME_BACK_BUTTON_BG_BORDER_INC;
5766                   border_scale: 1;
5767                }
5768             }
5769             description { state: "clicked" 0.0;
5770                inherit: "default" 0.0;
5771                image.normal: "00_winset_Back_btn_press.png";
5772             }
5773             description { state: "disabled" 0.0;
5774                inherit: "default" 0.0;
5775             }
5776             description { state: "focused" 0.0;
5777                inherit: "default" 0.0;
5778                image.normal: "00_winset_Back_btn_press.png";
5779             }
5780          }
5781          part { name: "back_button";
5782             scale: 1;
5783             mouse_events: 0;
5784             description { state: "default" 0.0;
5785                min: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC;
5786                max: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC;
5787                rel1.to: "button_image";
5788                rel2.to: "button_image";
5789                image.normal: "00_winset_Back.png";
5790             }
5791             description { state: "clicked" 0.0;
5792                inherit: "default" 0.0;
5793             }
5794          }
5795          part { name: "over2";
5796             type: RECT;
5797             repeat_events: 1;
5798             ignore_flags: ON_HOLD;
5799             description { state: "default" 0.0;
5800                color: 0 0 0 0;
5801             }
5802          }
5803          part { name: "over3";
5804             type: RECT;
5805             repeat_events: 1;
5806             description { state: "default" 0.0;
5807                color: 0 0 0 0;
5808             }
5809          }
5810          part { name: "disabler";
5811             type: RECT;
5812             description { state: "default" 0.0;
5813                color: 0 0 0 0;
5814                visible: 0;
5815             }
5816             description { state: "disabled" 0.0;
5817                inherit: "default" 0.0;
5818                visible: 1;
5819             }
5820          }
5821       }
5822       programs {
5823          program { name: "button_click";
5824             signal: "mouse,down,1";
5825             source: "over2";
5826             action: SIGNAL_EMIT "elm,action,press" "";
5827             after: "button_click_anim";
5828          }
5829          program { name: "button_click_anim";
5830             action: STATE_SET "clicked" 0.0;
5831             target: "button_image";
5832          }
5833          program { name: "button_unpress";
5834             action: SIGNAL_EMIT "elm,action,unpress" "";
5835          }
5836          program { name: "button_mouseout_clicked";
5837             signal: "mouse,up,1";
5838             source: "over3";
5839             script {
5840                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5841                  set_state(PART:"button_image", "default", 0.0);
5842             }
5843             after: button_unpress;
5844          }
5845          program { name: "button_unclick3";
5846             signal: "mouse,clicked,1";
5847             source: "over2";
5848             action: SIGNAL_EMIT "elm,action,click" "";
5849          }
5850          program { name: "disable";
5851             signal: "elm,state,disabled";
5852             source: "elm";
5853             action: STATE_SET "disabled" 0.0;
5854             target: "button_image";
5855             target: "disabler";
5856             after: "disable_button";
5857          }
5858          program { name: "disable_button";
5859             script {
5860                set_int(button_state, BUTTON_STATE_DISABLED);
5861             }
5862          }
5863          program { name: "enable";
5864             signal: "elm,state,enabled";
5865             source: "elm";
5866             action: STATE_SET "default" 0.0;
5867             target: "button_image";
5868             target: "disabler";
5869             after: "enable_button";
5870          }
5871          program { name: "enable_button";
5872             script {
5873                set_int(button_state, BUTTON_STATE_ENABLED);
5874             }
5875          }
5876       }
5877    }
5878
5879 ///////////////////////////////////////////////////////////////////////////////////////
5880    group { name: "elm/button/base/picker/prev/icon/default";
5881       images {
5882          image: "00_picker_btn_normal.png" COMP;
5883          image: "00_picker_btn_press.png" COMP;
5884          image: "00_picker_arrow_left.png" COMP;
5885          image: "00_picker_arrow_left_press.png" COMP;
5886       }
5887       script {
5888          public button_state = BUTTON_STATE_ENABLED;
5889       }
5890       parts {
5891          part { name: "button_image";
5892             scale: 1;
5893             description { state: "default" 0.0;
5894                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
5895                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
5896                image {
5897                   normal: "00_picker_btn_normal.png";
5898                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
5899                   border_scale: 1;
5900                }
5901             }
5902             description { state: "clicked" 0.0;
5903                inherit: "default" 0.0;
5904                image.normal: "00_picker_btn_press.png";
5905             }
5906             description { state: "disabled" 0.0;
5907                inherit: "default" 0.0;
5908             }
5909             description { state: "focused" 0.0;
5910                inherit: "default" 0.0;
5911                image.normal: "00_picker_btn_press.png";
5912             }
5913          }
5914          part { name: "padding_left_top";
5915             type: RECT;
5916             scale: 1;
5917             mouse_events: 0;
5918             description { state: "default" 0.0;
5919                align: 0.0 0.0;
5920                rel2.relative: 0.0 0.0;
5921                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
5922                fixed: 1 1;
5923                visible: 0;
5924             }
5925          }
5926          part { name: "padding_right_bottom";
5927             type: RECT;
5928             scale: 1;
5929             mouse_events: 0;
5930             description { state: "default" 0.0;
5931                align: 1.0 1.0;
5932                rel1.relative: 1.0 1.0;
5933                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
5934                fixed: 1 1;
5935                visible: 0;
5936             }
5937          }
5938          part { name: "left_arrow";
5939             scale: 1;
5940             mouse_events: 0;
5941             description { state: "default" 0.0;
5942                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
5943                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
5944                rel1 {
5945                   relative: 1.0 1.0;
5946                   to: "padding_left_top";
5947                }
5948                rel2 {
5949                   relative: 0.0 0.0;
5950                   to: "padding_right_bottom";
5951                }
5952                image.normal: "00_picker_arrow_left.png";
5953             }
5954             description { state: "clicked" 0.0;
5955                inherit: "default" 0.0;
5956                image.normal: "00_picker_arrow_left_press.png";
5957             }
5958          }
5959          part { name: "over2";
5960             type: RECT;
5961             repeat_events: 1;
5962             ignore_flags: ON_HOLD;
5963             description { state: "default" 0.0;
5964                color: 0 0 0 0;
5965             }
5966          }
5967          part { name: "over3";
5968             type: RECT;
5969             repeat_events: 1;
5970             description { state: "default" 0.0;
5971                color: 0 0 0 0;
5972             }
5973          }
5974          part { name: "disabler";
5975             type: RECT;
5976             description { state: "default" 0.0;
5977                color: 0 0 0 0;
5978                visible: 0;
5979             }
5980             description { state: "disabled" 0.0;
5981                inherit: "default" 0.0;
5982                visible: 1;
5983             }
5984          }
5985       }
5986       programs {
5987          program { name: "button_click";
5988             signal: "mouse,down,1";
5989             source: "over2";
5990             action: SIGNAL_EMIT "elm,action,press" "";
5991             after: "button_click_anim";
5992          }
5993          program { name: "button_click_anim";
5994             action: STATE_SET "clicked" 0.0;
5995             target: "button_image";
5996          }
5997          program { name: "button_unpress";
5998             action: SIGNAL_EMIT "elm,action,unpress" "";
5999          }
6000          program { name: "button_mouseout_clicked";
6001             signal: "mouse,up,1";
6002             source: "over3";
6003             script {
6004                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6005                  set_state(PART:"button_image", "default", 0.0);
6006             }
6007             after: button_unpress;
6008          }
6009          program { name: "button_unclick3";
6010             signal: "mouse,clicked,1";
6011             source: "over2";
6012             action: SIGNAL_EMIT "elm,action,click" "";
6013          }
6014          program { name: "disable";
6015             signal: "elm,state,disabled";
6016             source: "elm";
6017             action: STATE_SET "disabled" 0.0;
6018             target: "button_image";
6019             target: "disabler";
6020             after: "disable_button";
6021          }
6022          program { name: "disable_button";
6023             script {
6024                set_int(button_state, BUTTON_STATE_DISABLED);
6025             }
6026          }
6027          program { name: "enable";
6028             signal: "elm,state,enabled";
6029             source: "elm";
6030             action: STATE_SET "default" 0.0;
6031             target: "button_image";
6032             target: "disabler";
6033             after: "enable_button";
6034          }
6035          program { name: "enable_button";
6036             script {
6037                set_int(button_state, BUTTON_STATE_ENABLED);
6038             }
6039          }
6040          program { name: "focused";
6041             //signal: "elm,action,focus";
6042             //source: "elm";
6043             action: STATE_SET "focused" 0.0;
6044             target: "button_image";
6045          }
6046          program { name: "unfocused";
6047             //signal: "elm,action,unfocus";
6048             //source: "elm";
6049             action: STATE_SET "default" 0.0;
6050             target: "button_image";
6051          }
6052       }
6053    }
6054
6055 ///////////////////////////////////////////////////////////////////////////////////////
6056    group { name: "elm/button/base/picker/next/icon/default";
6057       images {
6058          image: "00_picker_btn_normal.png" COMP;
6059          image: "00_picker_btn_press.png" COMP;
6060          image: "00_picker_arrow_right.png" COMP;
6061          image: "00_picker_arrow_right_press.png" COMP;
6062       }
6063       script {
6064          public button_state = BUTTON_STATE_ENABLED;
6065       }
6066       parts {
6067          part { name: "button_image";
6068             scale: 1;
6069             description { state: "default" 0.0;
6070                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
6071                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
6072                image {
6073                   normal: "00_picker_btn_normal.png";
6074                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
6075                   border_scale: 1;
6076                }
6077             }
6078             description { state: "clicked" 0.0;
6079                inherit: "default" 0.0;
6080                image.normal: "00_picker_btn_press.png";
6081             }
6082             description { state: "disabled" 0.0;
6083                inherit: "default" 0.0;
6084             }
6085             description { state: "focused" 0.0;
6086                inherit: "default" 0.0;
6087                image.normal: "00_picker_btn_press.png";
6088             }
6089          }
6090          part { name: "padding_left_top";
6091             type: RECT;
6092             scale: 1;
6093             mouse_events: 0;
6094             description { state: "default" 0.0;
6095                align: 0.0 0.0;
6096                rel2.relative: 0.0 0.0;
6097                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
6098                fixed: 1 1;
6099                visible: 0;
6100             }
6101          }
6102          part { name: "padding_right_bottom";
6103             type: RECT;
6104             scale: 1;
6105             mouse_events: 0;
6106             description { state: "default" 0.0;
6107                align: 1.0 1.0;
6108                rel1.relative: 1.0 1.0;
6109                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
6110                fixed: 1 1;
6111                visible: 0;
6112             }
6113          }
6114          part { name: "right_arrow";
6115             scale: 1;
6116             mouse_events: 0;
6117             description { state: "default" 0.0;
6118                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
6119                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
6120                rel1 {
6121                   relative: 1.0 1.0;
6122                   to: "padding_left_top";
6123                }
6124                rel2 {
6125                   relative: 0.0 0.0;
6126                   to: "padding_right_bottom";
6127                }
6128                image.normal: "00_picker_arrow_right.png";
6129             }
6130             description { state: "clicked" 0.0;
6131                inherit: "default" 0.0;
6132                image.normal: "00_picker_arrow_right_press.png";
6133             }
6134          }
6135          part { name: "over2";
6136             type: RECT;
6137             repeat_events: 1;
6138             ignore_flags: ON_HOLD;
6139             description { state: "default" 0.0;
6140                color: 0 0 0 0;
6141             }
6142          }
6143          part { name: "over3";
6144             type: RECT;
6145             repeat_events: 1;
6146             description { state: "default" 0.0;
6147                color: 0 0 0 0;
6148             }
6149          }
6150          part { name: "disabler";
6151             type: RECT;
6152             description { state: "default" 0.0;
6153                color: 0 0 0 0;
6154                visible: 0;
6155             }
6156             description { state: "disabled" 0.0;
6157                inherit: "default" 0.0;
6158                visible: 1;
6159             }
6160          }
6161       }
6162       programs {
6163          program { name: "button_click";
6164             signal: "mouse,down,1";
6165             source: "over2";
6166             action: SIGNAL_EMIT "elm,action,press" "";
6167             after: "button_click_anim";
6168          }
6169          program { name: "button_click_anim";
6170             action: STATE_SET "clicked" 0.0;
6171             target: "button_image";
6172          }
6173          program { name: "button_unpress";
6174             action: SIGNAL_EMIT "elm,action,unpress" "";
6175          }
6176          program { name: "button_mouseout_clicked";
6177             signal: "mouse,up,1";
6178             source: "over3";
6179             script {
6180                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6181                  set_state(PART:"button_image", "default", 0.0);
6182             }
6183             after: button_unpress;
6184          }
6185          program { name: "button_unclick3";
6186             signal: "mouse,clicked,1";
6187             source: "over2";
6188             action: SIGNAL_EMIT "elm,action,click" "";
6189          }
6190          program { name: "disable";
6191             signal: "elm,state,disabled";
6192             source: "elm";
6193             action: STATE_SET "disabled" 0.0;
6194             target: "button_image";
6195             target: "disabler";
6196             after: "disable_button";
6197          }
6198          program { name: "disable_button";
6199             script {
6200                set_int(button_state, BUTTON_STATE_DISABLED);
6201             }
6202          }
6203          program { name: "enable";
6204             signal: "elm,state,enabled";
6205             source: "elm";
6206             action: STATE_SET "default" 0.0;
6207             target: "button_image";
6208             target: "disabler";
6209             after: "enable_button";
6210          }
6211          program { name: "enable_button";
6212             script {
6213                set_int(button_state, BUTTON_STATE_ENABLED);
6214             }
6215          }
6216          program { name: "focused";
6217             //signal: "elm,action,focus";
6218             //source: "elm";
6219             action: STATE_SET "focused" 0.0;
6220             target: "button_image";
6221          }
6222          program { name: "unfocused";
6223             //signal: "elm,action,unfocus";
6224             //source: "elm";
6225             action: STATE_SET "default" 0.0;
6226             target: "button_image";
6227          }
6228       }
6229    }
6230
6231 ///////////////////////////////////////////////////////////////////////////////////////
6232    group { name: "elm/button/base/naviframe_control/default";
6233       alias: "elm/button/base/naviframe_control/center";
6234       script {
6235          public button_state = BUTTON_STATE_ENABLED;
6236       }
6237       images {
6238          image: "00_Option_header_bt.png" COMP;
6239          image: "00_Option_header_bt_dim.png" COMP;
6240          image: "00_Option_header_bt_press.png" COMP;
6241       }
6242       parts {
6243          part { name: "button_image";
6244             scale: 1;
6245             description { state: "default" 0.0;
6246                min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC;
6247                color: 0 0 0 0;
6248                rel1.offset: 0 0;
6249                rel2.offset: -1 -1;
6250                image {
6251                   normal: "00_Option_header_bt.png";
6252                   border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC;
6253                }
6254                color: 255 255 255 255;
6255             }
6256             description { state: "disabled" 0.0;
6257                inherit: "default" 0.0;
6258                image.normal: "00_Option_header_bt_dim.png";
6259             }
6260             description { state: "clicked" 0.0;
6261                inherit: "default" 0.0;
6262                image.normal: "00_Option_header_bt_press.png";
6263             }
6264          }
6265          part { name: "padding_left_top";
6266             type: RECT;
6267             scale: 1;
6268             mouse_events: 0;
6269             description { state: "default" 0.0;
6270                align: 0.0 0.0;
6271                rel2.relative: 0.0 0.0;
6272                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6273                fixed: 1 1;
6274                visible: 0;
6275             }
6276          }
6277          part { name: "padding_right_bottom";
6278             type: RECT;
6279             scale: 1;
6280             mouse_events: 0;
6281             description { state: "default" 0.0;
6282                align: 1.0 1.0;
6283                rel1.relative: 1.0 1.0;
6284                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6285                fixed: 1 1;
6286                visible: 0;
6287             }
6288          }
6289          part { name: "icon_rect";
6290             type: RECT;
6291             scale: 1;
6292             mouse_events: 0;
6293             description { state: "default" 0.0;
6294                min: 0 0;
6295                fixed: 1 0;
6296                rel1 {
6297                   relative: 1.0 1.0;
6298                   to: "padding_left_top";
6299                }
6300                rel2 {
6301                   relative: 1.0 0.0;
6302                   to_x: "padding_left_top";
6303                   to_y: "padding_right_bottom";
6304                }
6305                align: 0.0 0.5;
6306                color: 0 0 0 0;
6307             }
6308             description { state: "visible" 0.0;
6309                min: BUTTON_NAVIFRAME_CENTER_ICON_RECT_VISIBLE_MIN_SIZE;
6310                fixed: 1 0;
6311                rel1 {
6312                   relative: 1.0 1.0;
6313                   to: "padding_left_top";
6314                }
6315                rel2 {
6316                   relative: 1.0 0.0;
6317                   to_x: "padding_left_top";
6318                   to_y: "padding_right_bottom";
6319                }
6320                align: 0.0 0.5;
6321                color: 0 0 0 0;
6322             }
6323             description { state: "icononly" 0.0;
6324                inherit: "default" 0.0;
6325             }
6326          }
6327          part { name: "padding_after_icon";
6328             type: RECT;
6329             scale: 1;
6330             mouse_events: 0;
6331             description { state: "default" 0.0; //when only icon or no icon is there
6332                align: 0.0 0.0;
6333                rel1 {
6334                   relative: 1.0 0.0;
6335                   to: "icon_rect";
6336                }
6337                rel2.to: "icon_rect";
6338                fixed: 1 0;
6339                min: 0 0;
6340                color: 0 0 0 0;
6341             }
6342             description { state: "visible" 0.0;
6343                align: 0.0 0.0;
6344                rel1 {
6345                   relative: 1.0 0.0;
6346                   to: "icon_rect";
6347                }
6348                rel2.to: "icon_rect";
6349                fixed: 1 0;
6350                min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
6351                color: 0 0 0 0;
6352             }
6353             description { state: "icononly" 0.0;
6354                inherit: "default" 0.0;
6355             }
6356          }
6357          part { name: "padding_before_text";
6358             type: RECT;
6359             scale: 1;
6360             mouse_events: 0;
6361             description { state: "default" 0.0; //when only icon or no icon is there
6362                align: 1.0 0.5;
6363                rel1 {
6364                   relative: 0.0 1.0;
6365                   to_x: "elm.text";
6366                   to_y: "padding_left_top";
6367                }
6368                rel2 {
6369                   relative: 0.0 0.0;
6370                   to_x: "elm.text";
6371                   to_y: "padding_right_bottom";
6372                }
6373                fixed: 1 0;
6374                min: BUTTON_NAVIFRAME_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC;
6375                color: 0 0 0 0;
6376             }
6377          }
6378          part { name: "elm.swallow.content";
6379             type: SWALLOW;
6380             scale: 1;
6381             clip_to: "clipper";
6382             description { state: "default" 0.0;
6383                visible: 0;
6384                align: 0.0 0.5;
6385                rel1 {
6386                   relative: 1.0 1.0;
6387                   to: "padding_left_top";
6388                }
6389                rel2 {
6390                   relative: 1.0 0.0;
6391                   to_x: "padding_left_top";
6392                   to_y: "padding_right_bottom";
6393                }
6394                fixed: 1 0;
6395             }
6396             description { state: "visible" 0.0;
6397                fixed: 1 0;
6398                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6399                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6400                align: 1.0 0.5;
6401                rel1 {
6402                   relative: 0.0 1.0;
6403                   to_x: "padding_before_text";
6404                   to_y: "padding_left_top";
6405                }
6406                rel2 {
6407                   relative: 0.0 0.0;
6408                   to_x: "padding_before_text";
6409                   to_y: "padding_right_bottom";
6410                }
6411                aspect: 1.0 1.0;
6412                aspect_preference: VERTICAL;
6413             }
6414             description { state: "icononly" 0.0;
6415                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6416                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6417                rel1 {
6418                   relative: 1.0 1.0;
6419                   to: "padding_left_top";
6420                }
6421                rel2 {
6422                   relative: 0.0 0.0;
6423                   to: "padding_right_bottom";
6424                }
6425                aspect: 1.0 1.0;
6426                aspect_preference: VERTICAL;
6427             }
6428          }
6429          part { name: "elm.text";
6430             type: TEXT;
6431             mouse_events: 0;
6432             scale: 1;
6433             clip_to: "clipper";
6434             description { state: "default" 0.0;
6435                visible: 0;
6436                rel1 {
6437                   relative: 1.0 1.0;
6438                   to_x: "padding_after_icon";
6439                   to_y: "padding_left_top";
6440                }
6441                rel2 {
6442                   relative: 0.0 0.0;
6443                   to: "padding_right_bottom";
6444                }
6445                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
6446                text {
6447                   font: "SLP:style=Medium";
6448                   size: BUTTON_NAVIFRAME_CENTER_TEXT_FONT_SIZE_INC;
6449                   min: 0 0;
6450                   max: 1 0;
6451                }
6452             }
6453             description { state: "visible" 0.0;
6454                inherit: "default" 0.0;
6455                visible: 1;
6456             }
6457             description { state: "clicked" 0.0;
6458                inherit: "default" 0.0;
6459                visible: 1;
6460                min: 0 0;
6461             }
6462             description { state: "focused" 0.0;
6463                inherit: "default" 0.0;
6464                visible: 1;
6465                min: 0 0;
6466                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
6467             }
6468          }
6469          part { name: "over2";
6470             type: RECT;
6471             repeat_events: 1;
6472             ignore_flags: ON_HOLD;
6473             description { state: "default" 0.0;
6474                color: 0 0 0 0;
6475             }
6476          }
6477          part { name: "over3";
6478             type: RECT;
6479             repeat_events: 1;
6480             description { state: "default" 0.0;
6481                color: 0 0 0 0;
6482             }
6483          }
6484          part { name: "clipper";
6485             type: RECT;
6486             description { state: "default" 0.0;
6487                color: 255 255 255 255;
6488             }
6489             description { state: "disabled" 0.0;
6490                color: 255 255 255 127;
6491             }
6492          }
6493          part { name: "disabler";
6494             type: RECT;
6495             description { state: "default" 0.0;
6496                color: 0 0 0 0;
6497                visible: 0;
6498             }
6499             description { state: "disabled" 0.0;
6500                inherit: "default" 0.0;
6501                visible: 1;
6502             }
6503          }
6504       }
6505       programs {
6506          program { name: "button_click";
6507             signal: "mouse,down,1";
6508             source: "over2";
6509             action: SIGNAL_EMIT "elm,action,press" "";
6510             after: "button_click_anim";
6511          }
6512          program { name: "button_click_anim";
6513             action: STATE_SET "clicked" 0.0;
6514             target: "button_image";
6515             after: "text_clicked";
6516          }
6517          program { name: "text_clicked";
6518             script {
6519                new st[31];
6520                new Float:vl;
6521                get_state(PART:"elm.text", st, 30, vl);
6522                if (!strcmp(st, "visible"))
6523                  set_state(PART:"elm.text", "clicked", 0.0);
6524             }
6525          }
6526          program { name: "button_unpress";
6527             action: SIGNAL_EMIT "elm,action,unpress" "";
6528          }
6529          program { name: "button_mouseout_clicked";
6530             signal: "mouse,up,1";
6531             source: "over3";
6532             script {
6533                new st[31];
6534                new Float:vl;
6535                get_state(PART:"elm.swallow.content", st, 30, vl);
6536                if (strcmp(st, "icononly"))
6537                  {
6538                     emit("elm,action,default,text,set", "");
6539                     set_state(PART:"elm.text", "visible", 0.0);
6540                  }
6541                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6542                  set_state(PART:"button_image", "default", 0.0);
6543             }
6544             after: button_unpress;
6545          }
6546          program { name: "button_unclick3";
6547             signal: "mouse,clicked,1";
6548             source: "over2";
6549             action: SIGNAL_EMIT "elm,action,click" "";
6550          }
6551          program { name: "text_show";
6552             signal: "elm,state,text,visible";
6553             source: "elm";
6554             script {
6555                new st[31];
6556                new Float:vl;
6557                get_state(PART:"elm.swallow.content", st, 30, vl);
6558                if (!strcmp(st, "icononly"))
6559                  {
6560                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6561                     set_state(PART:"icon_rect", "visible", 0.0);
6562                     set_state(PART:"padding_after_icon", "visible", 0.0);
6563                  }
6564                set_state(PART:"elm.text", "visible", 0.0);
6565             }
6566          }
6567          program { name: "text_hide";
6568             signal: "elm,state,text,hidden";
6569             source: "elm";
6570             script {
6571                new st[31];
6572                new Float:vl;
6573                get_state(PART:"elm.swallow.content", st, 30, vl);
6574                if (!strcmp(st, "visible"))
6575                  {
6576                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6577                     set_state(PART:"icon_rect", "icononly", 0.0);
6578                     set_state(PART:"padding_after_icon", "icononly", 0.0);
6579                  }
6580                set_state(PART:"elm.text", "default", 0.0);
6581             }
6582          }
6583          program { name: "icon_show";
6584             signal: "elm,state,icon,visible";
6585             source: "elm";
6586             script {
6587                new st[31];
6588                new Float:vl;
6589                get_state(PART:"elm.text", st, 30, vl);
6590                if (!strcmp(st, "visible"))
6591                  {
6592                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6593                     set_state(PART:"icon_rect", "visible", 0.0);
6594                     set_state(PART:"padding_after_icon", "visible", 0.0);
6595                  }
6596                else
6597                  {
6598                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6599                     set_state(PART:"icon_rect", "icononly", 0.0);
6600                     set_state(PART:"padding_after_icon", "icononly", 0.0);
6601                  }
6602             }
6603          }
6604          program { name: "icon_hide";
6605             signal: "elm,state,icon,hidden";
6606             source: "elm";
6607             action: STATE_SET "default" 0.0;
6608             target: "elm.swallow.content";
6609             target: "icon_rect";
6610             target: "padding_after_icon";
6611          }
6612          program { name: "disable";
6613             signal: "elm,state,disabled";
6614             source: "elm";
6615             action: STATE_SET "disabled" 0.0;
6616             target: "button_image";
6617             target: "clipper";
6618             target: "disabler";
6619             after: "disable_text";
6620          }
6621          program { name: "disable_text";
6622             script {
6623                new st[31];
6624                new Float:vl;
6625                set_int(button_state, BUTTON_STATE_DISABLED);
6626                get_state(PART:"elm.text", st, 30, vl);
6627                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
6628                  set_state(PART:"elm.text", "visible", 0.0);
6629             }
6630          }
6631          program { name: "enable";
6632             signal: "elm,state,enabled";
6633             source: "elm";
6634             action: STATE_SET "default" 0.0;
6635             target: "button_image";
6636             target: "clipper";
6637             target: "disabler";
6638             after: "enable_text";
6639          }
6640          program { name: "enable_text";
6641             script {
6642                new st[31];
6643                new Float:vl;
6644                set_int(button_state, BUTTON_STATE_ENABLED);
6645                get_state(PART:"elm.text", st, 30, vl);
6646                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
6647                  set_state(PART:"elm.text", "visible", 0.0);
6648             }
6649          }
6650          program { name: "focused";
6651             action: STATE_SET "focused" 0.0;
6652             target: "button_image";
6653             target: "elm.text";
6654          }
6655          program { name: "unfocused";
6656             action: STATE_SET "default" 0.0;
6657             target: "button_image";
6658             after: "unfocus_text";
6659          }
6660          program { name: "unfocus_text";
6661             action: STATE_SET "visible" 0.0;
6662             target: "elm.text";
6663          }
6664       }
6665    }
6666
6667 ///////////////////////////////////////////////////////////////////////////////////////
6668    group { name: "elm/button/base/naviframe_control/multiline";
6669       script {
6670          public button_state = BUTTON_STATE_ENABLED;
6671       }
6672       images {
6673          image: "00_Option_header_bt.png" COMP;
6674          image: "00_Option_header_bt_dim.png" COMP;
6675          image: "00_Option_header_bt_press.png" COMP;
6676       }
6677       styles{
6678          style { name: "btn_multiline_naviframe_controlbar_style";
6679             base: "font=SLP:style=Medium font_size="BUTTON_NAVIFRAME_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed";
6680             tag: "br" "\n";
6681             tag: "ps" "ps";
6682             tag: "tab" "\t";
6683          }
6684       }
6685       parts {
6686          part { name: "button_image";
6687             scale: 1;
6688             description { state: "default" 0.0;
6689                min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC;
6690                rel1.offset: 0 0;
6691                rel2.offset: -1 -1;
6692                image {
6693                   normal: "00_Option_header_bt.png";
6694                   border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC;
6695                }
6696                color: 255 255 255 255;
6697             }
6698             description { state: "disabled" 0.0;
6699                inherit: "default" 0.0;
6700                image.normal: "00_Option_header_bt_dim.png";
6701             }
6702             description { state: "clicked" 0.0;
6703                inherit: "default" 0.0;
6704                image.normal: "00_Option_header_bt_press.png";
6705             }
6706          }
6707          part { name: "padding_left_top";
6708             type: RECT;
6709             scale: 1;
6710             mouse_events: 0;
6711             description { state: "default" 0.0;
6712                align: 0.0 0.0;
6713                rel2.relative: 0.0 0.0;
6714                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6715                fixed: 1 1;
6716                visible: 0;
6717             }
6718          }
6719          part { name: "padding_right_bottom";
6720             type: RECT;
6721             scale: 1;
6722             mouse_events: 0;
6723             description { state: "default" 0.0;
6724                align: 1.0 1.0;
6725                rel1.relative: 1.0 1.0;
6726                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
6727                fixed: 1 1;
6728                visible: 0;
6729             }
6730          }
6731          part { name: "icon_rect";
6732             type: RECT;
6733             scale: 1;
6734             mouse_events: 0;
6735             description { state: "default" 0.0;
6736                visible: 0;
6737                min: 0 0;
6738                fixed: 1 0;
6739                rel1 {
6740                   relative: 0.0 1.0;
6741                   to_x: "elm.swallow.content";
6742                   to_y: "padding_left_top";
6743                }
6744                rel2 {
6745                   relative: 1.0 0.0;
6746                   to_x: "elm.swallow.content";
6747                   to_y: "padding_right_bottom";
6748                }
6749                align: 0.0 0.5;
6750             }
6751          }
6752          part { name: "padding_icon_text";
6753             type: RECT;
6754             scale: 1;
6755             mouse_events: 0;
6756             description { state: "default" 0.0; //when only icon or no icon is there
6757                visible: 0;
6758                align: 0.0 0.0;
6759                rel1 {
6760                   relative: 1.0 0.0;
6761                   to: "icon_rect";
6762                }
6763                rel2 {
6764                   relative: 1.0 1.0;
6765                   to: "icon_rect";
6766                }
6767                fixed: 1 0;
6768                min: 0 0;
6769             }
6770             description { state: "visible" 0.0;
6771                inherit: "default" 0.0;
6772                min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
6773                rel1 {
6774                   relative: 1.0 0.0;
6775                   to: "icon_rect";
6776                }
6777                rel2 {
6778                   relative: 1.0 1.0;
6779                   to: "icon_rect";
6780                }
6781            }
6782             description { state: "icononly" 0.0;
6783                inherit: "default" 0.0;
6784             }
6785          }
6786          part { name: "elm.swallow.content";
6787             type: SWALLOW;
6788             scale: 1;
6789             clip_to: "clipper";
6790             description { state: "default" 0.0;
6791                visible: 0;
6792                align: 0.0 0.5;
6793                rel1 {
6794                   relative: 1.0 1.0;
6795                   to: "padding_left_top";
6796                }
6797                rel2 {
6798                   relative: 1.0 0.0;
6799                   to_x: "padding_left_top";
6800                   to_y: "padding_right_bottom";
6801                }
6802                fixed: 1 0;
6803             }
6804             description { state: "visible" 0.0;
6805                fixed: 1 0;
6806                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6807                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6808                align: 0.0 0.5;
6809                rel1 {
6810                   relative: 1.0 1.0;
6811                   to: "padding_left_top";
6812                }
6813                rel2 {
6814                   relative: 0.0 0.0;
6815                   to_x: "padding_left_top";
6816                   to_y: "padding_right_bottom";
6817                }
6818             }
6819             description { state: "icononly" 0.0;
6820                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6821                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6822                rel1 {
6823                   relative: 1.0 1.0;
6824                   to: "padding_left_top";
6825                }
6826                rel2 {
6827                   relative: 0.0 0.0;
6828                   to: "padding_right_bottom";
6829                }
6830             }
6831          }
6832          part { name: "elm.text";
6833             type: TEXTBLOCK;
6834             mouse_events: 0;
6835             scale: 1;
6836             clip_to: "clipper";
6837             description { state: "default" 0.0;
6838                visible: 0;
6839                rel1 {
6840                   relative: 1.0 1.0;
6841                   to_x: "padding_icon_text";
6842                   to_y: "padding_left_top";
6843                }
6844                rel2 {
6845                    relative: 0.0 0.0;
6846                    to: "padding_right_bottom";
6847                }
6848                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
6849                text {
6850                   style: "btn_multiline_naviframe_controlbar_style";
6851                   min: 0 0;
6852                   max: 0 1;
6853                }
6854             }
6855             description { state: "visible" 0.0;
6856                inherit: "default" 0.0;
6857                visible: 1;
6858                min: 80 0;
6859             }
6860             description { state: "clicked" 0.0;
6861                inherit: "default" 0.0;
6862                visible: 1;
6863                min: 0 0;
6864             }
6865             description { state: "focused" 0.0;
6866                inherit: "default" 0.0;
6867                visible: 1;
6868                min: 0 0;
6869                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
6870             }
6871          }
6872          part { name: "over2";
6873             type: RECT;
6874             repeat_events: 1;
6875             ignore_flags: ON_HOLD;
6876             description { state: "default" 0.0;
6877                color: 0 0 0 0;
6878             }
6879          }
6880          part { name: "over3";
6881             type: RECT;
6882             repeat_events: 1;
6883             description { state: "default" 0.0;
6884                color: 0 0 0 0;
6885             }
6886          }
6887          part { name: "clipper";
6888             type: RECT;
6889             description { state: "default" 0.0;
6890                color: 255 255 255 255;
6891             }
6892             description { state: "disabled" 0.0;
6893                color: 255 255 255 127;
6894             }
6895          }
6896          part { name: "disabler";
6897             type: RECT;
6898             description { state: "default" 0.0;
6899                color: 0 0 0 0;
6900                visible: 0;
6901             }
6902             description { state: "disabled" 0.0;
6903                inherit: "default" 0.0;
6904                visible: 1;
6905             }
6906          }
6907       }
6908       programs {
6909          program { name: "button_click";
6910             signal: "mouse,down,1";
6911             source: "over2";
6912             action: SIGNAL_EMIT "elm,action,press" "";
6913             after: "button_click_anim";
6914          }
6915          program { name: "button_click_anim";
6916             action: STATE_SET "clicked" 0.0;
6917             target: "button_image";
6918             after: "text_clicked";
6919          }
6920          program { name: "text_clicked";
6921             script {
6922                new st[31];
6923                new Float:vl;
6924                get_state(PART:"elm.text", st, 30, vl);
6925                if (!strcmp(st, "visible"))
6926                  set_state(PART:"elm.text", "clicked", 0.0);
6927             }
6928          }
6929          program { name: "button_unpress";
6930             action: SIGNAL_EMIT "elm,action,unpress" "";
6931          }
6932          program { name: "button_mouseout_clicked";
6933             signal: "mouse,up,1";
6934             source: "over3";
6935             script {
6936                new st[31];
6937                new Float:vl;
6938                get_state(PART:"elm.swallow.content", st, 30, vl);
6939                if (strcmp(st, "icononly"))
6940                  {
6941                     emit("elm,action,default,text,set", "");
6942                     set_state(PART:"elm.text", "visible", 0.0);
6943                  }
6944                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6945                  set_state(PART:"button_image", "default", 0.0);
6946             }
6947             after: button_unpress;
6948          }
6949          program { name: "button_unclick3";
6950             signal: "mouse,clicked,1";
6951             source: "over2";
6952             action: SIGNAL_EMIT "elm,action,click" "";
6953          }
6954          program { name: "text_show";
6955             signal: "elm,state,text,visible";
6956             source: "elm";
6957             script {
6958                new st[31];
6959                new Float:vl;
6960                get_state(PART:"elm.swallow.content", st, 30, vl);
6961                if (!strcmp(st, "icononly"))
6962                  {
6963                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6964                     set_state(PART:"padding_icon_text", "visible", 0.0);
6965                  }
6966                set_state(PART:"elm.text", "visible", 0.0);
6967             }
6968          }
6969          program { name: "text_hide";
6970             signal: "elm,state,text,hidden";
6971             source: "elm";
6972             script {
6973                new st[31];
6974                new Float:vl;
6975                get_state(PART:"elm.swallow.content", st, 30, vl);
6976                if (!strcmp(st, "visible"))
6977                  {
6978                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6979                     set_state(PART:"padding_icon_text", "icononly", 0.0);
6980                  }
6981                set_state(PART:"elm.text", "default", 0.0);
6982             }
6983          }
6984          program { name: "icon_show";
6985             signal: "elm,state,icon,visible";
6986             source: "elm";
6987             script {
6988                new st[31];
6989                new Float:vl;
6990                get_state(PART:"elm.text", st, 30, vl);
6991                if (!strcmp(st, "visible"))
6992                  {
6993                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6994                     set_state(PART:"padding_icon_text", "visible", 0.0);
6995                  }
6996                else
6997                  {
6998                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6999                     set_state(PART:"padding_icon_text", "icononly", 0.0);
7000                  }
7001             }
7002          }
7003          program { name: "icon_hide";
7004             signal: "elm,state,icon,hidden";
7005             source: "elm";
7006             action: STATE_SET "default" 0.0;
7007             target: "elm.swallow.content";
7008             target: "padding_icon_text";
7009          }
7010          program { name: "disable";
7011             signal: "elm,state,disabled";
7012             source: "elm";
7013             action: STATE_SET "disabled" 0.0;
7014             target: "button_image";
7015             target: "clipper";
7016             target: "disabler";
7017             after: "disable_text";
7018          }
7019          program { name: "disable_text";
7020             script {
7021                new st[31];
7022                new Float:vl;
7023                set_int(button_state, BUTTON_STATE_DISABLED);
7024                get_state(PART:"elm.text", st, 30, vl);
7025                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
7026                  set_state(PART:"elm.text", "visible", 0.0);
7027             }
7028          }
7029          program { name: "enable";
7030             signal: "elm,state,enabled";
7031             source: "elm";
7032             action: STATE_SET "default" 0.0;
7033             target: "button_image";
7034             target: "clipper";
7035             target: "disabler";
7036             after: "enable_text";
7037          }
7038          program { name: "enable_text";
7039             script {
7040                new st[31];
7041                new Float:vl;
7042                set_int(button_state, BUTTON_STATE_ENABLED);
7043                get_state(PART:"elm.text", st, 30, vl);
7044                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
7045                  set_state(PART:"elm.text", "visible", 0.0);
7046             }
7047          }
7048          program { name: "focused";
7049             action: STATE_SET "focused" 0.0;
7050             target: "button_image";
7051             target: "elm.text";
7052          }
7053          program { name: "unfocused";
7054             action: STATE_SET "default" 0.0;
7055             target: "button_image";
7056             after: "unfocus_text";
7057          }
7058          program { name: "unfocus_text";
7059             action: STATE_SET "visible" 0.0;
7060             target: "elm.text";
7061          }
7062       }
7063    }
7064
7065 //////////////////////////////////////////////////////////////
7066    group { name: "elm/button/base/naviframe/title/default";
7067       images {
7068          image: "00_Title_btn.png" COMP;
7069          image: "00_Title_btn_press.png" COMP;
7070       }
7071       script {
7072          public button_state = BUTTON_STATE_ENABLED;
7073       }
7074       parts {
7075          part { name: "button_image";
7076             scale: 1;
7077             description { state: "default" 0.0;
7078                min: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;
7079                max: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;
7080                image {
7081                   normal: "00_Title_btn.png";
7082                   border: BUTTON_NAVIFRAME_BG_BORDER_INC;
7083                   border_scale: 1;
7084                }
7085             }
7086             description { state: "clicked" 0.0;
7087                inherit: "default" 0.0;
7088                image.normal: "00_Title_btn_press.png";
7089             }
7090             description { state: "disabled" 0.0;
7091                inherit: "default" 0.0;
7092             }
7093             description { state: "focused" 0.0;
7094                inherit: "default" 0.0;
7095                image.normal: "00_Title_btn_press.png";
7096             }
7097          }
7098          part { name: "padding_left_top";
7099             type: RECT;
7100             scale: 1;
7101             mouse_events: 0;
7102             description { state: "default" 0.0;
7103                align: 0.0 0.0;
7104                rel2.relative: 0.0 0.0;
7105                min: BUTTON_NAVIFRAME_PADDING_MIN_INC;
7106                fixed: 1 1;
7107                visible: 0;
7108             }
7109          }
7110          part { name: "bg";
7111             type: RECT;
7112             scale: 1;
7113             mouse_events: 0;
7114             description { state: "default" 0.0;
7115                min: BUTTON_NAVIFRAME_BG_MIN_INC;
7116                visible: 0;
7117             }
7118             description { state: "visible" 0.0;
7119                inherit: "default" 0.0;
7120                min: BUTTON_NAVIFRAME_VISIBLE_BG_MIN_INC;
7121             }
7122             description { state: "icononly" 0.0;
7123                inherit: "default" 0.0;
7124                min: BUTTON_NAVIFRAME_ICONONLY_BG_MIN_INC;
7125             }
7126          }
7127          part { name: "padding_right_bottom";
7128             type: RECT;
7129             scale: 1;
7130             mouse_events: 0;
7131             description { state: "default" 0.0;
7132                align: 1.0 1.0;
7133                rel1.relative: 1.0 1.0;
7134                min: BUTTON_NAVIFRAME_PADDING_MIN_INC;
7135                fixed: 1 1;
7136                visible: 0;
7137             }
7138          }
7139          part { name: "icon_rect";
7140             type: RECT;
7141             scale: 1;
7142             mouse_events: 0;
7143             description { state: "default" 0.0;
7144                visible: 0;
7145                min: 0 0;
7146                fixed: 1 0;
7147                rel1 {
7148                   relative: 1.0 1.0;
7149                   to: "padding_left_top";
7150                }
7151                rel2 {
7152                   relative: 1.0 0.0;
7153                   to_x: "padding_left_top";
7154                   to_y: "padding_right_bottom";
7155                }
7156                align: 0.0 0.5;
7157             }
7158             description { state: "visible" 0.0;
7159                visible: 0;
7160                min: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;
7161                max: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;
7162                fixed: 1 0;
7163                rel1 {
7164                   relative: 1.0 1.0;
7165                   to: "padding_left_top";
7166                }
7167                rel2 {
7168                   relative: 1.0 0.0;
7169                   to_x: "padding_left_top";
7170                   to_y: "padding_right_bottom";
7171                }
7172                align: 0.0 0.5;
7173             }
7174             description { state: "icononly" 0.0;
7175                inherit: "default" 0.0;
7176             }
7177          }
7178          part { name: "padding_after_icon";
7179             type: RECT;
7180             scale: 1;
7181             mouse_events: 0;
7182             description { state: "default" 0.0; //when only icon or no icon is there
7183                align: 0.0 0.0;
7184                rel1 {
7185                   relative: 1.0 0.0;
7186                   to: "icon_rect";
7187                }
7188                rel2.to: "icon_rect";
7189                fixed: 1 0;
7190                min: 0 0;
7191                visible: 0;
7192             }
7193             description { state: "visible" 0.0;
7194                visible: 0;
7195                align: 0.0 0.0;
7196                rel1 {
7197                   relative: 1.0 0.0;
7198                   to: "icon_rect";
7199                }
7200                rel2.to: "icon_rect";
7201                fixed: 1 0;
7202                min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
7203             }
7204             description { state: "icononly" 0.0;
7205                inherit: "default" 0.0;
7206             }
7207          }
7208          part { name: "padding_before_text";
7209             type: RECT;
7210             scale: 1;
7211             mouse_events: 0;
7212             description { state: "default" 0.0; //when only icon or no icon is there
7213                align: 1.0 0.5;
7214                rel1 {
7215                   relative: 0.0 1.0;
7216                   to_x: "elm.text";
7217                   to_y: "padding_left_top";
7218                }
7219                rel2 {
7220                   relative: 0.0 0.0;
7221                   to_x: "elm.text";
7222                   to_y: "padding_right_bottom";
7223                }
7224                fixed: 1 0;
7225                min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
7226                visible: 0;
7227             }
7228          }
7229          part { name: "elm.swallow.content";
7230             type: SWALLOW;
7231             scale: 1;
7232             clip_to: "clipper";
7233             description { state: "default" 0.0;
7234                visible: 0;
7235                align: 0.0 0.5;
7236                rel1 {
7237                   relative: 1.0 1.0;
7238                   to: "padding_left_top";
7239                }
7240                rel2 {
7241                   relative: 1.0 0.0;
7242                   to_x: "padding_left_top";
7243                   to_y: "padding_right_bottom";
7244                }
7245                fixed: 1 0;
7246             }
7247             description { state: "visible" 0.0;
7248                fixed: 1 0;
7249                min: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;
7250                max: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;
7251                align: 1.0 0.5;
7252                rel1 {
7253                   relative: 0.0 1.0;
7254                   to_x: "padding_before_text";
7255                   to_y: "padding_left_top";
7256                }
7257                rel2 {
7258                   relative: 0.0 0.0;
7259                   to_x: "padding_before_text";
7260                   to_y: "padding_right_bottom";
7261                }
7262             }
7263             description { state: "icononly" 0.0;
7264                min: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;
7265                max: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;
7266             }
7267          }
7268          part { name: "elm.text";
7269             type: TEXT;
7270             mouse_events: 0;
7271             scale: 1;
7272             clip_to: "clipper";
7273             description { state: "default" 0.0;
7274                visible: 0;
7275                rel1 {
7276                   relative: 1.0 1.0;
7277                   to_x: "padding_after_icon";
7278                   to_y: "padding_left_top";
7279                }
7280                rel2 {
7281                   relative: 0.0 0.0;
7282                   to: "padding_right_bottom";
7283                }
7284                color: BUTTON_TEXT_NAVIFRAME_NORMAL_COLOR_INC;
7285                text {
7286                   font: "SLP:style=Medium";
7287                   size: BUTTON_TEXT_NAVIFRAME_FONT_SIZE_INC;
7288                   min: 0 0;
7289                   max: 1 0;
7290                }
7291             }
7292             description { state: "visible" 0.0;
7293                inherit: "default" 0.0;
7294                visible: 1;
7295             }
7296             description { state: "clicked" 0.0;
7297                inherit: "default" 0.0;
7298                visible: 1;
7299                color: BUTTON_TEXT_NAVIFRAME_PRESSED_COLOR_INC;
7300             }
7301             description { state: "disabled" 0.0;
7302                inherit: "default" 0.0;
7303                color: 0 0 0 128;
7304             }
7305             description { state: "disabled_visible" 0.0;
7306                inherit: "default" 0.0;
7307                color: BUTTON_TEXT_NAVIFRAME_DISABLED_COLOR_INC;
7308                visible: 1;
7309             }
7310             description { state: "focused" 0.0;
7311                inherit: "default" 0.0;
7312                visible: 1;
7313                color: BUTTON_TEXT_NAVIFRAME_FOCUSED_COLOR_INC;
7314             }
7315          }
7316          part { name: "over2";
7317             type: RECT;
7318             repeat_events: 1;
7319             ignore_flags: ON_HOLD;
7320             description { state: "default" 0.0;
7321                color: 0 0 0 0;
7322             }
7323          }
7324          part { name: "over3";
7325             type: RECT;
7326             repeat_events: 1;
7327             description { state: "default" 0.0;
7328                color: 0 0 0 0;
7329             }
7330          }
7331          part { name: "clipper";
7332             type: RECT;
7333             description { state: "default" 0.0;
7334                color: 255 255 255 255;
7335             }
7336          }
7337          part { name: "disabler";
7338             type: RECT;
7339             description { state: "default" 0.0;
7340                color: 0 0 0 0;
7341                visible: 0;
7342             }
7343             description { state: "disabled" 0.0;
7344                inherit: "default" 0.0;
7345                visible: 1;
7346             }
7347          }
7348       }
7349       programs {
7350          program { name: "button_click";
7351             signal: "mouse,down,1";
7352             source: "over2";
7353             action: SIGNAL_EMIT "elm,action,press" "";
7354             after: "button_click_anim";
7355          }
7356          program { name: "button_click_anim";
7357             action: STATE_SET "clicked" 0.0;
7358             target: "button_image";
7359             after: "text_clicked";
7360          }
7361          program { name: "text_clicked";
7362             script {
7363                new st[31];
7364                new Float:vl;
7365                get_state(PART:"elm.text", st, 30, vl);
7366                if (!strcmp(st, "visible"))
7367                  set_state(PART:"elm.text", "clicked", 0.0);
7368             }
7369          }
7370          program { name: "button_unpress";
7371             action: SIGNAL_EMIT "elm,action,unpress" "";
7372          }
7373          program { name: "button_mouseout_clicked";
7374             signal: "mouse,up,1";
7375             source: "over3";
7376             script {
7377                new st[31];
7378                new Float:vl;
7379                get_state(PART:"elm.swallow.content", st, 30, vl);
7380                if (strcmp(st, "icononly"))
7381                  {
7382                     emit("elm,action,default,text,set", "");
7383                     set_state(PART:"elm.text", "visible", 0.0);
7384                  }
7385                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7386                  set_state(PART:"button_image", "default", 0.0);
7387             }
7388             after: button_unpress;
7389          }
7390          program { name: "button_unclick3";
7391             signal: "mouse,clicked,1";
7392             source: "over2";
7393             action: SIGNAL_EMIT "elm,action,click" "";
7394          }
7395          program { name: "text_show";
7396             signal: "elm,state,text,visible";
7397             source: "elm";
7398             script {
7399                new st[31];
7400                new Float:vl;
7401                get_state(PART:"elm.swallow.content", st, 30, vl);
7402                if (!strcmp(st, "icononly"))
7403                  {
7404                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7405                     set_state(PART:"icon_rect", "visible", 0.0);
7406                     set_state(PART:"padding_after_icon", "visible", 0.0);
7407                     set_state(PART:"bg", "visible", 0.0);
7408                  }
7409                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7410                  set_state(PART:"elm.text", "visible", 0.0);
7411                else
7412                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7413             }
7414          }
7415          program { name: "text_hide";
7416             signal: "elm,state,text,hidden";
7417             source: "elm";
7418             script {
7419                new st[31];
7420                new Float:vl;
7421                get_state(PART:"elm.swallow.content", st, 30, vl);
7422                if (!strcmp(st, "visible"))
7423                  {
7424                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7425                     set_state(PART:"icon_rect", "icononly", 0.0);
7426                     set_state(PART:"padding_after_icon", "icononly", 0.0);
7427                     set_state(PART:"bg", "icononly", 0.0);
7428                  }
7429                set_state(PART:"elm.text", "default", 0.0);
7430             }
7431          }
7432          program { name: "icon_show";
7433             signal: "elm,state,icon,visible";
7434             source: "elm";
7435             script {
7436                new st[31];
7437                new Float:vl;
7438                get_state(PART:"elm.text", st, 30, vl);
7439                if (!strcmp(st, "visible"))
7440                  {
7441                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7442                     set_state(PART:"icon_rect", "visible", 0.0);
7443                     set_state(PART:"padding_after_icon", "visible", 0.0);
7444                     set_state(PART:"bg", "visible", 0.0);
7445                  }
7446                else
7447                  {
7448                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7449                     set_state(PART:"icon_rect", "icononly", 0.0);
7450                     set_state(PART:"padding_after_icon", "icononly", 0.0);
7451                     set_state(PART:"bg", "icononly", 0.0);
7452                  }
7453             }
7454          }
7455          program { name: "icon_hide";
7456             signal: "elm,state,icon,hidden";
7457             source: "elm";
7458             action: STATE_SET "default" 0.0;
7459             target: "elm.swallow.content";
7460             target: "padding_after_icon";
7461             target: "icon_rect";
7462             target: "bg";
7463          }
7464          program { name: "disable";
7465             signal: "elm,state,disabled";
7466             source: "elm";
7467             action: STATE_SET "disabled" 0.0;
7468             target: "button_image";
7469             target: "disabler";
7470             after: "disable_text";
7471          }
7472          program { name: "disable_text";
7473             script {
7474                new st[31];
7475                new Float:vl;
7476                get_state(PART:"elm.text", st, 30, vl);
7477                if (!strcmp(st, "visible"))
7478                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7479                else
7480                  set_state(PART:"elm.text", "disabled", 0.0);
7481                set_int(button_state, BUTTON_STATE_DISABLED);
7482             }
7483          }
7484          program { name: "enable";
7485             signal: "elm,state,enabled";
7486             source: "elm";
7487             action: STATE_SET "default" 0.0;
7488             target: "button_image";
7489             target: "disabler";
7490             after: "enable_text";
7491          }
7492          program { name: "enable_text";
7493             script {
7494                new st[31];
7495                new Float:vl;
7496                get_state(PART:"elm.text", st, 30, vl);
7497                if (!strcmp(st, "disabled_visible"))
7498                  set_state(PART:"elm.text", "visible", 0.0);
7499                else
7500                  set_state(PART:"elm.text", "default", 0.0);
7501                set_int(button_state, BUTTON_STATE_ENABLED);
7502             }
7503          }
7504          program { name: "focused";
7505             //signal: "elm,action,focus";
7506             //source: "elm";
7507             action: STATE_SET "focused" 0.0;
7508             target: "button_image";
7509             target: "elm.text";
7510          }
7511          program { name: "unfocused";
7512             //signal: "elm,action,unfocus";
7513             //source: "elm";
7514             action: STATE_SET "default" 0.0;
7515             target: "button_image";
7516             after: "unfocus_text";
7517          }
7518          program { name: "unfocus_text";
7519             action: STATE_SET "visible" 0.0;
7520             target: "elm.text";
7521          }
7522       }
7523    }
7524
7525 /////////////////////////////////////////////////////////////////////////////////////////
7526    group { name: "elm/button/base/naviframe/more/default";
7527       images {
7528          image: "00_Title_btn.png" COMP;
7529          image: "00_Title_btn_press.png" COMP;
7530          image: "00_winset_more.png" COMP;
7531       }
7532       script {
7533          public button_state = BUTTON_STATE_ENABLED;
7534       }
7535       parts {
7536          part { name: "button_image";
7537             scale: 1;
7538             description { state: "default" 0.0;
7539                min: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC;
7540                max: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC;
7541                image {
7542                   normal: "00_Title_btn.png";
7543                   border: BUTTON_NAVIFRAME_MORE_BG_BORDER_INC;
7544                   border_scale: 1;
7545                }
7546             }
7547             description { state: "clicked" 0.0;
7548                inherit: "default" 0.0;
7549                image.normal: "00_Title_btn_press.png";
7550             }
7551             description { state: "disabled" 0.0;
7552                inherit: "default" 0.0;
7553             }
7554             description { state: "focused" 0.0;
7555                inherit: "default" 0.0;
7556                image.normal: "00_Title_btn_press.png";
7557             }
7558          }
7559          part { name: "more_image";
7560             scale: 1;
7561             mouse_events: 0;
7562             description { state: "default" 0.0;
7563                min: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC;
7564                max: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC;
7565                rel1.to: "button_image";
7566                rel2.to: "button_image";
7567                image.normal: "00_winset_more.png";
7568             }
7569             description { state: "clicked" 0.0;
7570                inherit: "default" 0.0;
7571             }
7572          }
7573          part { name: "over2";
7574             type: RECT;
7575             repeat_events: 1;
7576             ignore_flags: ON_HOLD;
7577             description { state: "default" 0.0;
7578                color: 0 0 0 0;
7579             }
7580          }
7581          part { name: "over3";
7582             type: RECT;
7583             repeat_events: 1;
7584             description { state: "default" 0.0;
7585                color: 0 0 0 0;
7586             }
7587          }
7588          part { name: "disabler";
7589             type: RECT;
7590             description { state: "default" 0.0;
7591                color: 0 0 0 0;
7592                visible: 0;
7593             }
7594             description { state: "disabled" 0.0;
7595                inherit: "default" 0.0;
7596                visible: 1;
7597             }
7598          }
7599       }
7600       programs {
7601          program { name: "button_click";
7602             signal: "mouse,down,1";
7603             source: "over2";
7604             action: SIGNAL_EMIT "elm,action,press" "";
7605             after: "button_click_anim";
7606          }
7607          program { name: "button_click_anim";
7608             action: STATE_SET "clicked" 0.0;
7609             target: "button_image";
7610          }
7611          program { name: "button_unpress";
7612             action: SIGNAL_EMIT "elm,action,unpress" "";
7613          }
7614          program { name: "button_mouseout_clicked";
7615             signal: "mouse,up,1";
7616             source: "over3";
7617             script {
7618                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7619                  set_state(PART:"button_image", "default", 0.0);
7620             }
7621             after: button_unpress;
7622          }
7623          program { name: "button_unclick3";
7624             signal: "mouse,clicked,1";
7625             source: "over2";
7626             action: SIGNAL_EMIT "elm,action,click" "";
7627          }
7628          program { name: "disable";
7629             signal: "elm,state,disabled";
7630             source: "elm";
7631             action: STATE_SET "disabled" 0.0;
7632             target: "button_image";
7633             target: "disabler";
7634             after: "disable_button";
7635          }
7636          program { name: "disable_button";
7637             script {
7638                set_int(button_state, BUTTON_STATE_DISABLED);
7639             }
7640          }
7641          program { name: "enable";
7642             signal: "elm,state,enabled";
7643             source: "elm";
7644             action: STATE_SET "default" 0.0;
7645             target: "button_image";
7646             target: "disabler";
7647             after: "enable_button";
7648          }
7649          program { name: "enable_button";
7650             script {
7651                set_int(button_state, BUTTON_STATE_ENABLED);
7652             }
7653          }
7654       }
7655    }
7656
7657 ///////////////////////////////////////////////////////////////////////////////////////
7658    group { name: "elm/button/base/controlbar/vertical";
7659       script {
7660          public button_state = BUTTON_STATE_ENABLED;
7661       }
7662       styles{
7663          style { name: "controlbar_style";
7664             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";
7665             tag: "br" "\n";
7666             tag: "ps" "ps";
7667             tag: "hilight" "+ font=SLP:style=Bold";
7668             tag: "b" "+ font=SLP:style=Bold";
7669             tag: "tab" "\t";
7670          }
7671       }
7672       parts {
7673          part { name: "button_image";
7674             type: RECT;
7675             scale: 1;
7676             description { state: "default" 0.0;
7677                min: 20 30;
7678                rel1.offset: 5 5;
7679                rel2.offset: -6 -6;
7680                color: 0 0 0 0;
7681                visible: 0;
7682             }
7683          }
7684          part { name: "padding_left_top";
7685             type: RECT;
7686             scale: 1;
7687             mouse_events: 0;
7688             description { state: "default" 0.0;
7689                align: 0.0 0.0;
7690                rel2.relative: 0.0 0.0;
7691                min: 10 8;
7692                fixed: 1 1;
7693                visible: 0;
7694             }
7695          }
7696          part { name: "padding_right_bottom";
7697             type: RECT;
7698             scale: 1;
7699             mouse_events: 0;
7700             description { state: "default" 0.0;
7701                align: 1.0 1.0;
7702                rel1.relative: 1.0 1.0;
7703                min: 10 5;
7704                fixed: 1 1;
7705                visible: 0;
7706             }
7707          }
7708          part {
7709             name: "icon_rect";
7710             type: RECT;
7711             scale: 1;
7712             mouse_events: 0;
7713             description { state: "default" 0.0;
7714                min: 0 0;
7715                fixed: 0 1;
7716                rel1 {
7717                   relative: 1.0 1.0;
7718                   to: "padding_left_top";
7719                }
7720                rel2 {
7721                   relative: 0.0 1.0;
7722                   to_x: "padding_right_bottom";
7723                   to_y: "padding_left_top";
7724                }
7725                align: 0.5 0.0;
7726                color: 0 0 0 0;
7727             }
7728             description { state: "visible" 0.0;
7729                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7730                fixed: 0 1;
7731                rel1 {
7732                   relative: 1.0 1.0;
7733                   to: "padding_left_top";
7734                }
7735                rel2 {
7736                   relative: 0.0 1.0;
7737                   to_x: "padding_right_bottom";
7738                   to_y: "padding_left_top";
7739                }
7740                align: 0.5 0.0;
7741                color: 0 0 0 0;
7742             }
7743             description { state: "icononly" 0.0;
7744                inherit: "default" 0.0;
7745             }
7746          }
7747          part { name: "padding_after_icon";
7748             type: RECT;
7749             scale: 1;
7750             mouse_events: 0;
7751             description { state: "default" 0.0; //when only icon or no icon is there
7752                align: 0.0 0.0;
7753                rel1 {
7754                   relative: 0.0 1.0;
7755                   to: "icon_rect";
7756                }
7757                rel2.to: "icon_rect";
7758                fixed: 0 1;
7759                min: 0 0;
7760                color: 0 0 0 0;
7761             }
7762             description { state: "visible" 0.0;
7763                align: 0.0 0.0;
7764                rel1 {
7765                   relative: 0.0 1.0;
7766                   to: "icon_rect";
7767                }
7768                rel2.to: "icon_rect";
7769                fixed: 0 1;
7770                min: 0 0;
7771                color: 0 0 0 0;
7772             }
7773             description { state: "icononly" 0.0;
7774                inherit: "default" 0.0;
7775             }
7776          }
7777          part { name: "padding_before_text";
7778             type: RECT;
7779             scale: 1;
7780             mouse_events: 0;
7781             description { state: "default" 0.0; //when only icon or no icon is there
7782                align: 0.5 1.0;
7783                rel1 {
7784                   relative: 1.0 0.0;
7785                   to_x: "padding_left_top";
7786                   to_y: "elm.text";
7787                }
7788                rel2 {
7789                   relative: 0.0 0.0;
7790                   to_x: "padding_right_bottom";
7791                   to_y: "elm.text";
7792                }
7793                fixed: 0 1;
7794                min: 0 0;
7795                color: 0 0 0 0;
7796             }
7797          }
7798          part { name: "elm.swallow.content";
7799             type: SWALLOW;
7800             scale: 1;
7801             clip_to: "disabler";
7802             description { state: "default" 0.0;
7803                visible: 0;
7804                align: 0.5 0.0;
7805                rel1 {
7806                   relative: 1.0 1.0;
7807                   to: "padding_left_top";
7808                }
7809                rel2 {
7810                   relative: 0.0 1.0;
7811                   to_x: "padding_right_bottom";
7812                   to_y: "padding_left_top";
7813                }
7814                fixed: 0 1;
7815             }
7816             description { state: "visible" 0.0;
7817                fixed: 0 1;
7818                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7819                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7820                rel1 {
7821                   relative: 1.0 1.0;
7822                   to: "padding_left_top";
7823                }
7824                rel2 {
7825                   relative: 0.0 0.0;
7826                   to_x: "padding_right_bottom";
7827                   to_y: "padding_before_text";
7828                }
7829                aspect: 1.0 1.0;
7830                aspect_preference: HORIZONTAL;
7831             }
7832             description { state: "icononly" 0.0;
7833                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7834                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7835                rel1 {
7836                   relative: 1.0 1.0;
7837                   to: "padding_left_top";
7838                }
7839                rel2 {
7840                   relative: 0.0 0.0;
7841                   to: "padding_right_bottom";
7842                }
7843                aspect: 1.0 1.0;
7844                aspect_preference: HORIZONTAL;
7845             }
7846          }
7847          part { name: "elm.text";
7848             type: TEXTBLOCK;
7849             mouse_events: 0;
7850             scale: 1;
7851             clip_to: "disabler";
7852             description { state: "default" 0.0;
7853                visible: 0;
7854                rel1 {
7855                   relative: 1.0 1.0;
7856                   to_x: "padding_left_top";
7857                   to_y: "padding_after_icon";
7858                }
7859                rel2 {
7860                   relative: 0.0 0.0;
7861                   to: "padding_right_bottom";
7862                }
7863                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
7864                fixed: 1 1;
7865                text {
7866                   style: "controlbar_style";
7867                   min: 0 1;
7868                   max: 0 1;
7869                }
7870             }
7871             description { state: "visible" 0.0;
7872                inherit: "default" 0.0;
7873                visible: 1;
7874             }
7875             description { state: "clicked" 0.0;
7876                inherit: "default" 0.0;
7877                visible: 1;
7878                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
7879             }
7880             description { state: "focused" 0.0;
7881                inherit: "default" 0.0;
7882                visible: 1;
7883                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
7884             }
7885          }
7886          part { name: "over2";
7887             type: RECT;
7888             repeat_events: 1;
7889             ignore_flags: ON_HOLD;
7890             description { state: "default" 0.0;
7891                color: 0 0 0 0;
7892             }
7893             description { state: "disabled" 0.0;
7894                inherit: "default" 0.0;
7895                visible: 0;
7896             }
7897          }
7898          part { name: "over3";
7899             type: RECT;
7900             repeat_events: 1;
7901             description { state: "default" 0.0;
7902                color: 0 0 0 0;
7903             }
7904          }
7905          part { name: "disabler";
7906             type: RECT;
7907             description { state: "default" 0.0;
7908                color: 255 255 255 255;
7909                visible: 1;
7910             }
7911             description { state: "disabled" 0.0;
7912                inherit: "default" 0.0;
7913                color: 255 255 255 127;
7914                visible: 1;
7915             }
7916          }
7917       }
7918       programs {
7919          program { name: "button_click";
7920             signal: "mouse,down,1";
7921             source: "over2";
7922             action: SIGNAL_EMIT "elm,action,press" "";
7923             after: "button_click_anim";
7924          }
7925          program { name: "button_click_anim";
7926             action: STATE_SET "clicked" 0.0;
7927             target: "button_image";
7928             after: "text_clicked";
7929          }
7930          program { name: "text_clicked";
7931             script {
7932                new st[31];
7933                new Float:vl;
7934                get_state(PART:"elm.text", st, 30, vl);
7935                if (!strcmp(st, "visible"))
7936                  set_state(PART:"elm.text", "clicked", 0.0);
7937             }
7938          }
7939          program { name: "button_unpress";
7940             action: SIGNAL_EMIT "elm,action,unpress" "";
7941          }
7942          program { name: "button_mouseout_clicked";
7943             signal: "mouse,up,1";
7944             source: "over3";
7945             script {
7946                new st[31];
7947                new Float:vl;
7948                get_state(PART:"elm.swallow.content", st, 30, vl);
7949                if (strcmp(st, "icononly"))
7950                  {
7951                     emit("elm,action,default,text,set", "");
7952                     set_state(PART:"elm.text", "visible", 0.0);
7953                  }
7954                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7955                  set_state(PART:"button_image", "default", 0.0);
7956             }
7957             after: button_unpress;
7958          }
7959          program { name: "button_unclick3";
7960             signal: "mouse,clicked,1";
7961             source: "over2";
7962             action: SIGNAL_EMIT "elm,action,click" "";
7963          }
7964          program { name: "text_show";
7965             signal: "elm,state,text,visible";
7966             source: "elm";
7967             script {
7968                new st[31];
7969                new Float:vl;
7970                get_state(PART:"elm.swallow.content", st, 30, vl);
7971                if (!strcmp(st, "icononly"))
7972                  {
7973                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7974                     set_state(PART:"icon_rect", "visible", 0.0);
7975                     set_state(PART:"padding_after_icon", "visible", 0.0);
7976                  }
7977                set_state(PART:"elm.text", "visible", 0.0);
7978             }
7979          }
7980          program { name: "text_hide";
7981             signal: "elm,state,text,hidden";
7982             source: "elm";
7983             script {
7984                new st[31];
7985                new Float:vl;
7986                get_state(PART:"elm.swallow.content", st, 30, vl);
7987                if (!strcmp(st, "visible"))
7988                  {
7989                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7990                     set_state(PART:"icon_rect", "icononly", 0.0);
7991                     set_state(PART:"padding_after_icon", "icononly", 0.0);
7992                  }
7993                set_state(PART:"elm.text", "default", 0.0);
7994             }
7995          }
7996          program { name: "icon_show";
7997             signal: "elm,state,icon,visible";
7998             source: "elm";
7999             script {
8000                new st[31];
8001                new Float:vl;
8002                get_state(PART:"elm.text", st, 30, vl);
8003                if (!strcmp(st, "visible"))
8004                  {
8005                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8006                     set_state(PART:"icon_rect", "visible", 0.0);
8007                     set_state(PART:"padding_after_icon", "visible", 0.0);
8008                  }
8009                else
8010                  {
8011                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8012                     set_state(PART:"icon_rect", "icononly", 0.0);
8013                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8014                  }
8015             }
8016          }
8017          program { name: "icon_hide";
8018             signal: "elm,state,icon,hidden";
8019             source: "elm";
8020             action: STATE_SET "default" 0.0;
8021             target: "elm.swallow.content";
8022             target: "icon_rect";
8023             target: "padding_after_icon";
8024          }
8025          program { name: "disable";
8026             signal: "elm,state,disabled";
8027             source: "elm";
8028             action: STATE_SET "disabled" 0.0;
8029             target: "over2";
8030             target: "disabler";
8031             after: "disable_text";
8032          }
8033          program { name: "disable_text";
8034             script {
8035                new st[31];
8036                new Float:vl;
8037                set_int(button_state, BUTTON_STATE_DISABLED);
8038                get_state(PART:"elm.text", st, 30, vl);
8039                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8040                  set_state(PART:"elm.text", "visible", 0.0);
8041             }
8042          }
8043          program { name: "enable";
8044             signal: "elm,state,enabled";
8045             source: "elm";
8046             action: STATE_SET "default" 0.0;
8047             target: "over2";
8048             target: "disabler";
8049             after: "enable_text";
8050          }
8051          program { name: "enable_text";
8052             script {
8053                new st[31];
8054                new Float:vl;
8055                set_int(button_state, BUTTON_STATE_ENABLED);
8056                get_state(PART:"elm.text", st, 30, vl);
8057                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8058                  set_state(PART:"elm.text", "visible", 0.0);
8059             }
8060          }
8061          program { name: "focused";
8062             action: STATE_SET "focused" 0.0;
8063             target: "button_image";
8064             target: "elm.text";
8065          }
8066          program { name: "unfocused";
8067             action: STATE_SET "default" 0.0;
8068             target: "button_image";
8069             after: "unfocus_text";
8070          }
8071          program { name: "unfocus_text";
8072             action: STATE_SET "visible" 0.0;
8073             target: "elm.text";
8074          }
8075       }
8076    }
8077
8078 ///////////////////////////////////////////////////////////////////////////////////////
8079    group { name: "elm/button/base/controlbar/horizontal_center";
8080       script {
8081          public button_state = BUTTON_STATE_ENABLED;
8082       }
8083       parts {
8084          part { name: "button_image";
8085             type: RECT;
8086             scale: 1;
8087             description { state: "default" 0.0;
8088                min: 20 30;
8089                rel1.offset: 5 5;
8090                rel2.offset: -6 -6;
8091                color: 0 0 0 0;
8092                visible: 0;
8093             }
8094             description { state: "clicked" 0.0;
8095                inherit: "default" 0.0;
8096                visible: 1;
8097             }
8098          }
8099          part { name: "padding_left_top";
8100             type: RECT;
8101             scale: 1;
8102             mouse_events: 0;
8103             description { state: "default" 0.0;
8104                align: 0.0 0.0;
8105                rel2.relative: 0.0 0.0;
8106                min: 10 5;
8107                fixed: 1 1;
8108                visible: 0;
8109             }
8110          }
8111          part { name: "padding_right_bottom";
8112             type: RECT;
8113             scale: 1;
8114             mouse_events: 0;
8115             description { state: "default" 0.0;
8116                align: 1.0 1.0;
8117                rel1.relative: 1.0 1.0;
8118                min: 10 5;
8119                fixed: 1 1;
8120                visible: 0;
8121             }
8122          }
8123          part { name: "icon_rect";
8124             type: RECT;
8125             scale: 1;
8126             mouse_events: 0;
8127             description { state: "default" 0.0;
8128                min: 0 0;
8129                fixed: 1 0;
8130                rel1 {
8131                   relative: 1.0 1.0;
8132                   to: "padding_left_top";
8133                }
8134                rel2 {
8135                   relative: 1.0 0.0;
8136                   to_x: "padding_left_top";
8137                   to_y: "padding_right_bottom";
8138                }
8139                align: 0.0 0.5;
8140                color: 0 0 0 0;
8141             }
8142             description { state: "visible" 0.0;
8143                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8144                fixed: 1 0;
8145                rel1 {
8146                   relative: 1.0 1.0;
8147                   to: "padding_left_top";
8148                }
8149                rel2 {
8150                   relative: 1.0 0.0;
8151                   to_x: "padding_left_top";
8152                   to_y: "padding_right_bottom";
8153                }
8154                align: 0.0 0.5;
8155                color: 0 0 0 0;
8156             }
8157             description { state: "icononly" 0.0;
8158                inherit: "default" 0.0;
8159                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8160             }
8161          }
8162          part { name: "padding_after_icon";
8163             type: RECT;
8164             scale: 1;
8165             mouse_events: 0;
8166             description { state: "default" 0.0; //when only icon or no icon is there
8167                align: 0.0 0.0;
8168                rel1 {
8169                   relative: 1.0 0.0;
8170                   to: "icon_rect";
8171                }
8172                rel2.to: "icon_rect";
8173                fixed: 1 0;
8174                min: 0 0;
8175                color: 0 0 0 0;
8176             }
8177             description { state: "visible" 0.0;
8178                align: 0.0 0.0;
8179                rel1 {
8180                   relative: 1.0 0.0;
8181                   to: "icon_rect";
8182                }
8183                rel2.to: "icon_rect";
8184                fixed: 1 0;
8185                min: 6 0;
8186                color: 0 0 0 0;
8187             }
8188             description { state: "icononly" 0.0;
8189                inherit: "default" 0.0;
8190             }
8191          }
8192          part { name: "padding_before_text";
8193             type: RECT;
8194             scale: 1;
8195             mouse_events: 0;
8196             description { state: "default" 0.0; //when only icon or no icon is there
8197                align: 1.0 0.5;
8198                rel1 {
8199                   relative: 0.0 1.0;
8200                   to_x: "elm.text";
8201                   to_y: "padding_left_top";
8202                }
8203                rel2 {
8204                   relative: 0.0 0.0;
8205                   to_x: "elm.text";
8206                   to_y: "padding_right_bottom";
8207                }
8208                fixed: 1 0;
8209                min: 6 0;
8210                color: 0 0 0 0;
8211             }
8212          }
8213          part { name: "elm.swallow.content";
8214             type: SWALLOW;
8215             scale: 1;
8216             clip_to: "disabler";
8217             description { state: "default" 0.0;
8218                visible: 0;
8219                align: 0.0 0.5;
8220                rel1 {
8221                   relative: 1.0 1.0;
8222                   to: "padding_left_top";
8223                }
8224                rel2 {
8225                   relative: 1.0 0.0;
8226                   to_x: "padding_left_top";
8227                   to_y: "padding_right_bottom";
8228                }
8229                fixed: 1 0;
8230             }
8231             description { state: "visible" 0.0;
8232                fixed: 1 0;
8233                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8234                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8235                align: 1.0 0.5;
8236                rel1 {
8237                   relative: 0.0 1.0;
8238                   to_x: "padding_before_text";
8239                   to_y: "padding_left_top";
8240                }
8241                rel2 {
8242                   relative: 0.0 0.0;
8243                   to_x: "padding_before_text";
8244                   to_y: "padding_right_bottom";
8245                }
8246                aspect: 1.0 1.0;
8247                aspect_preference: VERTICAL;
8248             }
8249             description { state: "icononly" 0.0;
8250                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8251                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8252                rel1 {
8253                   relative: 1.0 1.0;
8254                   to: "padding_left_top";
8255                }
8256                rel2 {
8257                   relative: 0.0 0.0;
8258                   to: "padding_right_bottom";
8259                }
8260                aspect: 1.0 1.0;
8261                aspect_preference: VERTICAL;
8262             }
8263          }
8264          part { name: "elm.text";
8265             type: TEXT;
8266             mouse_events: 0;
8267             scale: 1;
8268             clip_to: "disabler";
8269             description { state: "default" 0.0;
8270                visible: 0;
8271                rel1 {
8272                   relative: 1.0 1.0;
8273                   to_x: "padding_after_icon";
8274                   to_y: "padding_left_top";
8275                }
8276                rel2 {
8277                   relative: 0.0 0.0;
8278                   to: "padding_right_bottom";
8279                }
8280                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
8281                text {
8282                   font: "SLP:style=Medium";
8283                   size: BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC;
8284                   min: 0 0;
8285                   max: 1 0;
8286                }
8287             }
8288             description { state: "visible" 0.0;
8289                inherit: "default" 0.0;
8290                visible: 1;
8291             }
8292             description { state: "clicked" 0.0;
8293                inherit: "default" 0.0;
8294                visible: 1;
8295                min: 0 0;
8296             }
8297             description { state: "focused" 0.0;
8298                inherit: "default" 0.0;
8299                visible: 1;
8300                min: 0 0;
8301                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
8302             }
8303          }
8304          part { name: "over2";
8305             type: RECT;
8306             repeat_events: 1;
8307             ignore_flags: ON_HOLD;
8308             description { state: "default" 0.0;
8309                color: 0 0 0 0;
8310             }
8311             description { state: "disabled" 0.0;
8312                inherit: "default" 0.0;
8313                visible: 0;
8314             }
8315          }
8316          part { name: "over3";
8317             type: RECT;
8318             repeat_events: 1;
8319             description { state: "default" 0.0;
8320                color: 0 0 0 0;
8321             }
8322          }
8323          part { name: "disabler";
8324             type: RECT;
8325             description { state: "default" 0.0;
8326                color: 255 255 255 255;
8327             }
8328             description { state: "disabled" 0.0;
8329                color: 255 255 255 127;
8330             }
8331          }
8332       }
8333       programs {
8334          program { name: "button_click";
8335             signal: "mouse,down,1";
8336             source: "over2";
8337             action: SIGNAL_EMIT "elm,action,press" "";
8338             after: "button_click_anim";
8339          }
8340          program { name: "button_click_anim";
8341             action: STATE_SET "clicked" 0.0;
8342             target: "button_image";
8343             after: "text_clicked";
8344          }
8345          program { name: "text_clicked";
8346             script {
8347                new st[31];
8348                new Float:vl;
8349                get_state(PART:"elm.text", st, 30, vl);
8350                if (!strcmp(st, "visible"))
8351                  set_state(PART:"elm.text", "clicked", 0.0);
8352             }
8353          }
8354          program { name: "button_unpress";
8355             action: SIGNAL_EMIT "elm,action,unpress" "";
8356          }
8357          program { name: "button_mouseout_clicked";
8358             signal: "mouse,up,1";
8359             source: "over3";
8360             script {
8361                new st[31];
8362                new Float:vl;
8363                get_state(PART:"elm.swallow.content", st, 30, vl);
8364                if (strcmp(st, "icononly"))
8365                  {
8366                     emit("elm,action,default,text,set", "");
8367                     set_state(PART:"elm.text", "visible", 0.0);
8368                  }
8369                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8370                  set_state(PART:"button_image", "default", 0.0);
8371             }
8372             after: button_unpress;
8373          }
8374          program { name: "button_unclick3";
8375             signal: "mouse,clicked,1";
8376             source: "over2";
8377             action: SIGNAL_EMIT "elm,action,click" "";
8378          }
8379          program { name: "text_show";
8380             signal: "elm,state,text,visible";
8381             source: "elm";
8382             script {
8383                new st[31];
8384                new Float:vl;
8385                get_state(PART:"elm.swallow.content", st, 30, vl);
8386                if (!strcmp(st, "icononly"))
8387                  {
8388                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8389                     set_state(PART:"icon_rect", "visible", 0.0);
8390                     set_state(PART:"padding_after_icon", "visible", 0.0);
8391                  }
8392                set_state(PART:"elm.text", "visible", 0.0);
8393             }
8394          }
8395          program { name: "text_hide";
8396             signal: "elm,state,text,hidden";
8397             source: "elm";
8398             script {
8399                new st[31];
8400                new Float:vl;
8401                get_state(PART:"elm.swallow.content", st, 30, vl);
8402                if (!strcmp(st, "visible"))
8403                  {
8404                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8405                     set_state(PART:"icon_rect", "icononly", 0.0);
8406                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8407                  }
8408                set_state(PART:"elm.text", "default", 0.0);
8409             }
8410          }
8411          program { name: "icon_show";
8412             signal: "elm,state,icon,visible";
8413             source: "elm";
8414             script {
8415                new st[31];
8416                new Float:vl;
8417                get_state(PART:"elm.text", st, 30, vl);
8418                if (!strcmp(st, "visible"))
8419                  {
8420                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8421                     set_state(PART:"icon_rect", "visible", 0.0);
8422                     set_state(PART:"padding_after_icon", "visible", 0.0);
8423                  }
8424                else
8425                  {
8426                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8427                     set_state(PART:"icon_rect", "icononly", 0.0);
8428                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8429                  }
8430             }
8431          }
8432          program { name: "icon_hide";
8433             signal: "elm,state,icon,hidden";
8434             source: "elm";
8435             action: STATE_SET "default" 0.0;
8436             target: "elm.swallow.content";
8437             target: "icon_rect";
8438             target: "padding_after_icon";
8439          }
8440          program { name: "disable";
8441             signal: "elm,state,disabled";
8442             source: "elm";
8443             action: STATE_SET "disabled" 0.0;
8444             target: "over2";
8445             target: "disabler";
8446             after: "disable_text";
8447          }
8448          program { name: "disable_text";
8449             script {
8450                new st[31];
8451                new Float:vl;
8452                set_int(button_state, BUTTON_STATE_DISABLED);
8453                get_state(PART:"elm.text", st, 30, vl);
8454                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8455                  set_state(PART:"elm.text", "visible", 0.0);
8456             }
8457          }
8458          program { name: "enable";
8459             signal: "elm,state,enabled";
8460             source: "elm";
8461             action: STATE_SET "default" 0.0;
8462             target: "over2";
8463             target: "disabler";
8464             after: "enable_text";
8465          }
8466          program { name: "enable_text";
8467             script {
8468                new st[31];
8469                new Float:vl;
8470                set_int(button_state, BUTTON_STATE_ENABLED);
8471                get_state(PART:"elm.text", st, 30, vl);
8472                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8473                  set_state(PART:"elm.text", "visible", 0.0);
8474             }
8475          }
8476          program { name: "focused";
8477             action: STATE_SET "focused" 0.0;
8478             target: "button_image";
8479             target: "elm.text";
8480          }
8481          program { name: "unfocused";
8482             action: STATE_SET "default" 0.0;
8483             target: "button_image";
8484             after: "unfocus_text";
8485          }
8486          program { name: "unfocus_text";
8487             action: STATE_SET "visible" 0.0;
8488             target: "elm.text";
8489          }
8490       }
8491    }
8492
8493 ///////////////////////////////////////////////////////////////////////////////////////
8494    group { name: "elm/button/base/controlbar/horizontal_left";
8495       script {
8496          public button_state = BUTTON_STATE_ENABLED;
8497       }
8498       parts {
8499          part { name: "button_image";
8500             type: RECT;
8501             scale: 1;
8502             description { state: "default" 0.0;
8503                min: 20 30;
8504                rel1.offset: 5 5;
8505                rel2.offset: -6 -6;
8506                color: 0 0 0 0;
8507                visible: 0;
8508             }
8509             description { state: "clicked" 0.0;
8510                inherit: "default" 0.0;
8511                visible: 1;
8512             }
8513          }
8514          part { name: "padding_left_top";
8515             type: RECT;
8516             scale: 1;
8517             mouse_events: 0;
8518             description { state: "default" 0.0;
8519                align: 0.0 0.0;
8520                rel2.relative: 0.0 0.0;
8521                min: 10 5;
8522                fixed: 1 1;
8523                visible: 0;
8524             }
8525          }
8526          part { name: "padding_right_bottom";
8527             type: RECT;
8528             scale: 1;
8529             mouse_events: 0;
8530             description { state: "default" 0.0;
8531                align: 1.0 1.0;
8532                rel1.relative: 1.0 1.0;
8533                min: 10 5;
8534                fixed: 1 1;
8535                visible: 0;
8536             }
8537          }
8538          part { name: "icon_rect";
8539             type: RECT;
8540             scale: 1;
8541             mouse_events: 0;
8542             description { state: "default" 0.0;
8543                min: 0 0;
8544                fixed: 1 0;
8545                rel1 {
8546                   relative: 1.0 1.0;
8547                   to: "padding_left_top";
8548                }
8549                rel2 {
8550                   relative: 1.0 0.0;
8551                   to_x: "padding_left_top";
8552                   to_y: "padding_right_bottom";
8553                }
8554                align: 0.0 0.5;
8555                color: 0 0 0 0;
8556             }
8557             description { state: "visible" 0.0;
8558                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8559                fixed: 1 0;
8560                rel1 {
8561                   relative: 1.0 1.0;
8562                   to: "padding_left_top";
8563                }
8564                rel2 {
8565                   relative: 1.0 0.0;
8566                   to_x: "padding_left_top";
8567                   to_y: "padding_right_bottom";
8568                }
8569                align: 0.0 0.5;
8570                color: 0 0 0 0;
8571             }
8572             description { state: "icononly" 0.0;
8573                inherit: "default" 0.0;
8574             }
8575          }
8576          part { name: "padding_after_icon";
8577             type: RECT;
8578             scale: 1;
8579             mouse_events: 0;
8580             description { state: "default" 0.0; //when only icon or no icon is there
8581                align: 0.0 0.0;
8582                rel1 {
8583                   relative: 1.0 0.0;
8584                   to: "icon_rect";
8585                }
8586                rel2.to: "icon_rect";
8587                fixed: 1 0;
8588                min: 0 0;
8589                color: 0 0 0 0;
8590             }
8591             description { state: "visible" 0.0;
8592                align: 0.0 0.0;
8593                rel1 {
8594                   relative: 1.0 0.0;
8595                   to: "icon_rect";
8596                }
8597                rel2.to: "icon_rect";
8598                fixed: 1 0;
8599                min: 6 0;
8600                color: 0 0 0 0;
8601             }
8602             description { state: "icononly" 0.0;
8603                inherit: "default" 0.0;
8604             }
8605          }
8606          part { name: "padding_before_text";
8607             type: RECT;
8608             scale: 1;
8609             mouse_events: 0;
8610             description { state: "default" 0.0; //when only icon or no icon is there
8611                align: 1.0 0.5;
8612                rel1 {
8613                   relative: 0.0 1.0;
8614                   to_x: "elm.text";
8615                   to_y: "padding_left_top";
8616                }
8617                rel2 {
8618                   relative: 0.0 0.0;
8619                   to_x: "elm.text";
8620                   to_y: "padding_right_bottom";
8621                }
8622                fixed: 1 0;
8623                min: 6 0;
8624                color: 0 0 0 0;
8625             }
8626          }
8627          part { name: "elm.swallow.content";
8628             type: SWALLOW;
8629             scale: 1;
8630             clip_to: "disabler";
8631             description { state: "default" 0.0;
8632                visible: 0;
8633                align: 0.0 0.5;
8634                rel1 {
8635                   relative: 1.0 1.0;
8636                   to: "padding_left_top";
8637                }
8638                rel2 {
8639                   relative: 1.0 0.0;
8640                   to_x: "padding_left_top";
8641                   to_y: "padding_right_bottom";
8642                }
8643                fixed: 1 0;
8644             }
8645             description { state: "visible" 0.0;
8646                fixed: 1 0;
8647                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8648                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8649                align: 1.0 0.5;
8650                rel1 {
8651                   relative: 0.0 1.0;
8652                   to_x: "padding_before_text";
8653                   to_y: "padding_left_top";
8654                }
8655                rel2 {
8656                   relative: 0.0 0.0;
8657                   to_x: "padding_before_text";
8658                   to_y: "padding_right_bottom";
8659                }
8660                aspect: 1.0 1.0;
8661                aspect_preference: VERTICAL;
8662             }
8663             description { state: "icononly" 0.0;
8664                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8665                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8666                rel1 {
8667                   relative: 1.0 1.0;
8668                   to: "padding_left_top";
8669                }
8670                rel2 {
8671                   relative: 0.0 0.0;
8672                   to: "padding_right_bottom";
8673                }
8674                aspect: 1.0 1.0;
8675                aspect_preference: VERTICAL;
8676             }
8677          }
8678          part { name: "elm.text";
8679             type: TEXT;
8680             mouse_events: 0;
8681             scale: 1;
8682             clip_to: "disabler";
8683             description { state: "default" 0.0;
8684                visible: 0;
8685                rel1 {
8686                   relative: 1.0 1.0;
8687                   to_x: "padding_after_icon";
8688                   to_y: "padding_left_top";
8689                }
8690                rel2 {
8691                   relative: 0.0 0.0;
8692                   to: "padding_right_bottom";
8693                }
8694                align: 0.0 0.5;
8695                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
8696                text {
8697                   font: "SLP:style=Medium";
8698                   size: 20;
8699                   min: 0 0;
8700                   max: 1 0;
8701                   align: 0.0 0.5;
8702                }
8703             }
8704             description { state: "visible" 0.0;
8705                inherit: "default" 0.0;
8706                visible: 1;
8707             }
8708             description { state: "clicked" 0.0;
8709                inherit: "default" 0.0;
8710                visible: 1;
8711                min: 0 0;
8712             }
8713             description { state: "focused" 0.0;
8714                inherit: "default" 0.0;
8715                visible: 1;
8716                min: 0 0;
8717                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
8718             }
8719          }
8720          part { name: "over2";
8721             type: RECT;
8722             repeat_events: 1;
8723             ignore_flags: ON_HOLD;
8724             description { state: "default" 0.0;
8725                color: 0 0 0 0;
8726             }
8727          }
8728          part { name: "over3";
8729             type: RECT;
8730             repeat_events: 1;
8731             description { state: "default" 0.0;
8732                color: 0 0 0 0;
8733             }
8734          }
8735          part { name: "disabler";
8736             type: RECT;
8737             description { state: "default" 0.0;
8738                color: 255 255 255 255;
8739             }
8740             description { state: "disabled" 0.0;
8741                color: 255 255 255 127;
8742             }
8743          }
8744       }
8745       programs {
8746          program { name: "button_click";
8747             signal: "mouse,down,1";
8748             source: "over2";
8749             action: SIGNAL_EMIT "elm,action,press" "";
8750             after: "button_click_anim";
8751          }
8752          program { name: "button_click_anim";
8753             action: STATE_SET "clicked" 0.0;
8754             target: "button_image";
8755             after: "text_clicked";
8756          }
8757          program { name: "text_clicked";
8758             script {
8759                new st[31];
8760                new Float:vl;
8761                get_state(PART:"elm.text", st, 30, vl);
8762                if (!strcmp(st, "visible"))
8763                  set_state(PART:"elm.text", "clicked", 0.0);
8764             }
8765          }
8766          program { name: "button_unpress";
8767             action: SIGNAL_EMIT "elm,action,unpress" "";
8768          }
8769          program { name: "button_mouseout_clicked";
8770             signal: "mouse,up,1";
8771             source: "over3";
8772             script {
8773                new st[31];
8774                new Float:vl;
8775                get_state(PART:"elm.swallow.content", st, 30, vl);
8776                if (strcmp(st, "icononly"))
8777                  {
8778                     emit("elm,action,default,text,set", "");
8779                     set_state(PART:"elm.text", "visible", 0.0);
8780                  }
8781                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8782                  set_state(PART:"button_image", "default", 0.0);
8783             }
8784             after: button_unpress;
8785          }
8786          program { name: "button_unclick3";
8787             signal: "mouse,clicked,1";
8788             source: "over2";
8789             action: SIGNAL_EMIT "elm,action,click" "";
8790          }
8791          program { name: "text_show";
8792             signal: "elm,state,text,visible";
8793             source: "elm";
8794             script {
8795                new st[31];
8796                new Float:vl;
8797                get_state(PART:"elm.swallow.content", st, 30, vl);
8798                if (!strcmp(st, "icononly"))
8799                  {
8800                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8801                     set_state(PART:"icon_rect", "visible", 0.0);
8802                     set_state(PART:"padding_after_icon", "visible", 0.0);
8803                  }
8804                set_state(PART:"elm.text", "visible", 0.0);
8805             }
8806          }
8807          program { name: "text_hide";
8808             signal: "elm,state,text,hidden";
8809             source: "elm";
8810             script {
8811                new st[31];
8812                new Float:vl;
8813                get_state(PART:"elm.swallow.content", st, 30, vl);
8814                if (!strcmp(st, "visible"))
8815                  {
8816                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8817                     set_state(PART:"icon_rect", "icononly", 0.0);
8818                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8819                  }
8820                set_state(PART:"elm.text", "default", 0.0);
8821             }
8822          }
8823          program { name: "icon_show";
8824             signal: "elm,state,icon,visible";
8825             source: "elm";
8826             script {
8827                new st[31];
8828                new Float:vl;
8829                get_state(PART:"elm.text", st, 30, vl);
8830                if (!strcmp(st, "visible"))
8831                  {
8832                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8833                     set_state(PART:"icon_rect", "visible", 0.0);
8834                     set_state(PART:"padding_after_icon", "visible", 0.0);
8835                  }
8836                else
8837                  {
8838                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8839                     set_state(PART:"icon_rect", "icononly", 0.0);
8840                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8841                  }
8842             }
8843          }
8844          program { name: "icon_hide";
8845             signal: "elm,state,icon,hidden";
8846             source: "elm";
8847             action: STATE_SET "default" 0.0;
8848             target: "elm.swallow.content";
8849             target: "icon_rect";
8850             target: "padding_after_icon";
8851          }
8852          program { name: "disable";
8853             signal: "elm,state,disabled";
8854             source: "elm";
8855             action: STATE_SET "disabled" 0.0;
8856             target: "disabler";
8857             after: "disable_text";
8858          }
8859          program { name: "disable_text";
8860             script {
8861                new st[31];
8862                new Float:vl;
8863                set_int(button_state, BUTTON_STATE_DISABLED);
8864                get_state(PART:"elm.text", st, 30, vl);
8865                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8866                  set_state(PART:"elm.text", "visible", 0.0);
8867             }
8868          }
8869          program { name: "enable";
8870             signal: "elm,state,enabled";
8871             source: "elm";
8872             action: STATE_SET "default" 0.0;
8873             target: "disabler";
8874             after: "enable_text";
8875          }
8876          program { name: "enable_text";
8877             script {
8878                new st[31];
8879                new Float:vl;
8880                set_int(button_state, BUTTON_STATE_ENABLED);
8881                get_state(PART:"elm.text", st, 30, vl);
8882                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8883                  set_state(PART:"elm.text", "visible", 0.0);
8884             }
8885          }
8886          program { name: "focused";
8887             action: STATE_SET "focused" 0.0;
8888             target: "button_image";
8889             target: "elm.text";
8890          }
8891          program { name: "unfocused";
8892             action: STATE_SET "default" 0.0;
8893             target: "button_image";
8894             after: "unfocus_text";
8895          }
8896          program { name: "unfocus_text";
8897             action: STATE_SET "visible" 0.0;
8898             target: "elm.text";
8899          }
8900       }
8901    }
8902
8903 ///////////////////////////////////////////////////////////////////////////////////////
8904    group { name: "elm/button/base/controlbar/horizontal_right";
8905       script {
8906          public button_state = BUTTON_STATE_ENABLED;
8907       }
8908       parts {
8909          part { name: "button_image";
8910             type: RECT;
8911             scale: 1;
8912             description { state: "default" 0.0;
8913                min: 20 30;
8914                rel1.offset: 5 5;
8915                rel2.offset: -6 -6;
8916                color: 0 0 0 0;
8917                visible: 0;
8918             }
8919             description { state: "clicked" 0.0;
8920                inherit: "default" 0.0;
8921                visible: 1;
8922             }
8923          }
8924          part { name: "padding_left_top";
8925             type: RECT;
8926             scale: 1;
8927             mouse_events: 0;
8928             description { state: "default" 0.0;
8929                align: 0.0 0.0;
8930                rel2.relative: 0.0 0.0;
8931                min: 10 5;
8932                fixed: 1 1;
8933                visible: 0;
8934             }
8935          }
8936          part { name: "padding_right_bottom";
8937             type: RECT;
8938             scale: 1;
8939             mouse_events: 0;
8940             description { state: "default" 0.0;
8941                align: 1.0 1.0;
8942                rel1.relative: 1.0 1.0;
8943                min: 10 5;
8944                fixed: 1 1;
8945                visible: 0;
8946             }
8947          }
8948          part { name: "icon_rect";
8949             type: RECT;
8950             scale: 1;
8951             mouse_events: 0;
8952             description { state: "default" 0.0;
8953                min: 0 0;
8954                fixed: 1 0;
8955                rel1 {
8956                   relative: 1.0 1.0;
8957                   to: "padding_left_top";
8958                }
8959                rel2 {
8960                   relative: 1.0 0.0;
8961                   to_x: "padding_left_top";
8962                   to_y: "padding_right_bottom";
8963                }
8964                align: 0.0 0.5;
8965                color: 0 0 0 0;
8966             }
8967             description { state: "visible" 0.0;
8968                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8969                fixed: 1 0;
8970                rel1 {
8971                   relative: 1.0 1.0;
8972                   to: "padding_left_top";
8973                }
8974                rel2 {
8975                   relative: 1.0 0.0;
8976                   to_x: "padding_left_top";
8977                   to_y: "padding_right_bottom";
8978                }
8979                align: 0.0 0.5;
8980                color: 0 0 0 0;
8981             }
8982             description { state: "icononly" 0.0;
8983                inherit: "default" 0.0;
8984             }
8985          }
8986          part { name: "padding_after_icon";
8987             type: RECT;
8988             scale: 1;
8989             mouse_events: 0;
8990             description { state: "default" 0.0; //when only icon or no icon is there
8991                align: 0.0 0.0;
8992                rel1 {
8993                   relative: 1.0 0.0;
8994                   to: "icon_rect";
8995                }
8996                rel2.to: "icon_rect";
8997                fixed: 1 0;
8998                min: 0 0;
8999                color: 0 0 0 0;
9000             }
9001             description { state: "visible" 0.0;
9002                align: 0.0 0.0;
9003                rel1 {
9004                   relative: 1.0 0.0;
9005                   to: "icon_rect";
9006                }
9007                rel2.to: "icon_rect";
9008                fixed: 1 0;
9009                min: 6 0;
9010                color: 0 0 0 0;
9011             }
9012             description { state: "icononly" 0.0;
9013                inherit: "default" 0.0;
9014             }
9015          }
9016          part { name: "padding_before_text";
9017             type: RECT;
9018             scale: 1;
9019             mouse_events: 0;
9020             description { state: "default" 0.0; //when only icon or no icon is there
9021                align: 1.0 0.5;
9022                rel1 {
9023                   relative: 0.0 1.0;
9024                   to_x: "elm.text";
9025                   to_y: "padding_left_top";
9026                }
9027                rel2 {
9028                   relative: 0.0 0.0;
9029                   to_x: "elm.text";
9030                   to_y: "padding_right_bottom";
9031                }
9032                fixed: 1 0;
9033                min: 6 0;
9034                color: 0 0 0 0;
9035             }
9036          }
9037          part { name: "elm.swallow.content";
9038             type: SWALLOW;
9039             scale: 1;
9040             clip_to: "disabler";
9041             description { state: "default" 0.0;
9042                visible: 0;
9043                align: 0.0 0.5;
9044                rel1 {
9045                   relative: 1.0 1.0;
9046                   to: "padding_left_top";
9047                }
9048                rel2 {
9049                   relative: 1.0 0.0;
9050                   to_x: "padding_left_top";
9051                   to_y: "padding_right_bottom";
9052                }
9053                fixed: 1 0;
9054             }
9055             description { state: "visible" 0.0;
9056                fixed: 1 0;
9057                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9058                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9059                align: 1.0 0.5;
9060                rel1 {
9061                   relative: 0.0 1.0;
9062                   to_x: "padding_before_text";
9063                   to_y: "padding_left_top";
9064                }
9065                rel2 {
9066                   relative: 0.0 0.0;
9067                   to_x: "padding_before_text";
9068                   to_y: "padding_right_bottom";
9069                }
9070                aspect: 1.0 1.0;
9071                aspect_preference: VERTICAL;
9072             }
9073             description { state: "icononly" 0.0;
9074                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9075                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
9076                rel1 {
9077                   relative: 1.0 1.0;
9078                   to: "padding_left_top";
9079                }
9080                rel2 {
9081                   relative: 0.0 0.0;
9082                   to: "padding_right_bottom";
9083                }
9084                aspect: 1.0 1.0;
9085                aspect_preference: VERTICAL;
9086             }
9087          }
9088          part { name: "elm.text";
9089             type: TEXT;
9090             mouse_events: 0;
9091             scale: 1;
9092             clip_to: "disabler";
9093             description { state: "default" 0.0;
9094                visible: 0;
9095                rel1 {
9096                   relative: 1.0 1.0;
9097                   to_x: "padding_after_icon";
9098                   to_y: "padding_left_top";
9099                }
9100                rel2 {
9101                   relative: 0.0 0.0;
9102                   to: "padding_right_bottom";
9103                }
9104                align: 1.0 0.5;
9105                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
9106                text {
9107                   font: "SLP:style=Medium";
9108                   size: 20;
9109                   min: 0 0;
9110                   max: 1 0;
9111                   align: 1.0 0.5;
9112                }
9113             }
9114             description { state: "visible" 0.0;
9115                inherit: "default" 0.0;
9116                visible: 1;
9117             }
9118             description { state: "clicked" 0.0;
9119                inherit: "default" 0.0;
9120                visible: 1;
9121                min: 0 0;
9122             }
9123             description { state: "focused" 0.0;
9124                inherit: "default" 0.0;
9125                visible: 1;
9126                min: 0 0;
9127                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
9128             }
9129          }
9130          part { name: "over2";
9131             type: RECT;
9132             repeat_events: 1;
9133             ignore_flags: ON_HOLD;
9134             description { state: "default" 0.0;
9135                color: 0 0 0 0;
9136             }
9137          }
9138          part { name: "over3";
9139             type: RECT;
9140             repeat_events: 1;
9141             description { state: "default" 0.0;
9142                color: 0 0 0 0;
9143             }
9144          }
9145          part { name: "disabler";
9146             type: RECT;
9147             description { state: "default" 0.0;
9148                color: 255 255 255 255;
9149             }
9150             description { state: "disabled" 0.0;
9151                color: 255 255 255 127;
9152             }
9153          }
9154       }
9155       programs {
9156          program { name: "button_click";
9157             signal: "mouse,down,1";
9158             source: "over2";
9159             action: SIGNAL_EMIT "elm,action,press" "";
9160             after: "button_click_anim";
9161          }
9162          program { name: "button_click_anim";
9163             action: STATE_SET "clicked" 0.0;
9164             target: "button_image";
9165             after: "text_clicked";
9166          }
9167          program { name: "text_clicked";
9168             script {
9169                new st[31];
9170                new Float:vl;
9171                get_state(PART:"elm.text", st, 30, vl);
9172                if (!strcmp(st, "visible"))
9173                  set_state(PART:"elm.text", "clicked", 0.0);
9174             }
9175          }
9176          program { name: "button_unpress";
9177             action: SIGNAL_EMIT "elm,action,unpress" "";
9178          }
9179          program { name: "button_mouseout_clicked";
9180             signal: "mouse,up,1";
9181             source: "over3";
9182             script {
9183                new st[31];
9184                new Float:vl;
9185                get_state(PART:"elm.swallow.content", st, 30, vl);
9186                if (strcmp(st, "icononly"))
9187                  {
9188                     emit("elm,action,default,text,set", "");
9189                     set_state(PART:"elm.text", "visible", 0.0);
9190                  }
9191                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9192                  set_state(PART:"button_image", "default", 0.0);
9193             }
9194             after: button_unpress;
9195          }
9196          program { name: "button_unclick3";
9197             signal: "mouse,clicked,1";
9198             source: "over2";
9199             action: SIGNAL_EMIT "elm,action,click" "";
9200          }
9201          program { name: "text_show";
9202             signal: "elm,state,text,visible";
9203             source: "elm";
9204             script {
9205                new st[31];
9206                new Float:vl;
9207                get_state(PART:"elm.swallow.content", st, 30, vl);
9208                if (!strcmp(st, "icononly"))
9209                  {
9210                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9211                     set_state(PART:"icon_rect", "visible", 0.0);
9212                     set_state(PART:"padding_after_icon", "visible", 0.0);
9213                  }
9214                set_state(PART:"elm.text", "visible", 0.0);
9215             }
9216          }
9217          program { name: "text_hide";
9218             signal: "elm,state,text,hidden";
9219             source: "elm";
9220             script {
9221                new st[31];
9222                new Float:vl;
9223                get_state(PART:"elm.swallow.content", st, 30, vl);
9224                if (!strcmp(st, "visible"))
9225                  {
9226                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9227                     set_state(PART:"icon_rect", "icononly", 0.0);
9228                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9229                  }
9230                set_state(PART:"elm.text", "default", 0.0);
9231             }
9232          }
9233          program { name: "icon_show";
9234             signal: "elm,state,icon,visible";
9235             source: "elm";
9236             script {
9237                new st[31];
9238                new Float:vl;
9239                get_state(PART:"elm.text", st, 30, vl);
9240                if (!strcmp(st, "visible"))
9241                  {
9242                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9243                     set_state(PART:"icon_rect", "visible", 0.0);
9244                     set_state(PART:"padding_after_icon", "visible", 0.0);
9245                  }
9246                else
9247                  {
9248                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9249                     set_state(PART:"icon_rect", "icononly", 0.0);
9250                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9251                  }
9252             }
9253          }
9254          program { name: "icon_hide";
9255             signal: "elm,state,icon,hidden";
9256             source: "elm";
9257             action: STATE_SET "default" 0.0;
9258             target: "elm.swallow.content";
9259             target: "icon_rect";
9260             target: "padding_after_icon";
9261          }
9262          program { name: "disable";
9263             signal: "elm,state,disabled";
9264             source: "elm";
9265             action: STATE_SET "disabled" 0.0;
9266             target: "disabler";
9267             after: "disable_text";
9268          }
9269          program { name: "disable_text";
9270             script {
9271                new st[31];
9272                new Float:vl;
9273                set_int(button_state, BUTTON_STATE_DISABLED);
9274                get_state(PART:"elm.text", st, 30, vl);
9275                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9276                  set_state(PART:"elm.text", "visible", 0.0);
9277             }
9278          }
9279          program { name: "enable";
9280             signal: "elm,state,enabled";
9281             source: "elm";
9282             action: STATE_SET "default" 0.0;
9283             target: "disabler";
9284             after: "enable_text";
9285          }
9286          program { name: "enable_text";
9287             script {
9288                new st[31];
9289                new Float:vl;
9290                set_int(button_state, BUTTON_STATE_ENABLED);
9291                get_state(PART:"elm.text", st, 30, vl);
9292                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9293                  set_state(PART:"elm.text", "visible", 0.0);
9294             }
9295          }
9296          program { name: "focused";
9297             action: STATE_SET "focused" 0.0;
9298             target: "button_image";
9299             target: "elm.text";
9300          }
9301          program { name: "unfocused";
9302             action: STATE_SET "default" 0.0;
9303             target: "button_image";
9304             after: "unfocus_text";
9305          }
9306          program { name: "unfocus_text";
9307             action: STATE_SET "visible" 0.0;
9308             target: "elm.text";
9309          }
9310       }
9311    }
9312
9313 ///////////////////////////////////////////////////////////////////////////////////////
9314    group { name: "elm/button/base/tickernoti";
9315       images {
9316          image: "00_button_06_normal.png" COMP;
9317          image: "00_button_06_press.png" COMP;
9318          image: "00_button_06_dim.png" COMP;
9319       }
9320       script {
9321          public button_state = BUTTON_STATE_ENABLED;
9322       }
9323       parts {
9324          part { name: "button_image";
9325             scale: 1;
9326             description { state: "default" 0.0;
9327                image {
9328                   normal: "00_button_06_normal.png";
9329                   border: BUTTON_TICKERNOTI_BG_BORDER_INC;
9330                   border_scale: 1;
9331                }
9332             }
9333             description { state: "clicked" 0.0;
9334                inherit: "default" 0.0;
9335                image.normal: "00_button_06_press.png";
9336             }
9337             description { state: "disabled" 0.0;
9338                inherit: "default" 0.0;
9339                image.normal: "00_button_06_dim.png";
9340             }
9341             description { state: "focused" 0.0;
9342                inherit: "default" 0.0;
9343                image.normal: "00_button_06_press.png";
9344             }
9345          }
9346          part { name: "padding_left_top";
9347             type: RECT;
9348             scale: 1;
9349             mouse_events: 0;
9350             description { state: "default" 0.0;
9351                align: 0.0 0.0;
9352                rel2.relative: 0.0 0.0;
9353                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
9354                fixed: 1 1;
9355                visible: 0;
9356             }
9357          }
9358          part { name: "bg";
9359             type: RECT;
9360             scale: 1;
9361             mouse_events: 0;
9362             description { state: "default" 0.0;
9363                min: BUTTON_TICKERNOTI_BG_MIN_INC;
9364                visible: 0;
9365             }
9366             description { state: "visible" 0.0;
9367                inherit: "default" 0.0;
9368                min: BUTTON_TICKERNOTI_VISIBLE_BG_MIN_INC;
9369             }
9370             description { state: "icononly" 0.0;
9371                inherit: "default" 0.0;
9372                min: BUTTON_TICKERNOTI_ICONONLY_BG_MIN_INC;
9373             }
9374          }
9375          part { name: "padding_right_bottom";
9376             type: RECT;
9377             scale: 1;
9378             mouse_events: 0;
9379             description { state: "default" 0.0;
9380                align: 1.0 1.0;
9381                rel1.relative: 1.0 1.0;
9382                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
9383                fixed: 1 1;
9384                visible: 0;
9385             }
9386          }
9387          part { name: "icon_rect";
9388             type: RECT;
9389             scale: 1;
9390             mouse_events: 0;
9391             description { state: "default" 0.0;
9392                visible: 0;
9393                min: 0 0;
9394                fixed: 1 0;
9395                rel1 {
9396                   relative: 1.0 1.0;
9397                   to: "padding_left_top";
9398                }
9399                rel2 {
9400                   relative: 1.0 0.0;
9401                   to_x: "padding_left_top";
9402                   to_y: "padding_right_bottom";
9403                }
9404                align: 0.0 0.5;
9405             }
9406             description { state: "visible" 0.0;
9407                visible: 0;
9408                min: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
9409                max: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
9410                fixed: 1 0;
9411                rel1 {
9412                   relative: 1.0 1.0;
9413                   to: "padding_left_top";
9414                }
9415                rel2 {
9416                   relative: 1.0 0.0;
9417                   to_x: "padding_left_top";
9418                   to_y: "padding_right_bottom";
9419                }
9420                align: 0.0 0.5;
9421             }
9422             description { state: "icononly" 0.0;
9423                inherit: "default" 0.0;
9424             }
9425          }
9426          part { name: "padding_after_icon";
9427             type: RECT;
9428             scale: 1;
9429             mouse_events: 0;
9430             description { state: "default" 0.0; //when only icon or no icon is there
9431                align: 0.0 0.0;
9432                rel1 {
9433                   relative: 1.0 0.0;
9434                   to: "icon_rect";
9435                }
9436                rel2.to: "icon_rect";
9437                fixed: 1 0;
9438                min: 0 0;
9439                visible: 0;
9440             }
9441             description { state: "visible" 0.0;
9442                visible: 0;
9443                align: 0.0 0.0;
9444                rel1 {
9445                   relative: 1.0 0.0;
9446                   to: "icon_rect";
9447                }
9448                rel2.to: "icon_rect";
9449                fixed: 1 0;
9450                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
9451             }
9452             description { state: "icononly" 0.0;
9453                inherit: "default" 0.0;
9454             }
9455          }
9456          part { name: "padding_before_text";
9457             type: RECT;
9458             scale: 1;
9459             mouse_events: 0;
9460             description { state: "default" 0.0; //when only icon or no icon is there
9461                align: 1.0 0.5;
9462                rel1 {
9463                   relative: 0.0 1.0;
9464                   to_x: "elm.text";
9465                   to_y: "padding_left_top";
9466                }
9467                rel2 {
9468                   relative: 0.0 0.0;
9469                   to_x: "elm.text";
9470                   to_y: "padding_right_bottom";
9471                }
9472                fixed: 1 0;
9473                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
9474                visible: 0;
9475             }
9476          }
9477          part { name: "elm.swallow.content";
9478             type: SWALLOW;
9479             scale: 1;
9480             clip_to: "clipper";
9481             description { state: "default" 0.0;
9482                visible: 0;
9483                align: 0.0 0.5;
9484                rel1 {
9485                   relative: 1.0 1.0;
9486                   to: "padding_left_top";
9487                }
9488                rel2 {
9489                   relative: 1.0 0.0;
9490                   to_x: "padding_left_top";
9491                   to_y: "padding_right_bottom";
9492                }
9493                fixed: 1 0;
9494             }
9495             description { state: "visible" 0.0;
9496                fixed: 1 0;
9497                min: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
9498                max: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
9499                align: 1.0 0.5;
9500                rel1 {
9501                   relative: 0.0 1.0;
9502                   to_x: "padding_before_text";
9503                   to_y: "padding_left_top";
9504                }
9505                rel2 {
9506                   relative: 0.0 0.0;
9507                   to_x: "padding_before_text";
9508                   to_y: "padding_right_bottom";
9509                }
9510             }
9511             description { state: "icononly" 0.0;
9512                min: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
9513                max: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
9514             }
9515          }
9516          part { name: "elm.text";
9517             type: TEXT;
9518             mouse_events: 0;
9519             scale: 1;
9520             clip_to: "clipper";
9521             description { state: "default" 0.0;
9522                visible: 0;
9523                rel1 {
9524                   relative: 1.0 1.0;
9525                   to_x: "padding_after_icon";
9526                   to_y: "padding_left_top";
9527                }
9528                rel2 {
9529                   relative: 0.0 0.0;
9530                   to: "padding_right_bottom";
9531                }
9532                color: BUTTON_TICKERNOTI_NORMAL_COLOR_INC;
9533                text {
9534                   font: "SLP:style=Medium";
9535                   size: BUTTON_TICKERNOTI_FONT_SIZE_INC;
9536                   min: 1 0;
9537                   max: 1 0;
9538                }
9539             }
9540             description { state: "visible" 0.0;
9541                inherit: "default" 0.0;
9542                visible: 1;
9543             }
9544             description { state: "clicked" 0.0;
9545                inherit: "default" 0.0;
9546                visible: 1;
9547                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
9548             }
9549             description { state: "disabled" 0.0;
9550                inherit: "default" 0.0;
9551                color: 0 0 0 128;
9552             }
9553             description { state: "disabled_visible" 0.0;
9554                inherit: "default" 0.0;
9555                color: BUTTON_TICKERNOTI_DISABLED_COLOR_INC;
9556                visible: 1;
9557             }
9558             description { state: "focused" 0.0;
9559                inherit: "default" 0.0;
9560                visible: 1;
9561                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
9562             }
9563          }
9564          part { name: "over2";
9565             type: RECT;
9566             repeat_events: 1;
9567             ignore_flags: ON_HOLD;
9568             description { state: "default" 0.0;
9569                color: 0 0 0 0;
9570             }
9571          }
9572          part { name: "over3";
9573             type: RECT;
9574             repeat_events: 1;
9575             description { state: "default" 0.0;
9576                color: 0 0 0 0;
9577             }
9578          }
9579          part { name: "clipper";
9580             type: RECT;
9581             description { state: "default" 0.0;
9582                color: 255 255 255 255;
9583             }
9584          }
9585          part { name: "disabler";
9586             type: RECT;
9587             description { state: "default" 0.0;
9588                color: 0 0 0 0;
9589                visible: 0;
9590             }
9591             description { state: "disabled" 0.0;
9592                inherit: "default" 0.0;
9593                visible: 1;
9594             }
9595          }
9596       }
9597       programs {
9598          program { name: "button_click";
9599             signal: "mouse,down,1";
9600             source: "over2";
9601             action: SIGNAL_EMIT "elm,action,press" "";
9602             after: "button_click_anim";
9603          }
9604          program { name: "button_click_anim";
9605             action: STATE_SET "clicked" 0.0;
9606             target: "button_image";
9607             after: "text_clicked";
9608          }
9609          program { name: "text_clicked";
9610             script {
9611                new st[31];
9612                new Float:vl;
9613                get_state(PART:"elm.text", st, 30, vl);
9614                if (!strcmp(st, "visible"))
9615                  set_state(PART:"elm.text", "clicked", 0.0);
9616             }
9617          }
9618          program { name: "button_unpress";
9619             action: SIGNAL_EMIT "elm,action,unpress" "";
9620          }
9621          program { name: "button_mouseout_clicked";
9622             signal: "mouse,up,1";
9623             source: "over3";
9624             script {
9625                new st[31];
9626                new Float:vl;
9627                get_state(PART:"elm.swallow.content", st, 30, vl);
9628                if (strcmp(st, "icononly"))
9629                  {
9630                     emit("elm,action,default,text,set", "");
9631                     set_state(PART:"elm.text", "visible", 0.0);
9632                  }
9633                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9634                  set_state(PART:"button_image", "default", 0.0);
9635             }
9636             after: button_unpress;
9637          }
9638          program { name: "button_unclick3";
9639             signal: "mouse,clicked,1";
9640             source: "over2";
9641             action: SIGNAL_EMIT "elm,action,click" "";
9642          }
9643          program { name: "text_show";
9644             signal: "elm,state,text,visible";
9645             source: "elm";
9646             script {
9647                new st[31];
9648                new Float:vl;
9649                get_state(PART:"elm.swallow.content", st, 30, vl);
9650                if (!strcmp(st, "icononly"))
9651                  {
9652                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9653                     set_state(PART:"icon_rect", "visible", 0.0);
9654                     set_state(PART:"padding_after_icon", "visible", 0.0);
9655                     set_state(PART:"bg", "visible", 0.0);
9656                  }
9657                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9658                  set_state(PART:"elm.text", "visible", 0.0);
9659                else
9660                  set_state(PART:"elm.text", "disabled_visible", 0.0);
9661             }
9662          }
9663          program { name: "text_hide";
9664             signal: "elm,state,text,hidden";
9665             source: "elm";
9666             script {
9667                new st[31];
9668                new Float:vl;
9669                get_state(PART:"elm.swallow.content", st, 30, vl);
9670                if (!strcmp(st, "visible"))
9671                  {
9672                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9673                     set_state(PART:"icon_rect", "icononly", 0.0);
9674                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9675                     set_state(PART:"bg", "icononly", 0.0);
9676                  }
9677                set_state(PART:"elm.text", "default", 0.0);
9678             }
9679          }
9680          program { name: "icon_show";
9681             signal: "elm,state,icon,visible";
9682             source: "elm";
9683             script {
9684                new st[31];
9685                new Float:vl;
9686                get_state(PART:"elm.text", st, 30, vl);
9687                if (!strcmp(st, "visible"))
9688                  {
9689                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9690                     set_state(PART:"icon_rect", "visible", 0.0);
9691                     set_state(PART:"padding_after_icon", "visible", 0.0);
9692                     set_state(PART:"bg", "visible", 0.0);
9693                  }
9694                else
9695                  {
9696                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9697                     set_state(PART:"icon_rect", "icononly", 0.0);
9698                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9699                     set_state(PART:"bg", "icononly", 0.0);
9700                  }
9701             }
9702          }
9703          program { name: "icon_hide";
9704             signal: "elm,state,icon,hidden";
9705             source: "elm";
9706             action: STATE_SET "default" 0.0;
9707             target: "elm.swallow.content";
9708             target: "padding_after_icon";
9709             target: "icon_rect";
9710             target: "bg";
9711          }
9712          program { name: "disable";
9713             signal: "elm,state,disabled";
9714             source: "elm";
9715             action: STATE_SET "disabled" 0.0;
9716             target: "button_image";
9717             target: "disabler";
9718             after: "disable_text";
9719          }
9720          program { name: "disable_text";
9721             script {
9722                new st[31];
9723                new Float:vl;
9724                get_state(PART:"elm.text", st, 30, vl);
9725                if (!strcmp(st, "visible"))
9726                  set_state(PART:"elm.text", "disabled_visible", 0.0);
9727                else
9728                  set_state(PART:"elm.text", "disabled", 0.0);
9729                set_int(button_state, BUTTON_STATE_DISABLED);
9730             }
9731          }
9732          program { name: "enable";
9733             signal: "elm,state,enabled";
9734             source: "elm";
9735             action: STATE_SET "default" 0.0;
9736             target: "button_image";
9737             target: "disabler";
9738             after: "enable_text";
9739          }
9740          program { name: "enable_text";
9741             script {
9742                new st[31];
9743                new Float:vl;
9744                get_state(PART:"elm.text", st, 30, vl);
9745                if (!strcmp(st, "disabled_visible"))
9746                  set_state(PART:"elm.text", "visible", 0.0);
9747                else
9748                  set_state(PART:"elm.text", "default", 0.0);
9749                set_int(button_state, BUTTON_STATE_ENABLED);
9750             }
9751          }
9752          program { name: "focused";
9753             //signal: "elm,action,focus";
9754             //source: "elm";
9755             action: STATE_SET "focused" 0.0;
9756             target: "button_image";
9757             target: "elm.text";
9758          }
9759          program { name: "unfocused";
9760             //signal: "elm,action,unfocus";
9761             //source: "elm";
9762             action: STATE_SET "default" 0.0;
9763             target: "button_image";
9764             after: "unfocus_text";
9765          }
9766          program { name: "unfocus_text";
9767             action: STATE_SET "visible" 0.0;
9768             target: "elm.text";
9769          }
9770       }
9771    }
9772
9773 ///////////////////////////////////////////////////////////////////////////////////////
9774    group { name: "elm/button/base/expandable_number";
9775       alias: "elm/button/base/text_only/expandable_number";
9776       images {
9777          image: "00_button_05_normal.png" COMP;
9778          image: "00_button_05_press.png" COMP;
9779          image: "00_button_05_dim.png" COMP;
9780          image: "00_arrow_expand.png" COMP;
9781          image: "00_arrow_expand_press.png" COMP;
9782          image: "00_arrow_expand_dim.png" COMP;
9783       }
9784       script {
9785          public button_state = BUTTON_STATE_ENABLED;
9786       }
9787       parts {
9788          part { name: "button_image";
9789             scale: 1;
9790             description { state: "default" 0.0;
9791                min: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
9792                max: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
9793                image {
9794                   normal: "00_button_05_normal.png";
9795                   border: BUTTON_EXPANDABLE_NUMBER_BG_BORDER_INC;
9796                   border_scale: 1;
9797                }
9798             }
9799             description { state: "clicked" 0.0;
9800                inherit: "default" 0.0;
9801                image.normal: "00_button_05_press.png";
9802             }
9803             description { state: "disabled" 0.0;
9804                inherit: "default" 0.0;
9805                image.normal: "00_button_05_dim.png";
9806             }
9807             description { state: "focused" 0.0;
9808                inherit: "default" 0.0;
9809                image.normal: "00_button_05_press.png";
9810             }
9811          }
9812          part { name: "padding_left_top";
9813             type: RECT;
9814             scale: 1;
9815             mouse_events: 0;
9816             description { state: "default" 0.0;
9817                align: 0.0 0.0;
9818                rel2.relative: 0.0 0.0;
9819                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
9820                fixed: 1 1;
9821                visible: 0;
9822             }
9823          }
9824          part { name: "padding_right_bottom";
9825             type: RECT;
9826             scale: 1;
9827             mouse_events: 0;
9828             description { state: "default" 0.0;
9829                align: 1.0 1.0;
9830                rel1.relative: 1.0 1.0;
9831                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
9832                fixed: 1 1;
9833                visible: 0;
9834             }
9835          }
9836          part { name: "icon_rect";
9837             type: RECT;
9838             scale: 1;
9839             mouse_events: 0;
9840             description { state: "default" 0.0;
9841                visible: 0;
9842                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9843                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9844                fixed: 1 0;
9845                rel1 {
9846                   relative: 0.0 1.0;
9847                   to_x: "padding_right_bottom";
9848                   to_y: "padding_left_top";
9849                }
9850                rel2 {
9851                   relative: 0.0 0.0;
9852                   to: "padding_right_bottom";
9853                }
9854                align: 1.0 0.5;
9855                color: 0 0 0 0;
9856             }
9857          }
9858          part { name: "arrow_expand";
9859             scale: 1;
9860             mouse_events: 0;
9861             description { state: "default" 0.0;
9862                align: 0.0 0.5;
9863                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9864                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9865                fixed: 0 0;
9866                rel1.to: "icon_rect";
9867                rel2.to: "icon_rect";
9868                image.normal:"00_arrow_expand.png";
9869             }
9870             description { state: "clicked" 0.0;
9871                inherit: "default" 0.0;
9872                image.normal:"00_arrow_expand_press.png";
9873             }
9874             description { state: "disabled" 0.0;
9875                inherit: "default" 0.0;
9876                image.normal:"00_arrow_expand_dim.png";
9877             }
9878          }
9879          part { name: "elm.text";
9880             type: TEXT;
9881             mouse_events: 0;
9882             scale: 1;
9883             description { state: "default" 0.0;
9884                min: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
9885                max: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
9886                fixed:1 0;
9887                rel1 {
9888                   relative: 1.0 1.0;
9889                   to: "padding_left_top";
9890                }
9891                rel2 {
9892                   relative: 1.0 1.0;
9893                   to_x:"padding_left_top";
9894                   to_y:"padding_right_bottom";
9895                }
9896                align: 0.0 0.5;
9897                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
9898                text {
9899                   font: "SLP:style=Medium";
9900                   size: BUTTON_EXPANDABLE_NUMBER_FONT_SIZE_INC;
9901                   min: 0 0;
9902                   fit: 1 1;
9903                   size_range: 14 20;
9904                }
9905             }
9906             description { state: "visible" 0.0;
9907                inherit: "default" 0.0;
9908             }
9909             description { state: "clicked" 0.0;
9910                inherit: "default" 0.0;
9911                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
9912             }
9913             description { state: "disabled" 0.0;
9914                inherit: "default" 0.0;
9915                color: 0 0 0 128;
9916             }
9917             description { state: "disabled_visible" 0.0;
9918                inherit: "default" 0.0;
9919                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
9920             }
9921             description { state: "focused" 0.0;
9922                inherit: "default" 0.0;
9923                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
9924             }
9925          }
9926          part { name: "over2";
9927             type: RECT;
9928             repeat_events: 1;
9929             ignore_flags: ON_HOLD;
9930             description { state: "default" 0.0;
9931                color: 0 0 0 0;
9932             }
9933          }
9934          part { name: "over3";
9935             type: RECT;
9936             repeat_events: 1;
9937             description { state: "default" 0.0;
9938                color: 0 0 0 0;
9939             }
9940          }
9941          part { name: "disabler";
9942             type: RECT;
9943             description { state: "default" 0.0;
9944                color: 0 0 0 0;
9945                visible: 0;
9946             }
9947             description { state: "disabled" 0.0;
9948                inherit: "default" 0.0;
9949                visible: 1;
9950             }
9951          }
9952       }
9953       programs {
9954          program { name: "button_click";
9955             signal: "mouse,down,1";
9956             source: "over2";
9957             action: SIGNAL_EMIT "elm,action,press" "";
9958             after: "button_click_anim";
9959          }
9960          program { name: "button_click_anim";
9961             action: STATE_SET "clicked" 0.0;
9962             target: "button_image";
9963             target: "arrow_expand";
9964             after: "text_clicked";
9965          }
9966          program { name: "text_clicked";
9967             script {
9968                new st[31];
9969                new Float:vl;
9970                get_state(PART:"elm.text", st, 30, vl);
9971                if (!strcmp(st, "visible"))
9972                  set_state(PART:"elm.text", "clicked", 0.0);
9973             }
9974          }
9975          program { name: "button_unpress";
9976             action: SIGNAL_EMIT "elm,action,unpress" "";
9977          }
9978          program { name: "button_mouseout_clicked";
9979             signal: "mouse,up,1";
9980             source: "over3";
9981             script {
9982                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9983                  {
9984                     set_state(PART:"button_image", "default", 0.0);
9985                     set_state(PART:"elm.text", "visible", 0.0);
9986                     set_state(PART:"arrow_expand", "default", 0.0);
9987                  }
9988             }
9989             after: button_unpress;
9990          }
9991          program { name: "button_unclick3";
9992             signal: "mouse,clicked,1";
9993             source: "over2";
9994             action: SIGNAL_EMIT "elm,action,click" "";
9995          }
9996          program { name: "text_show";
9997             signal: "elm,state,text,visible";
9998             source: "elm";
9999             script {
10000                if (get_int(button_state) != BUTTON_STATE_DISABLED)
10001                  set_state(PART:"elm.text", "visible", 0.0);
10002                else
10003                  set_state(PART:"elm.text", "disabled_visible", 0.0);
10004             }
10005          }
10006          program { name: "text_hide";
10007             signal: "elm,state,text,hidden";
10008             source: "elm";
10009             script {
10010                set_state(PART:"elm.text", "default", 0.0);
10011             }
10012          }
10013          program { name: "disable";
10014             signal: "elm,state,disabled";
10015             source: "elm";
10016             action: STATE_SET "disabled" 0.0;
10017             target: "button_image";
10018             target: "disabler";
10019             after: "disable_text";
10020          }
10021          program { name: "disable_text";
10022             script {
10023                new st[31];
10024                new Float:vl;
10025                get_state(PART:"elm.text", st, 30, vl);
10026                if (!strcmp(st, "visible"))
10027                  set_state(PART:"elm.text", "disabled_visible", 0.0);
10028                else
10029                  set_state(PART:"elm.text", "disabled", 0.0);
10030                set_int(button_state, BUTTON_STATE_DISABLED);
10031             }
10032          }
10033          program { name: "enable";
10034             signal: "elm,state,enabled";
10035             source: "elm";
10036             action: STATE_SET "default" 0.0;
10037             target: "button_image";
10038             target: "disabler";
10039             after: "enable_text";
10040          }
10041          program { name: "enable_text";
10042             script {
10043                new st[31];
10044                new Float:vl;
10045                get_state(PART:"elm.text", st, 30, vl);
10046                if (!strcmp(st, "disabled_visible"))
10047                  set_state(PART:"elm.text", "visible", 0.0);
10048                else
10049                  set_state(PART:"elm.text", "default", 0.0);
10050                set_int(button_state, BUTTON_STATE_ENABLED);
10051             }
10052          }
10053          program { name: "focused";
10054             //signal: "elm,action,focus";
10055             //source: "elm";
10056             action: STATE_SET "focused" 0.0;
10057             target: "button_image";
10058             target: "elm.text";
10059          }
10060          program { name: "unfocused";
10061             //signal: "elm,action,unfocus";
10062             //source: "elm";
10063             action: STATE_SET "default" 0.0;
10064             target: "button_image";
10065             after: "unfocus_text";
10066          }
10067          program { name: "unfocus_text";
10068             action: STATE_SET "visible" 0.0;
10069             target: "elm.text";
10070          }
10071       }
10072    }
10073
10074 #undef BUTTON_STATE_ENABLED
10075 #undef BUTTON_STATE_DISABLED