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