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