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