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