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