[elm_colorselector]: edje objects created for button removed and new
[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/picker_left";
3556       images {
3557          image: "00_color_picker_btn_left.png" COMP;
3558          image: "00_color_picker_btn_left_press.png" COMP;
3559          image: "00_color_picker_btn_left_dim.png" COMP;
3560       }
3561       script {
3562          public button_state = BUTTON_STATE_ENABLED;
3563       }
3564       parts {
3565          part { name: "button_image";
3566             mouse_events: 1;
3567             scale: 1;
3568             description { state: "default" 0.0;
3569                min: 16 38;
3570                image {
3571                   normal: "00_color_picker_btn_left.png";
3572                   border: COLORSELECTOR_BUTTON_BORDER;
3573                   border_scale: 1;
3574                }
3575             }
3576             description { state: "clicked" 0.0;
3577                inherit: "default" 0.0;
3578                image.normal: "00_color_picker_btn_left_press.png";
3579             }
3580             description { state: "disabled" 0.0;
3581                inherit: "default" 0.0;
3582                image.normal: "00_color_picker_btn_left_dim.png";
3583             }
3584             description { state: "focused" 0.0;
3585                inherit: "default" 0.0;
3586                image.normal: "00_color_picker_btn_left_press.png";
3587             }
3588          }
3589          part {
3590             name: "padding_left_top";
3591             type: RECT;
3592             scale: 1;
3593             mouse_events: 0;
3594             description { state: "default" 0.0;
3595                align: 0.0 0.0;
3596                rel1.relative: 0.0 0.0;
3597                rel2.relative: 0.0 0.0;
3598                min: 2 2;
3599                fixed: 1 1;
3600                visible: 0;
3601             }
3602          }
3603          part {
3604             name: "padding_right_bottom";
3605             type: RECT;
3606             scale: 1;
3607             mouse_events: 0;
3608             description { state: "default" 0.0;
3609                align: 1.0 1.0;
3610                rel1.relative: 1.0 1.0;
3611                rel2.relative: 1.0 1.0;
3612                min: 2 2;
3613                fixed: 1 1;
3614                visible: 0;
3615             }
3616          }
3617          part {
3618             name: "padding_icon_text";
3619             type: RECT;
3620             scale: 1;
3621             mouse_events: 0;
3622             description { state: "default" 0.0; //when only icon or no icon is there
3623                align: 0.0 0.0;
3624                rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; }
3625                rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; }
3626                fixed: 1 0;
3627                min: 0 0;
3628                color: 0 0 0 0;
3629             }
3630             description { state: "icononly" 0.0;
3631                inherit: "default" 0.0;
3632             }
3633             description { state: "visible" 0.0; //when icon is visible
3634                align: 0.0 0.0;
3635                rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; }
3636                rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; }
3637                fixed: 1 0;
3638                min: 5 0;
3639                color: 0 0 0 0;
3640             }
3641          }
3642          part { name: "elm.swallow.content";
3643             type: SWALLOW;
3644             scale: 1;
3645             description { state: "default" 0.0;
3646                visible: 0;
3647                align: 0.0 0.5;
3648                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
3649                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
3650                fixed: 1 0;
3651             }
3652             description { state: "visible" 0.0;
3653                fixed: 1 0;
3654                visible: 1;
3655                align: 0.0 0.5;
3656                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
3657                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
3658                aspect: 1.0 1.0;
3659                aspect_preference: VERTICAL;
3660             }
3661             description { state: "icononly" 0.0;
3662                visible: 1;
3663                min: 38 38;
3664                rel1 { relative: 1.0 0.0; to_x: "padding_left_top"; }
3665                rel2 { relative: 0.0 1.0; to_x: "padding_right_bottom"; }
3666                align: 0.5 0.5;
3667                aspect: 1.0 1.0;
3668                aspect_preference: VERTICAL;
3669             }
3670          }
3671          part { name: "elm.text";
3672             type: TEXT;
3673             mouse_events: 0;
3674             scale: 1;
3675             description { state: "default" 0.0;
3676                visible: 0;
3677                rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; }
3678                rel2 { relative: 0.0 0.0; to:"padding_right_bottom"; }
3679                align: 0.5 0.5;
3680                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
3681                text {
3682                   font: "SLP:style=Medium";
3683                   size: 24;
3684                   min: 0 0;
3685                   align: 0.5 0.5;
3686                }
3687             }
3688             description { state: "visible" 0.0;
3689                inherit: "default" 0.0;
3690                visible: 1;
3691                min: 90 34;
3692             }
3693             description { state: "clicked" 0.0;
3694                inherit: "default" 0.0;
3695                visible: 1;
3696                min: 0 0;
3697                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
3698             }
3699             description { state: "disabled" 0.0;
3700                inherit: "default" 0.0;
3701                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
3702             }
3703             description { state: "disabled_visible" 0.0;
3704                inherit: "default" 0.0;
3705                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
3706                visible: 1;
3707                min: 90 34;
3708             }
3709             description { state: "focused" 0.0;
3710                inherit: "default" 0.0;
3711                visible: 1;
3712                min: 0 0;
3713                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
3714             }
3715          }
3716          part { name: "over2";
3717             type: RECT;
3718             mouse_events: 1;
3719             repeat_events: 1;
3720             ignore_flags: ON_HOLD;
3721             description { state: "default" 0.0;
3722                color: 0 0 0 0;
3723             }
3724          }
3725          part { name: "over3";
3726             type: RECT;
3727             mouse_events: 1;
3728             repeat_events: 1;
3729             description { state: "default" 0.0;
3730                color: 0 0 0 0;
3731             }
3732          }
3733          part { name: "disabler";
3734             type: RECT;
3735             description { state: "default" 0.0;
3736                color: 0 0 0 0;
3737                visible: 0;
3738             }
3739             description { state: "disabled" 0.0;
3740                inherit: "default" 0.0;
3741                visible: 1;
3742             }
3743          }
3744       }
3745       programs {
3746          program { name: "button_click";
3747             signal: "mouse,down,1";
3748             source: "over2";
3749             action: SIGNAL_EMIT "elm,action,press" "";
3750             after: "button_click_anim";
3751          }
3752          program { name: "button_click_anim";
3753             action: STATE_SET "clicked" 0.0;
3754             target: "button_image";
3755             after: "text_clicked";
3756          }
3757          program { name: "text_clicked";
3758             script {
3759                new st[31];
3760                new Float:vl;
3761                get_state(PART:"elm.text", st, 30, vl);
3762                if (!strcmp(st, "visible"))
3763                   set_state(PART:"elm.text", "clicked", 0.0);
3764             }
3765          }
3766          program { name: "button_unpress";
3767             action: SIGNAL_EMIT "elm,action,unpress" "";
3768          }
3769          program { name: "button_mouseout_clicked";
3770             signal: "mouse,up,1";
3771             source: "over3";
3772             script {
3773                new st[31];
3774                new Float:vl;
3775                get_state(PART:"elm.swallow.content", st, 30, vl);
3776                if (strcmp(st, "icononly"))
3777                {
3778                   emit("elm,action,default,text,set", "");
3779                   set_state(PART:"elm.text", "visible", 0.0);
3780                }
3781                if(get_int(button_state) != BUTTON_STATE_DISABLED)
3782                   set_state(PART:"button_image", "default", 0.0);
3783             }
3784             after: button_unpress;
3785          }
3786          program { name: "button_unclick3";
3787             signal: "mouse,clicked,1";
3788             source: "over2";
3789             action: SIGNAL_EMIT "elm,action,click" "";
3790          }
3791          program { name: "text_show";
3792             signal: "elm,state,text,visible";
3793             source: "elm";
3794             script {
3795                new st[31];
3796                new Float:vl;
3797                get_state(PART:"elm.swallow.content", st, 30, vl);
3798                if (!strcmp(st, "icononly"))
3799                {
3800                   set_state(PART:"elm.swallow.content", "visible", 0.0);
3801                   set_state(PART:"padding_icon_text", "visible", 0.0);
3802                }
3803                if(get_int(button_state) != BUTTON_STATE_DISABLED)
3804                  set_state(PART:"elm.text", "visible", 0.0);
3805                else
3806                  set_state(PART:"elm.text", "disabled_visible", 0.0);
3807             }
3808          }
3809          program { name: "text_hide";
3810             signal: "elm,state,text,hidden";
3811             source: "elm";
3812             script {
3813                new st[31];
3814                new Float:vl;
3815                get_state(PART:"elm.swallow.content", st, 30, vl);
3816                if (!strcmp(st, "visible"))
3817                {
3818                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
3819                   set_state(PART:"padding_icon_text", "icononly", 0.0);
3820                }
3821                set_state(PART:"elm.text", "default", 0.0);
3822             }
3823          }
3824          program { name: "icon_show";
3825             signal: "elm,state,icon,visible";
3826             source: "elm";
3827             script {
3828                new st[31];
3829                new Float:vl;
3830                get_state(PART:"elm.text", st, 30, vl);
3831                if (!strcmp(st, "visible"))
3832                {
3833                   set_state(PART:"elm.swallow.content", "visible", 0.0);
3834                   set_state(PART:"padding_icon_text", "visible", 0.0);
3835                }
3836                else
3837                {
3838                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
3839                   set_state(PART:"padding_icon_text", "icononly", 0.0);
3840                }
3841             }
3842          }
3843          program { name: "icon_hide";
3844             signal: "elm,state,icon,hidden";
3845             source: "elm";
3846             action: STATE_SET "default" 0.0;
3847             target: "elm.swallow.content";
3848             target: "padding_icon_text";
3849          }
3850          program { name: "disable";
3851             signal: "elm,state,disabled";
3852             source: "elm";
3853             action: STATE_SET "disabled" 0.0;
3854             target: "button_image";
3855             target: "disabler";
3856             after: "disable_text";
3857          }
3858          program { name: "disable_text";
3859             script {
3860                new st[31];
3861                new Float:vl;
3862                get_state(PART:"elm.text", st, 30, vl);
3863                if (!strcmp(st, "visible"))
3864                   set_state(PART:"elm.text", "disabled_visible", 0.0);
3865                else
3866                   set_state(PART:"elm.text", "disabled", 0.0);
3867                set_int(button_state, BUTTON_STATE_DISABLED);
3868             }
3869          }
3870          program { name: "enable";
3871             signal: "elm,state,enabled";
3872             source: "elm";
3873             action: STATE_SET "default" 0.0;
3874             target: "button_image";
3875             target: "disabler";
3876             after: "enable_text";
3877          }
3878          program { name: "enable_text";
3879             script {
3880                new st[31];
3881                new Float:vl;
3882                get_state(PART:"elm.text", st, 30, vl);
3883                if (!strcmp(st, "disabled_visible"))
3884                   set_state(PART:"elm.text", "visible", 0.0);
3885                else
3886                   set_state(PART:"elm.text", "default", 0.0);
3887                set_int(button_state, BUTTON_STATE_ENABLED);
3888             }
3889          }
3890          program { name: "focused";
3891             //signal: "elm,action,focus";
3892             //source: "elm";
3893             action: STATE_SET "focused" 0.0;
3894             target: "button_image";
3895             target: "elm.text";
3896          }
3897          program { name: "unfocused";
3898             //signal: "elm,action,unfocus";
3899             //source: "elm";
3900             action: STATE_SET "default" 0.0;
3901             target: "button_image";
3902             after: "unfocus_text";
3903          }
3904          program { name: "unfocus_text";
3905             action: STATE_SET "visible" 0.0;
3906             target: "elm.text";
3907          }
3908       }
3909    }
3910
3911   ///////////////////////////////////////////////////////////////////////////////////////
3912    group { name: "elm/button/base/picker_right";
3913       images {
3914          image: "00_color_picker_btn_right.png" COMP;
3915          image: "00_color_picker_btn_right_press.png" COMP;
3916          image: "00_color_picker_btn_right_dim.png" COMP;
3917       }
3918       script {
3919          public button_state = BUTTON_STATE_ENABLED;
3920       }
3921       parts {
3922          part { name: "button_image";
3923             mouse_events: 1;
3924             scale: 1;
3925             description { state: "default" 0.0;
3926                min: 16 38;
3927                image {
3928                   normal: "00_color_picker_btn_right.png";
3929                   border: COLORSELECTOR_BUTTON_BORDER;
3930                   border_scale: 1;
3931                }
3932             }
3933             description { state: "clicked" 0.0;
3934                inherit: "default" 0.0;
3935                image.normal: "00_color_picker_btn_right_press.png";
3936             }
3937             description { state: "disabled" 0.0;
3938                inherit: "default" 0.0;
3939                image.normal: "00_color_picker_btn_right_dim.png";
3940             }
3941             description { state: "focused" 0.0;
3942                inherit: "default" 0.0;
3943                image.normal: "00_color_picker_btn_right_press.png";
3944             }
3945          }
3946          part {
3947             name: "padding_left_top";
3948             type: RECT;
3949             scale: 1;
3950             mouse_events: 0;
3951             description { state: "default" 0.0;
3952                align: 0.0 0.0;
3953                rel1.relative: 0.0 0.0;
3954                rel2.relative: 0.0 0.0;
3955                min: 2 2;
3956                fixed: 1 1;
3957                visible: 0;
3958             }
3959          }
3960          part {
3961             name: "padding_right_bottom";
3962             type: RECT;
3963             scale: 1;
3964             mouse_events: 0;
3965             description { state: "default" 0.0;
3966                align: 1.0 1.0;
3967                rel1.relative: 1.0 1.0;
3968                rel2.relative: 1.0 1.0;
3969                min: 2 2;
3970                fixed: 1 1;
3971                visible: 0;
3972             }
3973          }
3974          part {
3975             name: "padding_icon_text";
3976             type: RECT;
3977             scale: 1;
3978             mouse_events: 0;
3979             description { state: "default" 0.0; //when only icon or no icon is there
3980                align: 0.0 0.0;
3981                rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; }
3982                rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; }
3983                fixed: 1 0;
3984                min: 0 0;
3985                color: 0 0 0 0;
3986             }
3987             description { state: "icononly" 0.0;
3988                inherit: "default" 0.0;
3989             }
3990             description { state: "visible" 0.0; //when icon is visible
3991                align: 0.0 0.0;
3992                rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; }
3993                rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; }
3994                fixed: 1 0;
3995                min: 5 0;
3996                color: 0 0 0 0;
3997             }
3998          }
3999          part { name: "elm.swallow.content";
4000             type: SWALLOW;
4001             scale: 1;
4002             description { state: "default" 0.0;
4003                visible: 0;
4004                align: 0.0 0.5;
4005                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
4006                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
4007                fixed: 1 0;
4008             }
4009             description { state: "visible" 0.0;
4010                fixed: 1 0;
4011                visible: 1;
4012                align: 0.0 0.5;
4013                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
4014                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
4015                aspect: 1.0 1.0;
4016                aspect_preference: VERTICAL;
4017             }
4018             description { state: "icononly" 0.0;
4019                visible: 1;
4020                min: 38 38;
4021                rel1 { relative: 1.0 0.0; to_x: "padding_left_top"; }
4022                rel2 { relative: 0.0 1.0; to_x: "padding_right_bottom"; }
4023                align: 0.5 0.5;
4024                aspect: 1.0 1.0;
4025                aspect_preference: VERTICAL;
4026             }
4027          }
4028          part { name: "elm.text";
4029             type: TEXT;
4030             mouse_events: 0;
4031             scale: 1;
4032             description { state: "default" 0.0;
4033                visible: 0;
4034                rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; }
4035                rel2 { relative: 0.0 0.0; to:"padding_right_bottom"; }
4036                align: 0.5 0.5;
4037                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
4038                text {
4039                   font: "SLP:style=Medium";
4040                   size: 24;
4041                   min: 0 0;
4042                   align: 0.5 0.5;
4043                }
4044             }
4045             description { state: "visible" 0.0;
4046                inherit: "default" 0.0;
4047                visible: 1;
4048                min: 90 34;
4049             }
4050             description { state: "clicked" 0.0;
4051                inherit: "default" 0.0;
4052                visible: 1;
4053                min: 0 0;
4054                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
4055             }
4056             description { state: "disabled" 0.0;
4057                inherit: "default" 0.0;
4058                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
4059             }
4060             description { state: "disabled_visible" 0.0;
4061                inherit: "default" 0.0;
4062                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
4063                visible: 1;
4064                min: 90 34;
4065             }
4066             description { state: "focused" 0.0;
4067                inherit: "default" 0.0;
4068                visible: 1;
4069                min: 0 0;
4070                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
4071             }
4072          }
4073          part { name: "over2";
4074             type: RECT;
4075             mouse_events: 1;
4076             repeat_events: 1;
4077             ignore_flags: ON_HOLD;
4078             description { state: "default" 0.0;
4079                color: 0 0 0 0;
4080             }
4081          }
4082          part { name: "over3";
4083             type: RECT;
4084             mouse_events: 1;
4085             repeat_events: 1;
4086             description { state: "default" 0.0;
4087                color: 0 0 0 0;
4088             }
4089          }
4090          part { name: "disabler";
4091             type: RECT;
4092             description { state: "default" 0.0;
4093                color: 0 0 0 0;
4094                visible: 0;
4095             }
4096             description { state: "disabled" 0.0;
4097                inherit: "default" 0.0;
4098                visible: 1;
4099             }
4100          }
4101       }
4102       programs {
4103          program { name: "button_click";
4104             signal: "mouse,down,1";
4105             source: "over2";
4106             action: SIGNAL_EMIT "elm,action,press" "";
4107             after: "button_click_anim";
4108          }
4109          program { name: "button_click_anim";
4110             action: STATE_SET "clicked" 0.0;
4111             target: "button_image";
4112             after: "text_clicked";
4113          }
4114          program { name: "text_clicked";
4115             script {
4116                new st[31];
4117                new Float:vl;
4118                get_state(PART:"elm.text", st, 30, vl);
4119                if (!strcmp(st, "visible"))
4120                   set_state(PART:"elm.text", "clicked", 0.0);
4121             }
4122          }
4123          program { name: "button_unpress";
4124             action: SIGNAL_EMIT "elm,action,unpress" "";
4125          }
4126          program { name: "button_mouseout_clicked";
4127             signal: "mouse,up,1";
4128             source: "over3";
4129             script {
4130                new st[31];
4131                new Float:vl;
4132                get_state(PART:"elm.swallow.content", st, 30, vl);
4133                if (strcmp(st, "icononly"))
4134                {
4135                   emit("elm,action,default,text,set", "");
4136                   set_state(PART:"elm.text", "visible", 0.0);
4137                }
4138                if(get_int(button_state) != BUTTON_STATE_DISABLED)
4139                   set_state(PART:"button_image", "default", 0.0);
4140             }
4141             after: button_unpress;
4142          }
4143          program { name: "button_unclick3";
4144             signal: "mouse,clicked,1";
4145             source: "over2";
4146             action: SIGNAL_EMIT "elm,action,click" "";
4147          }
4148          program { name: "text_show";
4149             signal: "elm,state,text,visible";
4150             source: "elm";
4151             script {
4152                new st[31];
4153                new Float:vl;
4154                get_state(PART:"elm.swallow.content", st, 30, vl);
4155                if (!strcmp(st, "icononly"))
4156                {
4157                   set_state(PART:"elm.swallow.content", "visible", 0.0);
4158                   set_state(PART:"padding_icon_text", "visible", 0.0);
4159                }
4160                if(get_int(button_state) != BUTTON_STATE_DISABLED)
4161                  set_state(PART:"elm.text", "visible", 0.0);
4162                else
4163                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4164             }
4165          }
4166          program { name: "text_hide";
4167             signal: "elm,state,text,hidden";
4168             source: "elm";
4169             script {
4170                new st[31];
4171                new Float:vl;
4172                get_state(PART:"elm.swallow.content", st, 30, vl);
4173                if (!strcmp(st, "visible"))
4174                {
4175                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
4176                   set_state(PART:"padding_icon_text", "icononly", 0.0);
4177                }
4178                set_state(PART:"elm.text", "default", 0.0);
4179             }
4180          }
4181          program { name: "icon_show";
4182             signal: "elm,state,icon,visible";
4183             source: "elm";
4184             script {
4185                new st[31];
4186                new Float:vl;
4187                get_state(PART:"elm.text", st, 30, vl);
4188                if (!strcmp(st, "visible"))
4189                {
4190                   set_state(PART:"elm.swallow.content", "visible", 0.0);
4191                   set_state(PART:"padding_icon_text", "visible", 0.0);
4192                }
4193                else
4194                {
4195                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
4196                   set_state(PART:"padding_icon_text", "icononly", 0.0);
4197                }
4198             }
4199          }
4200          program { name: "icon_hide";
4201             signal: "elm,state,icon,hidden";
4202             source: "elm";
4203             action: STATE_SET "default" 0.0;
4204             target: "elm.swallow.content";
4205             target: "padding_icon_text";
4206          }
4207          program { name: "disable";
4208             signal: "elm,state,disabled";
4209             source: "elm";
4210             action: STATE_SET "disabled" 0.0;
4211             target: "button_image";
4212             target: "disabler";
4213             after: "disable_text";
4214          }
4215          program { name: "disable_text";
4216             script {
4217                new st[31];
4218                new Float:vl;
4219                get_state(PART:"elm.text", st, 30, vl);
4220                if (!strcmp(st, "visible"))
4221                   set_state(PART:"elm.text", "disabled_visible", 0.0);
4222                else
4223                   set_state(PART:"elm.text", "disabled", 0.0);
4224                set_int(button_state, BUTTON_STATE_DISABLED);
4225             }
4226          }
4227          program { name: "enable";
4228             signal: "elm,state,enabled";
4229             source: "elm";
4230             action: STATE_SET "default" 0.0;
4231             target: "button_image";
4232             target: "disabler";
4233             after: "enable_text";
4234          }
4235          program { name: "enable_text";
4236             script {
4237                new st[31];
4238                new Float:vl;
4239                get_state(PART:"elm.text", st, 30, vl);
4240                if (!strcmp(st, "disabled_visible"))
4241                   set_state(PART:"elm.text", "visible", 0.0);
4242                else
4243                   set_state(PART:"elm.text", "default", 0.0);
4244                set_int(button_state, BUTTON_STATE_ENABLED);
4245             }
4246          }
4247          program { name: "focused";
4248             //signal: "elm,action,focus";
4249             //source: "elm";
4250             action: STATE_SET "focused" 0.0;
4251             target: "button_image";
4252             target: "elm.text";
4253          }
4254          program { name: "unfocused";
4255             //signal: "elm,action,unfocus";
4256             //source: "elm";
4257             action: STATE_SET "default" 0.0;
4258             target: "button_image";
4259             after: "unfocus_text";
4260          }
4261          program { name: "unfocus_text";
4262             action: STATE_SET "visible" 0.0;
4263             target: "elm.text";
4264          }
4265       }
4266    }
4267
4268 ///////////////////////////////////////////////////////////////////////////////////////
4269    group { name: "elm/button/base/hidden";
4270       images {
4271          image: "00_button_sweep.png" COMP;
4272          image: "00_button_sweep_press.png" COMP;//focus image is missing, so using press
4273    }
4274       script {
4275          public button_state = BUTTON_STATE_ENABLED;
4276       }
4277       parts {
4278          part { name: "button_image";
4279             mouse_events: 1;
4280             scale: 1;
4281             description { state: "default" 0.0;
4282                min: BUTTON_HIDDEN_BG_NORMAL_MIN_INC;
4283                image {
4284                   normal: "00_button_sweep.png";
4285                   border: BUTTON_HIDDEN_BG_BORDER_INC;
4286                   border_scale: 1;
4287                }
4288             }
4289             description { state: "clicked" 0.0;
4290                inherit: "default" 0.0;
4291                image.normal: "00_button_sweep_press.png";
4292             }
4293             description { state: "disabled" 0.0;
4294                inherit: "default" 0.0;
4295             }
4296             description { state: "focused" 0.0;
4297                inherit: "default" 0.0;
4298                image.normal: "00_button_sweep_press.png";
4299             }
4300          }
4301          part {
4302             name: "padding_left_top";
4303             type: RECT;
4304             scale: 1;
4305             mouse_events: 0;
4306             description { state: "default" 0.0;
4307                align: 0.0 0.0;
4308                rel1.relative: 0.0 0.0;
4309                rel2.relative: 0.0 0.0;
4310                min: BUTTON_HIDDEN_PADDING_MIN_INC;
4311                fixed: 1 1;
4312                visible: 0;
4313             }
4314          }
4315          part {
4316             name: "padding_right_bottom";
4317             type: RECT;
4318             scale: 1;
4319             mouse_events: 0;
4320             description { state: "default" 0.0;
4321                align: 1.0 1.0;
4322                rel1.relative: 1.0 1.0;
4323                rel2.relative: 1.0 1.0;
4324                min: BUTTON_HIDDEN_PADDING_MIN_INC;
4325                fixed: 1 1;
4326                visible: 0;
4327             }
4328          }
4329          part {
4330             name: "icon_rect";
4331             type: RECT;
4332             scale: 1;
4333             mouse_events: 0;
4334             description { state: "default" 0.0;
4335                visible: 1;
4336                min: BUTTON_HIDDEN_ICON_RECT_MIN_INC;
4337                fixed: 1 0;
4338                rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; }
4339                rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; }
4340                align: 0.0 0.5;
4341                color: 0 0 0 0;
4342             }
4343          }
4344          part {
4345             name: "padding_icon_text";
4346             type: RECT;
4347             scale: 1;
4348             mouse_events: 0;
4349             description { state: "default" 0.0; //when only icon or no icon is there
4350                align: 0.0 0.0;
4351                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
4352                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
4353                fixed: 1 0;
4354                min: 0 0;
4355                color: 0 0 0 0;
4356             }
4357             description { state: "icononly" 0.0;
4358                inherit: "default" 0.0;
4359             }
4360             description { state: "visible" 0.0; //when icon is visible
4361                align: 0.0 0.0;
4362                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
4363                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
4364                fixed: 1 0;
4365                min: BUTTON_HIDDEN_PADDING_ICON_TEXT_VISIBLE_MIN_INC;
4366                color: 0 0 0 0;
4367             }
4368          }
4369          part { name: "elm.swallow.content";
4370             type: SWALLOW;
4371             scale: 1;
4372             description { state: "default" 0.0;
4373                visible: 0;
4374                align: 0.0 0.5;
4375                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
4376                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
4377                fixed: 1 0;
4378             }
4379             description { state: "visible" 0.0;
4380                fixed: 1 0;
4381                visible: 1;
4382                align: 0.0 0.5;
4383                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
4384                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
4385                aspect: 1.0 1.0;
4386                aspect_preference: VERTICAL;
4387             }
4388             description { state: "icononly" 0.0;
4389                visible: 1;
4390                min: BUTTON_HIDDEN_ICON_ICONONLY_MIN_INC;
4391                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
4392                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
4393                align: 0.5 0.5;
4394                aspect: 1.0 1.0;
4395                aspect_preference: VERTICAL;
4396             }
4397          }
4398          part { name: "elm.text";
4399             type: TEXT;
4400             mouse_events: 0;
4401             scale: 1;
4402             description { state: "default" 0.0;
4403                visible: 0;
4404                rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; }
4405                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
4406                align: 0.5 0.5;
4407                color: BUTTON_HIDDEN_BUTTON_TEXT_NORMAL_COLOR_INC;
4408                text {
4409                   font: "SLP:style=Medium";
4410                   size: BUTTON_HIDDEN_FONT_SIZE_INC;
4411                   min: 0 0;
4412                   align: 0.5 0.5;
4413                }
4414             }
4415             description { state: "visible" 0.0;
4416                inherit: "default" 0.0;
4417                visible: 1;
4418                min: BUTTON_HIDDEN_TEXT_MIN_INC;
4419             }
4420             description { state: "clicked" 0.0;
4421                inherit: "default" 0.0;
4422                visible: 1;
4423                min: 0 0;
4424                color: BUTTON_HIDDEN_BUTTON_TEXT_PRESSED_COLOR_INC;
4425             }
4426             description { state: "disabled" 0.0;
4427                inherit: "default" 0.0;
4428                color: 0 0 0 128;
4429             }
4430             description { state: "disabled_visible" 0.0;
4431                inherit: "default" 0.0;
4432                color: BUTTON_HIDDEN_BUTTON_TEXT_DISABLED_COLOR_INC;
4433                visible: 1;
4434                min: BUTTON_HIDDEN_TEXT_MIN_INC;
4435             }
4436             description { state: "focused" 0.0;
4437                inherit: "default" 0.0;
4438                visible: 1;
4439                min: 0 0;
4440                color: BUTTON_HIDDEN_BUTTON_TEXT_FOCUSED_COLOR_INC;
4441             }
4442          }
4443          part { name: "over2";
4444             type: RECT;
4445             mouse_events: 1;
4446             repeat_events: 1;
4447             ignore_flags: ON_HOLD;
4448             description { state: "default" 0.0;
4449                color: 0 0 0 0;
4450             }
4451          }
4452          part { name: "over3";
4453             type: RECT;
4454             mouse_events: 1;
4455             repeat_events: 1;
4456             description { state: "default" 0.0;
4457                color: 0 0 0 0;
4458             }
4459          }
4460          part { name: "disabler";
4461             type: RECT;
4462             description { state: "default" 0.0;
4463                color: 0 0 0 0;
4464                visible: 0;
4465             }
4466             description { state: "disabled" 0.0;
4467                inherit: "default" 0.0;
4468                visible: 1;
4469             }
4470          }
4471       }
4472       programs {
4473          program { name: "button_click";
4474             signal: "mouse,down,1";
4475             source: "over2";
4476             action: SIGNAL_EMIT "elm,action,press" "";
4477             after: "button_click_anim";
4478          }
4479          program { name: "button_click_anim";
4480             action: STATE_SET "clicked" 0.0;
4481             target: "button_image";
4482             after: "text_clicked";
4483          }
4484          program { name: "text_clicked";
4485             script {
4486                new st[31];
4487                new Float:vl;
4488                get_state(PART:"elm.text", st, 30, vl);
4489                if (!strcmp(st, "visible"))
4490                   set_state(PART:"elm.text", "clicked", 0.0);
4491             }
4492          }
4493          program { name: "button_unpress";
4494             action: SIGNAL_EMIT "elm,action,unpress" "";
4495          }
4496          program { name: "button_mouseout_clicked";
4497             signal: "mouse,up,1";
4498             source: "over3";
4499             script {
4500                new st[31];
4501                new Float:vl;
4502                get_state(PART:"elm.swallow.content", st, 30, vl);
4503                if (strcmp(st, "icononly"))
4504                {
4505                   emit("elm,action,default,text,set", "");
4506                   set_state(PART:"elm.text", "visible", 0.0);
4507                }
4508                if(get_int(button_state) != BUTTON_STATE_DISABLED)
4509                   set_state(PART:"button_image", "default", 0.0);
4510             }
4511             after: button_unpress;
4512          }
4513          program { name: "button_unclick3";
4514             signal: "mouse,clicked,1";
4515             source: "over2";
4516             action: SIGNAL_EMIT "elm,action,click" "";
4517          }
4518          program { name: "text_show";
4519             signal: "elm,state,text,visible";
4520             source: "elm";
4521             script {
4522                new st[31];
4523                new Float:vl;
4524                get_state(PART:"elm.swallow.content", st, 30, vl);
4525                if (!strcmp(st, "icononly"))
4526                {
4527                   set_state(PART:"elm.swallow.content", "visible", 0.0);
4528                   set_state(PART:"padding_icon_text", "visible", 0.0);
4529                }
4530                if(get_int(button_state) != BUTTON_STATE_DISABLED)
4531                  set_state(PART:"elm.text", "visible", 0.0);
4532                else
4533                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4534             }
4535          }
4536          program { name: "text_hide";
4537             signal: "elm,state,text,hidden";
4538             source: "elm";
4539             script {
4540                new st[31];
4541                new Float:vl;
4542                get_state(PART:"elm.swallow.content", st, 30, vl);
4543                if (!strcmp(st, "visible"))
4544                {
4545                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
4546                   set_state(PART:"padding_icon_text", "icononly", 0.0);
4547                }
4548                set_state(PART:"elm.text", "default", 0.0);
4549             }
4550          }
4551          program { name: "icon_show";
4552             signal: "elm,state,icon,visible";
4553             source: "elm";
4554             script {
4555                new st[31];
4556                new Float:vl;
4557                get_state(PART:"elm.text", st, 30, vl);
4558                if (!strcmp(st, "visible"))
4559                {
4560                   set_state(PART:"elm.swallow.content", "visible", 0.0);
4561                   set_state(PART:"padding_icon_text", "visible", 0.0);
4562                }
4563                else
4564                {
4565                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
4566                   set_state(PART:"padding_icon_text", "icononly", 0.0);
4567                }
4568             }
4569          }
4570          program { name: "icon_hide";
4571             signal: "elm,state,icon,hidden";
4572             source: "elm";
4573             action: STATE_SET "default" 0.0;
4574             target: "elm.swallow.content";
4575             target: "padding_icon_text";
4576          }
4577          program { name: "disable";
4578             signal: "elm,state,disabled";
4579             source: "elm";
4580             action: STATE_SET "disabled" 0.0;
4581             target: "button_image";
4582             target: "disabler";
4583             after: "disable_text";
4584          }
4585          program { name: "disable_text";
4586             script {
4587                new st[31];
4588                new Float:vl;
4589                get_state(PART:"elm.text", st, 30, vl);
4590                if (!strcmp(st, "visible"))
4591                   set_state(PART:"elm.text", "disabled_visible", 0.0);
4592                else
4593                   set_state(PART:"elm.text", "disabled", 0.0);
4594                set_int(button_state, BUTTON_STATE_DISABLED);
4595             }
4596          }
4597          program { name: "enable";
4598             signal: "elm,state,enabled";
4599             source: "elm";
4600             action: STATE_SET "default" 0.0;
4601             target: "button_image";
4602             target: "disabler";
4603             after: "enable_text";
4604          }
4605          program { name: "enable_text";
4606             script {
4607                new st[31];
4608                new Float:vl;
4609                get_state(PART:"elm.text", st, 30, vl);
4610                if (!strcmp(st, "disabled_visible"))
4611                   set_state(PART:"elm.text", "visible", 0.0);
4612                else
4613                   set_state(PART:"elm.text", "default", 0.0);
4614                set_int(button_state, BUTTON_STATE_ENABLED);
4615             }
4616          }
4617          program { name: "focused";
4618             //signal: "elm,action,focus";
4619             //source: "elm";
4620             action: STATE_SET "focused" 0.0;
4621             target: "button_image";
4622             target: "elm.text";
4623          }
4624          program { name: "unfocused";
4625             //signal: "elm,action,unfocus";
4626             //source: "elm";
4627             action: STATE_SET "default" 0.0;
4628             target: "button_image";
4629             after: "unfocus_text";
4630          }
4631          program { name: "unfocus_text";
4632             action: STATE_SET "visible" 0.0;
4633             target: "elm.text";
4634          }
4635       }
4636    }
4637
4638 ///////////////////////////////////////////////////////////////////////////////////////
4639    group { name: "elm/button/base/picker/bar/default";
4640       images {
4641          image: "00_picker_btn_normal.png" COMP;
4642          image: "00_picker_btn_press.png" COMP;
4643       }
4644       script {
4645          public button_state = BUTTON_STATE_ENABLED;
4646       }
4647       parts {
4648          part { name: "button_image";
4649             scale: 1;
4650             description { state: "default" 0.0;
4651                min: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_MIN_INC;
4652                image {
4653                   normal: "00_picker_btn_normal.png";
4654                   border: BUTTON_PICKER_BAR_DEFAULT_BG_DEFAULT_IMAGE_BORDER_INC;
4655                   border_scale: 1;
4656                }
4657             }
4658             description { state: "clicked" 0.0;
4659                inherit: "default" 0.0;
4660                image {
4661                   normal: "00_picker_btn_press.png";
4662                }
4663             }
4664             description { state: "disabled" 0.0;
4665                inherit: "default" 0.0;
4666             }
4667             description { state: "focused" 0.0;
4668                inherit: "default" 0.0;
4669                image {
4670                   normal: "00_picker_btn_press.png";
4671                }
4672             }
4673          }
4674          part { name: "padding_left_top";
4675             type: RECT;
4676             scale: 1;
4677             mouse_events: 0;
4678             description { state: "default" 0.0;
4679                align: 0.0 0.0;
4680                rel2 {
4681                   relative: 0.0 0.0;
4682                }
4683                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC;
4684                fixed: 1 1;
4685                visible: 0;
4686             }
4687          }
4688          part { name: "padding_right_bottom";
4689             type: RECT;
4690             scale: 1;
4691             mouse_events: 0;
4692             description { state: "default" 0.0;
4693                align: 1.0 1.0;
4694                rel1 {
4695                   relative: 1.0 1.0;
4696                }
4697                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_MIN_INC;
4698                fixed: 1 1;
4699                visible: 0;
4700             }
4701          }
4702          part { name: "icon_rect";
4703             type: RECT;
4704             scale: 1;
4705             mouse_events: 0;
4706             description { state: "default" 0.0;
4707                min: BUTTON_PICKER_BAR_DEFAULT_ICON_RECT_DEFAULT_MIN_INC;
4708                fixed: 1 0;
4709                rel1 {
4710                   relative: 0.0 1.0;
4711                   to_x: "elm.swallow.content";
4712                   to_y: "padding_left_top";
4713                }
4714                rel2 {
4715                   relative: 1.0 0.0;
4716                   to_x: "elm.swallow.content";
4717                   to_y: "padding_right_bottom";
4718                }
4719                align: 0.0 0.5;
4720                color: 0 0 0 0;
4721             }
4722          }
4723          part { name: "padding_icon_text";
4724             type: RECT;
4725             scale: 1;
4726             mouse_events: 0;
4727             description { state: "default" 0.0; //when only icon or no icon is there
4728                align: 0.0 0.0;
4729                rel1 {
4730                   relative: 1.0 0.0;
4731                   to: "icon_rect";
4732                }
4733                rel2 {
4734                   to: "icon_rect";
4735                }
4736                fixed: 1 0;
4737                min: 0 0;
4738                color: 0 0 0 0;
4739             }
4740             description { state: "icononly" 0.0;
4741                inherit: "default" 0.0;
4742             }
4743             description { state: "visible" 0.0; //when icon is visible
4744                align: 0.0 0.0;
4745                rel1 {
4746                   relative: 1.0 0.0;
4747                   to: "icon_rect";
4748                }
4749                rel2 {
4750                   to: "icon_rect";
4751                }
4752                fixed: 1 0;
4753                min: BUTTON_PICKER_BAR_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC;
4754                color: 0 0 0 0;
4755             }
4756          }
4757          part { name: "elm.swallow.content";
4758             type: SWALLOW;
4759             scale: 1;
4760             clip_to: "clipper";
4761             description { state: "default" 0.0;
4762                visible: 0;
4763                align: 0.0 0.5;
4764                rel1 {
4765                   relative: 1.0 1.0;
4766                   to: "padding_left_top";
4767                }
4768                rel2 {
4769                   relative: 1.0 0.0;
4770                   to_x: "padding_left_top";
4771                   to_y: "padding_right_bottom";
4772                }
4773                fixed: 1 0;
4774             }
4775             description { state: "visible" 0.0;
4776                fixed: 1 0;
4777                align: 0.0 0.5;
4778                rel1 {
4779                   relative: 1.0 1.0;
4780                   to: "padding_left_top";
4781                }
4782                rel2 {
4783                   relative: 1.0 0.0;
4784                   to_x: "padding_left_top";
4785                   to_y: "padding_right_bottom";
4786                }
4787                aspect: 1.0 1.0;
4788                aspect_preference: VERTICAL;
4789             }
4790             description { state: "icononly" 0.0;
4791                min: BUTTON_PICKER_BAR_DEFAULT_CONTENT_ICONONLY_MIN_INC;
4792                rel1 {
4793                   relative: 1.0 1.0;
4794                   to: "padding_left_top";
4795                }
4796                rel2 {
4797                   relative: 1.0 0.0;
4798                   to_x: "padding_left_top";
4799                   to_y: "padding_right_bottom";
4800                }
4801                aspect: 1.0 1.0;
4802                aspect_preference: VERTICAL;
4803             }
4804          }
4805          part { name: "elm.text";
4806             type: TEXT;
4807             mouse_events: 0;
4808             scale: 1;
4809             clip_to: "clipper";
4810             description { state: "default" 0.0;
4811                visible: 0;
4812                rel1 {
4813                   relative: 1.0 1.0;
4814                   to_x: "padding_icon_text";
4815                   to_y: "padding_left_top";
4816                }
4817                rel2 {
4818                   relative: 0.0 0.0;
4819                   to: "padding_right_bottom";
4820                }
4821                color: 78 73 69 255;
4822                text {
4823                   font: "SLP:style=Medium";
4824                   size: BUTTON_PICKER_BAR_DEFAULT_TEXT_FONT_SIZE_INC;
4825                   min: 1 0;
4826                   max: 0 0;
4827                }
4828             }
4829             description { state: "visible" 0.0;
4830                inherit: "default" 0.0;
4831                visible: 1;
4832                min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC;
4833             }
4834             description { state: "clicked" 0.0;
4835                inherit: "default" 0.0;
4836                visible: 1;
4837                min: 0 0;
4838                color: 255 255 255 255;
4839             }
4840             description { state: "disabled" 0.0;
4841                inherit: "default" 0.0;
4842                color: 0 0 0 128;
4843             }
4844             description { state: "disabled_visible" 0.0;
4845                inherit: "default" 0.0;
4846                color: 0 0 0 128;
4847                visible: 1;
4848                min: BUTTON_PICKER_BAR_DEFAULT_TEXT_VISIBLE_MIN_INC;
4849             }
4850             description { state: "focused" 0.0;
4851                inherit: "default" 0.0;
4852                visible: 1;
4853                min: 0 0;
4854                color: 255 255 255 255;
4855             }
4856          }
4857          part { name: "over2";
4858             type: RECT;
4859             repeat_events: 1;
4860             ignore_flags: ON_HOLD;
4861             description { state: "default" 0.0;
4862                color: 0 0 0 0;
4863             }
4864          }
4865          part { name: "over3";
4866             type: RECT;
4867             repeat_events: 1;
4868             description { state: "default" 0.0;
4869                color: 0 0 0 0;
4870             }
4871          }
4872          part { name: "clipper";
4873             type: RECT;
4874             description { state: "default" 0.0;
4875                color: 255 255 255 255;
4876             }
4877          }
4878          part { name: "disabler";
4879             type: RECT;
4880             description { state: "default" 0.0;
4881                color: 0 0 0 0;
4882                visible: 0;
4883             }
4884             description { state: "disabled" 0.0;
4885                inherit: "default" 0.0;
4886                visible: 1;
4887             }
4888          }
4889       }
4890       programs {
4891          program { name: "button_click";
4892             signal: "mouse,down,1";
4893             source: "over2";
4894             action: SIGNAL_EMIT "elm,action,press" "";
4895             after: "button_click_anim";
4896          }
4897          program { name: "button_click_anim";
4898             action: STATE_SET "clicked" 0.0;
4899             target: "button_image";
4900             after: "text_clicked";
4901          }
4902          program { name: "text_clicked";
4903             script {
4904                new st[31];
4905                new Float:vl;
4906                get_state(PART:"elm.text", st, 30, vl);
4907                if (!strcmp(st, "visible"))
4908                  set_state(PART:"elm.text", "clicked", 0.0);
4909             }
4910          }
4911          program { name: "button_unpress";
4912             action: SIGNAL_EMIT "elm,action,unpress" "";
4913          }
4914          program { name: "button_mouseout_clicked";
4915             signal: "mouse,up,1";
4916             source: "over3";
4917             script {
4918                new st[31];
4919                new Float:vl;
4920                get_state(PART:"elm.swallow.content", st, 30, vl);
4921                if (strcmp(st, "icononly"))
4922                  {
4923                     emit("elm,action,default,text,set", "");
4924                     set_state(PART:"elm.text", "visible", 0.0);
4925                  }
4926                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4927                  set_state(PART:"button_image", "default", 0.0);
4928             }
4929             after: button_unpress;
4930          }
4931          program { name: "button_unclick3";
4932             signal: "mouse,clicked,1";
4933             source: "over2";
4934             action: SIGNAL_EMIT "elm,action,click" "";
4935          }
4936          program { name: "text_show";
4937             signal: "elm,state,text,visible";
4938             source: "elm";
4939             script {
4940                new st[31];
4941                new Float:vl;
4942                get_state(PART:"elm.swallow.content", st, 30, vl);
4943                if (!strcmp(st, "icononly"))
4944                  {
4945                     set_state(PART:"elm.swallow.content", "visible", 0.0);
4946                     set_state(PART:"padding_icon_text", "visible", 0.0);
4947                  }
4948                if (get_int(button_state) != BUTTON_STATE_DISABLED)
4949                  set_state(PART:"elm.text", "visible", 0.0);
4950                else
4951                  set_state(PART:"elm.text", "disabled_visible", 0.0);
4952             }
4953          }
4954          program { name: "text_hide";
4955             signal: "elm,state,text,hidden";
4956             source: "elm";
4957             script {
4958                new st[31];
4959                new Float:vl;
4960                get_state(PART:"elm.swallow.content", st, 30, vl);
4961                if (!strcmp(st, "visible"))
4962                  {
4963                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
4964                     set_state(PART:"padding_icon_text", "icononly", 0.0);
4965                  }
4966                set_state(PART:"elm.text", "default", 0.0);
4967             }
4968          }
4969          program { name: "icon_show";
4970             signal: "elm,state,icon,visible";
4971             source: "elm";
4972             script {
4973                new st[31];
4974                new Float:vl;
4975                get_state(PART:"elm.text", st, 30, vl);
4976                if (!strcmp(st, "visible"))
4977                  {
4978                     set_state(PART:"elm.swallow.content", "visible", 0.0);
4979                     set_state(PART:"padding_icon_text", "visible", 0.0);
4980                  }
4981                else
4982                  {
4983                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
4984                     set_state(PART:"padding_icon_text", "icononly", 0.0);
4985                  }
4986             }
4987          }
4988          program { name: "icon_hide";
4989             signal: "elm,state,icon,hidden";
4990             source: "elm";
4991             action: STATE_SET "default" 0.0;
4992             target: "elm.swallow.content";
4993             target: "padding_icon_text";
4994          }
4995          program { name: "disable";
4996             signal: "elm,state,disabled";
4997             source: "elm";
4998             action: STATE_SET "disabled" 0.0;
4999             target: "button_image";
5000             target: "disabler";
5001             after: "disable_text";
5002          }
5003          program { name: "disable_text";
5004             script {
5005                new st[31];
5006                new Float:vl;
5007                get_state(PART:"elm.text", st, 30, vl);
5008                if (!strcmp(st, "visible"))
5009                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5010                else
5011                  set_state(PART:"elm.text", "disabled", 0.0);
5012                set_int(button_state, BUTTON_STATE_DISABLED);
5013             }
5014          }
5015          program { name: "enable";
5016             signal: "elm,state,enabled";
5017             source: "elm";
5018             action: STATE_SET "default" 0.0;
5019             target: "button_image";
5020             target: "disabler";
5021             after: "enable_text";
5022          }
5023          program { name: "enable_text";
5024             script {
5025                new st[31];
5026                new Float:vl;
5027                get_state(PART:"elm.text", st, 30, vl);
5028                if (!strcmp(st, "disabled_visible"))
5029                  set_state(PART:"elm.text", "visible", 0.0);
5030                else
5031                  set_state(PART:"elm.text", "default", 0.0);
5032                set_int(button_state, BUTTON_STATE_ENABLED);
5033             }
5034          }
5035          program { name: "focused";
5036             //signal: "elm,action,focus";
5037             //source: "elm";
5038             action: STATE_SET "focused" 0.0;
5039             target: "button_image";
5040             target: "elm.text";
5041          }
5042          program { name: "unfocused";
5043             //signal: "elm,action,unfocus";
5044             //source: "elm";
5045             action: STATE_SET "default" 0.0;
5046             target: "button_image";
5047             after: "unfocus_text";
5048          }
5049          program { name: "unfocus_text";
5050             action: STATE_SET "visible" 0.0;
5051             target: "elm.text";
5052          }
5053       }
5054    }
5055
5056 ///////////////////////////////////////////////////////////////////////////////////////
5057    group { name: "elm/button/base/picker/prev/text/default";
5058       alias: "elm/button/base/picker/next/text/default";
5059       images {
5060          image: "00_picker_btn_normal.png" COMP;
5061          image: "00_picker_btn_press.png" COMP;
5062       }
5063       script {
5064          public button_state = BUTTON_STATE_ENABLED;
5065       }
5066       parts {
5067          part { name: "button_image";
5068             scale: 1;
5069             description { state: "default" 0.0;
5070                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_MIN_INC;
5071                image {
5072                   normal: "00_picker_btn_normal.png";
5073                   border: BUTTON_PICKER_PREV_TEXT_DEFAULT_BG_DEFAULT_BORDER_INC;
5074                   border_scale: 1;
5075                }
5076             }
5077             description { state: "clicked" 0.0;
5078                inherit: "default" 0.0;
5079                image {
5080                   normal: "00_picker_btn_press.png";
5081                }
5082             }
5083             description { state: "disabled" 0.0;
5084                inherit: "default" 0.0;
5085             }
5086             description { state: "focused" 0.0;
5087                inherit: "default" 0.0;
5088                image {
5089                   normal: "00_picker_btn_press.png";
5090                }
5091             }
5092          }
5093          part { name: "padding_left_top";
5094             type: RECT;
5095             scale: 1;
5096             mouse_events: 0;
5097             description { state: "default" 0.0;
5098                align: 0.0 0.0;
5099                rel2 {
5100                   relative: 0.0 0.0;
5101                }
5102                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC;
5103                fixed: 1 1;
5104                visible: 0;
5105             }
5106          }
5107          part { name: "padding_right_bottom";
5108             type: RECT;
5109             scale: 1;
5110             mouse_events: 0;
5111             description { state: "default" 0.0;
5112                align: 1.0 1.0;
5113                rel1 {
5114                   relative: 1.0 1.0;
5115                }
5116                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_MIN_INC;
5117                fixed: 1 1;
5118                visible: 0;
5119             }
5120          }
5121          part { name: "icon_rect";
5122             type: RECT;
5123             scale: 1;
5124             mouse_events: 0;
5125             description { state: "default" 0.0;
5126                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_ICON_RECT_MIN_INC;
5127                fixed: 1 0;
5128                rel1 {
5129                   relative: 0.0 1.0;
5130                   to_x: "elm.swallow.content";
5131                   to_y: "padding_left_top";
5132                }
5133                rel2 {
5134                   relative: 1.0 0.0;
5135                   to_x: "elm.swallow.content";
5136                   to_y: "padding_right_bottom";
5137                }
5138                align: 0.0 0.5;
5139                color: 0 0 0 0;
5140             }
5141          }
5142          part { name: "padding_icon_text";
5143             type: RECT;
5144             scale: 1;
5145             mouse_events: 0;
5146             description { state: "default" 0.0; //when only icon or no icon is there
5147                align: 0.0 0.0;
5148                rel1 {
5149                   relative: 1.0 0.0;
5150                   to: "icon_rect";
5151                }
5152                rel2 {
5153                   to: "icon_rect";
5154                }
5155                fixed: 1 0;
5156                min: 0 0;
5157                color: 0 0 0 0;
5158             }
5159             description { state: "icononly" 0.0;
5160                inherit: "default" 0.0;
5161             }
5162             description { state: "visible" 0.0; //when icon is visible
5163                align: 0.0 0.0;
5164                rel1 {
5165                   relative: 1.0 0.0;
5166                   to: "icon_rect";
5167                }
5168                rel2 {
5169                   to: "icon_rect";
5170                }
5171                fixed: 1 0;
5172                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_PADDING_ICON_RECT_TEXT_MIN_INC;
5173                color: 0 0 0 0;
5174             }
5175          }
5176          part { name: "elm.swallow.content";
5177             type: SWALLOW;
5178             scale: 1;
5179             clip_to: "clipper";
5180             description { state: "default" 0.0;
5181                visible: 0;
5182                align: 0.0 0.5;
5183                rel1 {
5184                   relative: 1.0 1.0;
5185                   to: "padding_left_top";
5186                }
5187                rel2 {
5188                   relative: 1.0 0.0;
5189                   to_x: "padding_left_top";
5190                   to_y: "padding_right_bottom";
5191                }
5192                fixed: 1 0;
5193             }
5194             description { state: "visible" 0.0;
5195                fixed: 1 0;
5196                align: 0.0 0.5;
5197                rel1 {
5198                   relative: 1.0 1.0;
5199                   to: "padding_left_top";
5200                }
5201                rel2 {
5202                   relative: 1.0 0.0;
5203                   to_x: "padding_left_top";
5204                   to_y: "padding_right_bottom";
5205                }
5206                aspect: 1.0 1.0;
5207                aspect_preference: VERTICAL;
5208             }
5209             description { state: "icononly" 0.0;
5210                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_CONTENT_ICON_ONLY_MIN_INC;
5211                rel1 {
5212                   relative: 1.0 1.0;
5213                   to: "padding_left_top";
5214                }
5215                rel2 {
5216                   relative: 1.0 0.0;
5217                   to_x: "padding_left_top";
5218                   to_y: "padding_right_bottom";
5219                }
5220                aspect: 1.0 1.0;
5221                aspect_preference: VERTICAL;
5222             }
5223          }
5224          part { name: "elm.text";
5225             type: TEXT;
5226             mouse_events: 0;
5227             scale: 1;
5228             clip_to: "clipper";
5229             description { state: "default" 0.0;
5230                visible: 0;
5231                rel1 {
5232                   relative: 1.0 1.0;
5233                   to_x: "padding_icon_text";
5234                   to_y: "padding_left_top";
5235                }
5236                rel2 {
5237                   relative: 0.0 0.0;
5238                   to: "padding_right_bottom";
5239                }
5240                color: 78 73 69 255;
5241                text {
5242                   font: "SLP:style=Medium";
5243                   size: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_FONT_SIZE_INC;
5244                   min: 1 0;
5245                   max: 1 0;
5246                }
5247             }
5248             description { state: "visible" 0.0;
5249                inherit: "default" 0.0;
5250                visible: 1;
5251                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC;
5252             }
5253             description { state: "clicked" 0.0;
5254                inherit: "default" 0.0;
5255                visible: 1;
5256                min: 0 0;
5257                color: 255 255 255 255;
5258             }
5259             description { state: "disabled" 0.0;
5260                inherit: "default" 0.0;
5261                color: 0 0 0 128;
5262             }
5263             description { state: "disabled_visible" 0.0;
5264                inherit: "default" 0.0;
5265                color: 0 0 0 128;
5266                visible: 1;
5267                min: BUTTON_PICKER_PREV_TEXT_DEFAULT_TEXT_VISIBLE_MIN_INC;
5268             }
5269             description { state: "focused" 0.0;
5270                inherit: "default" 0.0;
5271                visible: 1;
5272                min: 0 0;
5273                color: 255 255 255 255;
5274             }
5275          }
5276          part { name: "over2";
5277             type: RECT;
5278             repeat_events: 1;
5279             ignore_flags: ON_HOLD;
5280             description { state: "default" 0.0;
5281                color: 0 0 0 0;
5282             }
5283          }
5284          part { name: "over3";
5285             type: RECT;
5286             repeat_events: 1;
5287             description { state: "default" 0.0;
5288                color: 0 0 0 0;
5289             }
5290          }
5291          part { name: "clipper";
5292             type: RECT;
5293             description { state: "default" 0.0;
5294                color: 255 255 255 255;
5295             }
5296          }
5297          part { name: "disabler";
5298             type: RECT;
5299             description { state: "default" 0.0;
5300                color: 0 0 0 0;
5301                visible: 0;
5302             }
5303             description { state: "disabled" 0.0;
5304                inherit: "default" 0.0;
5305                visible: 1;
5306             }
5307          }
5308       }
5309       programs {
5310          program { name: "button_click";
5311             signal: "mouse,down,1";
5312             source: "over2";
5313             action: SIGNAL_EMIT "elm,action,press" "";
5314             after: "button_click_anim";
5315          }
5316          program { name: "button_click_anim";
5317             action: STATE_SET "clicked" 0.0;
5318             target: "button_image";
5319             after: "text_clicked";
5320          }
5321          program { name: "text_clicked";
5322             script {
5323                new st[31];
5324                new Float:vl;
5325                get_state(PART:"elm.text", st, 30, vl);
5326                if (!strcmp(st, "visible"))
5327                  set_state(PART:"elm.text", "clicked", 0.0);
5328             }
5329          }
5330          program { name: "button_unpress";
5331             action: SIGNAL_EMIT "elm,action,unpress" "";
5332          }
5333          program { name: "button_mouseout_clicked";
5334             signal: "mouse,up,1";
5335             source: "over3";
5336             script {
5337                new st[31];
5338                new Float:vl;
5339                get_state(PART:"elm.swallow.content", st, 30, vl);
5340                if (strcmp(st, "icononly"))
5341                  {
5342                     emit("elm,action,default,text,set", "");
5343                     set_state(PART:"elm.text", "visible", 0.0);
5344                  }
5345                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5346                  set_state(PART:"button_image", "default", 0.0);
5347             }
5348             after: button_unpress;
5349          }
5350          program { name: "button_unclick3";
5351             signal: "mouse,clicked,1";
5352             source: "over2";
5353             action: SIGNAL_EMIT "elm,action,click" "";
5354          }
5355          program { name: "text_show";
5356             signal: "elm,state,text,visible";
5357             source: "elm";
5358             script {
5359                new st[31];
5360                new Float:vl;
5361                get_state(PART:"elm.swallow.content", st, 30, vl);
5362                if (!strcmp(st, "icononly"))
5363                  {
5364                     set_state(PART:"elm.swallow.content", "visible", 0.0);
5365                     set_state(PART:"padding_icon_text", "visible", 0.0);
5366                  }
5367                if (get_int(button_state) != BUTTON_STATE_DISABLED)
5368                  set_state(PART:"elm.text", "visible", 0.0);
5369                else
5370                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5371             }
5372          }
5373          program { name: "text_hide";
5374             signal: "elm,state,text,hidden";
5375             source: "elm";
5376             script {
5377                new st[31];
5378                new Float:vl;
5379                get_state(PART:"elm.swallow.content", st, 30, vl);
5380                if (!strcmp(st, "visible"))
5381                  {
5382                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
5383                     set_state(PART:"padding_icon_text", "icononly", 0.0);
5384                  }
5385                set_state(PART:"elm.text", "default", 0.0);
5386             }
5387          }
5388          program { name: "icon_show";
5389             signal: "elm,state,icon,visible";
5390             source: "elm";
5391             script {
5392                new st[31];
5393                new Float:vl;
5394                get_state(PART:"elm.text", st, 30, vl);
5395                if (!strcmp(st, "visible"))
5396                  {
5397                     set_state(PART:"elm.swallow.content", "visible", 0.0);
5398                     set_state(PART:"padding_icon_text", "visible", 0.0);
5399                  }
5400                else
5401                  {
5402                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
5403                     set_state(PART:"padding_icon_text", "icononly", 0.0);
5404                  }
5405             }
5406          }
5407          program { name: "icon_hide";
5408             signal: "elm,state,icon,hidden";
5409             source: "elm";
5410             action: STATE_SET "default" 0.0;
5411             target: "elm.swallow.content";
5412             target: "padding_icon_text";
5413          }
5414          program { name: "disable";
5415             signal: "elm,state,disabled";
5416             source: "elm";
5417             action: STATE_SET "disabled" 0.0;
5418             target: "button_image";
5419             target: "disabler";
5420             after: "disable_text";
5421          }
5422          program { name: "disable_text";
5423             script {
5424                new st[31];
5425                new Float:vl;
5426                get_state(PART:"elm.text", st, 30, vl);
5427                if (!strcmp(st, "visible"))
5428                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5429                else
5430                  set_state(PART:"elm.text", "disabled", 0.0);
5431                set_int(button_state, BUTTON_STATE_DISABLED);
5432             }
5433          }
5434          program { name: "enable";
5435             signal: "elm,state,enabled";
5436             source: "elm";
5437             action: STATE_SET "default" 0.0;
5438             target: "button_image";
5439             target: "disabler";
5440             after: "enable_text";
5441          }
5442          program { name: "enable_text";
5443             script {
5444                new st[31];
5445                new Float:vl;
5446                get_state(PART:"elm.text", st, 30, vl);
5447                if (!strcmp(st, "disabled_visible"))
5448                  set_state(PART:"elm.text", "visible", 0.0);
5449                else
5450                  set_state(PART:"elm.text", "default", 0.0);
5451                set_int(button_state, BUTTON_STATE_ENABLED);
5452             }
5453          }
5454          program { name: "focused";
5455             //signal: "elm,action,focus";
5456             //source: "elm";
5457             action: STATE_SET "focused" 0.0;
5458             target: "button_image";
5459             target: "elm.text";
5460          }
5461          program { name: "unfocused";
5462             //signal: "elm,action,unfocus";
5463             //source: "elm";
5464             action: STATE_SET "default" 0.0;
5465             target: "button_image";
5466             after: "unfocus_text";
5467          }
5468          program { name: "unfocus_text";
5469             action: STATE_SET "visible" 0.0;
5470             target: "elm.text";
5471          }
5472       }
5473    }
5474
5475 ///////////////////////////////////////////////////////////////////////////////////////
5476    group { name: "elm/button/base/contact";
5477       alias: "elm/button/base/text_only/contact";
5478       script {
5479          public button_state = BUTTON_STATE_ENABLED;
5480       }
5481       parts {
5482          part { name: "button_image";
5483                 type: RECT;
5484             mouse_events: 1;
5485             scale: 1;
5486             description { state: "default" 0.0;
5487                rel1 { to_x: "padding.left"; to_y: "elm.text"; }
5488                rel2 { to_x: "padding.right"; to_y: "elm.text"; }
5489                min: BUTTON_CONTACT_BG_NORMAL_MIN_INC;
5490                color: BUTTON_CONTACT_BUTTON_BG_NORMAL_COLOR_INC;
5491             }
5492             description { state: "clicked" 0.0;
5493                inherit: "default" 0.0;
5494                color: BUTTON_CONTACT_BUTTON_BG_PRESSED_COLOR_INC ;
5495             }
5496             description { state: "disabled" 0.0;
5497                inherit: "default" 0.0;
5498             }
5499             description { state: "focused" 0.0;
5500                inherit: "default" 0.0;
5501             }
5502          }
5503          part { name: "padding.left";
5504             type: RECT;
5505             scale: 1;
5506             description { state: "default" 0.0;
5507                visible: 0;
5508                min: BUTTON_CONTACT_PADDING_MIN_INC;
5509                fixed: 1 0;
5510                color: 0 0 0 0;
5511                rel1.relative: 0 0;
5512                rel2 { relative: 0.0 1.0; to_x: "elm.text"; }
5513                align: 1 0;
5514             }
5515          }
5516          part { name: "padding.right";
5517             type: RECT;
5518             scale: 1;
5519             description { state: "default" 0.0;
5520                visible: 0;
5521                min: BUTTON_CONTACT_PADDING_MIN_INC;
5522                fixed: 1 0;
5523                color: 0 0 0 0;
5524                rel1 { relative: 1.0 0.0; to_x: "elm.text"; }
5525                rel2.relative: 1.0 1.0;
5526                align: 0 0;
5527             }
5528          }
5529          part {   name: "elm.text";
5530             type: TEXT;
5531             mouse_events: 0;
5532             scale: 1;
5533             description { state: "default" 0.0;
5534                visible: 0;
5535                fixed: 1 1;
5536                align: 0.5 0.5;
5537                color: BUTTON_CONTACT_BUTTON_TEXT_NORMAL_COLOR_INC;
5538                text {
5539                   font: "SLP:style=Medium";
5540                   size: BUTTON_CONTACT_FONT_SIZE_INC;
5541                   min: 1 1;
5542                   align: 0.5 0.5;
5543                }
5544             }
5545             description { state: "visible" 0.0;
5546                inherit: "default" 0.0;
5547                visible: 1;
5548                min: 1 1;
5549             }
5550             description { state: "clicked" 0.0;
5551                inherit: "default" 0.0;
5552                visible: 1;
5553                min: 1 1;
5554                color: BUTTON_CONTACT_BUTTON_TEXT_PRESSED_COLOR_INC;
5555             }
5556             description { state: "disabled" 0.0;
5557                inherit: "default" 0.0;
5558                color: 0 0 0 128;
5559             }
5560             description { state: "disabled_visible" 0.0;
5561                inherit: "default" 0.0;
5562                color: BUTTON_CONTACT_BUTTON_TEXT_DISABLED_COLOR_INC;
5563                visible: 1;
5564                min: 1 1;
5565             }
5566             description { state: "focused" 0.0;
5567                inherit: "default" 0.0;
5568                visible: 1;
5569                min: 1 1;
5570                color: BUTTON_CONTACT_BUTTON_TEXT_FOCUSED_COLOR_INC;
5571             }
5572          }
5573          part { name: "over1";
5574             mouse_events: 0;
5575             description { state: "default" 0.0;
5576                rel2.relative: 1.0 0.5;
5577             }
5578          }
5579          part { name: "over2";
5580             mouse_events: 1;
5581             repeat_events: 1;
5582             ignore_flags: ON_HOLD;
5583             description { state: "default" 0.0;
5584             rel1.to: "button_image";
5585             rel2.to: "button_image";
5586             }
5587          }
5588          part { name: "over3";
5589             mouse_events: 1;
5590             repeat_events: 1;
5591             description { state: "default" 0.0;
5592             rel1.to: "button_image";
5593             rel2.to: "button_image";
5594                color: 0 0 0 0;
5595             }
5596          }
5597          part { name: "disabler";
5598             type: RECT;
5599             description { state: "default" 0.0;
5600                rel1.to: "button_image";
5601                rel2.to: "button_image";
5602                color: 0 0 0 0;
5603                visible: 0;
5604             }
5605             description { state: "disabled" 0.0;
5606                inherit: "default" 0.0;
5607                visible: 1;
5608             }
5609          }
5610       }
5611       programs {
5612          program { name: "button_click";
5613             signal: "mouse,down,1";
5614             source: "over2";
5615             action: SIGNAL_EMIT "elm,action,press" "";
5616             after: "button_click_anim";
5617          }
5618          program { name: "button_click_anim";
5619             action: STATE_SET "clicked" 0.0;
5620             target: "button_image";
5621             target: "elm.text";
5622          }
5623          program { name: "button_unpress";
5624             action: SIGNAL_EMIT "elm,action,unpress" "";
5625          }
5626          program { name: "button_mouseout_clicked";
5627             signal: "mouse,up,1";
5628             source: "over3";
5629             script {
5630                new st[31];
5631                new Float:vl;
5632                get_state(PART:"elm.text", st, 30, vl);
5633                if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
5634                {
5635                   emit("elm,action,default,text,set", "");
5636                   set_state(PART:"elm.text", "visible", 0.0);
5637                }
5638                if(get_int(button_state) != BUTTON_STATE_DISABLED)
5639                   set_state(PART:"button_image", "default", 0.0);
5640             }
5641             after: button_unpress;
5642          }
5643          program { name: "button_unclick3";
5644             signal: "mouse,clicked,1";
5645             source: "over2";
5646             action: SIGNAL_EMIT "elm,action,click" "";
5647          }
5648          program { name: "text_show";
5649             signal: "elm,state,text,visible";
5650             source: "elm";
5651             script {
5652                if(get_int(button_state) != BUTTON_STATE_DISABLED)
5653                  set_state(PART:"elm.text", "visible", 0.0);
5654                else
5655                  set_state(PART:"elm.text", "disabled_visible", 0.0);
5656             }
5657          }
5658          program { name: "text_hide";
5659             signal: "elm,state,text,hidden";
5660             source: "elm";
5661             action: STATE_SET "default" 0.0;
5662             target: "elm.text";
5663          }
5664
5665          program { name: "disable";
5666             signal: "elm,state,disabled";
5667             source: "elm";
5668             action: STATE_SET "disabled" 0.0;
5669             target: "button_image";
5670             target: "disabler";
5671             after: "disable_text";
5672          }
5673          program { name: "disable_text";
5674             script {
5675                new st[31];
5676                new Float:vl;
5677                get_state(PART:"elm.text", st, 30, vl);
5678                if (!strcmp(st, "visible"))
5679                   set_state(PART:"elm.text", "disabled_visible", 0.0);
5680                else
5681                   set_state(PART:"elm.text", "disabled", 0.0);
5682                set_int(button_state, BUTTON_STATE_DISABLED);
5683             }
5684          }
5685          program { name: "enable";
5686             signal: "elm,state,enabled";
5687             source: "elm";
5688             action: STATE_SET "default" 0.0;
5689             target: "button_image";
5690             target: "disabler";
5691             after: "enable_text";
5692          }
5693          program { name: "enable_text";
5694             script {
5695                new st[31];
5696                new Float:vl;
5697                get_state(PART:"elm.text", st, 30, vl);
5698                if (!strcmp(st, "disabled_visible"))
5699                   set_state(PART:"elm.text", "visible", 0.0);
5700                else
5701                   set_state(PART:"elm.text", "default", 0.0);
5702                set_int(button_state, BUTTON_STATE_ENABLED);
5703             }
5704          }
5705          program { name: "focused";
5706             //signal: "elm,action,focus";
5707             //source: "elm";
5708             action: STATE_SET "focused" 0.0;
5709             target: "button_image";
5710             target: "elm.text";
5711          }
5712          program { name: "unfocused";
5713             //signal: "elm,action,unfocus";
5714             //source: "elm";
5715             action: STATE_SET "default" 0.0;
5716             target: "button_image";
5717             action: STATE_SET "visible" 0.0;
5718             target: "elm.text";
5719          }
5720       }
5721    }
5722
5723 ///////////////////////////////////////////////////////////////////////////////////////
5724    group { name: "elm/button/base/naviframe/back_btn/default";
5725        alias: "elm/button/base/naviframe/end_btn/default";
5726        //TODO: Remove this alias later
5727        alias: "elm/button/base/navigationbar_prev_btn/default";
5728        alias: "elm/button/base/navigationbar_backbutton/default";
5729        alias: "elm/button/base/navigationbar_end_btn/default";
5730        images {
5731          image: "00_winset_btn_prev.png" COMP;
5732          image: "00_winset_btn_prev_press.png" COMP;
5733       }
5734       parts {
5735          part { name: "button_image";
5736             type: RECT;
5737             mouse_events: 1;
5738             scale: 1;
5739             description { state: "default" 0.0;
5740                min: BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC;
5741                color: 0 0 0 0;
5742             }
5743             description {
5744                state: "clicked" 0.0;
5745                inherit: "default" 0.0;
5746             }
5747             description {
5748                state: "disabled" 0.0;
5749                inherit: "default" 0.0;
5750             }
5751          }
5752          part {name: "padding_right";
5753             type: RECT;
5754             mouse_events: 0;
5755             description { state: "default" 0.0;
5756                align: 1 0;
5757                min: 1 0;
5758                rel1 { relative: 1 0.2; }
5759                rel2 { relative: 1 0.8; }
5760                fixed: 1 0;
5761                color: NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC;
5762             }
5763          }
5764          part {name: "padding_before_right";
5765             type: RECT;
5766             mouse_events: 0;
5767             description { state: "default" 0.0;
5768                align: 1 0;
5769                min: 1 0;
5770                rel1 { relative: 0 0; to: "padding_right"; }
5771                rel2 { relative: 0 1; to: "padding_right"; }
5772                fixed: 1 0;
5773                color: NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC;
5774             }
5775          }
5776          part { name: "button_center_part";
5777             mouse_events: 0;
5778             scale: 1;
5779             description { state: "default" 0.0;
5780                min: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
5781                max: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
5782                align: 0.5 0.5;
5783                rel2 { relative: 0 1; to_x: "padding_before_right"; }
5784                image {
5785                   normal: "00_winset_btn_prev.png";
5786                }
5787             }
5788             description {
5789                state: "clicked" 0.0;
5790                inherit: "default" 0.0;
5791                image.normal: "00_winset_btn_prev_press.png";
5792             }
5793          }
5794          part { name: "over1";
5795             type: RECT;
5796             mouse_events: 1;
5797             repeat_events: 1;
5798             ignore_flags: ON_HOLD;
5799             description { state: "default" 0.0;
5800                color: 0 0 0 0;
5801             }
5802          }
5803          part { name: "over2";
5804             mouse_events: 1;
5805             repeat_events: 1;
5806             description { state: "default" 0.0;
5807                color: 0 0 0 0;
5808             }
5809          }
5810          part { name: "disabler";
5811             type: RECT;
5812             description { state: "default" 0.0;
5813                color: 0 0 0 0;
5814                visible: 0;
5815             }
5816             description { state: "disabled" 0.0;
5817                inherit: "default" 0.0;
5818                visible: 1;
5819             }
5820          }
5821       }
5822       programs {
5823          program { name: "button_click";
5824             signal: "mouse,down,1";
5825             source: "over1";
5826             action: SIGNAL_EMIT "elm,action,press" "";
5827             after: "button_click_anim";
5828          }
5829          program { name: "button_click_anim";
5830             action: STATE_SET "clicked" 0.0;
5831             target: "button_image";
5832             target: "button_center_part";
5833          }
5834          program { name: "button_unclick";
5835             signal: "mouse,up,1";
5836             source: "over2";
5837             action: SIGNAL_EMIT "elm,action,unpress" "";
5838             after: "button_unclick_anim";
5839          }
5840          program { name: "button_unclick_anim";
5841             action: STATE_SET "default" 0.0;
5842             target: "button_image";
5843             target: "button_center_part";
5844          }
5845          program { name: "button_unclick2";
5846             signal: "mouse,clicked,1";
5847             source: "over1";
5848             action: SIGNAL_EMIT "elm,action,click" "";
5849          }
5850          program { name: "disable";
5851             signal: "elm,state,disabled";
5852             source: "elm";
5853             action: STATE_SET "disabled" 0.0;
5854             target: "disabler";
5855             target: "button_image";
5856          }
5857          program { name: "enable";
5858             signal: "elm,state,enabled";
5859             source: "elm";
5860             action: STATE_SET "default" 0.0;
5861             target: "disabler";
5862             target: "button_image";
5863          }
5864       }
5865    }
5866
5867 ///////////////////////////////////////////////////////////////////////////////////////
5868    group { name: "elm/button/base/picker/prev/icon/default";
5869       images {
5870          image: "00_picker_btn_normal.png" COMP;
5871          image: "00_picker_btn_press.png" COMP;
5872          image: "00_picker_arrow_left.png" COMP;
5873          image: "00_picker_arrow_left_press.png" COMP;
5874       }
5875       script {
5876          public button_state = BUTTON_STATE_ENABLED;
5877       }
5878       parts {
5879          part { name: "button_image";
5880             scale: 1;
5881             description { state: "default" 0.0;
5882                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
5883                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
5884                image {
5885                   normal: "00_picker_btn_normal.png";
5886                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
5887                   border_scale: 1;
5888                }
5889             }
5890             description { state: "clicked" 0.0;
5891                inherit: "default" 0.0;
5892                image {
5893                   normal: "00_picker_btn_press.png";
5894                }
5895             }
5896             description { state: "disabled" 0.0;
5897                inherit: "default" 0.0;
5898             }
5899             description { state: "focused" 0.0;
5900                inherit: "default" 0.0;
5901                image {
5902                   normal: "00_picker_btn_press.png";
5903                }
5904             }
5905          }
5906          part { name: "padding_left_top";
5907             type: RECT;
5908             scale: 1;
5909             mouse_events: 0;
5910             description { state: "default" 0.0;
5911                align: 0.0 0.0;
5912                rel2 {
5913                   relative: 0.0 0.0;
5914                }
5915                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
5916                fixed: 1 1;
5917                visible: 0;
5918             }
5919          }
5920          part { name: "padding_right_bottom";
5921             type: RECT;
5922             scale: 1;
5923             mouse_events: 0;
5924             description { state: "default" 0.0;
5925                align: 1.0 1.0;
5926                rel1 {
5927                   relative: 1.0 1.0;
5928                }
5929                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
5930                fixed: 1 1;
5931                visible: 0;
5932             }
5933          }
5934          part { name: "left_arrow";
5935             scale: 1;
5936             mouse_events: 0;
5937             description { state: "default" 0.0;
5938                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
5939                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
5940                rel1 {
5941                   relative: 1.0 1.0;
5942                   to: "padding_left_top";
5943                }
5944                rel2 {
5945                   relative: 0.0 0.0;
5946                   to: "padding_right_bottom";
5947                }
5948                image {
5949                   normal: "00_picker_arrow_left.png";
5950                }
5951             }
5952             description { state: "clicked" 0.0;
5953                inherit: "default" 0.0;
5954                image {
5955                   normal: "00_picker_arrow_left_press.png";
5956                }
5957             }
5958          }
5959          part { name: "over2";
5960             type: RECT;
5961             repeat_events: 1;
5962             ignore_flags: ON_HOLD;
5963             description { state: "default" 0.0;
5964                color: 0 0 0 0;
5965             }
5966          }
5967          part { name: "over3";
5968             type: RECT;
5969             repeat_events: 1;
5970             description { state: "default" 0.0;
5971                color: 0 0 0 0;
5972             }
5973          }
5974          part { name: "disabler";
5975             type: RECT;
5976             description { state: "default" 0.0;
5977                color: 0 0 0 0;
5978                visible: 0;
5979             }
5980             description { state: "disabled" 0.0;
5981                inherit: "default" 0.0;
5982                visible: 1;
5983             }
5984          }
5985       }
5986       programs {
5987          program { name: "button_click";
5988             signal: "mouse,down,1";
5989             source: "over2";
5990             action: SIGNAL_EMIT "elm,action,press" "";
5991             after: "button_click_anim";
5992          }
5993          program { name: "button_click_anim";
5994             action: STATE_SET "clicked" 0.0;
5995             target: "button_image";
5996          }
5997          program { name: "button_unpress";
5998             action: SIGNAL_EMIT "elm,action,unpress" "";
5999          }
6000          program { name: "button_mouseout_clicked";
6001             signal: "mouse,up,1";
6002             source: "over3";
6003             script {
6004                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6005                  set_state(PART:"button_image", "default", 0.0);
6006             }
6007             after: button_unpress;
6008          }
6009          program { name: "button_unclick3";
6010             signal: "mouse,clicked,1";
6011             source: "over2";
6012             action: SIGNAL_EMIT "elm,action,click" "";
6013          }
6014          program { name: "disable";
6015             signal: "elm,state,disabled";
6016             source: "elm";
6017             action: STATE_SET "disabled" 0.0;
6018             target: "button_image";
6019             target: "disabler";
6020             after: "disable_button";
6021          }
6022          program { name: "disable_button";
6023             script {
6024                set_int(button_state, BUTTON_STATE_DISABLED);
6025             }
6026          }
6027          program { name: "enable";
6028             signal: "elm,state,enabled";
6029             source: "elm";
6030             action: STATE_SET "default" 0.0;
6031             target: "button_image";
6032             target: "disabler";
6033             after: "enable_button";
6034          }
6035          program { name: "enable_button";
6036             script {
6037                set_int(button_state, BUTTON_STATE_ENABLED);
6038             }
6039          }
6040          program { name: "focused";
6041             //signal: "elm,action,focus";
6042             //source: "elm";
6043             action: STATE_SET "focused" 0.0;
6044             target: "button_image";
6045          }
6046          program { name: "unfocused";
6047             //signal: "elm,action,unfocus";
6048             //source: "elm";
6049             action: STATE_SET "default" 0.0;
6050             target: "button_image";
6051          }
6052       }
6053    }
6054
6055 ///////////////////////////////////////////////////////////////////////////////////////
6056    group { name: "elm/button/base/picker/next/icon/default";
6057       images {
6058          image: "00_picker_btn_normal.png" COMP;
6059          image: "00_picker_btn_press.png" COMP;
6060          image: "00_picker_arrow_right.png" COMP;
6061          image: "00_picker_arrow_right_press.png" COMP;
6062       }
6063       script {
6064          public button_state = BUTTON_STATE_ENABLED;
6065       }
6066       parts {
6067          part { name: "button_image";
6068             scale: 1;
6069             description { state: "default" 0.0;
6070                min: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
6071                max: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_MIN_MAX_INC;
6072                image {
6073                   normal: "00_picker_btn_normal.png";
6074                   border: BUTTON_PICKER_PREV_ICON_DEFAULT_BG_DEFAULT_BORDER_INC;
6075                   border_scale: 1;
6076                }
6077             }
6078             description { state: "clicked" 0.0;
6079                inherit: "default" 0.0;
6080                image {
6081                   normal: "00_picker_btn_press.png";
6082                }
6083             }
6084             description { state: "disabled" 0.0;
6085                inherit: "default" 0.0;
6086             }
6087             description { state: "focused" 0.0;
6088                inherit: "default" 0.0;
6089                image {
6090                   normal: "00_picker_btn_press.png";
6091                }
6092             }
6093          }
6094          part { name: "padding_left_top";
6095             type: RECT;
6096             scale: 1;
6097             mouse_events: 0;
6098             description { state: "default" 0.0;
6099                align: 0.0 0.0;
6100                rel2 {
6101                   relative: 0.0 0.0;
6102                }
6103                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
6104                fixed: 1 1;
6105                visible: 0;
6106             }
6107          }
6108          part { name: "padding_right_bottom";
6109             type: RECT;
6110             scale: 1;
6111             mouse_events: 0;
6112             description { state: "default" 0.0;
6113                align: 1.0 1.0;
6114                rel1 {
6115                   relative: 1.0 1.0;
6116                }
6117                min: BUTTON_PICKER_PREV_ICON_DEFAULT_PADDING_MIN_INC;
6118                fixed: 1 1;
6119                visible: 0;
6120             }
6121          }
6122          part { name: "right_arrow";
6123             scale: 1;
6124             mouse_events: 0;
6125             description { state: "default" 0.0;
6126                min: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
6127                max: BUTTON_PICKER_PREV_ICON_DEFAULT_IMAGE_MIN_MAX_INC;
6128                rel1 {
6129                   relative: 1.0 1.0;
6130                   to: "padding_left_top";
6131                }
6132                rel2 {
6133                   relative: 0.0 0.0;
6134                   to: "padding_right_bottom";
6135                }
6136                image {
6137                   normal: "00_picker_arrow_right.png";
6138                }
6139             }
6140             description { state: "clicked" 0.0;
6141                inherit: "default" 0.0;
6142                image {
6143                   normal: "00_picker_arrow_right_press.png";
6144                }
6145             }
6146          }
6147          part { name: "over2";
6148             type: RECT;
6149             repeat_events: 1;
6150             ignore_flags: ON_HOLD;
6151             description { state: "default" 0.0;
6152                color: 0 0 0 0;
6153             }
6154          }
6155          part { name: "over3";
6156             type: RECT;
6157             repeat_events: 1;
6158             description { state: "default" 0.0;
6159                color: 0 0 0 0;
6160             }
6161          }
6162          part { name: "disabler";
6163             type: RECT;
6164             description { state: "default" 0.0;
6165                color: 0 0 0 0;
6166                visible: 0;
6167             }
6168             description { state: "disabled" 0.0;
6169                inherit: "default" 0.0;
6170                visible: 1;
6171             }
6172          }
6173       }
6174       programs {
6175          program { name: "button_click";
6176             signal: "mouse,down,1";
6177             source: "over2";
6178             action: SIGNAL_EMIT "elm,action,press" "";
6179             after: "button_click_anim";
6180          }
6181          program { name: "button_click_anim";
6182             action: STATE_SET "clicked" 0.0;
6183             target: "button_image";
6184          }
6185          program { name: "button_unpress";
6186             action: SIGNAL_EMIT "elm,action,unpress" "";
6187          }
6188          program { name: "button_mouseout_clicked";
6189             signal: "mouse,up,1";
6190             source: "over3";
6191             script {
6192                if (get_int(button_state) != BUTTON_STATE_DISABLED)
6193                  set_state(PART:"button_image", "default", 0.0);
6194             }
6195             after: button_unpress;
6196          }
6197          program { name: "button_unclick3";
6198             signal: "mouse,clicked,1";
6199             source: "over2";
6200             action: SIGNAL_EMIT "elm,action,click" "";
6201          }
6202          program { name: "disable";
6203             signal: "elm,state,disabled";
6204             source: "elm";
6205             action: STATE_SET "disabled" 0.0;
6206             target: "button_image";
6207             target: "disabler";
6208             after: "disable_button";
6209          }
6210          program { name: "disable_button";
6211             script {
6212                set_int(button_state, BUTTON_STATE_DISABLED);
6213             }
6214          }
6215          program { name: "enable";
6216             signal: "elm,state,enabled";
6217             source: "elm";
6218             action: STATE_SET "default" 0.0;
6219             target: "button_image";
6220             target: "disabler";
6221             after: "enable_button";
6222          }
6223          program { name: "enable_button";
6224             script {
6225                set_int(button_state, BUTTON_STATE_ENABLED);
6226             }
6227          }
6228          program { name: "focused";
6229             //signal: "elm,action,focus";
6230             //source: "elm";
6231             action: STATE_SET "focused" 0.0;
6232             target: "button_image";
6233          }
6234          program { name: "unfocused";
6235             //signal: "elm,action,unfocus";
6236             //source: "elm";
6237             action: STATE_SET "default" 0.0;
6238             target: "button_image";
6239          }
6240       }
6241    }
6242
6243 ///////////////////////////////////////////////////////////////////////////////////////
6244       group { name: "elm/button/base/naviframe_control/default";
6245          alias: "elm/button/base/naviframe_control/center";
6246          alias: "elm/button/base/navigationbar_control/default";
6247          alias: "elm/button/base/navigationbar_control/left";
6248          alias: "elm/button/base/navigationbar_control/right";
6249          alias: "elm/button/base/navigationbar_control/center";
6250       script {
6251          public button_state = BUTTON_STATE_ENABLED;
6252       }
6253       images.image: "00_Option_header_bt.png" COMP;
6254       images.image: "00_Option_header_bt_dim.png" COMP;
6255       images.image: "00_Option_header_bt_press.png" COMP;
6256       parts {
6257          part { name: "button_image";
6258             type: IMAGE;
6259             mouse_events: 1;
6260             scale: 1;
6261             description { state: "default" 0.0;
6262                min: BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_W_INC BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_H_INC;
6263                color: 0 0 0 0;
6264                rel1.offset: 0 0;
6265                rel2.offset: -1 -1;
6266                image.normal: "00_Option_header_bt.png";
6267                image.border: BUTTON_NAVIBAR_CENTER_BG_NORMAL_BORDER_INC;
6268                color: 255 255 255 255;
6269             }
6270             description { state: "disabled" 0.0;
6271                inherit: "default" 0.0;
6272                image.normal: "00_Option_header_bt_dim.png";
6273             }
6274             description { state: "clicked" 0.0;
6275                inherit: "default" 0.0;
6276                image.normal: "00_Option_header_bt_press.png";
6277             }
6278          }
6279          part {
6280             name: "padding_left_top";
6281             type: RECT;
6282             scale: 1;
6283             mouse_events: 0;
6284             description { state: "default" 0.0;
6285                align: 0.0 0.0;
6286                rel1.relative: 0.0 0.0;
6287                rel2.relative: 0.0 0.0;
6288                min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
6289                fixed: 1 1;
6290                visible: 0;
6291             }
6292          }
6293          part {
6294             name: "padding_right_bottom";
6295             type: RECT;
6296             scale: 1;
6297             mouse_events: 0;
6298             description { state: "default" 0.0;
6299                align: 1.0 1.0;
6300                rel1.relative: 1.0 1.0;
6301                rel2.relative: 1.0 1.0;
6302                min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
6303                fixed: 1 1;
6304                visible: 0;
6305             }
6306          }
6307          part {
6308             name: "icon_rect";
6309             type: RECT;
6310             scale: 1;
6311             mouse_events: 0;
6312             description { state: "default" 0.0;
6313                visible: 1;
6314                min: 0 0;
6315                fixed: 1 0;
6316                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
6317                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
6318                align: 0.0 0.5;
6319                color: 0 0 0 0;
6320             }
6321             description { state: "visible" 0.0;
6322                visible: 1;
6323                min: BUTTON_NAVIBAR_CENTER_ICON_RECT_VISIBLE_MIN_SIZE;
6324                fixed: 1 0;
6325                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
6326                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
6327                align: 0.0 0.5;
6328                color: 0 0 0 0;
6329             }
6330             description { state: "icononly" 0.0;
6331                inherit: "default" 0.0;
6332             }
6333          }
6334          part {
6335             name: "padding_after_icon";
6336             type: RECT;
6337             scale: 1;
6338             mouse_events: 0;
6339             description { state: "default" 0.0; //when only icon or no icon is there
6340                align: 0.0 0.0;
6341                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
6342                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
6343                fixed: 1 0;
6344                min: 0 0;
6345                color: 0 0 0 0;
6346             }
6347             description { state: "visible" 0.0;
6348                visible: 1;
6349                align: 0.0 0.0;
6350                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
6351                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
6352                fixed: 1 0;
6353                min: BUTTON_NAVIBAR_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
6354                color: 0 0 0 0;
6355             }
6356             description { state: "icononly" 0.0;
6357                inherit: "default" 0.0;
6358             }
6359          }
6360          part {
6361             name: "padding_before_text";
6362             type: RECT;
6363             scale: 1;
6364             mouse_events: 0;
6365             description { state: "default" 0.0; //when only icon or no icon is there
6366                align: 1.0 0.5;
6367                rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
6368                rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
6369                fixed: 1 0;
6370                min: BUTTON_NAVIBAR_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC;
6371                color: 0 0 0 0;
6372             }
6373          }
6374          part { name: "elm.swallow.content";
6375             type: SWALLOW;
6376             scale: 1;
6377             clip_to: "clipper";
6378             description { state: "default" 0.0;
6379                visible: 0;
6380                align: 0.0 0.5;
6381                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
6382                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
6383                fixed: 1 0;
6384             }
6385             description { state: "visible" 0.0;
6386                fixed: 1 0;
6387                visible: 1;
6388                min: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6389                max: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6390                align: 1.0 0.5;
6391                rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
6392                rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
6393                aspect: 1.0 1.0;
6394                aspect_preference: VERTICAL;
6395             }
6396             description { state: "icononly" 0.0;
6397                visible: 1;
6398                min: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6399                max: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6400                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
6401                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
6402                align: 0.5 0.5;
6403                aspect: 1.0 1.0;
6404                aspect_preference: VERTICAL;
6405             }
6406          }
6407          part { name: "elm.text";
6408             type: TEXT;
6409             mouse_events: 0;
6410             scale: 1;
6411             clip_to: "clipper";
6412             description { state: "default" 0.0;
6413                visible: 0;
6414                rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
6415                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
6416                align: 0.5 0.5;
6417                color: 255 255 255 255;
6418                text {
6419                   font: "SLP:style=Medium";
6420                   size: BUTTON_NAVIBAR_CENTER_TEXT_FONT_SIZE_INC;
6421                   min: 0 0;
6422                   max: 1 0;
6423                   align: 0.5 0.5;
6424                }
6425             }
6426             description { state: "visible" 0.0;
6427                inherit: "default" 0.0;
6428                visible: 1;
6429             }
6430             description { state: "clicked" 0.0;
6431                inherit: "default" 0.0;
6432                visible: 1;
6433                min: 0 0;
6434             }
6435             description { state: "focused" 0.0;
6436                inherit: "default" 0.0;
6437                visible: 1;
6438                min: 0 0;
6439                color: 255 255 255 255;
6440             }
6441          }
6442          part { name: "over2";
6443             type: RECT;
6444             mouse_events: 1;
6445             repeat_events: 1;
6446             ignore_flags: ON_HOLD;
6447             description { state: "default" 0.0;
6448                color: 0 0 0 0;
6449             }
6450          }
6451          part { name: "over3";
6452             type: RECT;
6453             mouse_events: 1;
6454             repeat_events: 1;
6455             description { state: "default" 0.0;
6456                color: 0 0 0 0;
6457             }
6458          }
6459          part { name: "clipper";
6460             type: RECT;
6461             description { state: "default" 0.0;
6462                color: 255 255 255 255;
6463             }
6464             description { state: "disabled" 0.0;
6465                color: 255 255 255 127;
6466             }
6467          }
6468          part { name: "disabler";
6469             type: RECT;
6470             description { state: "default" 0.0;
6471                color: 0 0 0 0;
6472                visible: 0;
6473             }
6474             description { state: "disabled" 0.0;
6475                inherit: "default" 0.0;
6476                visible: 1;
6477             }
6478          }
6479       }
6480       programs {
6481          program { name: "button_click";
6482             signal: "mouse,down,1";
6483             source: "over2";
6484             action: SIGNAL_EMIT "elm,action,press" "";
6485             after: "button_click_anim";
6486          }
6487          program { name: "button_click_anim";
6488             action: STATE_SET "clicked" 0.0;
6489             target: "button_image";
6490             after: "text_clicked";
6491          }
6492          program { name: "text_clicked";
6493             script {
6494                new st[31];
6495                new Float:vl;
6496                get_state(PART:"elm.text", st, 30, vl);
6497                if (!strcmp(st, "visible"))
6498                   set_state(PART:"elm.text", "clicked", 0.0);
6499             }
6500          }
6501          program { name: "button_unpress";
6502             action: SIGNAL_EMIT "elm,action,unpress" "";
6503          }
6504          program { name: "button_mouseout_clicked";
6505             signal: "mouse,up,1";
6506             source: "over3";
6507             script {
6508                new st[31];
6509                new Float:vl;
6510                get_state(PART:"elm.swallow.content", st, 30, vl);
6511                if (strcmp(st, "icononly"))
6512                  {
6513                     emit("elm,action,default,text,set", "");
6514                     set_state(PART:"elm.text", "visible", 0.0);
6515                  }
6516                if(get_int(button_state) != BUTTON_STATE_DISABLED)
6517                   set_state(PART:"button_image", "default", 0.0);
6518             }
6519             after: button_unpress;
6520          }
6521          program { name: "button_unclick3";
6522             signal: "mouse,clicked,1";
6523             source: "over2";
6524             action: SIGNAL_EMIT "elm,action,click" "";
6525          }
6526          program { name: "text_show";
6527             signal: "elm,state,text,visible";
6528             source: "elm";
6529             script {
6530                new st[31];
6531                new Float:vl;
6532                get_state(PART:"elm.swallow.content", st, 30, vl);
6533                if (!strcmp(st, "icononly"))
6534                {
6535                   set_state(PART:"elm.swallow.content", "visible", 0.0);
6536                   set_state(PART:"icon_rect", "visible", 0.0);
6537                   set_state(PART:"padding_after_icon", "visible", 0.0);
6538                }
6539                set_state(PART:"elm.text", "visible", 0.0);
6540             }
6541          }
6542          program { name: "text_hide";
6543             signal: "elm,state,text,hidden";
6544             source: "elm";
6545             script {
6546                new st[31];
6547                new Float:vl;
6548                get_state(PART:"elm.swallow.content", st, 30, vl);
6549                if (!strcmp(st, "visible"))
6550                {
6551                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
6552                   set_state(PART:"icon_rect", "icononly", 0.0);
6553                   set_state(PART:"padding_after_icon", "icononly", 0.0);
6554                }
6555                set_state(PART:"elm.text", "default", 0.0);
6556             }
6557          }
6558          program { name: "icon_show";
6559             signal: "elm,state,icon,visible";
6560             source: "elm";
6561             script {
6562                new st[31];
6563                new Float:vl;
6564                get_state(PART:"elm.text", st, 30, vl);
6565                if (!strcmp(st, "visible"))
6566                {
6567                   set_state(PART:"elm.swallow.content", "visible", 0.0);
6568                   set_state(PART:"icon_rect", "visible", 0.0);
6569                   set_state(PART:"padding_after_icon", "visible", 0.0);
6570                }
6571                else
6572                {
6573                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
6574                   set_state(PART:"icon_rect", "icononly", 0.0);
6575                   set_state(PART:"padding_after_icon", "icononly", 0.0);
6576                }
6577             }
6578          }
6579          program { name: "icon_hide";
6580             signal: "elm,state,icon,hidden";
6581             source: "elm";
6582             action: STATE_SET "default" 0.0;
6583             target: "elm.swallow.content";
6584             target: "icon_rect";
6585             target: "padding_after_icon";
6586          }
6587          program { name: "disable";
6588             signal: "elm,state,disabled";
6589             source: "elm";
6590             action: STATE_SET "disabled" 0.0;
6591             target: "button_image";
6592             target: "clipper";
6593             target: "disabler";
6594             after: "disable_text";
6595          }
6596          program { name: "disable_text";
6597             script {
6598                set_int(button_state, BUTTON_STATE_DISABLED);
6599                set_state(PART:"elm.text", "visible", 0.0);
6600             }
6601          }
6602          program { name: "enable";
6603             signal: "elm,state,enabled";
6604             source: "elm";
6605             action: STATE_SET "default" 0.0;
6606             target: "button_image";
6607             target: "clipper";
6608             target: "disabler";
6609             after: "enable_text";
6610          }
6611          program { name: "enable_text";
6612             script {
6613                set_int(button_state, BUTTON_STATE_ENABLED);
6614                set_state(PART:"elm.text", "visible", 0.0);
6615             }
6616          }
6617          program { name: "focused";
6618             action: STATE_SET "focused" 0.0;
6619             target: "button_image";
6620             target: "elm.text";
6621          }
6622          program { name: "unfocused";
6623             action: STATE_SET "default" 0.0;
6624             target: "button_image";
6625             after: "unfocus_text";
6626          }
6627          program { name: "unfocus_text";
6628             action: STATE_SET "visible" 0.0;
6629             target: "elm.text";
6630          }
6631       }
6632    }
6633
6634 ///////////////////////////////////////////////////////////////////////////////////////
6635    group { name: "elm/button/base/naviframe_control/multiline";
6636       alias: "elm/button/base/navigationbar_control/multiline";
6637       script {
6638          public button_state = BUTTON_STATE_ENABLED;
6639       }
6640       images.image: "00_Option_header_bt.png" COMP;
6641       images.image: "00_Option_header_bt_dim.png" COMP;
6642       images.image: "00_Option_header_bt_press.png" COMP;
6643       styles{
6644          style { name: "btn_multiline_navigationbar_controlbar_style";
6645             base: "font=SLP:style=Medium font_size="BUTTON_NAVIBAR_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed";
6646             tag: "br" "\n";
6647             tag: "ps" "ps";
6648             tag: "tab" "\t";
6649          }
6650       }
6651       parts {
6652          part { name: "button_image";
6653             type: IMAGE;
6654             mouse_events: 1;
6655             scale: 1;
6656             description { state: "default" 0.0;
6657                min: BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_W_INC BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_H_INC;
6658                rel1.offset: 0 0;
6659                rel2.offset: -1 -1;
6660                image.normal: "00_Option_header_bt.png";
6661                image.border: BUTTON_NAVIBAR_CENTER_BG_NORMAL_BORDER_INC;
6662                color: 255 255 255 255;
6663             }
6664             description { state: "disabled" 0.0;
6665                inherit: "default" 0.0;
6666                image.normal: "00_Option_header_bt_dim.png";
6667             }
6668             description { state: "clicked" 0.0;
6669                inherit: "default" 0.0;
6670                image.normal: "00_Option_header_bt_press.png";
6671             }
6672          }
6673          part {
6674             name: "padding_left_top";
6675             type: RECT;
6676             scale: 1;
6677             mouse_events: 0;
6678             description { state: "default" 0.0;
6679                align: 0.0 0.0;
6680                rel1 {
6681                   relative: 0.0 0.0;
6682                }
6683                rel2 {
6684                   relative: 0.0 0.0;
6685                }
6686                min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
6687                fixed: 1 1;
6688                visible: 0;
6689             }
6690          }
6691          part {
6692             name: "padding_right_bottom";
6693             type: RECT;
6694             scale: 1;
6695             mouse_events: 0;
6696             description { state: "default" 0.0;
6697                align: 1.0 1.0;
6698                rel1.relative: 1.0 1.0;
6699                rel2.relative: 1.0 1.0;
6700                min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
6701                fixed: 1 1;
6702                visible: 0;
6703             }
6704          }
6705          part {
6706             name: "icon_rect";
6707             type: RECT;
6708             scale: 1;
6709             mouse_events: 0;
6710             description { state: "default" 0.0;
6711                visible: 0;
6712                min: 0 0;
6713                fixed: 1 0;
6714                rel1 {
6715                   relative: 0.0 1.0;
6716                   to_x: "elm.swallow.content";
6717                   to_y: "padding_left_top";
6718                }
6719                rel2 {
6720                   relative: 1.0 0.0;
6721                   to_x: "elm.swallow.content";
6722                   to_y: "padding_right_bottom";
6723                }
6724                align: 0.0 0.5;
6725             }
6726          }
6727          part {
6728             name: "padding_icon_text";
6729             type: RECT;
6730             scale: 1;
6731             mouse_events: 0;
6732             description { state: "default" 0.0; //when only icon or no icon is there
6733                visible: 0;
6734                align: 0.0 0.0;
6735                rel1 {
6736                   relative: 1.0 0.0;
6737                   to: "icon_rect";
6738                }
6739                rel2 {
6740                   relative: 1.0 1.0;
6741                   to: "icon_rect";
6742                }
6743                fixed: 1 0;
6744                min: 0 0;
6745             }
6746             description { state: "visible" 0.0;
6747                inherit: "default" 0.0;
6748                min: BUTTON_NAVIBAR_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
6749                rel1 {
6750                   relative: 1.0 0.0;
6751                   to: "icon_rect";
6752                }
6753                rel2 {
6754                   relative: 1.0 1.0;
6755                   to: "icon_rect";
6756                }
6757            }
6758             description { state: "icononly" 0.0;
6759                inherit: "default" 0.0;
6760             }
6761          }
6762          part { name: "elm.swallow.content";
6763             type: SWALLOW;
6764             scale: 1;
6765             clip_to: "clipper";
6766             description { state: "default" 0.0;
6767                visible: 0;
6768                align: 0.0 0.5;
6769                rel1 {
6770                   relative: 1.0 1.0;
6771                   to: "padding_left_top";
6772                }
6773                rel2 {
6774                   relative: 1.0 0.0;
6775                   to_x: "padding_left_top";
6776                   to_y: "padding_right_bottom";
6777                }
6778                fixed: 1 0;
6779             }
6780             description { state: "visible" 0.0;
6781                fixed: 1 0;
6782                visible: 1;
6783                min: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6784                max: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
6785                align: 0.0 0.5;
6786                rel1 {
6787                   relative: 1.0 1.0;
6788                   to: "padding_left_top";
6789                }
6790                rel2 {
6791                   relative: 0.0 0.0;
6792                   to_x: "padding_left_top";
6793                   to_y: "padding_right_bottom";
6794                }
6795             }
6796             description { state: "icononly" 0.0;
6797                visible: 1;
6798                min: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6799                max: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
6800                rel1 {
6801                   relative: 1.0 1.0;
6802                   to: "padding_left_top";
6803                }
6804                rel2 {
6805                   relative: 0.0 0.0;
6806                   to: "padding_right_bottom";
6807                }
6808                align: 0.5 0.5;
6809             }
6810          }
6811          part { name: "elm.text";
6812             type: TEXTBLOCK;
6813             mouse_events: 0;
6814             scale: 1;
6815             clip_to: "clipper";
6816             description { state: "default" 0.0;
6817                visible: 0;
6818                rel1 {
6819                   relative: 1.0 1.0;
6820                   to_x: "padding_icon_text";
6821                   to_y: "padding_left_top";
6822                }
6823                rel2 {
6824                    relative: 0.0 0.0;
6825                    to: "padding_right_bottom";
6826                }
6827                align: 0.5 0.5;
6828                color: 255 255 255 255;
6829                text {
6830                   style: "btn_multiline_navigationbar_controlbar_style";
6831                   min: 0 0;
6832                   max: 0 1;
6833                }
6834             }
6835             description { state: "visible" 0.0;
6836                inherit: "default" 0.0;
6837                visible: 1;
6838                min: 80 0;
6839             }
6840             description { state: "clicked" 0.0;
6841                inherit: "default" 0.0;
6842                visible: 1;
6843                min: 0 0;
6844             }
6845             description { state: "focused" 0.0;
6846                inherit: "default" 0.0;
6847                visible: 1;
6848                min: 0 0;
6849                color: 255 255 255 255;
6850             }
6851          }
6852          part { name: "over2";
6853             type: RECT;
6854             mouse_events: 1;
6855             repeat_events: 1;
6856             ignore_flags: ON_HOLD;
6857             description { state: "default" 0.0;
6858                color: 0 0 0 0;
6859             }
6860          }
6861          part { name: "over3";
6862             type: RECT;
6863             mouse_events: 1;
6864             repeat_events: 1;
6865             description { state: "default" 0.0;
6866                color: 0 0 0 0;
6867             }
6868          }
6869          part { name: "clipper";
6870             type: RECT;
6871             description { state: "default" 0.0;
6872                color: 255 255 255 255;
6873             }
6874             description { state: "disabled" 0.0;
6875                color: 255 255 255 127;
6876             }
6877          }
6878          part { name: "disabler";
6879             type: RECT;
6880             description { state: "default" 0.0;
6881                color: 0 0 0 0;
6882                visible: 0;
6883             }
6884             description { state: "disabled" 0.0;
6885                inherit: "default" 0.0;
6886                visible: 1;
6887             }
6888          }
6889       }
6890       programs {
6891          program { name: "button_click";
6892             signal: "mouse,down,1";
6893             source: "over2";
6894             action: SIGNAL_EMIT "elm,action,press" "";
6895             after: "button_click_anim";
6896          }
6897          program { name: "button_click_anim";
6898             action: STATE_SET "clicked" 0.0;
6899             target: "button_image";
6900             after: "text_clicked";
6901          }
6902          program { name: "text_clicked";
6903             script {
6904                new st[31];
6905                new Float:vl;
6906                get_state(PART:"elm.text", st, 30, vl);
6907                if (!strcmp(st, "visible"))
6908                  set_state(PART:"elm.text", "clicked", 0.0);
6909             }
6910          }
6911          program { name: "button_unpress";
6912             action: SIGNAL_EMIT "elm,action,unpress" "";
6913          }
6914          program { name: "button_mouseout_clicked";
6915             signal: "mouse,up,1";
6916             source: "over3";
6917             script {
6918                new st[31];
6919                new Float:vl;
6920                get_state(PART:"elm.swallow.content", st, 30, vl);
6921                if (strcmp(st, "icononly"))
6922                  {
6923                     emit("elm,action,default,text,set", "");
6924                     set_state(PART:"elm.text", "visible", 0.0);
6925                  }
6926                if(get_int(button_state) != BUTTON_STATE_DISABLED)
6927                  set_state(PART:"button_image", "default", 0.0);
6928             }
6929             after: button_unpress;
6930          }
6931          program { name: "button_unclick3";
6932             signal: "mouse,clicked,1";
6933             source: "over2";
6934             action: SIGNAL_EMIT "elm,action,click" "";
6935          }
6936          program { name: "text_show";
6937             signal: "elm,state,text,visible";
6938             source: "elm";
6939             script {
6940                new st[31];
6941                new Float:vl;
6942                get_state(PART:"elm.swallow.content", st, 30, vl);
6943                if (!strcmp(st, "icononly"))
6944                  {
6945                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6946                     set_state(PART:"padding_icon_text", "visible", 0.0);
6947                  }
6948                set_state(PART:"elm.text", "visible", 0.0);
6949             }
6950          }
6951          program { name: "text_hide";
6952             signal: "elm,state,text,hidden";
6953             source: "elm";
6954             script {
6955                new st[31];
6956                new Float:vl;
6957                get_state(PART:"elm.swallow.content", st, 30, vl);
6958                if (!strcmp(st, "visible"))
6959                  {
6960                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6961                     set_state(PART:"padding_icon_text", "icononly", 0.0);
6962                  }
6963                set_state(PART:"elm.text", "default", 0.0);
6964             }
6965          }
6966          program { name: "icon_show";
6967             signal: "elm,state,icon,visible";
6968             source: "elm";
6969             script {
6970                new st[31];
6971                new Float:vl;
6972                get_state(PART:"elm.text", st, 30, vl);
6973                if (!strcmp(st, "visible"))
6974                  {
6975                     set_state(PART:"elm.swallow.content", "visible", 0.0);
6976                     set_state(PART:"padding_icon_text", "visible", 0.0);
6977                  }
6978                else
6979                  {
6980                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
6981                     set_state(PART:"padding_icon_text", "icononly", 0.0);
6982                  }
6983             }
6984          }
6985          program { name: "icon_hide";
6986             signal: "elm,state,icon,hidden";
6987             source: "elm";
6988             action: STATE_SET "default" 0.0;
6989             target: "elm.swallow.content";
6990             target: "padding_icon_text";
6991          }
6992          program { name: "disable";
6993             signal: "elm,state,disabled";
6994             source: "elm";
6995             action: STATE_SET "disabled" 0.0;
6996             target: "button_image";
6997             target: "clipper";
6998             target: "disabler";
6999             after: "disable_text";
7000          }
7001          program { name: "disable_text";
7002             script {
7003                set_int(button_state, BUTTON_STATE_DISABLED);
7004                set_state(PART:"elm.text", "visible", 0.0);
7005             }
7006          }
7007          program { name: "enable";
7008             signal: "elm,state,enabled";
7009             source: "elm";
7010             action: STATE_SET "default" 0.0;
7011             target: "button_image";
7012             target: "clipper";
7013             target: "disabler";
7014             after: "enable_text";
7015          }
7016          program { name: "enable_text";
7017             script {
7018                set_int(button_state, BUTTON_STATE_ENABLED);
7019                set_state(PART:"elm.text", "visible", 0.0);
7020             }
7021          }
7022          program { name: "focused";
7023             action: STATE_SET "focused" 0.0;
7024             target: "button_image";
7025             target: "elm.text";
7026          }
7027          program { name: "unfocused";
7028             action: STATE_SET "default" 0.0;
7029             target: "button_image";
7030             after: "unfocus_text";
7031          }
7032          program { name: "unfocus_text";
7033             action: STATE_SET "visible" 0.0;
7034             target: "elm.text";
7035          }
7036       }
7037    }
7038
7039 ///////////////////////////////////////////////////////////////////////////////////////
7040    group { name: "elm/button/base/controlbar/vertical";
7041       script {
7042          public button_state = BUTTON_STATE_ENABLED;
7043       }
7044       styles{
7045          style { name: "controlbar_style";
7046             base: "font=SLP:style=Medium font_size=18 align=center color="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXTBLOCK_COLOR_INC" wrap=mixed ellipsis=1";
7047             tag: "br" "\n";
7048             tag: "ps" "ps";
7049             tag: "hilight" "+ font=SLP:style=Bold";
7050             tag: "b" "+ font=SLP:style=Bold";
7051             tag: "tab" "\t";
7052          }
7053       }
7054       parts {
7055          part { name: "button_image";
7056             type: RECT;
7057             mouse_events: 1;
7058             scale: 1;
7059             description { state: "default" 0.0;
7060                min: 20 30;
7061                rel1.offset: 5 5;
7062                rel2.offset: -6 -6;
7063                color: 0 0 0 0;
7064                visible: 0;
7065             }
7066          }
7067          part {
7068             name: "padding_left_top";
7069             type: RECT;
7070             scale: 1;
7071             mouse_events: 0;
7072             description { state: "default" 0.0;
7073                align: 0.0 0.0;
7074                rel1.relative: 0.0 0.0;
7075                rel2.relative: 0.0 0.0;
7076                min: 10 8;
7077                fixed: 1 1;
7078                visible: 0;
7079             }
7080          }
7081          part {
7082             name: "padding_right_bottom";
7083             type: RECT;
7084             scale: 1;
7085             mouse_events: 0;
7086             description { state: "default" 0.0;
7087                align: 1.0 1.0;
7088                rel1.relative: 1.0 1.0;
7089                rel2.relative: 1.0 1.0;
7090                min: 10 5;
7091                fixed: 1 1;
7092                visible: 0;
7093             }
7094          }
7095          part {
7096             name: "icon_rect";
7097             type: RECT;
7098             scale: 1;
7099             mouse_events: 0;
7100             description { state: "default" 0.0;
7101                visible: 1;
7102                min: 0 0;
7103                fixed: 0 1;
7104                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7105                rel2 { relative: 0.0 1.0; to_x: "padding_right_bottom"; to_y: "padding_left_top"; }
7106                align: 0.5 0.0;
7107                color: 0 0 0 0;
7108             }
7109             description { state: "visible" 0.0;
7110                visible: 1;
7111                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7112                fixed: 0 1;
7113                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7114                rel2 { relative: 0.0 1.0; to_x: "padding_right_bottom"; to_y: "padding_left_top"; }
7115                align: 0.5 0.0;
7116                color: 0 0 0 0;
7117             }
7118             description { state: "icononly" 0.0;
7119                inherit: "default" 0.0;
7120             }
7121          }
7122          part {
7123             name: "padding_after_icon";
7124             type: RECT;
7125             scale: 1;
7126             mouse_events: 0;
7127             description { state: "default" 0.0; //when only icon or no icon is there
7128                align: 0.0 0.0;
7129                rel1 { relative: 0.0 1.0; to: "icon_rect"; }
7130                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
7131                fixed: 0 1;
7132                min: 0 0;
7133                color: 0 0 0 0;
7134             }
7135             description { state: "visible" 0.0;
7136                visible: 1;
7137                align: 0.0 0.0;
7138                rel1 { relative: 0.0 1.0; to: "icon_rect"; }
7139                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
7140                fixed: 0 1;
7141                min: 0 0;
7142                color: 0 0 0 0;
7143             }
7144             description { state: "icononly" 0.0;
7145                inherit: "default" 0.0;
7146             }
7147          }
7148          part {
7149             name: "padding_before_text";
7150             type: RECT;
7151             scale: 1;
7152             mouse_events: 0;
7153             description { state: "default" 0.0; //when only icon or no icon is there
7154                align: 0.5 1.0;
7155                rel1 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "elm.text"; }
7156                rel2 { relative: 0.0 0.0; to_x: "padding_right_bottom"; to_y: "elm.text"; }
7157                fixed: 0 1;
7158                min: 0 0;
7159                color: 0 0 0 0;
7160             }
7161          }
7162          part { name: "elm.swallow.content";
7163             type: SWALLOW;
7164             scale: 1;
7165             clip_to: "disabler";
7166             description { state: "default" 0.0;
7167                visible: 0;
7168                align: 0.5 0.0;
7169                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7170                rel2 { relative: 0.0 1.0; to_x: "padding_right_bottom"; to_y: "padding_left_top"; }
7171                fixed: 0 1;
7172             }
7173             description { state: "visible" 0.0;
7174                fixed: 0 1;
7175                visible: 1;
7176                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7177                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7178                align: 0.5 0.5;
7179                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7180                rel2 { relative: 0.0 0.0; to_x: "padding_right_bottom"; to_y: "padding_before_text"; }
7181                aspect: 1.0 1.0;
7182                aspect_preference: HORIZONTAL;
7183             }
7184             description { state: "icononly" 0.0;
7185                visible: 1;
7186                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7187                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7188                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7189                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
7190                align: 0.5 0.5;
7191                aspect: 1.0 1.0;
7192                aspect_preference: HORIZONTAL;
7193             }
7194          }
7195          part { name: "elm.text";
7196             type: TEXTBLOCK;
7197             mouse_events: 0;
7198             scale: 1;
7199             clip_to: "disabler";
7200             description { state: "default" 0.0;
7201                visible: 0;
7202                rel1 { relative: 1.0 1.0; to_x: "padding_left_top"; to_y: "padding_after_icon"; }
7203                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
7204                align: 0.5 0.5;
7205                color: 255 255 255 255;
7206                fixed: 1 1;
7207                text {
7208                   style: "controlbar_style";
7209                   min: 0 1;
7210                   max: 0 1;
7211                }
7212             }
7213             description { state: "visible" 0.0;
7214                inherit: "default" 0.0;
7215                visible: 1;
7216             }
7217             description { state: "clicked" 0.0;
7218                inherit: "default" 0.0;
7219                visible: 1;
7220                color: 255 255 255 255;
7221             }
7222             description { state: "focused" 0.0;
7223                inherit: "default" 0.0;
7224                visible: 1;
7225                color: 255 255 255 255;
7226             }
7227          }
7228          part { name: "over2";
7229             type: RECT;
7230             mouse_events: 1;
7231             repeat_events: 1;
7232             ignore_flags: ON_HOLD;
7233             description { state: "default" 0.0;
7234                color: 0 0 0 0;
7235             }
7236          }
7237          part { name: "over3";
7238             type: RECT;
7239             mouse_events: 1;
7240             repeat_events: 1;
7241             description { state: "default" 0.0;
7242                color: 0 0 0 0;
7243             }
7244          }
7245          part { name: "disabler";
7246             type: RECT;
7247             description { state: "default" 0.0;
7248                color: 255 255 255 255;
7249                visible: 1;
7250             }
7251             description { state: "disabled" 0.0;
7252                inherit: "default" 0.0;
7253                color: 255 255 255 127;
7254                visible: 1;
7255             }
7256          }
7257       }
7258       programs {
7259          program { name: "button_click";
7260             signal: "mouse,down,1";
7261             source: "over2";
7262             action: SIGNAL_EMIT "elm,action,press" "";
7263             after: "button_click_anim";
7264          }
7265          program { name: "button_click_anim";
7266             action: STATE_SET "clicked" 0.0;
7267             target: "button_image";
7268             after: "text_clicked";
7269          }
7270          program { name: "text_clicked";
7271             script {
7272                new st[31];
7273                new Float:vl;
7274                get_state(PART:"elm.text", st, 30, vl);
7275                if (!strcmp(st, "visible"))
7276                   set_state(PART:"elm.text", "clicked", 0.0);
7277             }
7278          }
7279          program { name: "button_unpress";
7280             action: SIGNAL_EMIT "elm,action,unpress" "";
7281          }
7282          program { name: "button_mouseout_clicked";
7283             signal: "mouse,up,1";
7284             source: "over3";
7285             script {
7286                new st[31];
7287                new Float:vl;
7288                get_state(PART:"elm.swallow.content", st, 30, vl);
7289                if (strcmp(st, "icononly"))
7290                  {
7291                     emit("elm,action,default,text,set", "");
7292                     set_state(PART:"elm.text", "visible", 0.0);
7293                  }
7294                if(get_int(button_state) != BUTTON_STATE_DISABLED)
7295                   set_state(PART:"button_image", "default", 0.0);
7296             }
7297             after: button_unpress;
7298          }
7299          program { name: "button_unclick3";
7300             signal: "mouse,clicked,1";
7301             source: "over2";
7302             action: SIGNAL_EMIT "elm,action,click" "";
7303          }
7304          program { name: "text_show";
7305             signal: "elm,state,text,visible";
7306             source: "elm";
7307             script {
7308                new st[31];
7309                new Float:vl;
7310                get_state(PART:"elm.swallow.content", st, 30, vl);
7311                if (!strcmp(st, "icononly"))
7312                {
7313                   set_state(PART:"elm.swallow.content", "visible", 0.0);
7314                   set_state(PART:"icon_rect", "visible", 0.0);
7315                   set_state(PART:"padding_after_icon", "visible", 0.0);
7316                }
7317                set_state(PART:"elm.text", "visible", 0.0);
7318             }
7319          }
7320          program { name: "text_hide";
7321             signal: "elm,state,text,hidden";
7322             source: "elm";
7323             script {
7324                new st[31];
7325                new Float:vl;
7326                get_state(PART:"elm.swallow.content", st, 30, vl);
7327                if (!strcmp(st, "visible"))
7328                {
7329                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
7330                   set_state(PART:"icon_rect", "icononly", 0.0);
7331                   set_state(PART:"padding_after_icon", "icononly", 0.0);
7332                }
7333                set_state(PART:"elm.text", "default", 0.0);
7334             }
7335          }
7336          program { name: "icon_show";
7337             signal: "elm,state,icon,visible";
7338             source: "elm";
7339             script {
7340                new st[31];
7341                new Float:vl;
7342                get_state(PART:"elm.text", st, 30, vl);
7343                if (!strcmp(st, "visible"))
7344                {
7345                   set_state(PART:"elm.swallow.content", "visible", 0.0);
7346                   set_state(PART:"icon_rect", "visible", 0.0);
7347                   set_state(PART:"padding_after_icon", "visible", 0.0);
7348                }
7349                else
7350                {
7351                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
7352                   set_state(PART:"icon_rect", "icononly", 0.0);
7353                   set_state(PART:"padding_after_icon", "icononly", 0.0);
7354                }
7355             }
7356          }
7357          program { name: "icon_hide";
7358             signal: "elm,state,icon,hidden";
7359             source: "elm";
7360             action: STATE_SET "default" 0.0;
7361             target: "elm.swallow.content";
7362             target: "icon_rect";
7363             target: "padding_after_icon";
7364          }
7365          program { name: "disable";
7366             signal: "elm,state,disabled";
7367             source: "elm";
7368             action: STATE_SET "disabled" 0.0;
7369             target: "button_image";
7370             target: "disabler";
7371             after: "disable_text";
7372          }
7373          program { name: "disable_text";
7374             script {
7375                set_int(button_state, BUTTON_STATE_DISABLED);
7376                set_state(PART:"elm.text", "visible", 0.0);
7377             }
7378          }
7379          program { name: "enable";
7380             signal: "elm,state,enabled";
7381             source: "elm";
7382             action: STATE_SET "default" 0.0;
7383             target: "button_image";
7384             target: "disabler";
7385             after: "enable_text";
7386          }
7387          program { name: "enable_text";
7388             script {
7389                set_int(button_state, BUTTON_STATE_ENABLED);
7390                set_state(PART:"elm.text", "visible", 0.0);
7391             }
7392          }
7393          program { name: "focused";
7394             action: STATE_SET "focused" 0.0;
7395             target: "button_image";
7396             target: "elm.text";
7397          }
7398          program { name: "unfocused";
7399             action: STATE_SET "default" 0.0;
7400             target: "button_image";
7401             after: "unfocus_text";
7402          }
7403          program { name: "unfocus_text";
7404             action: STATE_SET "visible" 0.0;
7405             target: "elm.text";
7406          }
7407       }
7408    }
7409
7410 ///////////////////////////////////////////////////////////////////////////////////////
7411    group { name: "elm/button/base/controlbar/horizontal_center";
7412    script {
7413          public button_state = BUTTON_STATE_ENABLED;
7414       }
7415       parts {
7416          part { name: "button_image";
7417             type: RECT;
7418             mouse_events: 1;
7419             scale: 1;
7420             description { state: "default" 0.0;
7421                min: 20 30;
7422                rel1.offset: 5 5;
7423                rel2.offset: -6 -6;
7424                color: 0 0 0 0;
7425                visible: 0;
7426             }
7427             description { state: "clicked" 0.0;
7428                inherit: "default" 0.0;
7429                visible: 1;
7430             }
7431          }
7432          part {
7433             name: "padding_left_top";
7434             type: RECT;
7435             scale: 1;
7436             mouse_events: 0;
7437             description { state: "default" 0.0;
7438                align: 0.0 0.0;
7439                rel1.relative: 0.0 0.0;
7440                rel2.relative: 0.0 0.0;
7441                min: 10 5;
7442                fixed: 1 1;
7443                visible: 0;
7444             }
7445          }
7446          part {
7447             name: "padding_right_bottom";
7448             type: RECT;
7449             scale: 1;
7450             mouse_events: 0;
7451             description { state: "default" 0.0;
7452                align: 1.0 1.0;
7453                rel1.relative: 1.0 1.0;
7454                rel2.relative: 1.0 1.0;
7455                min: 10 5;
7456                fixed: 1 1;
7457                visible: 0;
7458             }
7459          }
7460          part {
7461             name: "icon_rect";
7462             type: RECT;
7463             scale: 1;
7464             mouse_events: 0;
7465             description { state: "default" 0.0;
7466                visible: 1;
7467                min: 0 0;
7468                fixed: 1 0;
7469                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7470                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
7471                align: 0.0 0.5;
7472                color: 0 0 0 0;
7473             }
7474             description { state: "visible" 0.0;
7475                visible: 1;
7476                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7477                fixed: 1 0;
7478                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7479                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
7480                align: 0.0 0.5;
7481                color: 0 0 0 0;
7482             }
7483             description { state: "icononly" 0.0;
7484                inherit: "default" 0.0;
7485             }
7486          }
7487          part {
7488             name: "padding_after_icon";
7489             type: RECT;
7490             scale: 1;
7491             mouse_events: 0;
7492             description { state: "default" 0.0; //when only icon or no icon is there
7493                align: 0.0 0.0;
7494                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
7495                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
7496                fixed: 1 0;
7497                min: 0 0;
7498                color: 0 0 0 0;
7499             }
7500             description { state: "visible" 0.0;
7501                visible: 1;
7502                align: 0.0 0.0;
7503                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
7504                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
7505                fixed: 1 0;
7506                min: 6 0;
7507                color: 0 0 0 0;
7508             }
7509             description { state: "icononly" 0.0;
7510                inherit: "default" 0.0;
7511             }
7512          }
7513          part {
7514             name: "padding_before_text";
7515             type: RECT;
7516             scale: 1;
7517             mouse_events: 0;
7518             description { state: "default" 0.0; //when only icon or no icon is there
7519                align: 1.0 0.5;
7520                rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
7521                rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
7522                fixed: 1 0;
7523                min: 6 0;
7524                color: 0 0 0 0;
7525             }
7526          }
7527          part { name: "elm.swallow.content";
7528             type: SWALLOW;
7529             scale: 1;
7530             clip_to: "disabler";
7531             description { state: "default" 0.0;
7532                visible: 0;
7533                align: 0.0 0.5;
7534                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7535                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
7536                fixed: 1 0;
7537             }
7538             description { state: "visible" 0.0;
7539                fixed: 1 0;
7540                visible: 1;
7541                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7542                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7543                align: 1.0 0.5;
7544                rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
7545                rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
7546                aspect: 1.0 1.0;
7547                aspect_preference: VERTICAL;
7548             }
7549             description { state: "icononly" 0.0;
7550                visible: 1;
7551                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7552                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7553                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7554                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
7555                align: 0.5 0.5;
7556                aspect: 1.0 1.0;
7557                aspect_preference: VERTICAL;
7558             }
7559          }
7560          part { name: "elm.text";
7561             type: TEXT;
7562             mouse_events: 0;
7563             scale: 1;
7564             clip_to: "disabler";
7565             description { state: "default" 0.0;
7566                visible: 0;
7567                rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
7568                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
7569                align: 0.5 0.5;
7570                color: 255 255 255 255;
7571                text {
7572                   font: "SLP:style=Medium";
7573                   size: 20;
7574                   min: 0 0;
7575                   max: 1 0;
7576                   align: 0.5 0.5;
7577                }
7578             }
7579             description { state: "visible" 0.0;
7580                inherit: "default" 0.0;
7581                visible: 1;
7582             }
7583             description { state: "clicked" 0.0;
7584                inherit: "default" 0.0;
7585                visible: 1;
7586                min: 0 0;
7587             }
7588             description { state: "focused" 0.0;
7589                inherit: "default" 0.0;
7590                visible: 1;
7591                min: 0 0;
7592                color: 255 255 255 255;
7593             }
7594          }
7595          part { name: "over2";
7596             type: RECT;
7597             mouse_events: 1;
7598             repeat_events: 1;
7599             ignore_flags: ON_HOLD;
7600             description { state: "default" 0.0;
7601                color: 0 0 0 0;
7602             }
7603          }
7604          part { name: "over3";
7605             type: RECT;
7606             mouse_events: 1;
7607             repeat_events: 1;
7608             description { state: "default" 0.0;
7609                color: 0 0 0 0;
7610             }
7611          }
7612          part { name: "disabler";
7613             type: RECT;
7614             description { state: "default" 0.0;
7615                color: 255 255 255 255;
7616             }
7617             description { state: "disabled" 0.0;
7618                color: 255 255 255 127;
7619             }
7620          }
7621       }
7622       programs {
7623          program { name: "button_click";
7624             signal: "mouse,down,1";
7625             source: "over2";
7626             action: SIGNAL_EMIT "elm,action,press" "";
7627             after: "button_click_anim";
7628          }
7629          program { name: "button_click_anim";
7630             action: STATE_SET "clicked" 0.0;
7631             target: "button_image";
7632             after: "text_clicked";
7633          }
7634          program { name: "text_clicked";
7635             script {
7636                new st[31];
7637                new Float:vl;
7638                get_state(PART:"elm.text", st, 30, vl);
7639                if (!strcmp(st, "visible"))
7640                   set_state(PART:"elm.text", "clicked", 0.0);
7641             }
7642          }
7643          program { name: "button_unpress";
7644             action: SIGNAL_EMIT "elm,action,unpress" "";
7645          }
7646          program { name: "button_mouseout_clicked";
7647             signal: "mouse,up,1";
7648             source: "over3";
7649             script {
7650                new st[31];
7651                new Float:vl;
7652                get_state(PART:"elm.swallow.content", st, 30, vl);
7653                if (strcmp(st, "icononly"))
7654                  {
7655                     emit("elm,action,default,text,set", "");
7656                     set_state(PART:"elm.text", "visible", 0.0);
7657                  }
7658                if(get_int(button_state) != BUTTON_STATE_DISABLED)
7659                   set_state(PART:"button_image", "default", 0.0);
7660             }
7661             after: button_unpress;
7662          }
7663          program { name: "button_unclick3";
7664             signal: "mouse,clicked,1";
7665             source: "over2";
7666             action: SIGNAL_EMIT "elm,action,click" "";
7667          }
7668          program { name: "text_show";
7669             signal: "elm,state,text,visible";
7670             source: "elm";
7671             script {
7672                new st[31];
7673                new Float:vl;
7674                get_state(PART:"elm.swallow.content", st, 30, vl);
7675                if (!strcmp(st, "icononly"))
7676                {
7677                   set_state(PART:"elm.swallow.content", "visible", 0.0);
7678                   set_state(PART:"icon_rect", "visible", 0.0);
7679                   set_state(PART:"padding_after_icon", "visible", 0.0);
7680                }
7681                set_state(PART:"elm.text", "visible", 0.0);
7682             }
7683          }
7684          program { name: "text_hide";
7685             signal: "elm,state,text,hidden";
7686             source: "elm";
7687             script {
7688                new st[31];
7689                new Float:vl;
7690                get_state(PART:"elm.swallow.content", st, 30, vl);
7691                if (!strcmp(st, "visible"))
7692                {
7693                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
7694                   set_state(PART:"icon_rect", "icononly", 0.0);
7695                   set_state(PART:"padding_after_icon", "icononly", 0.0);
7696                }
7697                set_state(PART:"elm.text", "default", 0.0);
7698             }
7699          }
7700          program { name: "icon_show";
7701             signal: "elm,state,icon,visible";
7702             source: "elm";
7703             script {
7704                new st[31];
7705                new Float:vl;
7706                get_state(PART:"elm.text", st, 30, vl);
7707                if (!strcmp(st, "visible"))
7708                {
7709                   set_state(PART:"elm.swallow.content", "visible", 0.0);
7710                   set_state(PART:"icon_rect", "visible", 0.0);
7711                   set_state(PART:"padding_after_icon", "visible", 0.0);
7712                }
7713                else
7714                {
7715                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
7716                   set_state(PART:"icon_rect", "icononly", 0.0);
7717                   set_state(PART:"padding_after_icon", "icononly", 0.0);
7718                }
7719             }
7720          }
7721          program { name: "icon_hide";
7722             signal: "elm,state,icon,hidden";
7723             source: "elm";
7724             action: STATE_SET "default" 0.0;
7725             target: "elm.swallow.content";
7726             target: "icon_rect";
7727             target: "padding_after_icon";
7728          }
7729          program { name: "disable";
7730             signal: "elm,state,disabled";
7731             source: "elm";
7732             action: STATE_SET "disabled" 0.0;
7733             target: "disabler";
7734             after: "disable_text";
7735          }
7736          program { name: "disable_text";
7737             script {
7738                set_int(button_state, BUTTON_STATE_DISABLED);
7739                set_state(PART:"elm.text", "visible", 0.0);
7740             }
7741          }
7742          program { name: "enable";
7743             signal: "elm,state,enabled";
7744             source: "elm";
7745             action: STATE_SET "default" 0.0;
7746             target: "disabler";
7747             after: "enable_text";
7748          }
7749          program { name: "enable_text";
7750             script {
7751                set_int(button_state, BUTTON_STATE_ENABLED);
7752                set_state(PART:"elm.text", "visible", 0.0);
7753             }
7754          }
7755          program { name: "focused";
7756             action: STATE_SET "focused" 0.0;
7757             target: "button_image";
7758             target: "elm.text";
7759          }
7760          program { name: "unfocused";
7761             action: STATE_SET "default" 0.0;
7762             target: "button_image";
7763             after: "unfocus_text";
7764          }
7765          program { name: "unfocus_text";
7766             action: STATE_SET "visible" 0.0;
7767             target: "elm.text";
7768          }
7769       }
7770    }
7771
7772    ///////////////////////////////////////////////////////////////////////////////////////
7773    group { name: "elm/button/base/controlbar/horizontal_left";
7774       script {
7775          public button_state = BUTTON_STATE_ENABLED;
7776       }
7777       parts {
7778          part { name: "button_image";
7779             type: RECT;
7780             mouse_events: 1;
7781             scale: 1;
7782             description { state: "default" 0.0;
7783                min: 20 30;
7784                rel1.offset: 5 5;
7785                rel2.offset: -6 -6;
7786                color: 0 0 0 0;
7787                visible: 0;
7788             }
7789             description { state: "clicked" 0.0;
7790                inherit: "default" 0.0;
7791                visible: 1;
7792             }
7793          }
7794          part {
7795             name: "padding_left_top";
7796             type: RECT;
7797             scale: 1;
7798             mouse_events: 0;
7799             description { state: "default" 0.0;
7800                align: 0.0 0.0;
7801                rel1.relative: 0.0 0.0;
7802                rel2.relative: 0.0 0.0;
7803                min: 10 5;
7804                fixed: 1 1;
7805                visible: 0;
7806             }
7807          }
7808          part {
7809             name: "padding_right_bottom";
7810             type: RECT;
7811             scale: 1;
7812             mouse_events: 0;
7813             description { state: "default" 0.0;
7814                align: 1.0 1.0;
7815                rel1.relative: 1.0 1.0;
7816                rel2.relative: 1.0 1.0;
7817                min: 10 5;
7818                fixed: 1 1;
7819                visible: 0;
7820             }
7821          }
7822          part {
7823             name: "icon_rect";
7824             type: RECT;
7825             scale: 1;
7826             mouse_events: 0;
7827             description { state: "default" 0.0;
7828                visible: 1;
7829                min: 0 0;
7830                fixed: 1 0;
7831                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7832                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
7833                align: 0.0 0.5;
7834                color: 0 0 0 0;
7835             }
7836             description { state: "visible" 0.0;
7837                visible: 1;
7838                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7839                fixed: 1 0;
7840                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7841                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
7842                align: 0.0 0.5;
7843                color: 0 0 0 0;
7844             }
7845             description { state: "icononly" 0.0;
7846                inherit: "default" 0.0;
7847             }
7848          }
7849          part {
7850             name: "padding_after_icon";
7851             type: RECT;
7852             scale: 1;
7853             mouse_events: 0;
7854             description { state: "default" 0.0; //when only icon or no icon is there
7855                align: 0.0 0.0;
7856                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
7857                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
7858                fixed: 1 0;
7859                min: 0 0;
7860                color: 0 0 0 0;
7861             }
7862             description { state: "visible" 0.0;
7863                visible: 1;
7864                align: 0.0 0.0;
7865                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
7866                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
7867                fixed: 1 0;
7868                min: 6 0;
7869                color: 0 0 0 0;
7870             }
7871             description { state: "icononly" 0.0;
7872                inherit: "default" 0.0;
7873             }
7874          }
7875          part {
7876             name: "padding_before_text";
7877             type: RECT;
7878             scale: 1;
7879             mouse_events: 0;
7880             description { state: "default" 0.0; //when only icon or no icon is there
7881                align: 1.0 0.5;
7882                rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
7883                rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
7884                fixed: 1 0;
7885                min: 6 0;
7886                color: 0 0 0 0;
7887             }
7888          }
7889          part { name: "elm.swallow.content";
7890             type: SWALLOW;
7891             scale: 1;
7892             clip_to: "disabler";
7893             description { state: "default" 0.0;
7894                visible: 0;
7895                align: 0.0 0.5;
7896                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7897                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
7898                fixed: 1 0;
7899             }
7900             description { state: "visible" 0.0;
7901                fixed: 1 0;
7902                visible: 1;
7903                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7904                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7905                align: 1.0 0.5;
7906                rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
7907                rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
7908                aspect: 1.0 1.0;
7909                aspect_preference: VERTICAL;
7910             }
7911             description { state: "icononly" 0.0;
7912                visible: 1;
7913                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7914                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
7915                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
7916                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
7917                align: 0.5 0.5;
7918                aspect: 1.0 1.0;
7919                aspect_preference: VERTICAL;
7920             }
7921          }
7922          part { name: "elm.text";
7923             type: TEXT;
7924             mouse_events: 0;
7925             scale: 1;
7926             clip_to: "disabler";
7927             description { state: "default" 0.0;
7928                visible: 0;
7929                rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
7930                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
7931                align: 0.0 0.5;
7932                color: 255 255 255 255;
7933                text {
7934                   font: "SLP:style=Medium";
7935                   size: 20;
7936                   min: 0 0;
7937                   max: 1 0;
7938                   align: 0.0 0.5;
7939                }
7940             }
7941             description { state: "visible" 0.0;
7942                inherit: "default" 0.0;
7943                visible: 1;
7944             }
7945             description { state: "clicked" 0.0;
7946                inherit: "default" 0.0;
7947                visible: 1;
7948                min: 0 0;
7949             }
7950             description { state: "focused" 0.0;
7951                inherit: "default" 0.0;
7952                visible: 1;
7953                min: 0 0;
7954                color: 255 255 255 255;
7955             }
7956          }
7957          part { name: "over2";
7958             type: RECT;
7959             mouse_events: 1;
7960             repeat_events: 1;
7961             ignore_flags: ON_HOLD;
7962             description { state: "default" 0.0;
7963                color: 0 0 0 0;
7964             }
7965          }
7966          part { name: "over3";
7967             type: RECT;
7968             mouse_events: 1;
7969             repeat_events: 1;
7970             description { state: "default" 0.0;
7971                color: 0 0 0 0;
7972             }
7973          }
7974          part { name: "disabler";
7975             type: RECT;
7976             description { state: "default" 0.0;
7977                color: 255 255 255 255;
7978             }
7979             description { state: "disabled" 0.0;
7980                color: 255 255 255 127;
7981             }
7982          }
7983       }
7984       programs {
7985          program { name: "button_click";
7986             signal: "mouse,down,1";
7987             source: "over2";
7988             action: SIGNAL_EMIT "elm,action,press" "";
7989             after: "button_click_anim";
7990          }
7991          program { name: "button_click_anim";
7992             action: STATE_SET "clicked" 0.0;
7993             target: "button_image";
7994             after: "text_clicked";
7995          }
7996          program { name: "text_clicked";
7997             script {
7998                new st[31];
7999                new Float:vl;
8000                get_state(PART:"elm.text", st, 30, vl);
8001                if (!strcmp(st, "visible"))
8002                   set_state(PART:"elm.text", "clicked", 0.0);
8003             }
8004          }
8005          program { name: "button_unpress";
8006             action: SIGNAL_EMIT "elm,action,unpress" "";
8007          }
8008          program { name: "button_mouseout_clicked";
8009             signal: "mouse,up,1";
8010             source: "over3";
8011             script {
8012                new st[31];
8013                new Float:vl;
8014                get_state(PART:"elm.swallow.content", st, 30, vl);
8015                if (strcmp(st, "icononly"))
8016                  {
8017                     emit("elm,action,default,text,set", "");
8018                     set_state(PART:"elm.text", "visible", 0.0);
8019                  }
8020                if(get_int(button_state) != BUTTON_STATE_DISABLED)
8021                   set_state(PART:"button_image", "default", 0.0);
8022             }
8023             after: button_unpress;
8024          }
8025          program { name: "button_unclick3";
8026             signal: "mouse,clicked,1";
8027             source: "over2";
8028             action: SIGNAL_EMIT "elm,action,click" "";
8029          }
8030          program { name: "text_show";
8031             signal: "elm,state,text,visible";
8032             source: "elm";
8033             script {
8034                new st[31];
8035                new Float:vl;
8036                get_state(PART:"elm.swallow.content", st, 30, vl);
8037                if (!strcmp(st, "icononly"))
8038                {
8039                   set_state(PART:"elm.swallow.content", "visible", 0.0);
8040                   set_state(PART:"icon_rect", "visible", 0.0);
8041                   set_state(PART:"padding_after_icon", "visible", 0.0);
8042                }
8043                set_state(PART:"elm.text", "visible", 0.0);
8044             }
8045          }
8046          program { name: "text_hide";
8047             signal: "elm,state,text,hidden";
8048             source: "elm";
8049             script {
8050                new st[31];
8051                new Float:vl;
8052                get_state(PART:"elm.swallow.content", st, 30, vl);
8053                if (!strcmp(st, "visible"))
8054                {
8055                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
8056                   set_state(PART:"icon_rect", "icononly", 0.0);
8057                   set_state(PART:"padding_after_icon", "icononly", 0.0);
8058                }
8059                set_state(PART:"elm.text", "default", 0.0);
8060             }
8061          }
8062          program { name: "icon_show";
8063             signal: "elm,state,icon,visible";
8064             source: "elm";
8065             script {
8066                new st[31];
8067                new Float:vl;
8068                get_state(PART:"elm.text", st, 30, vl);
8069                if (!strcmp(st, "visible"))
8070                {
8071                   set_state(PART:"elm.swallow.content", "visible", 0.0);
8072                   set_state(PART:"icon_rect", "visible", 0.0);
8073                   set_state(PART:"padding_after_icon", "visible", 0.0);
8074                }
8075                else
8076                {
8077                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
8078                   set_state(PART:"icon_rect", "icononly", 0.0);
8079                   set_state(PART:"padding_after_icon", "icononly", 0.0);
8080                }
8081             }
8082          }
8083          program { name: "icon_hide";
8084             signal: "elm,state,icon,hidden";
8085             source: "elm";
8086             action: STATE_SET "default" 0.0;
8087             target: "elm.swallow.content";
8088             target: "icon_rect";
8089             target: "padding_after_icon";
8090          }
8091          program { name: "disable";
8092             signal: "elm,state,disabled";
8093             source: "elm";
8094             action: STATE_SET "disabled" 0.0;
8095             target: "disabler";
8096             after: "disable_text";
8097          }
8098          program { name: "disable_text";
8099             script {
8100                set_int(button_state, BUTTON_STATE_DISABLED);
8101                set_state(PART:"elm.text", "visible", 0.0);
8102             }
8103          }
8104          program { name: "enable";
8105             signal: "elm,state,enabled";
8106             source: "elm";
8107             action: STATE_SET "default" 0.0;
8108             target: "disabler";
8109             after: "enable_text";
8110          }
8111          program { name: "enable_text";
8112             script {
8113                set_int(button_state, BUTTON_STATE_ENABLED);
8114                set_state(PART:"elm.text", "visible", 0.0);
8115             }
8116          }
8117          program { name: "focused";
8118             action: STATE_SET "focused" 0.0;
8119             target: "button_image";
8120             target: "elm.text";
8121          }
8122          program { name: "unfocused";
8123             action: STATE_SET "default" 0.0;
8124             target: "button_image";
8125             after: "unfocus_text";
8126          }
8127          program { name: "unfocus_text";
8128             action: STATE_SET "visible" 0.0;
8129             target: "elm.text";
8130          }
8131       }
8132    }
8133
8134 ///////////////////////////////////////////////////////////////////////////////////////
8135    group { name: "elm/button/base/controlbar/horizontal_right";
8136       script {
8137          public button_state = BUTTON_STATE_ENABLED;
8138       }
8139       parts {
8140          part { name: "button_image";
8141             type: RECT;
8142             mouse_events: 1;
8143             scale: 1;
8144             description { state: "default" 0.0;
8145                min: 20 30;
8146                rel1.offset: 5 5;
8147                rel2.offset: -6 -6;
8148                color: 0 0 0 0;
8149                visible: 0;
8150             }
8151             description { state: "clicked" 0.0;
8152                inherit: "default" 0.0;
8153                visible: 1;
8154             }
8155          }
8156          part {
8157             name: "padding_left_top";
8158             type: RECT;
8159             scale: 1;
8160             mouse_events: 0;
8161             description { state: "default" 0.0;
8162                align: 0.0 0.0;
8163                rel1.relative: 0.0 0.0;
8164                rel2.relative: 0.0 0.0;
8165                min: 10 5;
8166                fixed: 1 1;
8167                visible: 0;
8168             }
8169          }
8170          part {
8171             name: "padding_right_bottom";
8172             type: RECT;
8173             scale: 1;
8174             mouse_events: 0;
8175             description { state: "default" 0.0;
8176                align: 1.0 1.0;
8177                rel1.relative: 1.0 1.0;
8178                rel2.relative: 1.0 1.0;
8179                min: 10 5;
8180                fixed: 1 1;
8181                visible: 0;
8182             }
8183          }
8184          part {
8185             name: "icon_rect";
8186             type: RECT;
8187             scale: 1;
8188             mouse_events: 0;
8189             description { state: "default" 0.0;
8190                visible: 1;
8191                min: 0 0;
8192                fixed: 1 0;
8193                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
8194                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
8195                align: 0.0 0.5;
8196                color: 0 0 0 0;
8197             }
8198             description { state: "visible" 0.0;
8199                visible: 1;
8200                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8201                fixed: 1 0;
8202                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
8203                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
8204                align: 0.0 0.5;
8205                color: 0 0 0 0;
8206             }
8207             description { state: "icononly" 0.0;
8208                inherit: "default" 0.0;
8209             }
8210          }
8211          part {
8212             name: "padding_after_icon";
8213             type: RECT;
8214             scale: 1;
8215             mouse_events: 0;
8216             description { state: "default" 0.0; //when only icon or no icon is there
8217                align: 0.0 0.0;
8218                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
8219                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
8220                fixed: 1 0;
8221                min: 0 0;
8222                color: 0 0 0 0;
8223             }
8224             description { state: "visible" 0.0;
8225                visible: 1;
8226                align: 0.0 0.0;
8227                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
8228                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
8229                fixed: 1 0;
8230                min: 6 0;
8231                color: 0 0 0 0;
8232             }
8233             description { state: "icononly" 0.0;
8234                inherit: "default" 0.0;
8235             }
8236          }
8237          part {
8238             name: "padding_before_text";
8239             type: RECT;
8240             scale: 1;
8241             mouse_events: 0;
8242             description { state: "default" 0.0; //when only icon or no icon is there
8243                align: 1.0 0.5;
8244                rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
8245                rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
8246                fixed: 1 0;
8247                min: 6 0;
8248                color: 0 0 0 0;
8249             }
8250          }
8251          part { name: "elm.swallow.content";
8252             type: SWALLOW;
8253             scale: 1;
8254             clip_to: "disabler";
8255             description { state: "default" 0.0;
8256                visible: 0;
8257                align: 0.0 0.5;
8258                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
8259                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
8260                fixed: 1 0;
8261             }
8262             description { state: "visible" 0.0;
8263                fixed: 1 0;
8264                visible: 1;
8265                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8266                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8267                align: 1.0 0.5;
8268                rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
8269                rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
8270                aspect: 1.0 1.0;
8271                aspect_preference: VERTICAL;
8272             }
8273             description { state: "icononly" 0.0;
8274                visible: 1;
8275                min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8276                max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
8277                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
8278                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
8279                align: 0.5 0.5;
8280                aspect: 1.0 1.0;
8281                aspect_preference: VERTICAL;
8282             }
8283          }
8284          part { name: "elm.text";
8285             type: TEXT;
8286             mouse_events: 0;
8287             scale: 1;
8288             clip_to: "disabler";
8289             description { state: "default" 0.0;
8290                visible: 0;
8291                rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
8292                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
8293                align: 1.0 0.5;
8294                color: 255 255 255 255;
8295                text {
8296                   font: "SLP:style=Medium";
8297                   size: 20;
8298                   min: 0 0;
8299                   max: 1 0;
8300                   align: 1.0 0.5;
8301                }
8302             }
8303             description { state: "visible" 0.0;
8304                inherit: "default" 0.0;
8305                visible: 1;
8306             }
8307             description { state: "clicked" 0.0;
8308                inherit: "default" 0.0;
8309                visible: 1;
8310                min: 0 0;
8311             }
8312             description { state: "focused" 0.0;
8313                inherit: "default" 0.0;
8314                visible: 1;
8315                min: 0 0;
8316                color: 255 255 255 255;
8317             }
8318          }
8319          part { name: "over2";
8320             type: RECT;
8321             mouse_events: 1;
8322             repeat_events: 1;
8323             ignore_flags: ON_HOLD;
8324             description { state: "default" 0.0;
8325                color: 0 0 0 0;
8326             }
8327          }
8328          part { name: "over3";
8329             type: RECT;
8330             mouse_events: 1;
8331             repeat_events: 1;
8332             description { state: "default" 0.0;
8333                color: 0 0 0 0;
8334             }
8335          }
8336          part { name: "disabler";
8337             type: RECT;
8338             description { state: "default" 0.0;
8339                color: 255 255 255 255;
8340             }
8341             description { state: "disabled" 0.0;
8342                color: 255 255 255 127;
8343             }
8344          }
8345       }
8346       programs {
8347          program { name: "button_click";
8348             signal: "mouse,down,1";
8349             source: "over2";
8350             action: SIGNAL_EMIT "elm,action,press" "";
8351             after: "button_click_anim";
8352          }
8353          program { name: "button_click_anim";
8354             action: STATE_SET "clicked" 0.0;
8355             target: "button_image";
8356             after: "text_clicked";
8357          }
8358          program { name: "text_clicked";
8359             script {
8360                new st[31];
8361                new Float:vl;
8362                get_state(PART:"elm.text", st, 30, vl);
8363                if (!strcmp(st, "visible"))
8364                   set_state(PART:"elm.text", "clicked", 0.0);
8365             }
8366          }
8367          program { name: "button_unpress";
8368             action: SIGNAL_EMIT "elm,action,unpress" "";
8369          }
8370          program { name: "button_mouseout_clicked";
8371             signal: "mouse,up,1";
8372             source: "over3";
8373             script {
8374                new st[31];
8375                new Float:vl;
8376                get_state(PART:"elm.swallow.content", st, 30, vl);
8377                if (strcmp(st, "icononly"))
8378                  {
8379                     emit("elm,action,default,text,set", "");
8380                     set_state(PART:"elm.text", "visible", 0.0);
8381                  }
8382                if(get_int(button_state) != BUTTON_STATE_DISABLED)
8383                   set_state(PART:"button_image", "default", 0.0);
8384             }
8385             after: button_unpress;
8386          }
8387          program { name: "button_unclick3";
8388             signal: "mouse,clicked,1";
8389             source: "over2";
8390             action: SIGNAL_EMIT "elm,action,click" "";
8391          }
8392          program { name: "text_show";
8393             signal: "elm,state,text,visible";
8394             source: "elm";
8395             script {
8396                new st[31];
8397                new Float:vl;
8398                get_state(PART:"elm.swallow.content", st, 30, vl);
8399                if (!strcmp(st, "icononly"))
8400                {
8401                   set_state(PART:"elm.swallow.content", "visible", 0.0);
8402                   set_state(PART:"icon_rect", "visible", 0.0);
8403                   set_state(PART:"padding_after_icon", "visible", 0.0);
8404                }
8405                set_state(PART:"elm.text", "visible", 0.0);
8406             }
8407          }
8408          program { name: "text_hide";
8409             signal: "elm,state,text,hidden";
8410             source: "elm";
8411             script {
8412                new st[31];
8413                new Float:vl;
8414                get_state(PART:"elm.swallow.content", st, 30, vl);
8415                if (!strcmp(st, "visible"))
8416                {
8417                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
8418                   set_state(PART:"icon_rect", "icononly", 0.0);
8419                   set_state(PART:"padding_after_icon", "icononly", 0.0);
8420                }
8421                set_state(PART:"elm.text", "default", 0.0);
8422             }
8423          }
8424          program { name: "icon_show";
8425             signal: "elm,state,icon,visible";
8426             source: "elm";
8427             script {
8428                new st[31];
8429                new Float:vl;
8430                get_state(PART:"elm.text", st, 30, vl);
8431                if (!strcmp(st, "visible"))
8432                {
8433                   set_state(PART:"elm.swallow.content", "visible", 0.0);
8434                   set_state(PART:"icon_rect", "visible", 0.0);
8435                   set_state(PART:"padding_after_icon", "visible", 0.0);
8436                }
8437                else
8438                {
8439                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
8440                   set_state(PART:"icon_rect", "icononly", 0.0);
8441                   set_state(PART:"padding_after_icon", "icononly", 0.0);
8442                }
8443             }
8444          }
8445          program { name: "icon_hide";
8446             signal: "elm,state,icon,hidden";
8447             source: "elm";
8448             action: STATE_SET "default" 0.0;
8449             target: "elm.swallow.content";
8450             target: "icon_rect";
8451             target: "padding_after_icon";
8452          }
8453          program { name: "disable";
8454             signal: "elm,state,disabled";
8455             source: "elm";
8456             action: STATE_SET "disabled" 0.0;
8457             target: "disabler";
8458             after: "disable_text";
8459          }
8460          program { name: "disable_text";
8461             script {
8462                set_int(button_state, BUTTON_STATE_DISABLED);
8463                set_state(PART:"elm.text", "visible", 0.0);
8464             }
8465          }
8466          program { name: "enable";
8467             signal: "elm,state,enabled";
8468             source: "elm";
8469             action: STATE_SET "default" 0.0;
8470             target: "disabler";
8471             after: "enable_text";
8472          }
8473          program { name: "enable_text";
8474             script {
8475                set_int(button_state, BUTTON_STATE_ENABLED);
8476                set_state(PART:"elm.text", "visible", 0.0);
8477             }
8478          }
8479          program { name: "focused";
8480             action: STATE_SET "focused" 0.0;
8481             target: "button_image";
8482             target: "elm.text";
8483          }
8484          program { name: "unfocused";
8485             action: STATE_SET "default" 0.0;
8486             target: "button_image";
8487             after: "unfocus_text";
8488          }
8489          program { name: "unfocus_text";
8490             action: STATE_SET "visible" 0.0;
8491             target: "elm.text";
8492          }
8493       }
8494    }
8495
8496 ///////////////////////////////////////////////////////////////////////////////////////
8497    group { name: "elm/button/base/tickernoti";
8498       images {
8499          image: "00_button_06_normal.png" COMP;
8500          image: "00_button_06_press.png" COMP;
8501          image: "00_button_06_dim.png" COMP;
8502       }
8503       script {
8504          public button_state = BUTTON_STATE_ENABLED;
8505       }
8506       parts {
8507          part { name: "button_image";
8508             scale: 1;
8509             description { state: "default" 0.0;
8510                image {
8511                   normal: "00_button_06_normal.png";
8512                   border: BUTTON_TICKERNOTI_BG_BORDER_INC;
8513                   border_scale: 1;
8514                }
8515             }
8516             description { state: "clicked" 0.0;
8517                inherit: "default" 0.0;
8518                image {
8519                   normal: "00_button_06_press.png";
8520                }
8521             }
8522             description { state: "disabled" 0.0;
8523                inherit: "default" 0.0;
8524                image {
8525                   normal: "00_button_06_dim.png";
8526                }
8527             }
8528             description { state: "focused" 0.0;
8529                inherit: "default" 0.0;
8530                image {
8531                   normal: "00_button_06_press.png";
8532                }
8533             }
8534          }
8535          part { name: "padding_left_top";
8536             type: RECT;
8537             scale: 1;
8538             mouse_events: 0;
8539             description { state: "default" 0.0;
8540                align: 0.0 0.0;
8541                rel2 {
8542                   relative: 0.0 0.0;
8543                }
8544                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
8545                fixed: 1 1;
8546                visible: 0;
8547             }
8548          }
8549          part { name: "bg";
8550             type: RECT;
8551             scale: 1;
8552             mouse_events: 0;
8553             description { state: "default" 0.0;
8554                min: BUTTON_TICKERNOTI_BG_MIN_INC;
8555                visible: 0;
8556             }
8557             description { state: "visible" 0.0;
8558                inherit: "default" 0.0;
8559                min: BUTTON_TICKERNOTI_VISIBLE_BG_MIN_INC;
8560             }
8561             description { state: "icononly" 0.0;
8562                inherit: "default" 0.0;
8563                min: BUTTON_TICKERNOTI_ICONONLY_BG_MIN_INC;
8564             }
8565          }
8566          part { name: "padding_right_bottom";
8567             type: RECT;
8568             scale: 1;
8569             mouse_events: 0;
8570             description { state: "default" 0.0;
8571                align: 1.0 1.0;
8572                rel1 {
8573                   relative: 1.0 1.0;
8574                }
8575                min: BUTTON_TICKERNOTI_PADDING_MIN_INC;
8576                fixed: 1 1;
8577                visible: 0;
8578             }
8579          }
8580          part { name: "icon_rect";
8581             type: RECT;
8582             scale: 1;
8583             mouse_events: 0;
8584             description { state: "default" 0.0;
8585                visible: 0;
8586                min: 0 0;
8587                fixed: 1 0;
8588                rel1 {
8589                   relative: 1.0 1.0;
8590                   to: "padding_left_top";
8591                }
8592                rel2 {
8593                   relative: 1.0 0.0;
8594                   to_x: "padding_left_top";
8595                   to_y: "padding_right_bottom";
8596                }
8597                align: 0.0 0.5;
8598             }
8599             description { state: "visible" 0.0;
8600                visible: 0;
8601                min: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
8602                max: BUTTON_TICKERNOTI_VISIBLE_ICON_RECT_MIN_MAX_INC;
8603                fixed: 1 0;
8604                rel1 {
8605                   relative: 1.0 1.0;
8606                   to: "padding_left_top";
8607                }
8608                rel2 {
8609                relative: 1.0 0.0;
8610                   to_x: "padding_left_top";
8611                   to_y: "padding_right_bottom";
8612                }
8613                align: 0.0 0.5;
8614             }
8615             description { state: "icononly" 0.0;
8616                inherit: "default" 0.0;
8617             }
8618          }
8619          part { name: "padding_after_icon";
8620             type: RECT;
8621             scale: 1;
8622             mouse_events: 0;
8623             description { state: "default" 0.0; //when only icon or no icon is there
8624                align: 0.0 0.0;
8625                rel1 {
8626                   relative: 1.0 0.0;
8627                   to: "icon_rect";
8628                }
8629                rel2 {
8630                   to: "icon_rect";
8631                }
8632                fixed: 1 0;
8633                min: 0 0;
8634                visible: 0;
8635             }
8636             description { state: "visible" 0.0;
8637                visible: 0;
8638                align: 0.0 0.0;
8639                rel1 {
8640                   relative: 1.0 0.0;
8641                   to: "icon_rect";
8642                }
8643                rel2 {
8644                   to: "icon_rect";
8645                }
8646                fixed: 1 0;
8647                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
8648             }
8649             description { state: "icononly" 0.0;
8650                inherit: "default" 0.0;
8651             }
8652          }
8653          part { name: "padding_before_text";
8654             type: RECT;
8655             scale: 1;
8656             mouse_events: 0;
8657             description { state: "default" 0.0; //when only icon or no icon is there
8658                align: 1.0 0.5;
8659                rel1 {
8660                   relative: 0.0 1.0;
8661                   to_x: "elm.text";
8662                   to_y: "padding_left_top";
8663                }
8664                rel2 {
8665                   relative: 0.0 0.0;
8666                   to_x: "elm.text";
8667                   to_y: "padding_right_bottom";
8668                }
8669                fixed: 1 0;
8670                min: BUTTON_TICKERNOTI_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
8671                visible: 0;
8672             }
8673          }
8674          part { name: "elm.swallow.content";
8675             type: SWALLOW;
8676             scale: 1;
8677             clip_to: "clipper";
8678             description { state: "default" 0.0;
8679                visible: 0;
8680                align: 0.0 0.5;
8681                rel1 {
8682                   relative: 1.0 1.0;
8683                   to: "padding_left_top";
8684                }
8685                rel2 {
8686                   relative: 1.0 0.0;
8687                   to_x: "padding_left_top";
8688                   to_y: "padding_right_bottom";
8689                }
8690                fixed: 1 0;
8691             }
8692             description { state: "visible" 0.0;
8693                fixed: 1 0;
8694                min: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
8695                max: BUTTON_TICKERNOTI_VISIBLE_ICON_MIN_MAX_INC;
8696                align: 1.0 0.5;
8697                rel1 {
8698                   relative: 0.0 1.0;
8699                   to_x: "padding_before_text";
8700                   to_y: "padding_left_top";
8701                }
8702                rel2 {
8703                   relative: 0.0 0.0;
8704                   to_x: "padding_before_text";
8705                   to_y: "padding_right_bottom";
8706                }
8707             }
8708             description { state: "icononly" 0.0;
8709                min: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
8710                max: BUTTON_TICKERNOTI_ICONONLY_ICON_MIN_MAX_INC;
8711                align: 0.5 0.5;
8712             }
8713          }
8714          part { name: "elm.text";
8715             type: TEXT;
8716             mouse_events: 0;
8717             scale: 1;
8718             clip_to: "clipper";
8719             description { state: "default" 0.0;
8720                visible: 0;
8721                rel1 {
8722                   relative: 1.0 1.0;
8723                   to_x: "padding_after_icon";
8724                   to_y: "padding_left_top";
8725                }
8726                rel2 {
8727                   relative: 0.0 0.0;
8728                   to: "padding_right_bottom";
8729                }
8730                color: BUTTON_TICKERNOTI_NORMAL_COLOR_INC;
8731                text {
8732                   font: "SLP:style=Medium";
8733                   size: BUTTON_TICKERNOTI_FONT_SIZE_INC;
8734                   min: 1 0;
8735                   max: 1 0;
8736                }
8737             }
8738             description { state: "visible" 0.0;
8739                inherit: "default" 0.0;
8740                visible: 1;
8741             }
8742             description { state: "clicked" 0.0;
8743                inherit: "default" 0.0;
8744                visible: 1;
8745                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
8746             }
8747             description { state: "disabled" 0.0;
8748                inherit: "default" 0.0;
8749                color: 0 0 0 128;
8750             }
8751             description { state: "disabled_visible" 0.0;
8752                inherit: "default" 0.0;
8753                color: BUTTON_TICKERNOTI_DISABLED_COLOR_INC;
8754                visible: 1;
8755             }
8756             description { state: "focused" 0.0;
8757                inherit: "default" 0.0;
8758                visible: 1;
8759                color: BUTTON_TICKERNOTI_PRESSED_COLOR_INC;
8760             }
8761          }
8762          part { name: "over2";
8763             type: RECT;
8764             repeat_events: 1;
8765             ignore_flags: ON_HOLD;
8766             description { state: "default" 0.0;
8767                color: 0 0 0 0;
8768             }
8769          }
8770          part { name: "over3";
8771             type: RECT;
8772             repeat_events: 1;
8773             description { state: "default" 0.0;
8774                color: 0 0 0 0;
8775             }
8776          }
8777          part { name: "clipper";
8778             type: RECT;
8779             description { state: "default" 0.0;
8780                color: 255 255 255 255;
8781             }
8782          }
8783          part { name: "disabler";
8784             type: RECT;
8785             description { state: "default" 0.0;
8786                color: 0 0 0 0;
8787                visible: 0;
8788             }
8789             description { state: "disabled" 0.0;
8790                inherit: "default" 0.0;
8791                visible: 1;
8792             }
8793          }
8794       }
8795       programs {
8796          program { name: "button_click";
8797             signal: "mouse,down,1";
8798             source: "over2";
8799             action: SIGNAL_EMIT "elm,action,press" "";
8800             after: "button_click_anim";
8801          }
8802          program { name: "button_click_anim";
8803             action: STATE_SET "clicked" 0.0;
8804             target: "button_image";
8805             after: "text_clicked";
8806          }
8807          program { name: "text_clicked";
8808             script {
8809                new st[31];
8810                new Float:vl;
8811                get_state(PART:"elm.text", st, 30, vl);
8812                if (!strcmp(st, "visible"))
8813                  set_state(PART:"elm.text", "clicked", 0.0);
8814             }
8815          }
8816          program { name: "button_unpress";
8817             action: SIGNAL_EMIT "elm,action,unpress" "";
8818          }
8819          program { name: "button_mouseout_clicked";
8820             signal: "mouse,up,1";
8821             source: "over3";
8822             script {
8823                new st[31];
8824                new Float:vl;
8825                get_state(PART:"elm.swallow.content", st, 30, vl);
8826                if (strcmp(st, "icononly"))
8827                  {
8828                     emit("elm,action,default,text,set", "");
8829                     set_state(PART:"elm.text", "visible", 0.0);
8830                  }
8831                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8832                  set_state(PART:"button_image", "default", 0.0);
8833             }
8834             after: button_unpress;
8835          }
8836          program { name: "button_unclick3";
8837             signal: "mouse,clicked,1";
8838             source: "over2";
8839             action: SIGNAL_EMIT "elm,action,click" "";
8840          }
8841          program { name: "text_show";
8842             signal: "elm,state,text,visible";
8843             source: "elm";
8844             script {
8845                new st[31];
8846                new Float:vl;
8847                get_state(PART:"elm.swallow.content", st, 30, vl);
8848                if (!strcmp(st, "icononly"))
8849                  {
8850                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8851                     set_state(PART:"icon_rect", "visible", 0.0);
8852                     set_state(PART:"padding_after_icon", "visible", 0.0);
8853                     set_state(PART:"bg", "visible", 0.0);
8854                  }
8855                if (get_int(button_state) != BUTTON_STATE_DISABLED)
8856                  set_state(PART:"elm.text", "visible", 0.0);
8857                else
8858                  set_state(PART:"elm.text", "disabled_visible", 0.0);
8859             }
8860          }
8861          program { name: "text_hide";
8862             signal: "elm,state,text,hidden";
8863             source: "elm";
8864             script {
8865                new st[31];
8866                new Float:vl;
8867                get_state(PART:"elm.swallow.content", st, 30, vl);
8868                if (!strcmp(st, "visible"))
8869                  {
8870                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8871                     set_state(PART:"icon_rect", "icononly", 0.0);
8872                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8873                     set_state(PART:"bg", "icononly", 0.0);
8874                  }
8875                set_state(PART:"elm.text", "default", 0.0);
8876             }
8877          }
8878          program { name: "icon_show";
8879             signal: "elm,state,icon,visible";
8880             source: "elm";
8881             script {
8882                new st[31];
8883                new Float:vl;
8884                get_state(PART:"elm.text", st, 30, vl);
8885                if (!strcmp(st, "visible"))
8886                  {
8887                     set_state(PART:"elm.swallow.content", "visible", 0.0);
8888                     set_state(PART:"icon_rect", "visible", 0.0);
8889                     set_state(PART:"padding_after_icon", "visible", 0.0);
8890                     set_state(PART:"bg", "visible", 0.0);
8891                  }
8892                else
8893                  {
8894                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
8895                     set_state(PART:"icon_rect", "icononly", 0.0);
8896                     set_state(PART:"padding_after_icon", "icononly", 0.0);
8897                     set_state(PART:"bg", "icononly", 0.0);
8898                  }
8899             }
8900          }
8901          program { name: "icon_hide";
8902             signal: "elm,state,icon,hidden";
8903             source: "elm";
8904             action: STATE_SET "default" 0.0;
8905             target: "elm.swallow.content";
8906             target: "padding_after_icon";
8907             target: "icon_rect";
8908             target: "bg";
8909          }
8910          program { name: "disable";
8911             signal: "elm,state,disabled";
8912             source: "elm";
8913             action: STATE_SET "disabled" 0.0;
8914             target: "button_image";
8915             target: "disabler";
8916             after: "disable_text";
8917          }
8918          program { name: "disable_text";
8919             script {
8920                new st[31];
8921                new Float:vl;
8922                get_state(PART:"elm.text", st, 30, vl);
8923                if (!strcmp(st, "visible"))
8924                  set_state(PART:"elm.text", "disabled_visible", 0.0);
8925                else
8926                  set_state(PART:"elm.text", "disabled", 0.0);
8927                set_int(button_state, BUTTON_STATE_DISABLED);
8928             }
8929          }
8930          program { name: "enable";
8931             signal: "elm,state,enabled";
8932             source: "elm";
8933             action: STATE_SET "default" 0.0;
8934             target: "button_image";
8935             target: "disabler";
8936             after: "enable_text";
8937          }
8938          program { name: "enable_text";
8939             script {
8940                new st[31];
8941                new Float:vl;
8942                get_state(PART:"elm.text", st, 30, vl);
8943                if (!strcmp(st, "disabled_visible"))
8944                  set_state(PART:"elm.text", "visible", 0.0);
8945                else
8946                  set_state(PART:"elm.text", "default", 0.0);
8947                set_int(button_state, BUTTON_STATE_ENABLED);
8948             }
8949          }
8950          program { name: "focused";
8951             //signal: "elm,action,focus";
8952             //source: "elm";
8953             action: STATE_SET "focused" 0.0;
8954             target: "button_image";
8955             target: "elm.text";
8956          }
8957          program { name: "unfocused";
8958             //signal: "elm,action,unfocus";
8959             //source: "elm";
8960             action: STATE_SET "default" 0.0;
8961             target: "button_image";
8962             after: "unfocus_text";
8963          }
8964          program { name: "unfocus_text";
8965             action: STATE_SET "visible" 0.0;
8966             target: "elm.text";
8967          }
8968       }
8969    }
8970
8971 ///////////////////////////////////////////////////////////////////////////////////////
8972    group { name: "elm/button/base/expandable_number";
8973       alias: "elm/button/base/text_only/expandable_number";
8974       images {
8975          image: "00_button_05_normal.png" COMP;
8976          image: "00_button_05_press.png" COMP;
8977          image: "00_button_05_dim.png" COMP;
8978          image: "00_arrow_expand.png" COMP;
8979          image: "00_arrow_expand_press.png" COMP;
8980          image: "00_arrow_expand_dim.png" COMP;
8981       }
8982       script {
8983          public button_state = BUTTON_STATE_ENABLED;
8984       }
8985       parts {
8986          part { name: "button_image";
8987             mouse_events: 1;
8988             scale: 1;
8989             description { state: "default" 0.0;
8990                min: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
8991                max: BUTTON_EXPANDABLE_NUMBER_BG_NORMAL_MIN_MAX_INC;
8992                image {
8993                   normal: "00_button_05_normal.png";
8994                   border: BUTTON_EXPANDABLE_NUMBER_BG_BORDER_INC;
8995                   border_scale: 1;
8996                }
8997             }
8998             description { state: "clicked" 0.0;
8999                inherit: "default" 0.0;
9000                image.normal: "00_button_05_press.png";
9001             }
9002             description { state: "disabled" 0.0;
9003                inherit: "default" 0.0;
9004                image.normal: "00_button_05_dim.png";
9005             }
9006             description { state: "focused" 0.0;
9007                inherit: "default" 0.0;
9008                image.normal: "00_button_05_press.png";
9009             }
9010          }
9011          part {
9012             name: "padding_left_top";
9013             type: RECT;
9014             scale: 1;
9015             mouse_events: 0;
9016             description { state: "default" 0.0;
9017                align: 0.0 0.0;
9018                rel1.relative: 0.0 0.0;
9019                rel2.relative: 0.0 0.0;
9020                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
9021                fixed: 1 1;
9022                visible: 0;
9023             }
9024          }
9025          part {
9026             name: "padding_right_bottom";
9027             type: RECT;
9028             scale: 1;
9029             mouse_events: 0;
9030             description { state: "default" 0.0;
9031                align: 1.0 1.0;
9032                rel1.relative: 1.0 1.0;
9033                rel2.relative: 1.0 1.0;
9034                min: BUTTON_EXPANDABLE_NUMBER_PADDING_MIN_INC;
9035                fixed: 1 1;
9036                visible: 0;
9037             }
9038          }
9039          part {
9040             name: "icon_rect";
9041             type: RECT;
9042             scale: 1;
9043             mouse_events: 0;
9044             description { state: "default" 0.0;
9045                visible: 0;
9046                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9047                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9048                fixed: 1 0;
9049                rel1 { relative: 0.0 1.0; to_x: "padding_right_bottom"; to_y: "padding_left_top"; }
9050                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
9051                align: 1.0 0.5;
9052                color: 0 0 0 0;
9053             }
9054          }
9055          part {
9056             name: "arrow_expand";
9057             scale: 1;
9058             mouse_events: 0;
9059             description { state: "default" 0.0;
9060                align: 0.0 0.5;
9061                min: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9062                max: BUTTON_EXPANDABLE_NUMBER_ICON_RECT_EXPAND__MIN_MAX_INC;
9063                fixed: 0 0;
9064                rel1 { relative: 0.0 0.0; to: "icon_rect"; }
9065                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
9066                image.normal:"00_arrow_expand.png";
9067             }
9068             description { state: "clicked" 0.0;
9069                inherit: "default" 0.0;
9070                image.normal:"00_arrow_expand_press.png";
9071             }
9072             description { state: "disabled" 0.0;
9073                inherit: "default" 0.0;
9074                image.normal:"00_arrow_expand_dim.png";
9075             }
9076          }
9077          part { name: "elm.text";
9078             type: TEXT;
9079             mouse_events: 0;
9080             scale: 1;
9081             description { state: "default" 0.0;
9082                visible: 1;
9083                min: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
9084                max: BUTTON_EXPANDABLE_NUMBER_TEXT_MIN_MAX_INC;
9085                fixed:1 0;
9086                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
9087                rel2 { relative: 1.0 1.0; to_x:"padding_left_top"; to_y:"padding_right_bottom"; }
9088                align: 0.0 0.5;
9089                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
9090                text {
9091                   font: "SLP:style=Medium";
9092                   size: BUTTON_EXPANDABLE_NUMBER_FONT_SIZE_INC;
9093                   min: 0 0;
9094                   fit: 1 1;
9095                   size_range: 14 20;
9096                   align: 0.5 0.5;
9097                }
9098             }
9099             description { state: "visible" 0.0;
9100                inherit: "default" 0.0;
9101                visible: 1;
9102             }
9103             description { state: "clicked" 0.0;
9104                inherit: "default" 0.0;
9105                visible: 1;
9106                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
9107             }
9108             description { state: "disabled" 0.0;
9109                inherit: "default" 0.0;
9110                color: 0 0 0 128;
9111             }
9112             description { state: "disabled_visible" 0.0;
9113                inherit: "default" 0.0;
9114                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
9115                visible: 1;
9116             }
9117             description { state: "focused" 0.0;
9118                inherit: "default" 0.0;
9119                visible: 1;
9120                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
9121             }
9122          }
9123          part { name: "over2";
9124             type: RECT;
9125             mouse_events: 1;
9126             repeat_events: 1;
9127             ignore_flags: ON_HOLD;
9128             description { state: "default" 0.0;
9129                color: 0 0 0 0;
9130             }
9131          }
9132          part { name: "over3";
9133             type: RECT;
9134             mouse_events: 1;
9135             repeat_events: 1;
9136             description { state: "default" 0.0;
9137                color: 0 0 0 0;
9138             }
9139          }
9140          part { name: "disabler";
9141             type: RECT;
9142             description { state: "default" 0.0;
9143                color: 0 0 0 0;
9144                visible: 0;
9145             }
9146             description { state: "disabled" 0.0;
9147                inherit: "default" 0.0;
9148                visible: 1;
9149             }
9150          }
9151       }
9152       programs {
9153          program { name: "button_click";
9154             signal: "mouse,down,1";
9155             source: "over2";
9156             action: SIGNAL_EMIT "elm,action,press" "";
9157             after: "button_click_anim";
9158          }
9159          program { name: "button_click_anim";
9160             action: STATE_SET "clicked" 0.0;
9161             target: "button_image";
9162             target: "arrow_expand";
9163             after: "text_clicked";
9164          }
9165          program { name: "text_clicked";
9166             script {
9167                new st[31];
9168                new Float:vl;
9169                get_state(PART:"elm.text", st, 30, vl);
9170                if (!strcmp(st, "visible"))
9171                   set_state(PART:"elm.text", "clicked", 0.0);
9172             }
9173          }
9174          program { name: "button_unpress";
9175             action: SIGNAL_EMIT "elm,action,unpress" "";
9176          }
9177          program { name: "button_mouseout_clicked";
9178             signal: "mouse,up,1";
9179             source: "over3";
9180             script {
9181                if(get_int(button_state) != BUTTON_STATE_DISABLED)
9182                {
9183                   set_state(PART:"button_image", "default", 0.0);
9184                   set_state(PART:"elm.text", "visible", 0.0);
9185                   set_state(PART:"arrow_expand", "default", 0.0);
9186                }
9187             }
9188             after: button_unpress;
9189          }
9190          program { name: "button_unclick3";
9191             signal: "mouse,clicked,1";
9192             source: "over2";
9193             action: SIGNAL_EMIT "elm,action,click" "";
9194          }
9195          program { name: "text_show";
9196             signal: "elm,state,text,visible";
9197             source: "elm";
9198             script {
9199                if(get_int(button_state) != BUTTON_STATE_DISABLED)
9200                  set_state(PART:"elm.text", "visible", 0.0);
9201                else
9202                  set_state(PART:"elm.text", "disabled_visible", 0.0);
9203             }
9204          }
9205          program { name: "text_hide";
9206             signal: "elm,state,text,hidden";
9207             source: "elm";
9208             script {
9209                set_state(PART:"elm.text", "default", 0.0);
9210             }
9211          }
9212          program { name: "disable";
9213             signal: "elm,state,disabled";
9214             source: "elm";
9215             action: STATE_SET "disabled" 0.0;
9216             target: "button_image";
9217             target: "disabler";
9218             after: "disable_text";
9219          }
9220          program { name: "disable_text";
9221             script {
9222                new st[31];
9223                new Float:vl;
9224                get_state(PART:"elm.text", st, 30, vl);
9225                if (!strcmp(st, "visible"))
9226                   set_state(PART:"elm.text", "disabled_visible", 0.0);
9227                else
9228                   set_state(PART:"elm.text", "disabled", 0.0);
9229                set_int(button_state, BUTTON_STATE_DISABLED);
9230             }
9231          }
9232          program { name: "enable";
9233             signal: "elm,state,enabled";
9234             source: "elm";
9235             action: STATE_SET "default" 0.0;
9236             target: "button_image";
9237             target: "disabler";
9238             after: "enable_text";
9239          }
9240          program { name: "enable_text";
9241             script {
9242                new st[31];
9243                new Float:vl;
9244                get_state(PART:"elm.text", st, 30, vl);
9245                if (!strcmp(st, "disabled_visible"))
9246                   set_state(PART:"elm.text", "visible", 0.0);
9247                else
9248                   set_state(PART:"elm.text", "default", 0.0);
9249                set_int(button_state, BUTTON_STATE_ENABLED);
9250             }
9251          }
9252          program { name: "focused";
9253             //signal: "elm,action,focus";
9254             //source: "elm";
9255             action: STATE_SET "focused" 0.0;
9256             target: "button_image";
9257             target: "elm.text";
9258          }
9259          program { name: "unfocused";
9260             //signal: "elm,action,unfocus";
9261             //source: "elm";
9262             action: STATE_SET "default" 0.0;
9263             target: "button_image";
9264             after: "unfocus_text";
9265          }
9266          program { name: "unfocus_text";
9267             action: STATE_SET "visible" 0.0;
9268             target: "elm.text";
9269          }
9270       }
9271    }
9272
9273 #undef BUTTON_STATE_ENABLED
9274 #undef BUTTON_STATE_DISABLED