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