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