[UX version 1.8]Implementation of Button, Check and Radio Widget.
[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       } \
6454       script { \
6455          public button_state = BUTTON_STATE_ENABLED; \
6456       } \
6457       parts { \
6458          part { name: "button_image"; \
6459             scale: 1; \
6460             description { state: "default" 0.0; \
6461                min: BUTTON_COLORSELECTOR_BG_DEFAULT_MIN_INC; \
6462                image { \
6463                   normal: image_normal; \
6464                   border: COLORSELECTOR_BUTTON_BORDER; \
6465                   border_scale: 1; \
6466                } \
6467             } \
6468             description { state: "clicked" 0.0; \
6469                inherit: "default" 0.0; \
6470                image.normal: image_press; \
6471             } \
6472             description { state: "disabled" 0.0; \
6473                inherit: "default" 0.0; \
6474                image.normal: image_disable; \
6475             } \
6476             description { state: "focused" 0.0; \
6477                inherit: "default" 0.0; \
6478                image.normal: image_press; \
6479             } \
6480          } \
6481          part { name: "over2"; \
6482             type: RECT; \
6483             repeat_events: 1; \
6484             ignore_flags: ON_HOLD; \
6485             description { state: "default" 0.0; \
6486                color: 0 0 0 0; \
6487             } \
6488          } \
6489          part { name: "over3"; \
6490             type: RECT; \
6491             repeat_events: 1; \
6492             description { state: "default" 0.0; \
6493                color: 0 0 0 0; \
6494             } \
6495          } \
6496          part { name: "disabler"; \
6497             type: RECT; \
6498             description { state: "default" 0.0; \
6499                color: 0 0 0 0; \
6500                visible: 0; \
6501             } \
6502             description { state: "disabled" 0.0; \
6503                inherit: "default" 0.0; \
6504                visible: 1; \
6505             } \
6506          } \
6507       } \
6508       programs { \
6509          program { name: "button_click"; \
6510             signal: "mouse,down,1"; \
6511             source: "over2"; \
6512             action: SIGNAL_EMIT "elm,action,press" ""; \
6513             after: "button_click_anim"; \
6514          } \
6515          program { name: "button_click_anim"; \
6516             action: STATE_SET "clicked" 0.0; \
6517             target: "button_image"; \
6518          } \
6519          program { name: "button_unpress"; \
6520             action: SIGNAL_EMIT "elm,action,unpress" ""; \
6521          } \
6522          program { name: "button_mouseout_clicked"; \
6523             signal: "mouse,up,1"; \
6524             source: "over3"; \
6525             script { \
6526                if (get_int(button_state) != BUTTON_STATE_DISABLED) \
6527                  set_state(PART:"button_image", "default", 0.0); \
6528             } \
6529             after: button_unpress; \
6530          } \
6531          program { name: "touch_snd"; \
6532             signal: "mouse,clicked,1"; \
6533             source: "over2"; \
6534             action: PLAY_SAMPLE "touch_sound" 1.0; \
6535             after: button_unclick3; \
6536          } \
6537          program { name: "button_unclick3"; \
6538             action: SIGNAL_EMIT "elm,action,click" ""; \
6539          } \
6540          program { name: "disable"; \
6541             signal: "elm,state,disabled"; \
6542             source: "elm"; \
6543             action: STATE_SET "disabled" 0.0; \
6544             target: "button_image"; \
6545             target: "disabler"; \
6546             script { \
6547                set_int(button_state, BUTTON_STATE_DISABLED); \
6548             } \
6549          } \
6550          program { name: "enable"; \
6551             signal: "elm,state,enabled"; \
6552             source: "elm"; \
6553             action: STATE_SET "default" 0.0; \
6554             target: "button_image"; \
6555             target: "disabler"; \
6556             script { \
6557                set_int(button_state, BUTTON_STATE_ENABLED); \
6558             } \
6559          } \
6560       } \
6561    }
6562 ///////////////////////////////////////////////////////////////////////////////////////
6563    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")
6564 ///////////////////////////////////////////////////////////////////////////////////////
6565    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")
6566 ///////////////////////////////////////////////////////////////////////////////////////
6567    group { name: "elm/button/base/hidden";
6568       images {
6569          image: "00_button_sweep.png" COMP;
6570          image: "00_button_sweep_press.png" COMP;
6571          image: "00_button_sweep_focus.png" COMP;
6572          image: "00_button_sweep_dim.png" COMP;
6573       }
6574       script {
6575          public button_state = BUTTON_STATE_ENABLED;
6576       }
6577       parts {
6578          part { name: "button_image";
6579             scale: 1;
6580             description { state: "default" 0.0;
6581                min: BUTTON_HIDDEN_BG_NORMAL_MIN_INC;
6582                image {
6583                   normal: "00_button_sweep.png";
6584                   border: BUTTON_HIDDEN_BG_BORDER_INC;
6585                   border_scale: 1;
6586                }
6587             }
6588             description { state: "clicked" 0.0;
6589                inherit: "default" 0.0;
6590                image.normal: "00_button_sweep_press.png";
6591             }
6592             description { state: "disabled" 0.0;
6593                inherit: "default" 0.0;
6594                image.normal: "00_button_sweep_dim.png";
6595             }
6596             description { state: "focused" 0.0;
6597                inherit: "default" 0.0;
6598                image.normal: "00_button_sweep_focus.png";
6599             }
6600          }
6601          part { name: "padding_left_top";
6602             type: RECT;
6603             scale: 1;
6604             mouse_events: 0;
6605             description { state: "default" 0.0;
6606                align: 0.0 0.0;
6607                rel2.relative: 0.0 0.0;
6608                min: BUTTON_HIDDEN_PADDING_MIN_INC;
6609                fixed: 1 1;
6610                visible: 0;
6611             }
6612          }
6613          part { name: "padding_right_bottom";
6614             type: RECT;
6615             scale: 1;
6616             mouse_events: 0;
6617             description { state: "default" 0.0;
6618                align: 1.0 1.0;
6619                rel1.relative: 1.0 1.0;
6620                min: BUTTON_HIDDEN_PADDING_MIN_INC;
6621                fixed: 1 1;
6622                visible: 0;
6623             }
6624          }
6625          part { name: "icon_rect";
6626             type: RECT;
6627             scale: 1;
6628             mouse_events: 0;
6629             description { state: "default" 0.0;
6630                min: BUTTON_HIDDEN_ICON_RECT_MIN_INC;
6631                fixed: 1 0;
6632                rel1 {
6633                   relative: 0.0 1.0;
6634                   to_x: "elm.swallow.content";
6635                   to_y: "padding_left_top";
6636                }
6637                rel2 {
6638                   relative: 1.0 0.0;
6639                   to_x: "elm.swallow.content";
6640                   to_y: "padding_right_bottom";
6641                }
6642                align: 0.0 0.5;
6643                color: 0 0 0 0;
6644             }
6645          }
6646          part { name: "padding_icon_text";
6647             type: RECT;
6648             scale: 1;
6649             mouse_events: 0;
6650             description { state: "default" 0.0; //when only icon or no icon is there
6651                align: 0.0 0.0;
6652                rel1 {
6653                   relative: 1.0 0.0;
6654                   to: "icon_rect";
6655                }
6656                rel2.to: "icon_rect";
6657                fixed: 1 0;
6658                min: 0 0;
6659                color: 0 0 0 0;
6660             }
6661             description { state: "icononly" 0.0;
6662                inherit: "default" 0.0;
6663             }
6664             description { state: "visible" 0.0; //when icon is visible
6665                align: 0.0 0.0;
6666                rel1 {
6667                   relative: 1.0 0.0;
6668                   to: "icon_rect";
6669                }
6670                rel2.to: "icon_rect";
6671                fixed: 1 0;
6672                min: BUTTON_HIDDEN_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
6673                color: 0 0 0 0;
6674             }
6675          }
6676          part { name: "elm.swallow.content";
6677             type: SWALLOW;
6678             scale: 1;
6679             clip_to: "clipper";
6680             description { state: "default" 0.0;
6681                visible: 0;
6682                align: 0.0 0.5;
6683                rel1 {
6684                   relative: 1.0 1.0;
6685                   to: "padding_left_top";
6686                }
6687                rel2 {
6688                   relative: 1.0 0.0;
6689                   to_x: "padding_left_top";
6690                   to_y: "padding_right_bottom";
6691                }
6692                fixed: 1 0;
6693             }
6694             description { state: "visible" 0.0;
6695                fixed: 1 0;
6696                align: 0.0 0.5;
6697                rel1 {
6698                   relative: 1.0 1.0;
6699                   to: "padding_left_top";
6700                }
6701                rel2 {
6702                   relative: 1.0 0.0;
6703                   to_x: "padding_left_top";
6704                   to_y: "padding_right_bottom";
6705                }
6706                aspect: 1.0 1.0;
6707                aspect_preference: VERTICAL;
6708             }
6709             description { state: "icononly" 0.0;
6710                min: BUTTON_HIDDEN_ICON_ICONONLY_MIN_INC;
6711                rel1 {
6712                   relative: 1.0 1.0;
6713                   to: "padding_left_top";
6714                }
6715                rel2 {
6716                   relative: 1.0 0.0;
6717                   to_x: "padding_left_top";
6718                   to_y: "padding_right_bottom";
6719                }
6720                aspect: 1.0 1.0;
6721                aspect_preference: VERTICAL;
6722             }
6723          }
6724          part { name: "elm.text";
6725             type: TEXT;
6726             mouse_events: 0;
6727             scale: 1;
6728             clip_to: "clipper";
6729             description { state: "default" 0.0;
6730                visible: 0;
6731                rel1 {
6732                   relative: 1.0 1.0;
6733                   to_x: "padding_icon_text";
6734                   to_y: "padding_left_top";
6735                }
6736                rel2 {
6737                   relative: 0.0 0.0;
6738                   to: "padding_right_bottom";
6739                }
6740                color: BUTTON_HIDDEN_BUTTON_TEXT_NORMAL_COLOR_INC;
6741                text {
6742                   font: "SLP:style=Medium";
6743                   size: BUTTON_HIDDEN_FONT_SIZE_INC;
6744                   min: 0 0;
6745                   text_class: "slp_medium";
6746                }
6747             }
6748             description { state: "visible" 0.0;
6749                inherit: "default" 0.0;
6750                visible: 1;
6751                min: BUTTON_HIDDEN_TEXT_MIN_INC;
6752             }
6753             description { state: "clicked" 0.0;
6754                inherit: "default" 0.0;
6755                visible: 1;
6756                min: 0 0;
6757                color: BUTTON_HIDDEN_BUTTON_TEXT_PRESSED_COLOR_INC;
6758             }
6759             description { state: "disabled" 0.0;
6760                inherit: "default" 0.0;
6761                color: 0 0 0 128;
6762             }
6763             description { state: "disabled_visible" 0.0;
6764                inherit: "default" 0.0;
6765                color: BUTTON_HIDDEN_BUTTON_TEXT_DISABLED_COLOR_INC;
6766                visible: 1;
6767                min: BUTTON_HIDDEN_TEXT_MIN_INC;
6768             }
6769             description { state: "focused" 0.0;
6770                inherit: "default" 0.0;
6771                visible: 1;
6772                min: 0 0;
6773                color: BUTTON_HIDDEN_BUTTON_TEXT_FOCUSED_COLOR_INC;
6774             }
6775          }
6776          part { name: "over2";
6777             type: RECT;
6778             repeat_events: 1;
6779             ignore_flags: ON_HOLD;
6780             description { state: "default" 0.0;
6781                color: 0 0 0 0;
6782             }
6783          }
6784          part { name: "over3";
6785             type: RECT;
6786             repeat_events: 1;
6787             description { state: "default" 0.0;
6788                color: 0 0 0 0;
6789             }
6790          }
6791          part { name: "clipper";
6792             type: RECT;
6793             description { state: "default" 0.0;
6794                color: 255 255 255 255;
6795             }
6796          }
6797          part { name: "disabler";
6798             type: RECT;
6799             description { state: "default" 0.0;
6800                color: 0 0 0 0;
6801                visible: 0;
6802             }
6803             description { state: "disabled" 0.0;
6804                inherit: "default" 0.0;
6805                visible: 1;
6806             }
6807          }
6808       }
6809       programs {
6810          program { name: "button_click";
6811             signal: "mouse,down,1";
6812             source: "over2";
6813             action: SIGNAL_EMIT "elm,action,press" "";
6814             after: "button_click_anim";
6815          }
6816          program { name: "button_click_anim";
6817             action: STATE_SET "clicked" 0.0;
6818             target: "button_image";
6819             after: "text_clicked";
6820          }
6821          program { name: "text_clicked";
6822             script {
6823                new st[31];
6824                new Float:vl;
6825                get_state(PART:"elm.text", st, 30, vl);
6826                if (!strcmp(st, "visible"))
6827                  set_state(PART:"elm.text", "clicked", 0.0);
6828             }
6829          }
6830          program { name: "button_unpress";
6831             action: SIGNAL_EMIT "elm,action,unpress" "";
6832          }
6833          program { name: "button_mouseout_clicked";
6834             signal: "mouse,up,1";
6835             source: "over3";
6836             script {
6837                new st[31];
6838                new Float:vl;
6839                get_state(PART:"elm.swallow.content", st, 30, vl);
6840                if (strcmp(st, "icononly"))
6841                  {
6842                     emit("elm,action,default,text,set", "");
6843                     set_state(PART:"elm.text", "visible", 0.0);
6844                  }
6845                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6846                  set_state(PART:"button_image", "default", 0.0);
6847             }
6848             after: button_unpress;
6849          }
6850          program { name: "touch_snd";
6851             signal: "mouse,clicked,1";
6852             source: "over2";
6853             action: PLAY_SAMPLE "touch_sound" 1.0;
6854             after: button_unclick3;
6855          }
6856          program { name: "button_unclick3";
6857             action: SIGNAL_EMIT "elm,action,click" "";
6858          }
6859          program { name: "text_show";
6860             signal: "elm,state,text,visible";
6861             source: "elm";
6862             script {
6863                new st[31];
6864                new Float:vl;
6865                get_state(PART:"elm.swallow.content", st, 30, vl);
6866                if (!strcmp(st, "icononly"))
6867                  {
6868                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6869                     set_state(PART:"padding_icon_text", "visible", 0.0);
6870                  }
6871                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6872                  set_state(PART:"elm.text", "visible", 0.0);
6873                else
6874                  set_state(PART:"elm.text", "disabled_visible", 0.0);
6875             }
6876          }
6877          program { name: "text_hide";
6878             signal: "elm,state,text,hidden";
6879             source: "elm";
6880             script {
6881                new st[31];
6882                new Float:vl;
6883                get_state(PART:"elm.swallow.content", st, 30, vl);
6884                if (!strcmp(st, "visible"))
6885                  {
6886                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6887                     set_state(PART:"padding_icon_text", "icononly", 0.0);
6888                  }
6889                set_state(PART:"elm.text", "default", 0.0);
6890             }
6891          }
6892          program { name: "icon_show";
6893             signal: "elm,state,icon,visible";
6894             source: "elm";
6895             script {
6896                new st[31];
6897                new Float:vl;
6898                get_state(PART:"elm.text", st, 30, vl);
6899                if (!strcmp(st, "visible"))
6900                  {
6901                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6902                     set_state(PART:"padding_icon_text", "visible", 0.0);
6903                  }
6904                else
6905                  {
6906                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6907                     set_state(PART:"padding_icon_text", "icononly", 0.0);
6908                  }
6909             }
6910          }
6911          program { name: "icon_hide";
6912             signal: "elm,state,icon,hidden";
6913             source: "elm";
6914             action: STATE_SET "default" 0.0;
6915             target: "elm.swallow.content";
6916             target: "padding_icon_text";
6917          }
6918          program { name: "disable";
6919             signal: "elm,state,disabled";
6920             source: "elm";
6921             action: STATE_SET "disabled" 0.0;
6922             target: "button_image";
6923             target: "disabler";
6924             after: "disable_text";
6925          }
6926          program { name: "disable_text";
6927             script {
6928                new st[31];
6929                new Float:vl;
6930                get_state(PART:"elm.text", st, 30, vl);
6931                if (!strcmp(st, "visible"))
6932                  set_state(PART:"elm.text", "disabled_visible", 0.0);
6933                else
6934                  set_state(PART:"elm.text", "disabled", 0.0);
6935                set_int(button_state, BUTTON_STATE_DISABLED);
6936             }
6937          }
6938          program { name: "enable";
6939             signal: "elm,state,enabled";
6940             source: "elm";
6941             action: STATE_SET "default" 0.0;
6942             target: "button_image";
6943             target: "disabler";
6944             after: "enable_text";
6945          }
6946          program { name: "enable_text";
6947             script {
6948                new st[31];
6949                new Float:vl;
6950                get_state(PART:"elm.text", st, 30, vl);
6951                if (!strcmp(st, "disabled_visible"))
6952                  set_state(PART:"elm.text", "visible", 0.0);
6953                else
6954                  set_state(PART:"elm.text", "default", 0.0);
6955                set_int(button_state, BUTTON_STATE_ENABLED);
6956             }
6957          }
6958          program { name: "focused";
6959             //signal: "elm,action,focus";
6960             //source: "elm";
6961             action: STATE_SET "focused" 0.0;
6962             target: "button_image";
6963             target: "elm.text";
6964          }
6965          program { name: "unfocused";
6966             //signal: "elm,action,unfocus";
6967             //source: "elm";
6968             action: STATE_SET "default" 0.0;
6969             target: "button_image";
6970             after: "unfocus_text";
6971          }
6972          program { name: "unfocus_text";
6973             action: STATE_SET "visible" 0.0;
6974             target: "elm.text";
6975          }
6976       }
6977    }
6978
6979 ///////////////////////////////////////////////////////////////////////////////////////
6980    group { name: "elm/button/base/picker/bar/default";
6981       images {
6982          image: "00_picker_btn_normal.png" COMP;
6983          image: "00_picker_btn_press.png" COMP;
6984          image: "00_picker_btn_normal_focus.png" COMP;
6985       }
6986       script {
6987          public button_state = BUTTON_STATE_ENABLED;
6988       }
6989       parts {
6990          part { name: "button_image";
6991             scale: 1;
6992             description { state: "default" 0.0;
6993                min: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_MIN_INC;
6994                image {
6995                   normal: "00_picker_btn_normal.png";
6996                   border: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_IMAGE_BORDER_INC;
6997                   border_scale: 1;
6998                }
6999             }
7000             description { state: "clicked" 0.0;
7001                inherit: "default" 0.0;
7002                image.normal: "00_picker_btn_press.png";
7003             }
7004             description { state: "disabled" 0.0;
7005                inherit: "default" 0.0;
7006             }
7007             description { state: "focused" 0.0;
7008                inherit: "default" 0.0;
7009                image.normal: "00_picker_btn_normal_focus.png";
7010             }
7011          }
7012          part { name: "padding_left_top";
7013             type: RECT;
7014             scale: 1;
7015             mouse_events: 0;
7016             description { state: "default" 0.0;
7017                align: 0.0 0.0;
7018                rel2.relative: 0.0 0.0;
7019                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC;
7020                fixed: 1 1;
7021                visible: 0;
7022             }
7023          }
7024          part { name: "padding_right_bottom";
7025             type: RECT;
7026             scale: 1;
7027             mouse_events: 0;
7028             description { state: "default" 0.0;
7029                align: 1.0 1.0;
7030                rel1.relative: 1.0 1.0;
7031                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC;
7032                fixed: 1 1;
7033                visible: 0;
7034             }
7035          }
7036          part { name: "icon_rect";
7037             type: RECT;
7038             scale: 1;
7039             mouse_events: 0;
7040             description { state: "default" 0.0;
7041                min: BUTTON_PICKER_BAR_DEFAULT_ICON_RECT_DEFAULT_MIN_INC;
7042                fixed: 1 0;
7043                rel1 {
7044                   relative: 0.0 1.0;
7045                   to_x: "elm.swallow.content";
7046                   to_y: "padding_left_top";
7047                }
7048                rel2 {
7049                   relative: 1.0 0.0;
7050                   to_x: "elm.swallow.content";
7051                   to_y: "padding_right_bottom";
7052                }
7053                align: 0.0 0.5;
7054                color: 0 0 0 0;
7055             }
7056          }
7057          part { name: "padding_icon_text";
7058             type: RECT;
7059             scale: 1;
7060             mouse_events: 0;
7061             description { state: "default" 0.0; //when only icon or no icon is there
7062                align: 0.0 0.0;
7063                rel1 {
7064                   relative: 1.0 0.0;
7065                   to: "icon_rect";
7066                }
7067                rel2.to: "icon_rect";
7068                fixed: 1 0;
7069                min: 0 0;
7070                color: 0 0 0 0;
7071             }
7072             description { state: "icononly" 0.0;
7073                inherit: "default" 0.0;
7074             }
7075             description { state: "visible" 0.0; //when icon is visible
7076                align: 0.0 0.0;
7077                rel1 {
7078                   relative: 1.0 0.0;
7079                   to: "icon_rect";
7080                }
7081                rel2.to: "icon_rect";
7082                fixed: 1 0;
7083                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC;
7084                color: 0 0 0 0;
7085             }
7086          }
7087          part { name: "elm.swallow.content";
7088             type: SWALLOW;
7089             scale: 1;
7090             clip_to: "clipper";
7091             description { state: "default" 0.0;
7092                visible: 0;
7093                align: 0.0 0.5;
7094                rel1 {
7095                   relative: 1.0 1.0;
7096                   to: "padding_left_top";
7097                }
7098                rel2 {
7099                   relative: 1.0 0.0;
7100                   to_x: "padding_left_top";
7101                   to_y: "padding_right_bottom";
7102                }
7103                fixed: 1 0;
7104             }
7105             description { state: "visible" 0.0;
7106                fixed: 1 0;
7107                align: 0.0 0.5;
7108                rel1 {
7109                   relative: 1.0 1.0;
7110                   to: "padding_left_top";
7111                }
7112                rel2 {
7113                   relative: 1.0 0.0;
7114                   to_x: "padding_left_top";
7115                   to_y: "padding_right_bottom";
7116                }
7117                aspect: 1.0 1.0;
7118                aspect_preference: VERTICAL;
7119             }
7120             description { state: "icononly" 0.0;
7121                min: BUTTON_PICKER_BAR_DEFAULT_CONTENT_ICONONLY_MIN_INC;
7122                rel1 {
7123                   relative: 1.0 1.0;
7124                   to: "padding_left_top";
7125                }
7126                rel2 {
7127                   relative: 1.0 0.0;
7128                   to_x: "padding_left_top";
7129                   to_y: "padding_right_bottom";
7130                }
7131                aspect: 1.0 1.0;
7132                aspect_preference: VERTICAL;
7133             }
7134          }
7135          part { name: "elm.text";
7136             type: TEXT;
7137             mouse_events: 0;
7138             scale: 1;
7139             clip_to: "clipper";
7140             description { state: "default" 0.0;
7141                visible: 0;
7142                rel1 {
7143                   relative: 1.0 1.0;
7144                   to_x: "padding_icon_text";
7145                   to_y: "padding_left_top";
7146                }
7147                rel2 {
7148                   relative: 0.0 0.0;
7149                   to: "padding_right_bottom";
7150                }
7151                color: BUTTON_PICKER_TEXT_DEFAULT_COLOR_INC;
7152                text {
7153                   font: "SLP:style=Medium";
7154                   size: BUTTON_PICKER_BAR_DEFAULT_TEXT_FONT_SIZE_INC;
7155                   min: 1 0;
7156                   max: 0 0;
7157                   text_class: "slp_medium";
7158                }
7159             }
7160             description { state: "visible" 0.0;
7161                inherit: "default" 0.0;
7162                visible: 1;
7163                min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC;
7164             }
7165             description { state: "clicked" 0.0;
7166                inherit: "default" 0.0;
7167                visible: 1;
7168                min: 0 0;
7169                color: BUTTON_PICKER_TEXT_CLICKED_COLOR_INC;
7170             }
7171             description { state: "disabled" 0.0;
7172                inherit: "default" 0.0;
7173                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
7174             }
7175             description { state: "disabled_visible" 0.0;
7176                inherit: "default" 0.0;
7177                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
7178                visible: 1;
7179                min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC;
7180             }
7181             description { state: "focused" 0.0;
7182                inherit: "default" 0.0;
7183                visible: 1;
7184                min: 0 0;
7185                color: BUTTON_PICKER_TEXT_FOCUSED_COLOR_INC;
7186             }
7187          }
7188          part { name: "over2";
7189             type: RECT;
7190             repeat_events: 1;
7191             ignore_flags: ON_HOLD;
7192             description { state: "default" 0.0;
7193                color: 0 0 0 0;
7194             }
7195          }
7196          part { name: "over3";
7197             type: RECT;
7198             repeat_events: 1;
7199             description { state: "default" 0.0;
7200                color: 0 0 0 0;
7201             }
7202          }
7203          part { name: "clipper";
7204             type: RECT;
7205             description { state: "default" 0.0;
7206                color: 255 255 255 255;
7207             }
7208          }
7209          part { name: "disabler";
7210             type: RECT;
7211             description { state: "default" 0.0;
7212                color: 0 0 0 0;
7213                visible: 0;
7214             }
7215             description { state: "disabled" 0.0;
7216                inherit: "default" 0.0;
7217                visible: 1;
7218             }
7219          }
7220       }
7221       programs {
7222          program { name: "button_click";
7223             signal: "mouse,down,1";
7224             source: "over2";
7225             action: SIGNAL_EMIT "elm,action,press" "";
7226             after: "button_click_anim";
7227          }
7228          program { name: "button_click_anim";
7229             action: STATE_SET "clicked" 0.0;
7230             target: "button_image";
7231             after: "text_clicked";
7232          }
7233          program { name: "text_clicked";
7234             script {
7235                new st[31];
7236                new Float:vl;
7237                get_state(PART:"elm.text", st, 30, vl);
7238                if (!strcmp(st, "visible"))
7239                  set_state(PART:"elm.text", "clicked", 0.0);
7240             }
7241          }
7242          program { name: "button_unpress";
7243             action: SIGNAL_EMIT "elm,action,unpress" "";
7244          }
7245          program { name: "button_mouseout_clicked";
7246             signal: "mouse,up,1";
7247             source: "over3";
7248             script {
7249                new st[31];
7250                new Float:vl;
7251                get_state(PART:"elm.swallow.content", st, 30, vl);
7252                if (strcmp(st, "icononly"))
7253                  {
7254                     emit("elm,action,default,text,set", "");
7255                     set_state(PART:"elm.text", "visible", 0.0);
7256                  }
7257                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7258                  set_state(PART:"button_image", "default", 0.0);
7259             }
7260             after: button_unpress;
7261          }
7262          program { name: "touch_snd";
7263             signal: "mouse,clicked,1";
7264             source: "over2";
7265             action: PLAY_SAMPLE "touch_sound" 1.0;
7266             after: button_unclick3;
7267          }
7268          program { name: "button_unclick3";
7269             action: SIGNAL_EMIT "elm,action,click" "";
7270          }
7271          program { name: "text_show";
7272             signal: "elm,state,text,visible";
7273             source: "elm";
7274             script {
7275                new st[31];
7276                new Float:vl;
7277                get_state(PART:"elm.swallow.content", st, 30, vl);
7278                if (!strcmp(st, "icononly"))
7279                  {
7280                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7281                     set_state(PART:"padding_icon_text", "visible", 0.0);
7282                  }
7283                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7284                  set_state(PART:"elm.text", "visible", 0.0);
7285                else
7286                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7287             }
7288          }
7289          program { name: "text_hide";
7290             signal: "elm,state,text,hidden";
7291             source: "elm";
7292             script {
7293                new st[31];
7294                new Float:vl;
7295                get_state(PART:"elm.swallow.content", st, 30, vl);
7296                if (!strcmp(st, "visible"))
7297                  {
7298                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7299                     set_state(PART:"padding_icon_text", "icononly", 0.0);
7300                  }
7301                set_state(PART:"elm.text", "default", 0.0);
7302             }
7303          }
7304          program { name: "icon_show";
7305             signal: "elm,state,icon,visible";
7306             source: "elm";
7307             script {
7308                new st[31];
7309                new Float:vl;
7310                get_state(PART:"elm.text", st, 30, vl);
7311                if (!strcmp(st, "visible"))
7312                  {
7313                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7314                     set_state(PART:"padding_icon_text", "visible", 0.0);
7315                  }
7316                else
7317                  {
7318                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7319                     set_state(PART:"padding_icon_text", "icononly", 0.0);
7320                  }
7321             }
7322          }
7323          program { name: "icon_hide";
7324             signal: "elm,state,icon,hidden";
7325             source: "elm";
7326             action: STATE_SET "default" 0.0;
7327             target: "elm.swallow.content";
7328             target: "padding_icon_text";
7329          }
7330          program { name: "disable";
7331             signal: "elm,state,disabled";
7332             source: "elm";
7333             action: STATE_SET "disabled" 0.0;
7334             target: "button_image";
7335             target: "disabler";
7336             after: "disable_text";
7337          }
7338          program { name: "disable_text";
7339             script {
7340                new st[31];
7341                new Float:vl;
7342                get_state(PART:"elm.text", st, 30, vl);
7343                if (!strcmp(st, "visible"))
7344                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7345                else
7346                  set_state(PART:"elm.text", "disabled", 0.0);
7347                set_int(button_state, BUTTON_STATE_DISABLED);
7348             }
7349          }
7350          program { name: "enable";
7351             signal: "elm,state,enabled";
7352             source: "elm";
7353             action: STATE_SET "default" 0.0;
7354             target: "button_image";
7355             target: "disabler";
7356             after: "enable_text";
7357          }
7358          program { name: "enable_text";
7359             script {
7360                new st[31];
7361                new Float:vl;
7362                get_state(PART:"elm.text", st, 30, vl);
7363                if (!strcmp(st, "disabled_visible"))
7364                  set_state(PART:"elm.text", "visible", 0.0);
7365                else
7366                  set_state(PART:"elm.text", "default", 0.0);
7367                set_int(button_state, BUTTON_STATE_ENABLED);
7368             }
7369          }
7370          program { name: "focused";
7371             //signal: "elm,action,focus";
7372             //source: "elm";
7373             action: STATE_SET "focused" 0.0;
7374             target: "button_image";
7375             target: "elm.text";
7376          }
7377          program { name: "unfocused";
7378             //signal: "elm,action,unfocus";
7379             //source: "elm";
7380             action: STATE_SET "default" 0.0;
7381             target: "button_image";
7382             after: "unfocus_text";
7383          }
7384          program { name: "unfocus_text";
7385             action: STATE_SET "visible" 0.0;
7386             target: "elm.text";
7387          }
7388       }
7389    }
7390
7391 ///////////////////////////////////////////////////////////////////////////////////////
7392    group { name: "elm/button/base/picker/prev/text/default";
7393       alias: "elm/button/base/picker/next/text/default";
7394       images {
7395          image: "00_picker_btn_normal.png" COMP;
7396          image: "00_picker_btn_press.png" COMP;
7397          image: "00_picker_btn_normal_focus.png" COMP;
7398       }
7399       script {
7400          public button_state = BUTTON_STATE_ENABLED;
7401       }
7402       parts {
7403          part { name: "button_image";
7404             scale: 1;
7405             description { state: "default" 0.0;
7406                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_MIN_INC;
7407                image {
7408                   normal: "00_picker_btn_normal.png";
7409                   border: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_BORDER_INC;
7410                   border_scale: 1;
7411                }
7412             }
7413             description { state: "clicked" 0.0;
7414                inherit: "default" 0.0;
7415                image.normal: "00_picker_btn_press.png";
7416             }
7417             description { state: "disabled" 0.0;
7418                inherit: "default" 0.0;
7419                color: 0 0 0 128;
7420             }
7421             description { state: "focused" 0.0;
7422                inherit: "default" 0.0;
7423                image.normal: "00_picker_btn_normal_focus.png";
7424             }
7425          }
7426          part { name: "padding_left_top";
7427             type: RECT;
7428             scale: 1;
7429             mouse_events: 0;
7430             description { state: "default" 0.0;
7431                align: 0.0 0.0;
7432                rel2.relative: 0.0 0.0;
7433                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC;
7434                fixed: 1 1;
7435                visible: 0;
7436             }
7437          }
7438          part { name: "padding_right_bottom";
7439             type: RECT;
7440             scale: 1;
7441             mouse_events: 0;
7442             description { state: "default" 0.0;
7443                align: 1.0 1.0;
7444                rel1.relative: 1.0 1.0;
7445                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC;
7446                fixed: 1 1;
7447                visible: 0;
7448             }
7449          }
7450          part { name: "icon_rect";
7451             type: RECT;
7452             scale: 1;
7453             mouse_events: 0;
7454             description { state: "default" 0.0;
7455                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_ICON_RECT_MIN_INC;
7456                fixed: 1 0;
7457                rel1 {
7458                   relative: 0.0 1.0;
7459                   to_x: "elm.swallow.content";
7460                   to_y: "padding_left_top";
7461                }
7462                rel2 {
7463                   relative: 1.0 0.0;
7464                   to_x: "elm.swallow.content";
7465                   to_y: "padding_right_bottom";
7466                }
7467                align: 0.0 0.5;
7468                color: 0 0 0 0;
7469             }
7470          }
7471          part { name: "padding_icon_text";
7472             type: RECT;
7473             scale: 1;
7474             mouse_events: 0;
7475             description { state: "default" 0.0; //when only icon or no icon is there
7476                align: 0.0 0.0;
7477                rel1 {
7478                   relative: 1.0 0.0;
7479                   to: "icon_rect";
7480                }
7481                rel2.to: "icon_rect";
7482                fixed: 1 0;
7483                min: 0 0;
7484                color: 0 0 0 0;
7485             }
7486             description { state: "icononly" 0.0;
7487                inherit: "default" 0.0;
7488             }
7489             description { state: "visible" 0.0; //when icon is visible
7490                align: 0.0 0.0;
7491                rel1 {
7492                   relative: 1.0 0.0;
7493                   to: "icon_rect";
7494                }
7495                rel2.to: "icon_rect";
7496                fixed: 1 0;
7497                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC;
7498                color: 0 0 0 0;
7499             }
7500          }
7501          part { name: "elm.swallow.content";
7502             type: SWALLOW;
7503             scale: 1;
7504             clip_to: "clipper";
7505             description { state: "default" 0.0;
7506                visible: 0;
7507                align: 0.0 0.5;
7508                rel1 {
7509                   relative: 1.0 1.0;
7510                   to: "padding_left_top";
7511                }
7512                rel2 {
7513                   relative: 1.0 0.0;
7514                   to_x: "padding_left_top";
7515                   to_y: "padding_right_bottom";
7516                }
7517                fixed: 1 0;
7518             }
7519             description { state: "visible" 0.0;
7520                fixed: 1 0;
7521                align: 0.0 0.5;
7522                rel1 {
7523                   relative: 1.0 1.0;
7524                   to: "padding_left_top";
7525                }
7526                rel2 {
7527                   relative: 1.0 0.0;
7528                   to_x: "padding_left_top";
7529                   to_y: "padding_right_bottom";
7530                }
7531                aspect: 1.0 1.0;
7532                aspect_preference: VERTICAL;
7533             }
7534             description { state: "icononly" 0.0;
7535                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_CONTENT_ICON_ONLY_MIN_INC;
7536                rel1 {
7537                   relative: 1.0 1.0;
7538                   to: "padding_left_top";
7539                }
7540                rel2 {
7541                   relative: 1.0 0.0;
7542                   to_x: "padding_left_top";
7543                   to_y: "padding_right_bottom";
7544                }
7545                aspect: 1.0 1.0;
7546                aspect_preference: VERTICAL;
7547             }
7548          }
7549          part { name: "elm.text";
7550             type: TEXT;
7551             mouse_events: 0;
7552             scale: 1;
7553             clip_to: "clipper";
7554             description { state: "default" 0.0;
7555                visible: 0;
7556                rel1 {
7557                   relative: 1.0 1.0;
7558                   to_x: "padding_icon_text";
7559                   to_y: "padding_left_top";
7560                }
7561                rel2 {
7562                   relative: 0.0 0.0;
7563                   to: "padding_right_bottom";
7564                }
7565                color: BUTTON_PICKER_TEXT_DEFAULT_COLOR_INC;
7566                text {
7567                   font: "SLP:style=Medium";
7568                   size: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_FONT_SIZE_INC;
7569                   min: 1 0;
7570                   max: 1 0;
7571                   text_class: "slp_medium";
7572                }
7573             }
7574             description { state: "visible" 0.0;
7575                inherit: "default" 0.0;
7576                visible: 1;
7577                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC;
7578             }
7579             description { state: "clicked" 0.0;
7580                inherit: "default" 0.0;
7581                visible: 1;
7582                min: 0 0;
7583                color: BUTTON_PICKER_TEXT_CLICKED_COLOR_INC;
7584             }
7585             description { state: "disabled" 0.0;
7586                inherit: "default" 0.0;
7587                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
7588             }
7589             description { state: "disabled_visible" 0.0;
7590                inherit: "default" 0.0;
7591                color: BUTTON_PICKER_TEXT_DISABLED_COLOR_INC;
7592                visible: 1;
7593                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC;
7594             }
7595             description { state: "focused" 0.0;
7596                inherit: "default" 0.0;
7597                visible: 1;
7598                min: 0 0;
7599                color: BUTTON_PICKER_TEXT_FOCUSED_COLOR_INC;
7600             }
7601          }
7602          part { name: "over2";
7603             type: RECT;
7604             repeat_events: 1;
7605             ignore_flags: ON_HOLD;
7606             description { state: "default" 0.0;
7607                color: 0 0 0 0;
7608             }
7609          }
7610          part { name: "over3";
7611             type: RECT;
7612             repeat_events: 1;
7613             description { state: "default" 0.0;
7614                color: 0 0 0 0;
7615             }
7616          }
7617          part { name: "clipper";
7618             type: RECT;
7619             description { state: "default" 0.0;
7620                color: 255 255 255 255;
7621             }
7622          }
7623          part { name: "disabler";
7624             type: RECT;
7625             description { state: "default" 0.0;
7626                color: 0 0 0 0;
7627                visible: 0;
7628             }
7629             description { state: "disabled" 0.0;
7630                inherit: "default" 0.0;
7631                visible: 1;
7632             }
7633          }
7634       }
7635       programs {
7636          program { name: "button_click";
7637             signal: "mouse,down,1";
7638             source: "over2";
7639             action: SIGNAL_EMIT "elm,action,press" "";
7640             after: "button_click_anim";
7641          }
7642          program { name: "button_click_anim";
7643             action: STATE_SET "clicked" 0.0;
7644             target: "button_image";
7645             after: "text_clicked";
7646          }
7647          program { name: "text_clicked";
7648             script {
7649                new st[31];
7650                new Float:vl;
7651                get_state(PART:"elm.text", st, 30, vl);
7652                if (!strcmp(st, "visible"))
7653                  set_state(PART:"elm.text", "clicked", 0.0);
7654             }
7655          }
7656          program { name: "button_unpress";
7657             action: SIGNAL_EMIT "elm,action,unpress" "";
7658          }
7659          program { name: "button_mouseout_clicked";
7660             signal: "mouse,up,1";
7661             source: "over3";
7662             script {
7663                new st[31];
7664                new Float:vl;
7665                get_state(PART:"elm.swallow.content", st, 30, vl);
7666                if (strcmp(st, "icononly"))
7667                  {
7668                     emit("elm,action,default,text,set", "");
7669                     set_state(PART:"elm.text", "visible", 0.0);
7670                  }
7671                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7672                  set_state(PART:"button_image", "default", 0.0);
7673             }
7674             after: button_unpress;
7675          }
7676          program { name: "touch_snd";
7677             signal: "mouse,clicked,1";
7678             source: "over2";
7679             action: PLAY_SAMPLE "touch_sound" 1.0;
7680             after: button_unclick3;
7681          }
7682          program { name: "button_unclick3";
7683             action: SIGNAL_EMIT "elm,action,click" "";
7684          }
7685          program { name: "text_show";
7686             signal: "elm,state,text,visible";
7687             source: "elm";
7688             script {
7689                new st[31];
7690                new Float:vl;
7691                get_state(PART:"elm.swallow.content", st, 30, vl);
7692                if (!strcmp(st, "icononly"))
7693                  {
7694                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7695                     set_state(PART:"padding_icon_text", "visible", 0.0);
7696                  }
7697                if (get_int(button_state) != BUTTON_STATE_DISABLED)
7698                  set_state(PART:"elm.text", "visible", 0.0);
7699                else
7700                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7701             }
7702          }
7703          program { name: "text_hide";
7704             signal: "elm,state,text,hidden";
7705             source: "elm";
7706             script {
7707                new st[31];
7708                new Float:vl;
7709                get_state(PART:"elm.swallow.content", st, 30, vl);
7710                if (!strcmp(st, "visible"))
7711                  {
7712                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7713                     set_state(PART:"padding_icon_text", "icononly", 0.0);
7714                  }
7715                set_state(PART:"elm.text", "default", 0.0);
7716             }
7717          }
7718          program { name: "icon_show";
7719             signal: "elm,state,icon,visible";
7720             source: "elm";
7721             script {
7722                new st[31];
7723                new Float:vl;
7724                get_state(PART:"elm.text", st, 30, vl);
7725                if (!strcmp(st, "visible"))
7726                  {
7727                     set_state(PART:"elm.swallow.content", "visible", 0.0);
7728                     set_state(PART:"padding_icon_text", "visible", 0.0);
7729                  }
7730                else
7731                  {
7732                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
7733                     set_state(PART:"padding_icon_text", "icononly", 0.0);
7734                  }
7735             }
7736          }
7737          program { name: "icon_hide";
7738             signal: "elm,state,icon,hidden";
7739             source: "elm";
7740             action: STATE_SET "default" 0.0;
7741             target: "elm.swallow.content";
7742             target: "padding_icon_text";
7743          }
7744          program { name: "disable";
7745             signal: "elm,state,disabled";
7746             source: "elm";
7747             action: STATE_SET "disabled" 0.0;
7748             target: "button_image";
7749             target: "disabler";
7750             after: "disable_text";
7751          }
7752          program { name: "disable_text";
7753             script {
7754                new st[31];
7755                new Float:vl;
7756                get_state(PART:"elm.text", st, 30, vl);
7757                if (!strcmp(st, "visible"))
7758                  set_state(PART:"elm.text", "disabled_visible", 0.0);
7759                else
7760                  set_state(PART:"elm.text", "disabled", 0.0);
7761                set_int(button_state, BUTTON_STATE_DISABLED);
7762             }
7763          }
7764          program { name: "enable";
7765             signal: "elm,state,enabled";
7766             source: "elm";
7767             action: STATE_SET "default" 0.0;
7768             target: "button_image";
7769             target: "disabler";
7770             after: "enable_text";
7771          }
7772          program { name: "enable_text";
7773             script {
7774                new st[31];
7775                new Float:vl;
7776                get_state(PART:"elm.text", st, 30, vl);
7777                if (!strcmp(st, "disabled_visible"))
7778                  set_state(PART:"elm.text", "visible", 0.0);
7779                else
7780                  set_state(PART:"elm.text", "default", 0.0);
7781                set_int(button_state, BUTTON_STATE_ENABLED);
7782             }
7783          }
7784          program { name: "focused";
7785             //signal: "elm,action,focus";
7786             //source: "elm";
7787             action: STATE_SET "focused" 0.0;
7788             target: "button_image";
7789             target: "elm.text";
7790          }
7791          program { name: "unfocused";
7792             //signal: "elm,action,unfocus";
7793             //source: "elm";
7794             action: STATE_SET "default" 0.0;
7795             target: "button_image";
7796             after: "unfocus_text";
7797          }
7798          program { name: "unfocus_text";
7799             action: STATE_SET "visible" 0.0;
7800             target: "elm.text";
7801          }
7802       }
7803    }
7804
7805 ///////////////////////////////////////////////////////////////////////////////////////
7806 #define BUTTON_CONTACT_STYLES(style_name, image_normal, image_press) \
7807    group { name: "elm/button/base/contact/"style_name; \
7808       images { \
7809          image: "00_contacts_circle_bg.png" COMP; \
7810          image: image_normal COMP; \
7811          image: image_press COMP; \
7812       } \
7813       parts { \
7814          part { name: "button_image"; \
7815             scale: 1; \
7816             description { state: "default" 0.0; \
7817                min: BUTTON_CONTACT_STYLE_BG_MIN_MAX_INC; \
7818                max: BUTTON_CONTACT_STYLE_BG_MIN_MAX_INC; \
7819                image.normal: "00_contacts_circle_bg.png"; \
7820                color: 255 255 255 255; \
7821             } \
7822             description { \
7823                state: "clicked" 0.0; \
7824                inherit: "default" 0.0; \
7825                image.normal: "00_contacts_circle_bg.png"; \
7826             } \
7827             description { \
7828                state: "disabled" 0.0; \
7829                inherit: "default" 0.0; \
7830                color: 255 255 255 128; \
7831             } \
7832          } \
7833          part { name: "button_center_part"; \
7834             scale: 1; \
7835             description { state: "default" 0.0; \
7836                min: BUTTON_CONTACT_STYLE_IMAGE_MIN_MAX_INC; \
7837                max: BUTTON_CONTACT_STYLE_IMAGE_MIN_MAX_INC; \
7838                image.normal: image_normal; \
7839                color: 255 255 255 255; \
7840             } \
7841             description { \
7842                state: "clicked" 0.0; \
7843                inherit: "default" 0.0; \
7844                image.normal: image_press; \
7845             } \
7846             description { \
7847                state: "disabled" 0.0; \
7848                inherit: "default" 0.0; \
7849                color: 255 255 255 128; \
7850             } \
7851          } \
7852          part { name: "over1"; \
7853             type: RECT; \
7854             ignore_flags: ON_HOLD; \
7855             description { state: "default" 0.0; \
7856                color: 0 0 0 0; \
7857             } \
7858          } \
7859          part { name: "over2"; \
7860             repeat_events: 1; \
7861             description { state: "default" 0.0; \
7862                color: 0 0 0 0; \
7863             } \
7864          } \
7865          part { name: "disabler"; \
7866             type: RECT; \
7867             description { state: "default" 0.0; \
7868                color: 0 0 0 0; \
7869                visible: 0; \
7870             } \
7871             description { state: "disabled" 0.0; \
7872                inherit: "default" 0.0; \
7873                visible: 1; \
7874             } \
7875          } \
7876       } \
7877       programs { \
7878          program { name: "button_click"; \
7879             signal: "mouse,down,1"; \
7880             source: "over1"; \
7881             action: SIGNAL_EMIT "elm,action,press" ""; \
7882             after: "button_click_anim"; \
7883          } \
7884          program { name: "button_click_anim"; \
7885             action: STATE_SET "clicked" 0.0; \
7886             target: "button_image"; \
7887             target: "button_center_part"; \
7888          } \
7889          program { name: "button_unclick"; \
7890             signal: "mouse,up,1"; \
7891             source: "over2"; \
7892             action: SIGNAL_EMIT "elm,action,unpress" ""; \
7893             after: "button_unclick_anim"; \
7894          } \
7895          program { name: "button_unclick_anim"; \
7896             action: STATE_SET "default" 0.0; \
7897             target: "button_image"; \
7898             target: "button_center_part"; \
7899          } \
7900          program { name: "touch_snd"; \
7901             signal: "mouse,clicked,1"; \
7902             source: "over1"; \
7903             action: PLAY_SAMPLE "touch_sound" 1.0; \
7904             after: button_unclick3; \
7905          } \
7906          program { name: "button_unclick3"; \
7907             action: SIGNAL_EMIT "elm,action,click" ""; \
7908          } \
7909          program { name: "disable"; \
7910             signal: "elm,state,disabled"; \
7911             source: "elm"; \
7912             action: STATE_SET "disabled" 0.0; \
7913             target: "disabler"; \
7914             target: "button_image"; \
7915             target: "button_center_part"; \
7916          } \
7917          program { name: "enable"; \
7918             signal: "elm,state,enabled"; \
7919             source: "elm"; \
7920             action: STATE_SET "default" 0.0; \
7921             target: "disabler"; \
7922             target: "button_image"; \
7923             target: "button_center_part"; \
7924          } \
7925       } \
7926    }
7927
7928 ///////////////////////////////////////////////////////////////////////////////////////
7929    BUTTON_CONTACT_STYLES("expand_closed", "00_button_expand_closed.png", "00_button_expand_closed_press.png")
7930
7931    BUTTON_CONTACT_STYLES("expand_opened", "00_button_expand_opened.png", "00_button_expand_opened_press.png")
7932
7933    BUTTON_CONTACT_STYLES("plus", "00_button_plus.png", "00_button_plus_press.png")
7934
7935 ///////////////////////////////////////////////////////////////////////////////////////
7936    group { name: "elm/button/base/contact";
7937       alias: "elm/button/base/text_only/contact";
7938       images {
7939          image: "00_contacts_button_bg.png" COMP;
7940          image: "00_contacts_button_bg_press.png" COMP;
7941       }
7942       script {
7943          public button_state = BUTTON_STATE_ENABLED;
7944       }
7945       parts {
7946          part { name: "button_image";
7947             scale: 1;
7948             description { state: "default" 0.0;
7949                rel1 {
7950                   to_x: "padding.left";
7951                   to_y: "elm.text";
7952                }
7953                rel2 {
7954                   to_x: "padding.right";
7955                   to_y: "elm.text";
7956                }
7957                min: BUTTON_CONTACT_BG_MIN_INC;
7958                image {
7959                   normal: "00_contacts_button_bg.png";
7960                   border: BUTTON_CONTACT_BG_BORDER_INC;
7961                   border_scale: 1;
7962                }
7963             }
7964             description { state: "clicked" 0.0;
7965                inherit: "default" 0.0;
7966                image.normal: "00_contacts_button_bg_press.png";
7967             }
7968             description { state: "disabled" 0.0;
7969                inherit: "default" 0.0;
7970                color: 0 0 0 128;
7971             }
7972             description { state: "focused" 0.0;
7973                inherit: "default" 0.0;
7974             }
7975          }
7976          part { name: "padding.left";
7977             type: RECT;
7978             scale: 1;
7979             description { state: "default" 0.0;
7980                visible: 0;
7981                min: BUTTON_CONTACT_PADDING_MIN_INC;
7982                fixed: 1 0;
7983                color: 0 0 0 0;
7984                rel2 {
7985                   relative: 0.0 1.0;
7986                   to_x: "elm.text";
7987                }
7988                align: 1.0 0.0;
7989             }
7990          }
7991          part { name: "padding.right";
7992             type: RECT;
7993             scale: 1;
7994             description { state: "default" 0.0;
7995                visible: 0;
7996                min: BUTTON_CONTACT_PADDING_MIN_INC;
7997                fixed: 1 0;
7998                color: 0 0 0 0;
7999                rel1 {
8000                   relative: 1.0 0.0;
8001                   to_x: "elm.text";
8002                }
8003                align: 0.0 0.0;
8004             }
8005          }
8006          part {   name: "elm.text";
8007             type: TEXT;
8008             mouse_events: 0;
8009             scale: 1;
8010             description { state: "default" 0.0;
8011                visible: 0;
8012                fixed: 1 1;
8013                color: BUTTON_CONTACT_BUTTON_TEXT_NORMAL_COLOR_INC;
8014                text {
8015                   font: "SLP:style=Medium";
8016                   size: BUTTON_CONTACT_FONT_SIZE_INC;
8017                   min: 1 1;
8018                   text_class: "slp_medium";
8019                }
8020             }
8021             description { state: "visible" 0.0;
8022                inherit: "default" 0.0;
8023                visible: 1;
8024                min: 1 1;
8025             }
8026             description { state: "clicked" 0.0;
8027                inherit: "default" 0.0;
8028                visible: 1;
8029                min: 1 1;
8030                color: BUTTON_CONTACT_BUTTON_TEXT_PRESSED_COLOR_INC;
8031             }
8032             description { state: "disabled" 0.0;
8033                inherit: "default" 0.0;
8034                color: 0 0 0 128;
8035             }
8036             description { state: "disabled_visible" 0.0;
8037                inherit: "default" 0.0;
8038                color: BUTTON_CONTACT_BUTTON_TEXT_DISABLED_COLOR_INC;
8039                visible: 1;
8040                min: 1 1;
8041             }
8042             description { state: "focused" 0.0;
8043                inherit: "default" 0.0;
8044                visible: 1;
8045                min: 1 1;
8046                color: BUTTON_CONTACT_BUTTON_TEXT_FOCUSED_COLOR_INC;
8047             }
8048          }
8049          part { name: "over1";
8050             mouse_events: 0;
8051             description { state: "default" 0.0;
8052                rel2.relative: 1.0 0.5;
8053             }
8054          }
8055          part { name: "over2";
8056             repeat_events: 1;
8057             ignore_flags: ON_HOLD;
8058             description { state: "default" 0.0;
8059                rel1.to: "button_image";
8060                rel2.to: "button_image";
8061             }
8062          }
8063          part { name: "over3";
8064             repeat_events: 1;
8065             description { state: "default" 0.0;
8066                rel1.to: "button_image";
8067                rel2.to: "button_image";
8068                color: 0 0 0 0;
8069             }
8070          }
8071          part { name: "disabler";
8072             type: RECT;
8073             description { state: "default" 0.0;
8074                rel1.to: "button_image";
8075                rel2.to: "button_image";
8076                color: 0 0 0 0;
8077                visible: 0;
8078             }
8079             description { state: "disabled" 0.0;
8080                inherit: "default" 0.0;
8081                visible: 1;
8082             }
8083          }
8084       }
8085       programs {
8086          program { name: "button_click";
8087             signal: "mouse,down,1";
8088             source: "over2";
8089             action: SIGNAL_EMIT "elm,action,press" "";
8090             after: "button_click_anim";
8091          }
8092          program { name: "button_click_anim";
8093             action: STATE_SET "clicked" 0.0;
8094             target: "button_image";
8095             target: "elm.text";
8096          }
8097          program { name: "button_unpress";
8098             action: SIGNAL_EMIT "elm,action,unpress" "";
8099          }
8100          program { name: "button_mouseout_clicked";
8101             signal: "mouse,up,1";
8102             source: "over3";
8103             script {
8104                new st[31];
8105                new Float:vl;
8106                get_state(PART:"elm.text", st, 30, vl);
8107                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
8108                  {
8109                     emit("elm,action,default,text,set", "");
8110                     set_state(PART:"elm.text", "visible", 0.0);
8111                  }
8112                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8113                  set_state(PART:"button_image", "default", 0.0);
8114             }
8115             after: button_unpress;
8116          }
8117          program { name: "touch_snd";
8118             signal: "mouse,clicked,1";
8119             source: "over2";
8120             action: PLAY_SAMPLE "touch_sound" 1.0;
8121             after: button_unclick3;
8122          }
8123          program { name: "button_unclick3";
8124             action: SIGNAL_EMIT "elm,action,click" "";
8125          }
8126          program { name: "text_show";
8127             signal: "elm,state,text,visible";
8128             source: "elm";
8129             script {
8130                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8131                  set_state(PART:"elm.text", "visible", 0.0);
8132                else
8133                  set_state(PART:"elm.text", "disabled_visible", 0.0);
8134             }
8135          }
8136          program { name: "text_hide";
8137             signal: "elm,state,text,hidden";
8138             source: "elm";
8139             action: STATE_SET "default" 0.0;
8140             target: "elm.text";
8141          }
8142          program { name: "disable";
8143             signal: "elm,state,disabled";
8144             source: "elm";
8145             action: STATE_SET "disabled" 0.0;
8146             target: "button_image";
8147             target: "disabler";
8148             after: "disable_text";
8149          }
8150          program { name: "disable_text";
8151             script {
8152                new st[31];
8153                new Float:vl;
8154                get_state(PART:"elm.text", st, 30, vl);
8155                if (!strcmp(st, "visible"))
8156                  set_state(PART:"elm.text", "disabled_visible", 0.0);
8157                else
8158                  set_state(PART:"elm.text", "disabled", 0.0);
8159                set_int(button_state, BUTTON_STATE_DISABLED);
8160             }
8161          }
8162          program { name: "enable";
8163             signal: "elm,state,enabled";
8164             source: "elm";
8165             action: STATE_SET "default" 0.0;
8166             target: "button_image";
8167             target: "disabler";
8168             after: "enable_text";
8169          }
8170          program { name: "enable_text";
8171             script {
8172                new st[31];
8173                new Float:vl;
8174                get_state(PART:"elm.text", st, 30, vl);
8175                if (!strcmp(st, "disabled_visible"))
8176                  set_state(PART:"elm.text", "visible", 0.0);
8177                else
8178                  set_state(PART:"elm.text", "default", 0.0);
8179                set_int(button_state, BUTTON_STATE_ENABLED);
8180             }
8181          }
8182          program { name: "focused";
8183             //signal: "elm,action,focus";
8184             //source: "elm";
8185             action: STATE_SET "focused" 0.0;
8186             target: "button_image";
8187             target: "elm.text";
8188          }
8189          program { name: "unfocused";
8190             //signal: "elm,action,unfocus";
8191             //source: "elm";
8192             action: STATE_SET "default" 0.0;
8193             target: "button_image";
8194             action: STATE_SET "visible" 0.0;
8195             target: "elm.text";
8196          }
8197       }
8198    }
8199
8200 ///////////////////////////////////////////////////////////////////////////////////////
8201    group { name: "elm/button/base/naviframe/back_btn/default";
8202       alias: "elm/button/base/naviframe/prev_btn/default";
8203       alias: "elm/button/base/naviframe/end_btn/default";
8204       images {
8205          image: "00_winset_Back_btn_normal.png" COMP;
8206          image: "00_winset_Back_btn_press.png" COMP;
8207          image: "00_winset_Back_btn_normal_focus.png" COMP;
8208          image: "00_winset_Back.png" COMP;
8209       }
8210       script {
8211          public button_state = BUTTON_STATE_ENABLED;
8212       }
8213       parts {
8214          part { name: "button_image";
8215             scale: 1;
8216             description { state: "default" 0.0;
8217                min: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC;
8218                max: BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC;
8219                image {
8220                   normal: "00_winset_Back_btn_normal.png";
8221                   border: BUTTON_NAVIFRAME_BACK_BUTTON_BG_BORDER_INC;
8222                   border_scale: 1;
8223                }
8224             }
8225             description { state: "clicked" 0.0;
8226                inherit: "default" 0.0;
8227                image.normal: "00_winset_Back_btn_press.png";
8228             }
8229             description { state: "disabled" 0.0;
8230                inherit: "default" 0.0;
8231             }
8232             description { state: "focused" 0.0;
8233                inherit: "default" 0.0;
8234                image.normal: "00_winset_Back_btn_normal_focus.png";
8235             }
8236          }
8237          part { name: "back_button";
8238             scale: 1;
8239             mouse_events: 0;
8240             description { state: "default" 0.0;
8241                min: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC;
8242                max: BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC;
8243                rel1.to: "button_image";
8244                rel2.to: "button_image";
8245                image.normal: "00_winset_Back.png";
8246             }
8247             description { state: "clicked" 0.0;
8248                inherit: "default" 0.0;
8249             }
8250             description { state: "disabled" 0.0;
8251                inherit: "default" 0.0;
8252                color: 127 127 127 127;
8253             }
8254          }
8255          part { name: "over2";
8256             type: RECT;
8257             repeat_events: 1;
8258             ignore_flags: ON_HOLD;
8259             description { state: "default" 0.0;
8260                color: 0 0 0 0;
8261             }
8262          }
8263          part { name: "over3";
8264             type: RECT;
8265             repeat_events: 1;
8266             description { state: "default" 0.0;
8267                color: 0 0 0 0;
8268             }
8269          }
8270          part { name: "disabler";
8271             type: RECT;
8272             description { state: "default" 0.0;
8273                color: 0 0 0 0;
8274                visible: 0;
8275             }
8276             description { state: "disabled" 0.0;
8277                inherit: "default" 0.0;
8278                visible: 1;
8279             }
8280          }
8281       }
8282       programs {
8283          program { name: "button_click";
8284             signal: "mouse,down,1";
8285             source: "over2";
8286             action: SIGNAL_EMIT "elm,action,press" "";
8287             after: "button_click_anim";
8288          }
8289          program { name: "button_click_anim";
8290             action: STATE_SET "clicked" 0.0;
8291             target: "button_image";
8292          }
8293          program { name: "button_unpress";
8294             action: SIGNAL_EMIT "elm,action,unpress" "";
8295          }
8296          program { name: "button_mouseout_clicked";
8297             signal: "mouse,up,1";
8298             source: "over3";
8299             script {
8300                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8301                  set_state(PART:"button_image", "default", 0.0);
8302             }
8303             after: button_unpress;
8304          }
8305          program { name: "touch_snd";
8306             signal: "mouse,clicked,1";
8307             source: "over2";
8308             action: PLAY_SAMPLE "touch_sound" 1.0;
8309             after: button_unclick3;
8310          }
8311          program { name: "button_unclick3";
8312             action: SIGNAL_EMIT "elm,action,click" "";
8313          }
8314          program { name: "disable";
8315             signal: "elm,state,disabled";
8316             source: "elm";
8317             action: STATE_SET "disabled" 0.0;
8318             target: "button_image";
8319             target: "disabler";
8320             target: "back_button";
8321             after: "disable_button";
8322          }
8323          program { name: "disable_button";
8324             script {
8325                set_int(button_state, BUTTON_STATE_DISABLED);
8326             }
8327          }
8328          program { name: "enable";
8329             signal: "elm,state,enabled";
8330             source: "elm";
8331             action: STATE_SET "default" 0.0;
8332             target: "button_image";
8333             target: "disabler";
8334             target: "back_button";
8335             after: "enable_button";
8336          }
8337          program { name: "enable_button";
8338             script {
8339                set_int(button_state, BUTTON_STATE_ENABLED);
8340             }
8341          }
8342          program { name: "focused";
8343             //signal: "elm,action,focus";
8344             //source: "elm";
8345             action: STATE_SET "focused" 0.0;
8346             target: "button_image";
8347          }
8348          program { name: "unfocused";
8349             //signal: "elm,action,unfocus";
8350             //source: "elm";
8351             action: STATE_SET "default" 0.0;
8352             target: "button_image";
8353          }
8354       }
8355    }
8356
8357 ///////////////////////////////////////////////////////////////////////////////////////
8358    group { name: "elm/button/base/picker/prev/icon/default";
8359       images {
8360          image: "00_picker_btn_normal.png" COMP;
8361          image: "00_picker_btn_press.png" COMP;
8362          image: "00_picker_btn_normal_focus.png" COMP;
8363          image: "00_picker_arrow_left.png" COMP;
8364          image: "00_picker_arrow_left_press.png" COMP;
8365       }
8366       script {
8367          public button_state = BUTTON_STATE_ENABLED;
8368       }
8369       parts {
8370          part { name: "button_image";
8371             scale: 1;
8372             description { state: "default" 0.0;
8373                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
8374                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
8375                image {
8376                   normal: "00_picker_btn_normal.png";
8377                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
8378                   border_scale: 1;
8379                }
8380             }
8381             description { state: "clicked" 0.0;
8382                inherit: "default" 0.0;
8383                image.normal: "00_picker_btn_press.png";
8384             }
8385             description { state: "disabled" 0.0;
8386                inherit: "default" 0.0;
8387             }
8388             description { state: "focused" 0.0;
8389                inherit: "default" 0.0;
8390                image.normal: "00_picker_btn_normal_focus.png";
8391             }
8392          }
8393          part { name: "padding_left_top";
8394             type: RECT;
8395             scale: 1;
8396             mouse_events: 0;
8397             description { state: "default" 0.0;
8398                align: 0.0 0.0;
8399                rel2.relative: 0.0 0.0;
8400                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
8401                fixed: 1 1;
8402                visible: 0;
8403             }
8404          }
8405          part { name: "padding_right_bottom";
8406             type: RECT;
8407             scale: 1;
8408             mouse_events: 0;
8409             description { state: "default" 0.0;
8410                align: 1.0 1.0;
8411                rel1.relative: 1.0 1.0;
8412                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
8413                fixed: 1 1;
8414                visible: 0;
8415             }
8416          }
8417          part { name: "left_arrow";
8418             scale: 1;
8419             mouse_events: 0;
8420             description { state: "default" 0.0;
8421                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
8422                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
8423                rel1 {
8424                   relative: 1.0 1.0;
8425                   to: "padding_left_top";
8426                }
8427                rel2 {
8428                   relative: 0.0 0.0;
8429                   to: "padding_right_bottom";
8430                }
8431                image.normal: "00_picker_arrow_left.png";
8432             }
8433             description { state: "clicked" 0.0;
8434                inherit: "default" 0.0;
8435                image.normal: "00_picker_arrow_left_press.png";
8436             }
8437          }
8438          part { name: "over2";
8439             type: RECT;
8440             repeat_events: 1;
8441             ignore_flags: ON_HOLD;
8442             description { state: "default" 0.0;
8443                color: 0 0 0 0;
8444             }
8445          }
8446          part { name: "over3";
8447             type: RECT;
8448             repeat_events: 1;
8449             description { state: "default" 0.0;
8450                color: 0 0 0 0;
8451             }
8452          }
8453          part { name: "disabler";
8454             type: RECT;
8455             description { state: "default" 0.0;
8456                color: 0 0 0 0;
8457                visible: 0;
8458             }
8459             description { state: "disabled" 0.0;
8460                inherit: "default" 0.0;
8461                visible: 1;
8462             }
8463          }
8464       }
8465       programs {
8466          program { name: "button_click";
8467             signal: "mouse,down,1";
8468             source: "over2";
8469             action: SIGNAL_EMIT "elm,action,press" "";
8470             after: "button_click_anim";
8471          }
8472          program { name: "button_click_anim";
8473             action: STATE_SET "clicked" 0.0;
8474             target: "button_image";
8475          }
8476          program { name: "button_unpress";
8477             action: SIGNAL_EMIT "elm,action,unpress" "";
8478          }
8479          program { name: "button_mouseout_clicked";
8480             signal: "mouse,up,1";
8481             source: "over3";
8482             script {
8483                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8484                  set_state(PART:"button_image", "default", 0.0);
8485             }
8486             after: button_unpress;
8487          }
8488          program { name: "touch_snd";
8489             signal: "mouse,clicked,1";
8490             source: "over2";
8491             action: PLAY_SAMPLE "touch_sound" 1.0;
8492             after: button_unclick3;
8493          }
8494          program { name: "button_unclick3";
8495             action: SIGNAL_EMIT "elm,action,click" "";
8496          }
8497          program { name: "disable";
8498             signal: "elm,state,disabled";
8499             source: "elm";
8500             action: STATE_SET "disabled" 0.0;
8501             target: "button_image";
8502             target: "disabler";
8503             after: "disable_button";
8504          }
8505          program { name: "disable_button";
8506             script {
8507                set_int(button_state, BUTTON_STATE_DISABLED);
8508             }
8509          }
8510          program { name: "enable";
8511             signal: "elm,state,enabled";
8512             source: "elm";
8513             action: STATE_SET "default" 0.0;
8514             target: "button_image";
8515             target: "disabler";
8516             after: "enable_button";
8517          }
8518          program { name: "enable_button";
8519             script {
8520                set_int(button_state, BUTTON_STATE_ENABLED);
8521             }
8522          }
8523          program { name: "focused";
8524             //signal: "elm,action,focus";
8525             //source: "elm";
8526             action: STATE_SET "focused" 0.0;
8527             target: "button_image";
8528          }
8529          program { name: "unfocused";
8530             //signal: "elm,action,unfocus";
8531             //source: "elm";
8532             action: STATE_SET "default" 0.0;
8533             target: "button_image";
8534          }
8535       }
8536    }
8537
8538 ///////////////////////////////////////////////////////////////////////////////////////
8539    group { name: "elm/button/base/picker/next/icon/default";
8540       images {
8541          image: "00_picker_btn_normal.png" COMP;
8542          image: "00_picker_btn_press.png" COMP;
8543          image: "00_picker_btn_normal_focus.png" COMP;
8544          image: "00_picker_arrow_right.png" COMP;
8545          image: "00_picker_arrow_right_press.png" COMP;
8546       }
8547       script {
8548          public button_state = BUTTON_STATE_ENABLED;
8549       }
8550       parts {
8551          part { name: "button_image";
8552             scale: 1;
8553             description { state: "default" 0.0;
8554                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
8555                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
8556                image {
8557                   normal: "00_picker_btn_normal.png";
8558                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
8559                   border_scale: 1;
8560                }
8561             }
8562             description { state: "clicked" 0.0;
8563                inherit: "default" 0.0;
8564                image.normal: "00_picker_btn_press.png";
8565             }
8566             description { state: "disabled" 0.0;
8567                inherit: "default" 0.0;
8568             }
8569             description { state: "focused" 0.0;
8570                inherit: "default" 0.0;
8571                image.normal: "00_picker_btn_normal_focus.png";
8572             }
8573          }
8574          part { name: "padding_left_top";
8575             type: RECT;
8576             scale: 1;
8577             mouse_events: 0;
8578             description { state: "default" 0.0;
8579                align: 0.0 0.0;
8580                rel2.relative: 0.0 0.0;
8581                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
8582                fixed: 1 1;
8583                visible: 0;
8584             }
8585          }
8586          part { name: "padding_right_bottom";
8587             type: RECT;
8588             scale: 1;
8589             mouse_events: 0;
8590             description { state: "default" 0.0;
8591                align: 1.0 1.0;
8592                rel1.relative: 1.0 1.0;
8593                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
8594                fixed: 1 1;
8595                visible: 0;
8596             }
8597          }
8598          part { name: "right_arrow";
8599             scale: 1;
8600             mouse_events: 0;
8601             description { state: "default" 0.0;
8602                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
8603                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
8604                rel1 {
8605                   relative: 1.0 1.0;
8606                   to: "padding_left_top";
8607                }
8608                rel2 {
8609                   relative: 0.0 0.0;
8610                   to: "padding_right_bottom";
8611                }
8612                image.normal: "00_picker_arrow_right.png";
8613             }
8614             description { state: "clicked" 0.0;
8615                inherit: "default" 0.0;
8616                image.normal: "00_picker_arrow_right_press.png";
8617             }
8618          }
8619          part { name: "over2";
8620             type: RECT;
8621             repeat_events: 1;
8622             ignore_flags: ON_HOLD;
8623             description { state: "default" 0.0;
8624                color: 0 0 0 0;
8625             }
8626          }
8627          part { name: "over3";
8628             type: RECT;
8629             repeat_events: 1;
8630             description { state: "default" 0.0;
8631                color: 0 0 0 0;
8632             }
8633          }
8634          part { name: "disabler";
8635             type: RECT;
8636             description { state: "default" 0.0;
8637                color: 0 0 0 0;
8638                visible: 0;
8639             }
8640             description { state: "disabled" 0.0;
8641                inherit: "default" 0.0;
8642                visible: 1;
8643             }
8644          }
8645       }
8646       programs {
8647          program { name: "button_click";
8648             signal: "mouse,down,1";
8649             source: "over2";
8650             action: SIGNAL_EMIT "elm,action,press" "";
8651             after: "button_click_anim";
8652          }
8653          program { name: "button_click_anim";
8654             action: STATE_SET "clicked" 0.0;
8655             target: "button_image";
8656          }
8657          program { name: "button_unpress";
8658             action: SIGNAL_EMIT "elm,action,unpress" "";
8659          }
8660          program { name: "button_mouseout_clicked";
8661             signal: "mouse,up,1";
8662             source: "over3";
8663             script {
8664                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8665                  set_state(PART:"button_image", "default", 0.0);
8666             }
8667             after: button_unpress;
8668          }
8669          program { name: "touch_snd";
8670             signal: "mouse,clicked,1";
8671             source: "over2";
8672             action: PLAY_SAMPLE "touch_sound" 1.0;
8673             after: button_unclick3;
8674          }
8675          program { name: "button_unclick3";
8676             action: SIGNAL_EMIT "elm,action,click" "";
8677          }
8678          program { name: "disable";
8679             signal: "elm,state,disabled";
8680             source: "elm";
8681             action: STATE_SET "disabled" 0.0;
8682             target: "button_image";
8683             target: "disabler";
8684             after: "disable_button";
8685          }
8686          program { name: "disable_button";
8687             script {
8688                set_int(button_state, BUTTON_STATE_DISABLED);
8689             }
8690          }
8691          program { name: "enable";
8692             signal: "elm,state,enabled";
8693             source: "elm";
8694             action: STATE_SET "default" 0.0;
8695             target: "button_image";
8696             target: "disabler";
8697             after: "enable_button";
8698          }
8699          program { name: "enable_button";
8700             script {
8701                set_int(button_state, BUTTON_STATE_ENABLED);
8702             }
8703          }
8704          program { name: "focused";
8705             //signal: "elm,action,focus";
8706             //source: "elm";
8707             action: STATE_SET "focused" 0.0;
8708             target: "button_image";
8709          }
8710          program { name: "unfocused";
8711             //signal: "elm,action,unfocus";
8712             //source: "elm";
8713             action: STATE_SET "default" 0.0;
8714             target: "button_image";
8715          }
8716       }
8717    }
8718
8719 ///////////////////////////////////////////////////////////////////////////////////////
8720    group { name: "elm/button/base/naviframe_control/default";
8721       alias: "elm/button/base/naviframe_control/center";
8722       script {
8723          public button_state = BUTTON_STATE_ENABLED;
8724       }
8725       images {
8726          image: "00_Option_header_bt.png" COMP;
8727          image: "00_Option_header_bt_dim.png" COMP;
8728          image: "00_Option_header_bt_press.png" COMP;
8729          image: "00_Option_header_bt_focus.png" COMP;
8730       }
8731       parts {
8732          part { name: "button_image";
8733             scale: 1;
8734             description { state: "default" 0.0;
8735                min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC;
8736                color: 0 0 0 0;
8737                rel1.offset: 0 0;
8738                rel2.offset: -1 -1;
8739                image {
8740                   normal: "00_Option_header_bt.png";
8741                   border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC;
8742                }
8743                color: 255 255 255 255;
8744             }
8745             description { state: "disabled" 0.0;
8746                inherit: "default" 0.0;
8747                image.normal: "00_Option_header_bt_dim.png";
8748             }
8749             description { state: "clicked" 0.0;
8750                inherit: "default" 0.0;
8751                image.normal: "00_Option_header_bt_press.png";
8752             }
8753             description { state: "focused" 0.0;
8754                inherit: "default" 0.0;
8755                image.normal: "00_Option_header_bt_focus.png";
8756             }
8757          }
8758          part { name: "padding_left_top";
8759             type: RECT;
8760             scale: 1;
8761             mouse_events: 0;
8762             description { state: "default" 0.0;
8763                align: 0.0 0.0;
8764                rel2.relative: 0.0 0.0;
8765                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
8766                fixed: 1 1;
8767                visible: 0;
8768             }
8769          }
8770          part { name: "padding_right_bottom";
8771             type: RECT;
8772             scale: 1;
8773             mouse_events: 0;
8774             description { state: "default" 0.0;
8775                align: 1.0 1.0;
8776                rel1.relative: 1.0 1.0;
8777                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
8778                fixed: 1 1;
8779                visible: 0;
8780             }
8781          }
8782          part { name: "icon_rect";
8783             type: RECT;
8784             scale: 1;
8785             mouse_events: 0;
8786             description { state: "default" 0.0;
8787                min: 0 0;
8788                fixed: 1 0;
8789                rel1 {
8790                   relative: 1.0 1.0;
8791                   to: "padding_left_top";
8792                }
8793                rel2 {
8794                   relative: 1.0 0.0;
8795                   to_x: "padding_left_top";
8796                   to_y: "padding_right_bottom";
8797                }
8798                align: 0.0 0.5;
8799                color: 0 0 0 0;
8800             }
8801             description { state: "visible" 0.0;
8802                min: BUTTON_NAVIFRAME_CENTER_ICON_RECT_VISIBLE_MIN_SIZE;
8803                fixed: 1 0;
8804                rel1 {
8805                   relative: 1.0 1.0;
8806                   to: "padding_left_top";
8807                }
8808                rel2 {
8809                   relative: 1.0 0.0;
8810                   to_x: "padding_left_top";
8811                   to_y: "padding_right_bottom";
8812                }
8813                align: 0.0 0.5;
8814                color: 0 0 0 0;
8815             }
8816             description { state: "icononly" 0.0;
8817                inherit: "default" 0.0;
8818             }
8819          }
8820          part { name: "padding_after_icon";
8821             type: RECT;
8822             scale: 1;
8823             mouse_events: 0;
8824             description { state: "default" 0.0; //when only icon or no icon is there
8825                align: 0.0 0.0;
8826                rel1 {
8827                   relative: 1.0 0.0;
8828                   to: "icon_rect";
8829                }
8830                rel2.to: "icon_rect";
8831                fixed: 1 0;
8832                min: 0 0;
8833                color: 0 0 0 0;
8834             }
8835             description { state: "visible" 0.0;
8836                align: 0.0 0.0;
8837                rel1 {
8838                   relative: 1.0 0.0;
8839                   to: "icon_rect";
8840                }
8841                rel2.to: "icon_rect";
8842                fixed: 1 0;
8843                min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
8844                color: 0 0 0 0;
8845             }
8846             description { state: "icononly" 0.0;
8847                inherit: "default" 0.0;
8848             }
8849          }
8850          part { name: "padding_before_text";
8851             type: RECT;
8852             scale: 1;
8853             mouse_events: 0;
8854             description { state: "default" 0.0; //when only icon or no icon is there
8855                align: 1.0 0.5;
8856                rel1 {
8857                   relative: 0.0 1.0;
8858                   to_x: "elm.text";
8859                   to_y: "padding_left_top";
8860                }
8861                rel2 {
8862                   relative: 0.0 0.0;
8863                   to_x: "elm.text";
8864                   to_y: "padding_right_bottom";
8865                }
8866                fixed: 1 0;
8867                min: BUTTON_NAVIFRAME_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC;
8868                color: 0 0 0 0;
8869             }
8870          }
8871          part { name: "elm.swallow.content";
8872             type: SWALLOW;
8873             scale: 1;
8874             clip_to: "clipper";
8875             description { state: "default" 0.0;
8876                visible: 0;
8877                align: 0.0 0.5;
8878                rel1 {
8879                   relative: 1.0 1.0;
8880                   to: "padding_left_top";
8881                }
8882                rel2 {
8883                   relative: 1.0 0.0;
8884                   to_x: "padding_left_top";
8885                   to_y: "padding_right_bottom";
8886                }
8887                fixed: 1 0;
8888             }
8889             description { state: "visible" 0.0;
8890                fixed: 1 0;
8891                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
8892                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
8893                align: 1.0 0.5;
8894                rel1 {
8895                   relative: 0.0 1.0;
8896                   to_x: "padding_before_text";
8897                   to_y: "padding_left_top";
8898                }
8899                rel2 {
8900                   relative: 0.0 0.0;
8901                   to_x: "padding_before_text";
8902                   to_y: "padding_right_bottom";
8903                }
8904                aspect: 1.0 1.0;
8905                aspect_preference: VERTICAL;
8906             }
8907             description { state: "icononly" 0.0;
8908                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
8909                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
8910                rel1 {
8911                   relative: 1.0 1.0;
8912                   to: "padding_left_top";
8913                }
8914                rel2 {
8915                   relative: 0.0 0.0;
8916                   to: "padding_right_bottom";
8917                }
8918                aspect: 1.0 1.0;
8919                aspect_preference: VERTICAL;
8920             }
8921          }
8922          part { name: "elm.text";
8923             type: TEXT;
8924             mouse_events: 0;
8925             scale: 1;
8926             clip_to: "clipper";
8927             description { state: "default" 0.0;
8928                visible: 0;
8929                rel1 {
8930                   relative: 1.0 1.0;
8931                   to_x: "padding_after_icon";
8932                   to_y: "padding_left_top";
8933                }
8934                rel2 {
8935                   relative: 0.0 0.0;
8936                   to: "padding_right_bottom";
8937                }
8938                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
8939                text {
8940                   font: "SLP:style=Medium";
8941                   size: BUTTON_NAVIFRAME_CENTER_TEXT_FONT_SIZE_INC;
8942                   min: 0 0;
8943                   max: 1 0;
8944                   text_class: "slp_medium";
8945                }
8946             }
8947             description { state: "visible" 0.0;
8948                inherit: "default" 0.0;
8949                visible: 1;
8950             }
8951             description { state: "clicked" 0.0;
8952                inherit: "default" 0.0;
8953                visible: 1;
8954                min: 0 0;
8955             }
8956             description { state: "focused" 0.0;
8957                inherit: "default" 0.0;
8958                visible: 1;
8959                min: 0 0;
8960                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
8961             }
8962          }
8963          part { name: "over2";
8964             type: RECT;
8965             repeat_events: 1;
8966             ignore_flags: ON_HOLD;
8967             description { state: "default" 0.0;
8968                color: 0 0 0 0;
8969             }
8970          }
8971          part { name: "over3";
8972             type: RECT;
8973             repeat_events: 1;
8974             description { state: "default" 0.0;
8975                color: 0 0 0 0;
8976             }
8977          }
8978          part { name: "clipper";
8979             type: RECT;
8980             description { state: "default" 0.0;
8981                color: 255 255 255 255;
8982             }
8983             description { state: "disabled" 0.0;
8984                color: 255 255 255 127;
8985             }
8986          }
8987          part { name: "disabler";
8988             type: RECT;
8989             description { state: "default" 0.0;
8990                color: 0 0 0 0;
8991                visible: 0;
8992             }
8993             description { state: "disabled" 0.0;
8994                inherit: "default" 0.0;
8995                visible: 1;
8996             }
8997          }
8998       }
8999       programs {
9000          program { name: "button_click";
9001             signal: "mouse,down,1";
9002             source: "over2";
9003             action: SIGNAL_EMIT "elm,action,press" "";
9004             after: "button_click_anim";
9005          }
9006          program { name: "button_click_anim";
9007             action: STATE_SET "clicked" 0.0;
9008             target: "button_image";
9009             after: "text_clicked";
9010          }
9011          program { name: "text_clicked";
9012             script {
9013                new st[31];
9014                new Float:vl;
9015                get_state(PART:"elm.text", st, 30, vl);
9016                if (!strcmp(st, "visible"))
9017                  set_state(PART:"elm.text", "clicked", 0.0);
9018             }
9019          }
9020          program { name: "button_unpress";
9021             action: SIGNAL_EMIT "elm,action,unpress" "";
9022          }
9023          program { name: "button_mouseout_clicked";
9024             signal: "mouse,up,1";
9025             source: "over3";
9026             script {
9027                new st[31];
9028                new Float:vl;
9029                get_state(PART:"elm.swallow.content", st, 30, vl);
9030                if (strcmp(st, "icononly"))
9031                  {
9032                     emit("elm,action,default,text,set", "");
9033                     set_state(PART:"elm.text", "visible", 0.0);
9034                  }
9035                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9036                  set_state(PART:"button_image", "default", 0.0);
9037             }
9038             after: button_unpress;
9039          }
9040          program { name: "touch_snd";
9041             signal: "mouse,clicked,1";
9042             source: "over2";
9043             action: PLAY_SAMPLE "touch_sound" 1.0;
9044             after: button_unclick3;
9045          }
9046          program { name: "button_unclick3";
9047             action: SIGNAL_EMIT "elm,action,click" "";
9048          }
9049          program { name: "text_show";
9050             signal: "elm,state,text,visible";
9051             source: "elm";
9052             script {
9053                new st[31];
9054                new Float:vl;
9055                get_state(PART:"elm.swallow.content", st, 30, vl);
9056                if (!strcmp(st, "icononly"))
9057                  {
9058                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9059                     set_state(PART:"icon_rect", "visible", 0.0);
9060                     set_state(PART:"padding_after_icon", "visible", 0.0);
9061                  }
9062                set_state(PART:"elm.text", "visible", 0.0);
9063             }
9064          }
9065          program { name: "text_hide";
9066             signal: "elm,state,text,hidden";
9067             source: "elm";
9068             script {
9069                new st[31];
9070                new Float:vl;
9071                get_state(PART:"elm.swallow.content", st, 30, vl);
9072                if (!strcmp(st, "visible"))
9073                  {
9074                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9075                     set_state(PART:"icon_rect", "icononly", 0.0);
9076                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9077                  }
9078                set_state(PART:"elm.text", "default", 0.0);
9079             }
9080          }
9081          program { name: "icon_show";
9082             signal: "elm,state,icon,visible";
9083             source: "elm";
9084             script {
9085                new st[31];
9086                new Float:vl;
9087                get_state(PART:"elm.text", st, 30, vl);
9088                if (!strcmp(st, "visible"))
9089                  {
9090                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9091                     set_state(PART:"icon_rect", "visible", 0.0);
9092                     set_state(PART:"padding_after_icon", "visible", 0.0);
9093                  }
9094                else
9095                  {
9096                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9097                     set_state(PART:"icon_rect", "icononly", 0.0);
9098                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9099                  }
9100             }
9101          }
9102          program { name: "icon_hide";
9103             signal: "elm,state,icon,hidden";
9104             source: "elm";
9105             action: STATE_SET "default" 0.0;
9106             target: "elm.swallow.content";
9107             target: "icon_rect";
9108             target: "padding_after_icon";
9109          }
9110          program { name: "disable";
9111             signal: "elm,state,disabled";
9112             source: "elm";
9113             action: STATE_SET "disabled" 0.0;
9114             target: "button_image";
9115             target: "clipper";
9116             target: "disabler";
9117             after: "disable_text";
9118          }
9119          program { name: "disable_text";
9120             script {
9121                new st[31];
9122                new Float:vl;
9123                set_int(button_state, BUTTON_STATE_DISABLED);
9124                get_state(PART:"elm.text", st, 30, vl);
9125                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9126                  set_state(PART:"elm.text", "visible", 0.0);
9127             }
9128          }
9129          program { name: "enable";
9130             signal: "elm,state,enabled";
9131             source: "elm";
9132             action: STATE_SET "default" 0.0;
9133             target: "button_image";
9134             target: "clipper";
9135             target: "disabler";
9136             after: "enable_text";
9137          }
9138          program { name: "enable_text";
9139             script {
9140                new st[31];
9141                new Float:vl;
9142                set_int(button_state, BUTTON_STATE_ENABLED);
9143                get_state(PART:"elm.text", st, 30, vl);
9144                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9145                  set_state(PART:"elm.text", "visible", 0.0);
9146             }
9147          }
9148          program { name: "focused";
9149             //signal: "elm,action,focus";
9150             //source: "elm";
9151             action: STATE_SET "focused" 0.0;
9152             target: "button_image";
9153             target: "elm.text";
9154          }
9155          program { name: "unfocused";
9156             //signal: "elm,action,unfocus";
9157             //source: "elm";
9158             action: STATE_SET "default" 0.0;
9159             target: "button_image";
9160             after: "unfocus_text";
9161          }
9162          program { name: "unfocus_text";
9163             action: STATE_SET "visible" 0.0;
9164             target: "elm.text";
9165          }
9166       }
9167    }
9168
9169 ///////////////////////////////////////////////////////////////////////////////////////
9170    group { name: "elm/button/base/naviframe_control/multiline";
9171       script {
9172          public button_state = BUTTON_STATE_ENABLED;
9173       }
9174       images {
9175          image: "00_Option_header_bt.png" COMP;
9176          image: "00_Option_header_bt_dim.png" COMP;
9177          image: "00_Option_header_bt_press.png" COMP;
9178          image: "00_Option_header_bt_focus.png" COMP;
9179       }
9180       styles{
9181          style { name: "btn_multiline_naviframe_controlbar_style";
9182             base: "font=SLP:style=Medium font_size="BUTTON_NAVIFRAME_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed text_class=slp_medium";
9183             tag: "br" "\n";
9184             tag: "ps" "ps";
9185             tag: "tab" "\t";
9186          }
9187       }
9188       parts {
9189          part { name: "button_image";
9190             scale: 1;
9191             description { state: "default" 0.0;
9192                min: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC;
9193                rel1.offset: 0 0;
9194                rel2.offset: -1 -1;
9195                image {
9196                   normal: "00_Option_header_bt.png";
9197                   border: BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC;
9198                }
9199                color: 255 255 255 255;
9200             }
9201             description { state: "disabled" 0.0;
9202                inherit: "default" 0.0;
9203                image.normal: "00_Option_header_bt_dim.png";
9204             }
9205             description { state: "clicked" 0.0;
9206                inherit: "default" 0.0;
9207                image.normal: "00_Option_header_bt_press.png";
9208             }
9209             description { state: "focused" 0.0;
9210                inherit: "default" 0.0;
9211                image.normal: "00_Option_header_bt_focus.png";
9212             }
9213          }
9214          part { name: "padding_left_top";
9215             type: RECT;
9216             scale: 1;
9217             mouse_events: 0;
9218             description { state: "default" 0.0;
9219                align: 0.0 0.0;
9220                rel2.relative: 0.0 0.0;
9221                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
9222                fixed: 1 1;
9223                visible: 0;
9224             }
9225          }
9226          part { name: "padding_right_bottom";
9227             type: RECT;
9228             scale: 1;
9229             mouse_events: 0;
9230             description { state: "default" 0.0;
9231                align: 1.0 1.0;
9232                rel1.relative: 1.0 1.0;
9233                min: BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC;
9234                fixed: 1 1;
9235                visible: 0;
9236             }
9237          }
9238          part { name: "icon_rect";
9239             type: RECT;
9240             scale: 1;
9241             mouse_events: 0;
9242             description { state: "default" 0.0;
9243                visible: 0;
9244                min: 0 0;
9245                fixed: 1 0;
9246                rel1 {
9247                   relative: 0.0 1.0;
9248                   to_x: "elm.swallow.content";
9249                   to_y: "padding_left_top";
9250                }
9251                rel2 {
9252                   relative: 1.0 0.0;
9253                   to_x: "elm.swallow.content";
9254                   to_y: "padding_right_bottom";
9255                }
9256                align: 0.0 0.5;
9257             }
9258          }
9259          part { name: "padding_icon_text";
9260             type: RECT;
9261             scale: 1;
9262             mouse_events: 0;
9263             description { state: "default" 0.0; //when only icon or no icon is there
9264                visible: 0;
9265                align: 0.0 0.0;
9266                rel1 {
9267                   relative: 1.0 0.0;
9268                   to: "icon_rect";
9269                }
9270                rel2 {
9271                   relative: 1.0 1.0;
9272                   to: "icon_rect";
9273                }
9274                fixed: 1 0;
9275                min: 0 0;
9276             }
9277             description { state: "visible" 0.0;
9278                inherit: "default" 0.0;
9279                min: BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
9280                rel1 {
9281                   relative: 1.0 0.0;
9282                   to: "icon_rect";
9283                }
9284                rel2 {
9285                   relative: 1.0 1.0;
9286                   to: "icon_rect";
9287                }
9288            }
9289             description { state: "icononly" 0.0;
9290                inherit: "default" 0.0;
9291             }
9292          }
9293          part { name: "elm.swallow.content";
9294             type: SWALLOW;
9295             scale: 1;
9296             clip_to: "clipper";
9297             description { state: "default" 0.0;
9298                visible: 0;
9299                align: 0.0 0.5;
9300                rel1 {
9301                   relative: 1.0 1.0;
9302                   to: "padding_left_top";
9303                }
9304                rel2 {
9305                   relative: 1.0 0.0;
9306                   to_x: "padding_left_top";
9307                   to_y: "padding_right_bottom";
9308                }
9309                fixed: 1 0;
9310             }
9311             description { state: "visible" 0.0;
9312                fixed: 1 0;
9313                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
9314                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
9315                align: 0.0 0.5;
9316                rel1 {
9317                   relative: 1.0 1.0;
9318                   to: "padding_left_top";
9319                }
9320                rel2 {
9321                   relative: 0.0 0.0;
9322                   to_x: "padding_left_top";
9323                   to_y: "padding_right_bottom";
9324                }
9325             }
9326             description { state: "icononly" 0.0;
9327                min: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
9328                max: BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
9329                rel1 {
9330                   relative: 1.0 1.0;
9331                   to: "padding_left_top";
9332                }
9333                rel2 {
9334                   relative: 0.0 0.0;
9335                   to: "padding_right_bottom";
9336                }
9337             }
9338          }
9339          part { name: "elm.text";
9340             type: TEXTBLOCK;
9341             mouse_events: 0;
9342             scale: 1;
9343             clip_to: "clipper";
9344             description { state: "default" 0.0;
9345                visible: 0;
9346                rel1 {
9347                   relative: 1.0 1.0;
9348                   to_x: "padding_icon_text";
9349                   to_y: "padding_left_top";
9350                }
9351                rel2 {
9352                    relative: 0.0 0.0;
9353                    to: "padding_right_bottom";
9354                }
9355                color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
9356                text {
9357                   style: "btn_multiline_naviframe_controlbar_style";
9358                   min: 0 0;
9359                   max: 0 1;
9360                }
9361             }
9362             description { state: "visible" 0.0;
9363                inherit: "default" 0.0;
9364                visible: 1;
9365                min: 80 0;
9366             }
9367             description { state: "clicked" 0.0;
9368                inherit: "default" 0.0;
9369                visible: 1;
9370                min: 0 0;
9371             }
9372             description { state: "focused" 0.0;
9373                inherit: "default" 0.0;
9374                visible: 1;
9375                min: 0 0;
9376                color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
9377             }
9378          }
9379          part { name: "over2";
9380             type: RECT;
9381             repeat_events: 1;
9382             ignore_flags: ON_HOLD;
9383             description { state: "default" 0.0;
9384                color: 0 0 0 0;
9385             }
9386          }
9387          part { name: "over3";
9388             type: RECT;
9389             repeat_events: 1;
9390             description { state: "default" 0.0;
9391                color: 0 0 0 0;
9392             }
9393          }
9394          part { name: "clipper";
9395             type: RECT;
9396             description { state: "default" 0.0;
9397                color: 255 255 255 255;
9398             }
9399             description { state: "disabled" 0.0;
9400                color: 255 255 255 127;
9401             }
9402          }
9403          part { name: "disabler";
9404             type: RECT;
9405             description { state: "default" 0.0;
9406                color: 0 0 0 0;
9407                visible: 0;
9408             }
9409             description { state: "disabled" 0.0;
9410                inherit: "default" 0.0;
9411                visible: 1;
9412             }
9413          }
9414       }
9415       programs {
9416          program { name: "button_click";
9417             signal: "mouse,down,1";
9418             source: "over2";
9419             action: SIGNAL_EMIT "elm,action,press" "";
9420             after: "button_click_anim";
9421          }
9422          program { name: "button_click_anim";
9423             action: STATE_SET "clicked" 0.0;
9424             target: "button_image";
9425             after: "text_clicked";
9426          }
9427          program { name: "text_clicked";
9428             script {
9429                new st[31];
9430                new Float:vl;
9431                get_state(PART:"elm.text", st, 30, vl);
9432                if (!strcmp(st, "visible"))
9433                  set_state(PART:"elm.text", "clicked", 0.0);
9434             }
9435          }
9436          program { name: "button_unpress";
9437             action: SIGNAL_EMIT "elm,action,unpress" "";
9438          }
9439          program { name: "button_mouseout_clicked";
9440             signal: "mouse,up,1";
9441             source: "over3";
9442             script {
9443                new st[31];
9444                new Float:vl;
9445                get_state(PART:"elm.swallow.content", st, 30, vl);
9446                if (strcmp(st, "icononly"))
9447                  {
9448                     emit("elm,action,default,text,set", "");
9449                     set_state(PART:"elm.text", "visible", 0.0);
9450                  }
9451                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9452                  set_state(PART:"button_image", "default", 0.0);
9453             }
9454             after: button_unpress;
9455          }
9456          program { name: "touch_snd";
9457             signal: "mouse,clicked,1";
9458             source: "over2";
9459             action: PLAY_SAMPLE "touch_sound" 1.0;
9460             after: button_unclick3;
9461          }
9462          program { name: "button_unclick3";
9463             action: SIGNAL_EMIT "elm,action,click" "";
9464          }
9465          program { name: "text_show";
9466             signal: "elm,state,text,visible";
9467             source: "elm";
9468             script {
9469                new st[31];
9470                new Float:vl;
9471                get_state(PART:"elm.swallow.content", st, 30, vl);
9472                if (!strcmp(st, "icononly"))
9473                  {
9474                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9475                     set_state(PART:"padding_icon_text", "visible", 0.0);
9476                  }
9477                set_state(PART:"elm.text", "visible", 0.0);
9478             }
9479          }
9480          program { name: "text_hide";
9481             signal: "elm,state,text,hidden";
9482             source: "elm";
9483             script {
9484                new st[31];
9485                new Float:vl;
9486                get_state(PART:"elm.swallow.content", st, 30, vl);
9487                if (!strcmp(st, "visible"))
9488                  {
9489                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9490                     set_state(PART:"padding_icon_text", "icononly", 0.0);
9491                  }
9492                set_state(PART:"elm.text", "default", 0.0);
9493             }
9494          }
9495          program { name: "icon_show";
9496             signal: "elm,state,icon,visible";
9497             source: "elm";
9498             script {
9499                new st[31];
9500                new Float:vl;
9501                get_state(PART:"elm.text", st, 30, vl);
9502                if (!strcmp(st, "visible"))
9503                  {
9504                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9505                     set_state(PART:"padding_icon_text", "visible", 0.0);
9506                  }
9507                else
9508                  {
9509                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9510                     set_state(PART:"padding_icon_text", "icononly", 0.0);
9511                  }
9512             }
9513          }
9514          program { name: "icon_hide";
9515             signal: "elm,state,icon,hidden";
9516             source: "elm";
9517             action: STATE_SET "default" 0.0;
9518             target: "elm.swallow.content";
9519             target: "padding_icon_text";
9520          }
9521          program { name: "disable";
9522             signal: "elm,state,disabled";
9523             source: "elm";
9524             action: STATE_SET "disabled" 0.0;
9525             target: "button_image";
9526             target: "clipper";
9527             target: "disabler";
9528             after: "disable_text";
9529          }
9530          program { name: "disable_text";
9531             script {
9532                new st[31];
9533                new Float:vl;
9534                set_int(button_state, BUTTON_STATE_DISABLED);
9535                get_state(PART:"elm.text", st, 30, vl);
9536                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9537                  set_state(PART:"elm.text", "visible", 0.0);
9538             }
9539          }
9540          program { name: "enable";
9541             signal: "elm,state,enabled";
9542             source: "elm";
9543             action: STATE_SET "default" 0.0;
9544             target: "button_image";
9545             target: "clipper";
9546             target: "disabler";
9547             after: "enable_text";
9548          }
9549          program { name: "enable_text";
9550             script {
9551                new st[31];
9552                new Float:vl;
9553                set_int(button_state, BUTTON_STATE_ENABLED);
9554                get_state(PART:"elm.text", st, 30, vl);
9555                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
9556                  set_state(PART:"elm.text", "visible", 0.0);
9557             }
9558          }
9559          program { name: "focused";
9560             //signal: "elm,action,focus";
9561             //source: "elm";
9562             action: STATE_SET "focused" 0.0;
9563             target: "button_image";
9564             target: "elm.text";
9565          }
9566          program { name: "unfocused";
9567             //signal: "elm,action,unfocus";
9568             //source: "elm";
9569             action: STATE_SET "default" 0.0;
9570             target: "button_image";
9571             after: "unfocus_text";
9572          }
9573          program { name: "unfocus_text";
9574             action: STATE_SET "visible" 0.0;
9575             target: "elm.text";
9576          }
9577       }
9578    }
9579
9580 //////////////////////////////////////////////////////////////
9581    group { name: "elm/button/base/naviframe/title/default";
9582       script {
9583          public button_state = BUTTON_STATE_ENABLED;
9584       }
9585       images {
9586          image: "00_title_btn_bg_press.png" COMP;
9587       }
9588       styles{
9589          style { name: "btn_naviframe_style";
9590             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";
9591             tag: "br" "\n";
9592             tag: "ps" "ps";
9593             tag: "tab" "\t";
9594          }
9595       }
9596       parts {
9597          part { name: "button_image";
9598             scale: 1;
9599             description { state: "default" 0.0;
9600                min: BUTTON_NAVIFRAME_TITLE_TEXT_BG_NORMAL_MIN_INC;
9601                max: BUTTON_NAVIFRAME_TITLE_TEXT_BG_NORMAL_MIN_INC;
9602                color: 0 0 0 0;
9603             }
9604             description { state: "clicked" 0.0;
9605                min: BUTTON_NAVIFRAME_TITLE_TEXT_BG_PRESSED_MIN_INC;
9606                max: BUTTON_NAVIFRAME_TITLE_TEXT_BG_PRESSED_MIN_INC;
9607                image {
9608                   normal: "00_title_btn_bg_press.png";
9609                   border: BUTTON_NAVIFRAME_TITLE_TEXT_BG_PRESSED_BORDER_INC;
9610                   border_scale: 1;
9611                }
9612             }
9613             description { state: "disabled" 0.0;
9614                inherit: "default" 0.0;
9615             }
9616             description { state: "focused" 0.0;
9617                inherit: "default" 0.0;
9618             }
9619          }
9620          part { name: "padding_left_top";
9621             type: RECT;
9622             scale: 1;
9623             mouse_events: 0;
9624             description { state: "default" 0.0;
9625                align: 0.0 0.0;
9626                rel2.relative: 0.0 0.0;
9627                min: BUTTON_NAVIFRAME_TITLE_TEXT_PADDING_MIN_INC;
9628                fixed: 1 1;
9629                visible: 0;
9630             }
9631          }
9632          part { name: "padding_right_bottom";
9633             type: RECT;
9634             scale: 1;
9635             mouse_events: 0;
9636             description { state: "default" 0.0;
9637                align: 1.0 1.0;
9638                rel1.relative: 1.0 1.0;
9639                min: BUTTON_NAVIFRAME_TITLE_TEXT_PADDING_MIN_INC;
9640                fixed: 1 1;
9641                visible: 0;
9642             }
9643          }
9644          part { name: "icon_rect";
9645             type: RECT;
9646             scale: 1;
9647             mouse_events: 0;
9648             description { state: "default" 0.0;
9649                visible: 0;
9650                min: 0 0;
9651                fixed: 1 0;
9652                rel1 {
9653                   relative: 1.0 1.0;
9654                   to: "padding_left_top";
9655                }
9656                rel2 {
9657                   relative: 1.0 0.0;
9658                   to_x: "padding_left_top";
9659                   to_y: "padding_right_bottom";
9660                }
9661                align: 0.0 0.5;
9662             }
9663             description { state: "visible" 0.0;
9664                visible: 0;
9665                min: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC;
9666                max: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC;
9667                fixed: 1 0;
9668                rel1 {
9669                   relative: 1.0 1.0;
9670                   to: "padding_left_top";
9671                }
9672                rel2 {
9673                   relative: 1.0 0.0;
9674                   to_x: "padding_left_top";
9675                   to_y: "padding_right_bottom";
9676                }
9677                align: 0.0 0.5;
9678             }
9679             description { state: "icononly" 0.0;
9680                inherit: "default" 0.0;
9681             }
9682          }
9683          part { name: "padding_after_icon";
9684             type: RECT;
9685             scale: 1;
9686             mouse_events: 0;
9687             description { state: "default" 0.0; //when only icon or no icon is there
9688                align: 0.0 0.0;
9689                rel1 {
9690                   relative: 1.0 0.0;
9691                   to: "icon_rect";
9692                }
9693                rel2.to: "icon_rect";
9694                fixed: 1 0;
9695                min: 0 0;
9696                visible: 0;
9697             }
9698             description { state: "visible" 0.0;
9699                visible: 0;
9700                align: 0.0 0.0;
9701                rel1 {
9702                   relative: 1.0 0.0;
9703                   to: "icon_rect";
9704                }
9705                rel2.to: "icon_rect";
9706                fixed: 1 0;
9707                min: BUTTON_NAVIFRAME_TITLE_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
9708             }
9709             description { state: "icononly" 0.0;
9710                inherit: "default" 0.0;
9711             }
9712          }
9713          part { name: "padding_before_text";
9714             type: RECT;
9715             scale: 1;
9716             mouse_events: 0;
9717             description { state: "default" 0.0; //when only icon or no icon is there
9718                align: 1.0 0.5;
9719                rel1 {
9720                   relative: 0.0 1.0;
9721                   to_x: "elm.text";
9722                   to_y: "padding_left_top";
9723                }
9724                rel2 {
9725                   relative: 0.0 0.0;
9726                   to_x: "elm.text";
9727                   to_y: "padding_right_bottom";
9728                }
9729                fixed: 1 0;
9730                min: BUTTON_NAVIFRAME_TITLE_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
9731                visible: 0;
9732             }
9733          }
9734          part { name: "elm.swallow.content";
9735             type: SWALLOW;
9736             scale: 1;
9737             clip_to: "clipper";
9738             description { state: "default" 0.0;
9739                visible: 0;
9740                align: 0.0 0.5;
9741                rel1 {
9742                   relative: 1.0 1.0;
9743                   to: "padding_left_top";
9744                }
9745                rel2 {
9746                   relative: 1.0 0.0;
9747                   to_x: "padding_left_top";
9748                   to_y: "padding_right_bottom";
9749                }
9750                fixed: 1 0;
9751             }
9752             description { state: "visible" 0.0;
9753                fixed: 1 0;
9754                min: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC;
9755                max: BUTTON_NAVIFRAME_TITLE_VISIBLE_ICON_RECT_MIN_MAX_INC;
9756                align: 1.0 0.5;
9757                rel1 {
9758                   relative: 0.0 1.0;
9759                   to_x: "padding_before_text";
9760                   to_y: "padding_left_top";
9761                }
9762                rel2 {
9763                   relative: 0.0 0.0;
9764                   to_x: "padding_before_text";
9765                   to_y: "padding_right_bottom";
9766                }
9767             }
9768             description { state: "icononly" 0.0;
9769                min: BUTTON_NAVIFRAME_TITLE_ICONONLY_ICON_MIN_MAX_INC;
9770                max: BUTTON_NAVIFRAME_TITLE_ICONONLY_ICON_MIN_MAX_INC;
9771             }
9772          }
9773          part { name: "elm.text";
9774             type: TEXTBLOCK;
9775             mouse_events: 0;
9776             scale: 1;
9777             clip_to: "clipper";
9778             description { state: "default" 0.0;
9779                visible: 0;
9780                rel1 {
9781                   relative: 1.0 1.0;
9782                   to_x: "padding_after_icon";
9783                   to_y: "padding_left_top";
9784                }
9785                rel2 {
9786                   relative: 0.0 0.0;
9787                   to: "padding_right_bottom";
9788                }
9789                color: BUTTON_NAVIFRAME_TITLE_TEXT_NORMAL_COLOR_INC;
9790                text {
9791                    style: "btn_naviframe_style";
9792                    min: 0 0;
9793                    max: 0 1;
9794                }
9795             }
9796             description { state: "visible" 0.0;
9797                inherit: "default" 0.0;
9798                visible: 1;
9799             }
9800             description { state: "clicked" 0.0;
9801                inherit: "default" 0.0;
9802                visible: 1;
9803                color: BUTTON_NAVIFRAME_TITLE_TEXT_PRESSED_COLOR_INC;
9804             }
9805             description { state: "disabled" 0.0;
9806                inherit: "default" 0.0;
9807                color: 0 0 0 128;
9808             }
9809             description { state: "disabled_visible" 0.0;
9810                inherit: "default" 0.0;
9811                color: BUTTON_NAVIFRAME_TITLE_TEXT_DISABLED_COLOR_INC;
9812                visible: 1;
9813             }
9814             description { state: "focused" 0.0;
9815                inherit: "default" 0.0;
9816                visible: 1;
9817                color: BUTTON_NAVIFRAME_TITLE_TEXT_FOCUSED_COLOR_INC;
9818             }
9819          }
9820          part { name: "over2";
9821             type: RECT;
9822             repeat_events: 1;
9823             ignore_flags: ON_HOLD;
9824             description { state: "default" 0.0;
9825                color: 0 0 0 0;
9826             }
9827          }
9828          part { name: "over3";
9829             type: RECT;
9830             repeat_events: 1;
9831             description { state: "default" 0.0;
9832                color: 0 0 0 0;
9833             }
9834          }
9835          part { name: "clipper";
9836             type: RECT;
9837             description { state: "default" 0.0;
9838                color: 255 255 255 255;
9839             }
9840          }
9841          part { name: "disabler";
9842             type: RECT;
9843             description { state: "default" 0.0;
9844                color: 0 0 0 0;
9845                visible: 0;
9846             }
9847             description { state: "disabled" 0.0;
9848                inherit: "default" 0.0;
9849                visible: 1;
9850             }
9851          }
9852       }
9853       programs {
9854          program { name: "button_click";
9855             signal: "mouse,down,1";
9856             source: "over2";
9857             action: SIGNAL_EMIT "elm,action,press" "";
9858             after: "button_click_anim";
9859          }
9860          program { name: "button_click_anim";
9861             action: STATE_SET "clicked" 0.0;
9862             target: "button_image";
9863             after: "text_clicked";
9864          }
9865          program { name: "text_clicked";
9866             script {
9867                new st[31];
9868                new Float:vl;
9869                get_state(PART:"elm.text", st, 30, vl);
9870                if (!strcmp(st, "visible"))
9871                  set_state(PART:"elm.text", "clicked", 0.0);
9872             }
9873          }
9874          program { name: "button_unpress";
9875             action: SIGNAL_EMIT "elm,action,unpress" "";
9876          }
9877          program { name: "button_mouseout_clicked";
9878             signal: "mouse,up,1";
9879             source: "over3";
9880             script {
9881                new st[31];
9882                new Float:vl;
9883                get_state(PART:"elm.swallow.content", st, 30, vl);
9884                if (strcmp(st, "icononly"))
9885                  {
9886                     emit("elm,action,default,text,set", "");
9887                     set_state(PART:"elm.text", "visible", 0.0);
9888                  }
9889                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9890                  set_state(PART:"button_image", "default", 0.0);
9891             }
9892             after: button_unpress;
9893          }
9894          program { name: "touch_snd";
9895             signal: "mouse,clicked,1";
9896             source: "over2";
9897             action: PLAY_SAMPLE "touch_sound" 1.0;
9898             after: button_unclick3;
9899          }
9900          program { name: "button_unclick3";
9901             action: SIGNAL_EMIT "elm,action,click" "";
9902          }
9903          program { name: "text_show";
9904             signal: "elm,state,text,visible";
9905             source: "elm";
9906             script {
9907                new st[31];
9908                new Float:vl;
9909                get_state(PART:"elm.swallow.content", st, 30, vl);
9910                if (!strcmp(st, "icononly"))
9911                  {
9912                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9913                     set_state(PART:"icon_rect", "visible", 0.0);
9914                     set_state(PART:"padding_after_icon", "visible", 0.0);
9915                  }
9916                if (get_int(button_state) != BUTTON_STATE_DISABLED)
9917                  set_state(PART:"elm.text", "visible", 0.0);
9918                else
9919                  set_state(PART:"elm.text", "disabled_visible", 0.0);
9920             }
9921          }
9922          program { name: "text_hide";
9923             signal: "elm,state,text,hidden";
9924             source: "elm";
9925             script {
9926                new st[31];
9927                new Float:vl;
9928                get_state(PART:"elm.swallow.content", st, 30, vl);
9929                if (!strcmp(st, "visible"))
9930                  {
9931                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9932                     set_state(PART:"icon_rect", "icononly", 0.0);
9933                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9934                  }
9935                set_state(PART:"elm.text", "default", 0.0);
9936             }
9937          }
9938          program { name: "icon_show";
9939             signal: "elm,state,icon,visible";
9940             source: "elm";
9941             script {
9942                new st[31];
9943                new Float:vl;
9944                get_state(PART:"elm.text", st, 30, vl);
9945                if (!strcmp(st, "visible"))
9946                  {
9947                     set_state(PART:"elm.swallow.content", "visible", 0.0);
9948                     set_state(PART:"icon_rect", "visible", 0.0);
9949                     set_state(PART:"padding_after_icon", "visible", 0.0);
9950                  }
9951                else
9952                  {
9953                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
9954                     set_state(PART:"icon_rect", "icononly", 0.0);
9955                     set_state(PART:"padding_after_icon", "icononly", 0.0);
9956                  }
9957             }
9958          }
9959          program { name: "icon_hide";
9960             signal: "elm,state,icon,hidden";
9961             source: "elm";
9962             action: STATE_SET "default" 0.0;
9963             target: "elm.swallow.content";
9964             target: "padding_after_icon";
9965             target: "icon_rect";
9966          }
9967          program { name: "disable";
9968             signal: "elm,state,disabled";
9969             source: "elm";
9970             action: STATE_SET "disabled" 0.0;
9971             target: "button_image";
9972             target: "disabler";
9973             after: "disable_text";
9974          }
9975          program { name: "disable_text";
9976             script {
9977                new st[31];
9978                new Float:vl;
9979                get_state(PART:"elm.text", st, 30, vl);
9980                if (!strcmp(st, "visible"))
9981                  set_state(PART:"elm.text", "disabled_visible", 0.0);
9982                else
9983                  set_state(PART:"elm.text", "disabled", 0.0);
9984                set_int(button_state, BUTTON_STATE_DISABLED);
9985             }
9986          }
9987          program { name: "enable";
9988             signal: "elm,state,enabled";
9989             source: "elm";
9990             action: STATE_SET "default" 0.0;
9991             target: "button_image";
9992             target: "disabler";
9993             after: "enable_text";
9994          }
9995          program { name: "enable_text";
9996             script {
9997                new st[31];
9998                new Float:vl;
9999                get_state(PART:"elm.text", st, 30, vl);
10000                if (!strcmp(st, "disabled_visible"))
10001                  set_state(PART:"elm.text", "visible", 0.0);
10002                else
10003                  set_state(PART:"elm.text", "default", 0.0);
10004                set_int(button_state, BUTTON_STATE_ENABLED);
10005             }
10006          }
10007          program { name: "focused";
10008             //signal: "elm,action,focus";
10009             //source: "elm";
10010             action: STATE_SET "focused" 0.0;
10011             target: "button_image";
10012             target: "elm.text";
10013          }
10014          program { name: "unfocused";
10015             //signal: "elm,action,unfocus";
10016             //source: "elm";
10017             action: STATE_SET "default" 0.0;
10018             target: "button_image";
10019             after: "unfocus_text";
10020          }
10021          program { name: "unfocus_text";
10022             action: STATE_SET "visible" 0.0;
10023             target: "elm.text";
10024          }
10025       }
10026    }
10027
10028 ///////////////////////////////////////////////////////////////////////////////////////
10029 #define BUTTON_NAVIFRAME_TITLE_ICON_STYLES(style_name, image_normal, image_press, min_width, min_height) \
10030    group { name: "elm/button/base/naviframe/title/icon/"style_name; \
10031       images { \
10032          image: image_normal COMP; \
10033          image: image_press COMP; \
10034          image: "00_title_btn_bg_press.png" COMP; \
10035       } \
10036       parts { \
10037          part { name: "button_image"; \
10038             scale: 1; \
10039             description { state: "default" 0.0; \
10040                min: BUTTON_NAVIFRAME_TITLE_ICON_BG_NORMAL_MIN_INC; \
10041                max: BUTTON_NAVIFRAME_TITLE_ICON_BG_NORMAL_MIN_INC; \
10042                color: 0 0 0 0; \
10043             } \
10044             description { \
10045                state: "clicked" 0.0; \
10046                min: BUTTON_NAVIFRAME_TITLE_ICON_BG_PRESSED_MIN_INC; \
10047                max: BUTTON_NAVIFRAME_TITLE_ICON_BG_PRESSED_MIN_INC; \
10048                image { \
10049                   normal: "00_title_btn_bg_press.png"; \
10050                   border: BUTTON_NAVIFRAME_TITLE_ICON_BG_PRESSED_BORDER_INC; \
10051                   border_scale: 1; \
10052                } \
10053             } \
10054             description { \
10055                state: "disabled" 0.0; \
10056                inherit: "default" 0.0; \
10057             } \
10058             description { state: "focused" 0.0; \
10059                inherit: "default" 0.0;\
10060             } \
10061          } \
10062          part { name: "icon_part"; \
10063             scale: 1; \
10064             description { state: "default" 0.0; \
10065                min: min_width min_height; \
10066                max: min_width min_height; \
10067                rel1.to: "button_image"; \
10068                rel2.to: "button_image"; \
10069                image.normal: image_normal; \
10070             } \
10071             description { \
10072                state: "clicked" 0.0; \
10073                inherit: "default" 0.0; \
10074                image.normal: image_press; \
10075             } \
10076             description { \
10077                state: "disabled" 0.0; \
10078                inherit: "default" 0.0; \
10079                color: 127 127 127 127; \
10080             } \
10081          } \
10082          part { name: "over1"; \
10083             type: RECT; \
10084             ignore_flags: ON_HOLD; \
10085             description { state: "default" 0.0; \
10086                color: 0 0 0 0; \
10087                min: min_width min_height; \
10088             } \
10089          } \
10090          part { name: "over2"; \
10091             repeat_events: 1; \
10092             description { state: "default" 0.0; \
10093                color: 0 0 0 0; \
10094             } \
10095          } \
10096          part { name: "disabler"; \
10097             type: RECT; \
10098             description { state: "default" 0.0; \
10099                color: 0 0 0 0; \
10100                visible: 0; \
10101             } \
10102             description { state: "disabled" 0.0; \
10103                inherit: "default" 0.0; \
10104                visible: 1; \
10105             } \
10106          } \
10107       } \
10108       programs { \
10109          program { name: "button_click"; \
10110             signal: "mouse,down,1"; \
10111             source: "over1"; \
10112             action: SIGNAL_EMIT "elm,action,press" ""; \
10113             after: "button_click_anim"; \
10114          } \
10115          program { name: "button_click_anim"; \
10116             action: STATE_SET "clicked" 0.0; \
10117             target: "button_image"; \
10118             target: "icon_part"; \
10119          } \
10120          program { name: "button_unclick"; \
10121             signal: "mouse,up,1"; \
10122             source: "over2"; \
10123             action: SIGNAL_EMIT "elm,action,unpress" ""; \
10124             after: "button_unclick_anim"; \
10125          } \
10126          program { name: "button_unclick_anim"; \
10127             action: STATE_SET "default" 0.0; \
10128             target: "button_image"; \
10129             target: "icon_part"; \
10130          } \
10131          program { name: "touch_snd"; \
10132             signal: "mouse,clicked,1"; \
10133             source: "over1"; \
10134             action: PLAY_SAMPLE "touch_sound" 1.0; \
10135             after: button_unclick3; \
10136          } \
10137          program { name: "button_unclick3"; \
10138             action: SIGNAL_EMIT "elm,action,click" ""; \
10139          } \
10140          program { name: "disable"; \
10141             signal: "elm,state,disabled"; \
10142             source: "elm"; \
10143             action: STATE_SET "disabled" 0.0; \
10144             target: "disabler"; \
10145             target: "button_image"; \
10146             target: "icon_part"; \
10147          } \
10148          program { name: "enable"; \
10149             signal: "elm,state,enabled"; \
10150             source: "elm"; \
10151             action: STATE_SET "default" 0.0; \
10152             target: "disabler"; \
10153             target: "button_image"; \
10154             target: "icon_part"; \
10155          } \
10156       } \
10157    }
10158 ///////////////////////////////////////////////////////////////////////////////////////
10159    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)
10160
10161    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)
10162
10163    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)
10164
10165    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)
10166
10167 /////////////////////////////////////////////////////////////////////////////////////////
10168    group { name: "elm/button/base/naviframe/more/default";
10169       images {
10170          image: "00_winset_more.png" COMP;
10171          image: "00_winset_more_press.png" COMP;
10172          image: "00_title_btn_bg_press.png" COMP;
10173       }
10174       parts {
10175          part { name: "button_image";
10176             scale: 1;
10177             description { state: "default" 0.0;
10178                min: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC;
10179                max: BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC;
10180                color: 0 0 0 0;
10181             }
10182             description { state: "clicked" 0.0;
10183                min: BUTTON_NAVIFRAME_MORE_BG_PRESSED_MIN_MAX_INC;
10184                max: BUTTON_NAVIFRAME_MORE_BG_PRESSED_MIN_MAX_INC;
10185                image {
10186                   normal: "00_title_btn_bg_press.png";
10187                   border: BUTTON_NAVIFRAME_MORE_BG_PRESSED_BORDER_INC;
10188                   border_scale: 1;
10189                }
10190             }
10191             description { state: "disabled" 0.0;
10192                inherit: "default" 0.0;
10193             }
10194             description { state: "focused" 0.0;
10195                inherit: "default" 0.0;
10196             }
10197          }
10198          part { name: "more_image";
10199             scale: 1;
10200             mouse_events: 0;
10201             description { state: "default" 0.0;
10202                min: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC;
10203                max: BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC;
10204                rel1.to: "button_image";
10205                rel2.to: "button_image";
10206                image.normal: "00_winset_more.png";
10207             }
10208             description { state: "clicked" 0.0;
10209                inherit: "default" 0.0;
10210                image.normal: "00_winset_more_press.png";
10211             }
10212             description { state: "disabled" 0.0;
10213                inherit: "default" 0.0;
10214                color: 255 255 255 127;
10215             }
10216          }
10217          part { name: "over2";
10218             type: RECT;
10219             repeat_events: 1;
10220             ignore_flags: ON_HOLD;
10221             description { state: "default" 0.0;
10222                color: 0 0 0 0;
10223             }
10224          }
10225          part { name: "over3";
10226             type: RECT;
10227             repeat_events: 1;
10228             description { state: "default" 0.0;
10229                color: 0 0 0 0;
10230             }
10231          }
10232          part { name: "disabler";
10233             type: RECT;
10234             description { state: "default" 0.0;
10235                color: 0 0 0 0;
10236                visible: 0;
10237             }
10238             description { state: "disabled" 0.0;
10239                inherit: "default" 0.0;
10240                visible: 1;
10241             }
10242          }
10243       }
10244       programs {
10245          program { name: "button_click";
10246             signal: "mouse,down,1";
10247             source: "over2";
10248             action: SIGNAL_EMIT "elm,action,press" "";
10249             after: "button_click_anim";
10250          }
10251          program { name: "button_click_anim";
10252             action: STATE_SET "clicked" 0.0;
10253             target: "button_image";
10254             target: "more_image";
10255          }
10256          program { name: "button_unclick";
10257             signal: "mouse,up,1";
10258             source: "over3";
10259             action: SIGNAL_EMIT "elm,action,unpress" "";
10260             after: "button_unclick_anim";
10261          }
10262          program { name: "button_unclick_anim";
10263             action: STATE_SET "default" 0.0;
10264             target: "button_image";
10265             target: "more_image";
10266          }
10267          program { name: "touch_snd";
10268             signal: "mouse,clicked,1";
10269             source: "over2";
10270             action: PLAY_SAMPLE "touch_sound" 1.0;
10271             after: button_unclick3;
10272          }
10273          program { name: "button_unclick3";
10274             action: SIGNAL_EMIT "elm,action,click" "";
10275          }
10276          program { name: "disable";
10277             signal: "elm,state,disabled";
10278             source: "elm";
10279             action: STATE_SET "disabled" 0.0;
10280             target: "disabler";
10281             target: "button_image";
10282             target: "more_image";
10283          }
10284          program { name: "enable";
10285             signal: "elm,state,enabled";
10286             source: "elm";
10287             action: STATE_SET "default" 0.0;
10288             target: "disabler";
10289             target: "button_image";
10290             target: "more_image";
10291          }
10292       }
10293    }
10294
10295 ///////////////////////////////////////////////////////////////////////////////////////
10296    group { name: "elm/button/base/tickernoti";
10297       images {
10298          image: "00_button_06_normal.png" COMP;
10299          image: "00_button_06_press.png" COMP;
10300          image: "00_button_06_dim.png" COMP;
10301          image: "00_button_06_normal_focus.png" COMP;
10302       }
10303       script {
10304          public button_state = BUTTON_STATE_ENABLED;
10305       }
10306       parts {
10307          part { name: "button_image";
10308             scale: 1;
10309             description { state: "default" 0.0;
10310                image {
10311                   normal: "00_button_06_normal.png";
10312                   border: BUTTON_TICKERNOTI_BG_BORDER_INC;
10313                   border_scale: 1;
10314                }
10315             }
10316             description { state: "clicked" 0.0;
10317                inherit: "default" 0.0;
10318                image.normal: "00_button_06_press.png";
10319             }
10320             description { state: "disabled" 0.0;
10321                inherit: "default" 0.0;
10322                image.normal: "00_button_06_dim.png";
10323             }
10324             description { state: "focused" 0.0;
10325                inherit: "default" 0.0;
10326                image.normal: "00_button_06_normal_focus.png";
10327             }
10328          }
10329          part { name: "padding_left_top";
10330             type: RECT;
10331             scale: 1;
10332             mouse_events: 0;
10333             description { state: "default" 0.0;
10334                align: 0.0 0.0;
10335                rel2.relative: 0.0 0.0;
10336                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
10337                fixed: 1 1;
10338                visible: 0;
10339             }
10340          }
10341          part { name: "bg";
10342             type: RECT;
10343             scale: 1;
10344             mouse_events: 0;
10345             description { state: "default" 0.0;
10346                min: BUTTON_TICKERNOTI_BG_MIN_INC;
10347                visible: 0;
10348             }
10349             description { state: "visible" 0.0;
10350                inherit: "default" 0.0;
10351                min: BUTTON_TICKERNOTI_VISIBLE_BG_MIN_INC;
10352             }
10353             description { state: "icononly" 0.0;
10354                inherit: "default" 0.0;
10355                min: BUTTON_TICKERNOTI_ICONONLY_BG_MIN_INC;
10356             }
10357          }
10358          part { name: "padding_right_bottom";
10359             type: RECT;
10360             scale: 1;
10361             mouse_events: 0;
10362             description { state: "default" 0.0;
10363                align: 1.0 1.0;
10364                rel1.relative: 1.0 1.0;
10365                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
10366                fixed: 1 1;
10367                visible: 0;
10368             }
10369          }
10370          part { name: "icon_rect";
10371             type: RECT;
10372             scale: 1;
10373             mouse_events: 0;
10374             description { state: "default" 0.0;
10375                visible: 0;
10376                min: 0 0;
10377                fixed: 1 0;
10378                rel1 {
10379                   relative: 1.0 1.0;
10380                   to: "padding_left_top";
10381                }
10382                rel2 {
10383                   relative: 1.0 0.0;
10384                   to_x: "padding_left_top";
10385                   to_y: "padding_right_bottom";
10386                }
10387                align: 0.0 0.5;
10388             }
10389             description { state: "visible" 0.0;
10390                visible: 0;
10391                min: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
10392                max: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
10393                fixed: 1 0;
10394                rel1 {
10395                   relative: 1.0 1.0;
10396                   to: "padding_left_top";
10397                }
10398                rel2 {
10399                   relative: 1.0 0.0;
10400                   to_x: "padding_left_top";
10401                   to_y: "padding_right_bottom";
10402                }
10403                align: 0.0 0.5;
10404             }
10405             description { state: "icononly" 0.0;
10406                inherit: "default" 0.0;
10407             }
10408          }
10409          part { name: "padding_after_icon";
10410             type: RECT;
10411             scale: 1;
10412             mouse_events: 0;
10413             description { state: "default" 0.0; //when only icon or no icon is there
10414                align: 0.0 0.0;
10415                rel1 {
10416                   relative: 1.0 0.0;
10417                   to: "icon_rect";
10418                }
10419                rel2.to: "icon_rect";
10420                fixed: 1 0;
10421                min: 0 0;
10422                visible: 0;
10423             }
10424             description { state: "visible" 0.0;
10425                visible: 0;
10426                align: 0.0 0.0;
10427                rel1 {
10428                   relative: 1.0 0.0;
10429                   to: "icon_rect";
10430                }
10431                rel2.to: "icon_rect";
10432                fixed: 1 0;
10433                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
10434             }
10435             description { state: "icononly" 0.0;
10436                inherit: "default" 0.0;
10437             }
10438          }
10439          part { name: "padding_before_text";
10440             type: RECT;
10441             scale: 1;
10442             mouse_events: 0;
10443             description { state: "default" 0.0; //when only icon or no icon is there
10444                align: 1.0 0.5;
10445                rel1 {
10446                   relative: 0.0 1.0;
10447                   to_x: "elm.text";
10448                   to_y: "padding_left_top";
10449                }
10450                rel2 {
10451                   relative: 0.0 0.0;
10452                   to_x: "elm.text";
10453                   to_y: "padding_right_bottom";
10454                }
10455                fixed: 1 0;
10456                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
10457                visible: 0;
10458             }
10459          }
10460          part { name: "elm.swallow.content";
10461             type: SWALLOW;
10462             scale: 1;
10463             clip_to: "clipper";
10464             description { state: "default" 0.0;
10465                visible: 0;
10466                align: 0.0 0.5;
10467                rel1 {
10468                   relative: 1.0 1.0;
10469                   to: "padding_left_top";
10470                }
10471                rel2 {
10472                   relative: 1.0 0.0;
10473                   to_x: "padding_left_top";
10474                   to_y: "padding_right_bottom";
10475                }
10476                fixed: 1 0;
10477             }
10478             description { state: "visible" 0.0;
10479                fixed: 1 0;
10480                min: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
10481                max: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
10482                align: 1.0 0.5;
10483                rel1 {
10484                   relative: 0.0 1.0;
10485                   to_x: "padding_before_text";
10486                   to_y: "padding_left_top";
10487                }
10488                rel2 {
10489                   relative: 0.0 0.0;
10490                   to_x: "padding_before_text";
10491                   to_y: "padding_right_bottom";
10492                }
10493             }
10494             description { state: "icononly" 0.0;
10495                min: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
10496                max: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
10497             }
10498          }
10499          part { name: "elm.text";
10500             type: TEXT;
10501             mouse_events: 0;
10502             scale: 1;
10503             clip_to: "clipper";
10504             description { state: "default" 0.0;
10505                visible: 0;
10506                rel1 {
10507                   relative: 1.0 1.0;
10508                   to_x: "padding_after_icon";
10509                   to_y: "padding_left_top";
10510                }
10511                rel2 {
10512                   relative: 0.0 0.0;
10513                   to: "padding_right_bottom";
10514                }
10515                color: BUTTON_TICKERNOTI_NORMAL_COLOR_INC;
10516                text {
10517                   font: "SLP:style=Medium";
10518                   size: BUTTON_TICKERNOTI_FONT_SIZE_INC;
10519                   min: 1 0;
10520                   max: 1 0;
10521                   text_class: "slp_medium";
10522                }
10523             }
10524             description { state: "visible" 0.0;
10525                inherit: "default" 0.0;
10526                visible: 1;
10527             }
10528             description { state: "clicked" 0.0;
10529                inherit: "default" 0.0;
10530                visible: 1;
10531                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
10532             }
10533             description { state: "disabled" 0.0;
10534                inherit: "default" 0.0;
10535                color: 0 0 0 128;
10536             }
10537             description { state: "disabled_visible" 0.0;
10538                inherit: "default" 0.0;
10539                color: BUTTON_TICKERNOTI_DISABLED_COLOR_INC;
10540                visible: 1;
10541             }
10542             description { state: "focused" 0.0;
10543                inherit: "default" 0.0;
10544                visible: 1;
10545                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
10546             }
10547          }
10548          part { name: "over2";
10549             type: RECT;
10550             repeat_events: 1;
10551             ignore_flags: ON_HOLD;
10552             description { state: "default" 0.0;
10553                color: 0 0 0 0;
10554             }
10555          }
10556          part { name: "over3";
10557             type: RECT;
10558             repeat_events: 1;
10559             description { state: "default" 0.0;
10560                color: 0 0 0 0;
10561             }
10562          }
10563          part { name: "clipper";
10564             type: RECT;
10565             description { state: "default" 0.0;
10566                color: 255 255 255 255;
10567             }
10568          }
10569          part { name: "disabler";
10570             type: RECT;
10571             description { state: "default" 0.0;
10572                color: 0 0 0 0;
10573                visible: 0;
10574             }
10575             description { state: "disabled" 0.0;
10576                inherit: "default" 0.0;
10577                visible: 1;
10578             }
10579          }
10580       }
10581       programs {
10582          program { name: "button_click";
10583             signal: "mouse,down,1";
10584             source: "over2";
10585             action: SIGNAL_EMIT "elm,action,press" "";
10586             after: "button_click_anim";
10587          }
10588          program { name: "button_click_anim";
10589             action: STATE_SET "clicked" 0.0;
10590             target: "button_image";
10591             after: "text_clicked";
10592          }
10593          program { name: "text_clicked";
10594             script {
10595                new st[31];
10596                new Float:vl;
10597                get_state(PART:"elm.text", st, 30, vl);
10598                if (!strcmp(st, "visible"))
10599                  set_state(PART:"elm.text", "clicked", 0.0);
10600             }
10601          }
10602          program { name: "button_unpress";
10603             action: SIGNAL_EMIT "elm,action,unpress" "";
10604          }
10605          program { name: "button_mouseout_clicked";
10606             signal: "mouse,up,1";
10607             source: "over3";
10608             script {
10609                new st[31];
10610                new Float:vl;
10611                get_state(PART:"elm.swallow.content", st, 30, vl);
10612                if (strcmp(st, "icononly"))
10613                  {
10614                     emit("elm,action,default,text,set", "");
10615                     set_state(PART:"elm.text", "visible", 0.0);
10616                  }
10617                if (get_int(button_state) != BUTTON_STATE_DISABLED)
10618                  set_state(PART:"button_image", "default", 0.0);
10619             }
10620             after: button_unpress;
10621          }
10622          program { name: "touch_snd";
10623             signal: "mouse,clicked,1";
10624             source: "over2";
10625             action: PLAY_SAMPLE "touch_sound" 1.0;
10626             after: button_unclick3;
10627          }
10628          program { name: "button_unclick3";
10629             action: SIGNAL_EMIT "elm,action,click" "";
10630          }
10631          program { name: "text_show";
10632             signal: "elm,state,text,visible";
10633             source: "elm";
10634             script {
10635                new st[31];
10636                new Float:vl;
10637                get_state(PART:"elm.swallow.content", st, 30, vl);
10638                if (!strcmp(st, "icononly"))
10639                  {
10640                     set_state(PART:"elm.swallow.content", "visible", 0.0);
10641                     set_state(PART:"icon_rect", "visible", 0.0);
10642                     set_state(PART:"padding_after_icon", "visible", 0.0);
10643                     set_state(PART:"bg", "visible", 0.0);
10644                  }
10645                if (get_int(button_state) != BUTTON_STATE_DISABLED)
10646                  set_state(PART:"elm.text", "visible", 0.0);
10647                else
10648                  set_state(PART:"elm.text", "disabled_visible", 0.0);
10649             }
10650          }
10651          program { name: "text_hide";
10652             signal: "elm,state,text,hidden";
10653             source: "elm";
10654             script {
10655                new st[31];
10656                new Float:vl;
10657                get_state(PART:"elm.swallow.content", st, 30, vl);
10658                if (!strcmp(st, "visible"))
10659                  {
10660                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
10661                     set_state(PART:"icon_rect", "icononly", 0.0);
10662                     set_state(PART:"padding_after_icon", "icononly", 0.0);
10663                     set_state(PART:"bg", "icononly", 0.0);
10664                  }
10665                set_state(PART:"elm.text", "default", 0.0);
10666             }
10667          }
10668          program { name: "icon_show";
10669             signal: "elm,state,icon,visible";
10670             source: "elm";
10671             script {
10672                new st[31];
10673                new Float:vl;
10674                get_state(PART:"elm.text", st, 30, vl);
10675                if (!strcmp(st, "visible"))
10676                  {
10677                     set_state(PART:"elm.swallow.content", "visible", 0.0);
10678                     set_state(PART:"icon_rect", "visible", 0.0);
10679                     set_state(PART:"padding_after_icon", "visible", 0.0);
10680                     set_state(PART:"bg", "visible", 0.0);
10681                  }
10682                else
10683                  {
10684                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
10685                     set_state(PART:"icon_rect", "icononly", 0.0);
10686                     set_state(PART:"padding_after_icon", "icononly", 0.0);
10687                     set_state(PART:"bg", "icononly", 0.0);
10688                  }
10689             }
10690          }
10691          program { name: "icon_hide";
10692             signal: "elm,state,icon,hidden";
10693             source: "elm";
10694             action: STATE_SET "default" 0.0;
10695             target: "elm.swallow.content";
10696             target: "padding_after_icon";
10697             target: "icon_rect";
10698             target: "bg";
10699          }
10700          program { name: "disable";
10701             signal: "elm,state,disabled";
10702             source: "elm";
10703             action: STATE_SET "disabled" 0.0;
10704             target: "button_image";
10705             target: "disabler";
10706             after: "disable_text";
10707          }
10708          program { name: "disable_text";
10709             script {
10710                new st[31];
10711                new Float:vl;
10712                get_state(PART:"elm.text", st, 30, vl);
10713                if (!strcmp(st, "visible"))
10714                  set_state(PART:"elm.text", "disabled_visible", 0.0);
10715                else
10716                  set_state(PART:"elm.text", "disabled", 0.0);
10717                set_int(button_state, BUTTON_STATE_DISABLED);
10718             }
10719          }
10720          program { name: "enable";
10721             signal: "elm,state,enabled";
10722             source: "elm";
10723             action: STATE_SET "default" 0.0;
10724             target: "button_image";
10725             target: "disabler";
10726             after: "enable_text";
10727          }
10728          program { name: "enable_text";
10729             script {
10730                new st[31];
10731                new Float:vl;
10732                get_state(PART:"elm.text", st, 30, vl);
10733                if (!strcmp(st, "disabled_visible"))
10734                  set_state(PART:"elm.text", "visible", 0.0);
10735                else
10736                  set_state(PART:"elm.text", "default", 0.0);
10737                set_int(button_state, BUTTON_STATE_ENABLED);
10738             }
10739          }
10740          program { name: "focused";
10741             //signal: "elm,action,focus";
10742             //source: "elm";
10743             action: STATE_SET "focused" 0.0;
10744             target: "button_image";
10745             target: "elm.text";
10746          }
10747          program { name: "unfocused";
10748             //signal: "elm,action,unfocus";
10749             //source: "elm";
10750             action: STATE_SET "default" 0.0;
10751             target: "button_image";
10752             after: "unfocus_text";
10753          }
10754          program { name: "unfocus_text";
10755             action: STATE_SET "visible" 0.0;
10756             target: "elm.text";
10757          }
10758       }
10759    }
10760
10761 ///////////////////////////////////////////////////////////////////////////////////////
10762    group { name: "elm/button/base/expandable_number";
10763       alias: "elm/button/base/text_only/expandable_number";
10764       images {
10765          image: "00_button_05_normal.png" COMP;
10766          image: "00_button_05_press.png" COMP;
10767          image: "00_button_05_dim.png" COMP;
10768          image: "00_button_05_normal_focus.png" COMP;
10769          image: "00_arrow_expand.png" COMP;
10770          image: "00_arrow_expand_press.png" COMP;
10771          image: "00_arrow_expand_dim.png" COMP;
10772       }
10773       script {
10774          public button_state = BUTTON_STATE_ENABLED;
10775       }
10776       parts {
10777          part { name: "button_image";
10778             scale: 1;
10779             description { state: "default" 0.0;
10780                min: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
10781                max: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
10782                image {
10783                   normal: "00_button_05_normal.png";
10784                   border: BUTTON_EXPANDABLE_NUMBER_BG_BORDER_INC;
10785                   border_scale: 1;
10786                }
10787             }
10788             description { state: "clicked" 0.0;
10789                inherit: "default" 0.0;
10790                image.normal: "00_button_05_press.png";
10791             }
10792             description { state: "disabled" 0.0;
10793                inherit: "default" 0.0;
10794                image.normal: "00_button_05_dim.png";
10795             }
10796             description { state: "focused" 0.0;
10797                inherit: "default" 0.0;
10798                image.normal: "00_button_05_normal_focus.png";
10799             }
10800          }
10801          part { name: "padding_left_top";
10802             type: RECT;
10803             scale: 1;
10804             mouse_events: 0;
10805             description { state: "default" 0.0;
10806                align: 0.0 0.0;
10807                rel2.relative: 0.0 0.0;
10808                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
10809                fixed: 1 1;
10810                visible: 0;
10811             }
10812          }
10813          part { name: "padding_right_bottom";
10814             type: RECT;
10815             scale: 1;
10816             mouse_events: 0;
10817             description { state: "default" 0.0;
10818                align: 1.0 1.0;
10819                rel1.relative: 1.0 1.0;
10820                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
10821                fixed: 1 1;
10822                visible: 0;
10823             }
10824          }
10825          part { name: "icon_rect";
10826             type: RECT;
10827             scale: 1;
10828             mouse_events: 0;
10829             description { state: "default" 0.0;
10830                visible: 0;
10831                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
10832                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
10833                fixed: 1 0;
10834                rel1 {
10835                   relative: 0.0 1.0;
10836                   to_x: "padding_right_bottom";
10837                   to_y: "padding_left_top";
10838                }
10839                rel2 {
10840                   relative: 0.0 0.0;
10841                   to: "padding_right_bottom";
10842                }
10843                align: 1.0 0.5;
10844                color: 0 0 0 0;
10845             }
10846          }
10847          part { name: "arrow_expand";
10848             scale: 1;
10849             mouse_events: 0;
10850             description { state: "default" 0.0;
10851                align: 0.0 0.5;
10852                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
10853                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
10854                fixed: 0 0;
10855                rel1.to: "icon_rect";
10856                rel2.to: "icon_rect";
10857                image.normal:"00_arrow_expand.png";
10858             }
10859             description { state: "clicked" 0.0;
10860                inherit: "default" 0.0;
10861                image.normal:"00_arrow_expand_press.png";
10862             }
10863             description { state: "disabled" 0.0;
10864                inherit: "default" 0.0;
10865                image.normal:"00_arrow_expand_dim.png";
10866             }
10867          }
10868          part { name: "elm.text";
10869             type: TEXT;
10870             mouse_events: 0;
10871             scale: 1;
10872             description { state: "default" 0.0;
10873                min: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
10874                max: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
10875                fixed:1 0;
10876                rel1 {
10877                   relative: 1.0 1.0;
10878                   to: "padding_left_top";
10879                }
10880                rel2 {
10881                   relative: 1.0 1.0;
10882                   to_x:"padding_left_top";
10883                   to_y:"padding_right_bottom";
10884                }
10885                align: 0.0 0.5;
10886                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
10887                text {
10888                   font: "SLP:style=Medium";
10889                   size: BUTTON_EXPANDABLE_NUMBER_FONT_SIZE_INC;
10890                   min: 0 0;
10891                   fit: 1 1;
10892                   size_range: 14 20;
10893                   text_class: "slp_medium";
10894                }
10895             }
10896             description { state: "visible" 0.0;
10897                inherit: "default" 0.0;
10898             }
10899             description { state: "clicked" 0.0;
10900                inherit: "default" 0.0;
10901                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
10902             }
10903             description { state: "disabled" 0.0;
10904                inherit: "default" 0.0;
10905                color: 0 0 0 128;
10906             }
10907             description { state: "disabled_visible" 0.0;
10908                inherit: "default" 0.0;
10909                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
10910             }
10911             description { state: "focused" 0.0;
10912                inherit: "default" 0.0;
10913                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
10914             }
10915          }
10916          part { name: "over2";
10917             type: RECT;
10918             repeat_events: 1;
10919             ignore_flags: ON_HOLD;
10920             description { state: "default" 0.0;
10921                color: 0 0 0 0;
10922             }
10923          }
10924          part { name: "over3";
10925             type: RECT;
10926             repeat_events: 1;
10927             description { state: "default" 0.0;
10928                color: 0 0 0 0;
10929             }
10930          }
10931          part { name: "disabler";
10932             type: RECT;
10933             description { state: "default" 0.0;
10934                color: 0 0 0 0;
10935                visible: 0;
10936             }
10937             description { state: "disabled" 0.0;
10938                inherit: "default" 0.0;
10939                visible: 1;
10940             }
10941          }
10942       }
10943       programs {
10944          program { name: "button_click";
10945             signal: "mouse,down,1";
10946             source: "over2";
10947             action: SIGNAL_EMIT "elm,action,press" "";
10948             after: "button_click_anim";
10949          }
10950          program { name: "button_click_anim";
10951             action: STATE_SET "clicked" 0.0;
10952             target: "button_image";
10953             target: "arrow_expand";
10954             after: "text_clicked";
10955          }
10956          program { name: "text_clicked";
10957             script {
10958                new st[31];
10959                new Float:vl;
10960                get_state(PART:"elm.text", st, 30, vl);
10961                if (!strcmp(st, "visible"))
10962                  set_state(PART:"elm.text", "clicked", 0.0);
10963             }
10964          }
10965          program { name: "button_unpress";
10966             action: SIGNAL_EMIT "elm,action,unpress" "";
10967          }
10968          program { name: "button_mouseout_clicked";
10969             signal: "mouse,up,1";
10970             source: "over3";
10971             script {
10972                if (get_int(button_state) != BUTTON_STATE_DISABLED)
10973                  {
10974                     set_state(PART:"button_image", "default", 0.0);
10975                     set_state(PART:"elm.text", "visible", 0.0);
10976                     set_state(PART:"arrow_expand", "default", 0.0);
10977                  }
10978             }
10979             after: button_unpress;
10980          }
10981          program { name: "touch_snd";
10982             signal: "mouse,clicked,1";
10983             source: "over2";
10984             action: PLAY_SAMPLE "touch_sound" 1.0;
10985             after: button_unclick3;
10986          }
10987          program { name: "button_unclick3";
10988             action: SIGNAL_EMIT "elm,action,click" "";
10989          }
10990          program { name: "text_show";
10991             signal: "elm,state,text,visible";
10992             source: "elm";
10993             script {
10994                if (get_int(button_state) != BUTTON_STATE_DISABLED)
10995                  set_state(PART:"elm.text", "visible", 0.0);
10996                else
10997                  set_state(PART:"elm.text", "disabled_visible", 0.0);
10998             }
10999          }
11000          program { name: "text_hide";
11001             signal: "elm,state,text,hidden";
11002             source: "elm";
11003             script {
11004                set_state(PART:"elm.text", "default", 0.0);
11005             }
11006          }
11007          program { name: "disable";
11008             signal: "elm,state,disabled";
11009             source: "elm";
11010             action: STATE_SET "disabled" 0.0;
11011             target: "button_image";
11012             target: "disabler";
11013             after: "disable_text";
11014          }
11015          program { name: "disable_text";
11016             script {
11017                new st[31];
11018                new Float:vl;
11019                get_state(PART:"elm.text", st, 30, vl);
11020                if (!strcmp(st, "visible"))
11021                  set_state(PART:"elm.text", "disabled_visible", 0.0);
11022                else
11023                  set_state(PART:"elm.text", "disabled", 0.0);
11024                set_int(button_state, BUTTON_STATE_DISABLED);
11025             }
11026          }
11027          program { name: "enable";
11028             signal: "elm,state,enabled";
11029             source: "elm";
11030             action: STATE_SET "default" 0.0;
11031             target: "button_image";
11032             target: "disabler";
11033             after: "enable_text";
11034          }
11035          program { name: "enable_text";
11036             script {
11037                new st[31];
11038                new Float:vl;
11039                get_state(PART:"elm.text", st, 30, vl);
11040                if (!strcmp(st, "disabled_visible"))
11041                  set_state(PART:"elm.text", "visible", 0.0);
11042                else
11043                  set_state(PART:"elm.text", "default", 0.0);
11044                set_int(button_state, BUTTON_STATE_ENABLED);
11045             }
11046          }
11047          program { name: "focused";
11048             //signal: "elm,action,focus";
11049             //source: "elm";
11050             action: STATE_SET "focused" 0.0;
11051             target: "button_image";
11052             target: "elm.text";
11053          }
11054          program { name: "unfocused";
11055             //signal: "elm,action,unfocus";
11056             //source: "elm";
11057             action: STATE_SET "default" 0.0;
11058             target: "button_image";
11059             after: "unfocus_text";
11060          }
11061          program { name: "unfocus_text";
11062             action: STATE_SET "visible" 0.0;
11063             target: "elm.text";
11064          }
11065       }
11066    }
11067
11068 #undef BUTTON_STATE_ENABLED
11069 #undef BUTTON_STATE_DISABLED