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