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