Tizen 2.1 base
[apps/core/preloaded/pwlock.git] / res / edje / pwlock-button.edc
1 #define BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC 249 249 249 255
2 #define BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC 249 249 249 255
3 #define BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC 249 249 249 255
4 #define BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC 249 249 249 102
5 #define BUTTON_TEXT_STYLE1_TEXT_DISABLED_COLOR_INC 180 180 1 255
6
7 #define BUTTON_TEXT_STYLE2_BG_MIN_INC 100 72
8 #define BUTTON_TEXT_STYLE2_VISIBLE_BG_MIN_INC 148 74
9 #define BUTTON_TEXT_STYLE2_ICONONLY_BG_MIN_INC 74 74
10 #define BUTTON_TEXT_STYLE2_BG_BORDER_INC 5 5 5 5
11 #define BUTTON_TEXT_STYLE2_PADDING_MIN_INC 5 3
12 #define BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC 38 38
13 #define BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC 10 0
14 #define BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC 38 38
15 #define BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC 38 38
16 #define BUTTON_TEXT_STYLE2_FONT_SIZE_INC 36
17 #define BUTTON_TEXT_STYLE2_MULTILINE_FONT_SIZE_INC 32
18
19 #define BUTTON_STATE_ENABLED 0
20 #define BUTTON_STATE_DISABLED 1
21
22 sounds {
23       sample {
24          name: "touch_sound" AS_IS;
25          source: "S_Touch_30ms.wav";
26       }
27 }
28
29 group { name: "elm/button/base/pwlock/lang_btn";
30       images {
31          image: "A01-9_button_background_nomal_nomal.png" COMP;
32          image: "A01-9_button_background_nomal_press.png" COMP;
33          image: "A01-9_button_background_nomal_dim.png" COMP;
34          image: "A01-9_button_background_nomal_focus.png" COMP;
35       }
36       script {
37          public button_state = BUTTON_STATE_ENABLED;
38       }
39       parts {
40          part { name: "button_image";
41             scale: 0;
42             description { state: "default" 0.0;
43                image {
44                   normal: "A01-9_button_background_nomal_nomal.png";
45                   border: BUTTON_TEXT_STYLE2_BG_BORDER_INC;
46                   border_scale: 0;
47                }
48             }
49             description { state: "clicked" 0.0;
50                inherit: "default" 0.0;
51                image.normal: "A01-9_button_background_nomal_press.png";
52             }
53             description { state: "disabled" 0.0;
54                inherit: "default" 0.0;
55                image.normal: "A01-9_button_background_nomal_dim.png";
56             }
57             description { state: "focused" 0.0;
58                inherit: "default" 0.0;
59                image.normal: "A01-9_button_background_nomal_focus.png";
60             }
61          }
62          part { name: "padding_left_top";
63             type: RECT;
64             scale: 0;
65             mouse_events: 0;
66             description { state: "default" 0.0;
67                align: 0.0 0.0;
68                rel2.relative: 0.0 0.0;
69                min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC;
70                fixed: 1 1;
71                visible: 0;
72             }
73          }
74          part { name: "bg";
75             type: RECT;
76             scale: 0;
77             mouse_events: 0;
78             description { state: "default" 0.0;
79                min: BUTTON_TEXT_STYLE2_BG_MIN_INC;
80                visible: 0;
81             }
82             description { state: "visible" 0.0;
83                inherit: "default" 0.0;
84                min: BUTTON_TEXT_STYLE2_VISIBLE_BG_MIN_INC;
85             }
86             description { state: "icononly" 0.0;
87                inherit: "default" 0.0;
88                min: BUTTON_TEXT_STYLE2_ICONONLY_BG_MIN_INC;
89             }
90          }
91          part { name: "padding_right_bottom";
92             type: RECT;
93             scale: 0;
94             mouse_events: 0;
95             description { state: "default" 0.0;
96                align: 1.0 1.0;
97                rel1.relative: 1.0 1.0;
98                min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC;
99                fixed: 1 1;
100                visible: 0;
101             }
102          }
103          part { name: "icon_rect";
104             type: RECT;
105             scale: 0;
106             mouse_events: 0;
107             description { state: "default" 0.0;
108                visible: 0;
109                min: 0 0;
110                fixed: 1 0;
111                rel1 {
112                   relative: 1.0 1.0;
113                   to: "padding_left_top";
114                }
115                rel2 {
116                   relative: 1.0 0.0;
117                   to_x: "padding_left_top";
118                   to_y: "padding_right_bottom";
119                }
120                align: 0.0 0.5;
121             }
122             description { state: "visible" 0.0;
123                visible: 0;
124                min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC;
125                max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC;
126                fixed: 1 0;
127                rel1 {
128                   relative: 1.0 1.0;
129                   to: "padding_left_top";
130                }
131                rel2 {
132                   relative: 1.0 0.0;
133                   to_x: "padding_left_top";
134                   to_y: "padding_right_bottom";
135                }
136                align: 0.0 0.5;
137             }
138             description { state: "icononly" 0.0;
139                inherit: "default" 0.0;
140             }
141          }
142          part { name: "padding_after_icon";
143             type: RECT;
144             scale: 0;
145             mouse_events: 0;
146             description { state: "default" 0.0; //when only icon or no icon is there
147                align: 0.0 0.0;
148                rel1 {
149                   relative: 1.0 0.0;
150                   to: "icon_rect";
151                }
152                rel2.to: "icon_rect";
153                fixed: 1 0;
154                min: 0 0;
155                visible: 0;
156             }
157             description { state: "visible" 0.0;
158                visible: 0;
159                align: 0.0 0.0;
160                rel1 {
161                   relative: 1.0 0.0;
162                   to: "icon_rect";
163                }
164                rel2.to: "icon_rect";
165                fixed: 1 0;
166                min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
167             }
168             description { state: "icononly" 0.0;
169                inherit: "default" 0.0;
170             }
171          }
172          part { name: "padding_before_text";
173             type: RECT;
174             scale: 0;
175             mouse_events: 0;
176             description { state: "default" 0.0; //when only icon or no icon is there
177                align: 1.0 0.5;
178                rel1 {
179                   relative: 0.0 1.0;
180                   to_x: "elm.text";
181                   to_y: "padding_left_top";
182                }
183                rel2 {
184                   relative: 0.0 0.0;
185                   to_x: "elm.text";
186                   to_y: "padding_right_bottom";
187                }
188                fixed: 1 0;
189                min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
190                visible: 0;
191             }
192          }
193          part { name: "elm.swallow.content";
194             type: SWALLOW;
195             scale: 0;
196             clip_to: "clipper";
197             description { state: "default" 0.0;
198                visible: 0;
199                align: 0.0 0.5;
200                rel1 {
201                   relative: 1.0 1.0;
202                   to: "padding_left_top";
203                }
204                rel2 {
205                   relative: 1.0 0.0;
206                   to_x: "padding_left_top";
207                   to_y: "padding_right_bottom";
208                }
209                fixed: 1 0;
210             }
211             description { state: "visible" 0.0;
212                fixed: 1 0;
213                min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC;
214                max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC;
215                align: 1.0 0.5;
216                rel1 {
217                   relative: 0.0 1.0;
218                   to_x: "padding_before_text";
219                   to_y: "padding_left_top";
220                }
221                rel2 {
222                   relative: 0.0 0.0;
223                   to_x: "padding_before_text";
224                   to_y: "padding_right_bottom";
225                }
226             }
227             description { state: "icononly" 0.0;
228                min: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC;
229                max: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC;
230             }
231          }
232          part { name: "elm.text";
233             type: TEXT;
234             mouse_events: 0;
235             scale: 0;
236             clip_to: "clipper";
237             description { state: "default" 0.0;
238                visible: 0;
239                rel1 {
240                   relative: 1.0 1.0;
241                   to_x: "padding_after_icon";
242                   to_y: "padding_left_top";
243                }
244                rel2 {
245                   relative: 0.0 0.0;
246                   to: "padding_right_bottom";
247                }
248                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
249                text {
250                   font: "SLP:style=Medium";
251                   size: BUTTON_TEXT_STYLE2_FONT_SIZE_INC;
252                   min: 0 0;
253                   max: 1 0;
254                   text_class: "slp_medium";
255                }
256             }
257             description { state: "visible" 0.0;
258                inherit: "default" 0.0;
259                visible: 1;
260             }
261             description { state: "clicked" 0.0;
262                inherit: "default" 0.0;
263                visible: 1;
264                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
265             }
266             description { state: "disabled" 0.0;
267                inherit: "default" 0.0;
268                color: 0 0 0 128;
269             }
270             description { state: "disabled_visible" 0.0;
271                inherit: "default" 0.0;
272                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
273                visible: 1;
274             }
275             description { state: "focused" 0.0;
276                inherit: "default" 0.0;
277                visible: 1;
278                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
279             }
280          }
281          part { name: "over2";
282             type: RECT;
283             repeat_events: 1;
284             ignore_flags: ON_HOLD;
285             description { state: "default" 0.0;
286                color: 0 0 0 0;
287             }
288          }
289          part { name: "over3";
290             type: RECT;
291             repeat_events: 1;
292             description { state: "default" 0.0;
293                color: 0 0 0 0;
294             }
295          }
296          part { name: "clipper";
297             type: RECT;
298             description { state: "default" 0.0;
299                color: 255 255 255 255;
300             }
301          }
302          part { name: "disabler";
303             type: RECT;
304             description { state: "default" 0.0;
305                color: 0 0 0 0;
306                visible: 0;
307             }
308             description { state: "disabled" 0.0;
309                inherit: "default" 0.0;
310                visible: 1;
311             }
312          }
313       }
314       programs {
315          program { name: "button_click";
316             signal: "mouse,down,1";
317             source: "over2";
318             action: SIGNAL_EMIT "elm,action,press" "";
319             after: "button_click_anim";
320          }
321          program { name: "button_click_anim";
322             action: STATE_SET "clicked" 0.0;
323             target: "button_image";
324             after: "text_clicked";
325          }
326          program { name: "text_clicked";
327             script {
328                new st[31];
329                new Float:vl;
330                get_state(PART:"elm.text", st, 30, vl);
331                if (!strcmp(st, "visible"))
332                  set_state(PART:"elm.text", "clicked", 0.0);
333             }
334          }
335          program { name: "button_unpress";
336             action: SIGNAL_EMIT "elm,action,unpress" "";
337          }
338          program { name: "button_mouseout_clicked";
339             signal: "mouse,up,1";
340             source: "over3";
341             script {
342                new st[31];
343                new Float:vl;
344                get_state(PART:"elm.swallow.content", st, 30, vl);
345                if (strcmp(st, "icononly"))
346                  {
347                     emit("elm,action,default,text,set", "");
348                     set_state(PART:"elm.text", "visible", 0.0);
349                  }
350                if (get_int(button_state) != BUTTON_STATE_DISABLED)
351                  set_state(PART:"button_image", "default", 0.0);
352             }
353             after: button_unpress;
354          }
355          program { name: "touch_snd";
356             signal: "mouse,clicked,1";
357             source: "over2";
358             action: PLAY_SAMPLE "touch_sound" 1.0;
359             after: button_unclick3;
360          }
361          program { name: "button_unclick3";
362             action: SIGNAL_EMIT "elm,action,click" "";
363          }
364          program { name: "text_show";
365             signal: "elm,state,text,visible";
366             source: "elm";
367             script {
368                new st[31];
369                new Float:vl;
370                get_state(PART:"elm.swallow.content", st, 30, vl);
371                if (!strcmp(st, "icononly"))
372                  {
373                     set_state(PART:"elm.swallow.content", "visible", 0.0);
374                     set_state(PART:"icon_rect", "visible", 0.0);
375                     set_state(PART:"padding_after_icon", "visible", 0.0);
376                     set_state(PART:"bg", "visible", 0.0);
377                  }
378                if (get_int(button_state) != BUTTON_STATE_DISABLED)
379                  set_state(PART:"elm.text", "visible", 0.0);
380                else
381                  set_state(PART:"elm.text", "disabled_visible", 0.0);
382             }
383          }
384          program { name: "text_hide";
385             signal: "elm,state,text,hidden";
386             source: "elm";
387             script {
388                new st[31];
389                new Float:vl;
390                get_state(PART:"elm.swallow.content", st, 30, vl);
391                if (!strcmp(st, "visible"))
392                  {
393                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
394                     set_state(PART:"icon_rect", "icononly", 0.0);
395                     set_state(PART:"padding_after_icon", "icononly", 0.0);
396                     set_state(PART:"bg", "icononly", 0.0);
397                  }
398                set_state(PART:"elm.text", "default", 0.0);
399             }
400          }
401          program { name: "icon_show";
402             signal: "elm,state,icon,visible";
403             source: "elm";
404             script {
405                new st[31];
406                new Float:vl;
407                get_state(PART:"elm.text", st, 30, vl);
408                if (!strcmp(st, "visible"))
409                  {
410                     set_state(PART:"elm.swallow.content", "visible", 0.0);
411                     set_state(PART:"icon_rect", "visible", 0.0);
412                     set_state(PART:"padding_after_icon", "visible", 0.0);
413                     set_state(PART:"bg", "visible", 0.0);
414                  }
415                else
416                  {
417                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
418                     set_state(PART:"icon_rect", "icononly", 0.0);
419                     set_state(PART:"padding_after_icon", "icononly", 0.0);
420                     set_state(PART:"bg", "icononly", 0.0);
421                  }
422             }
423          }
424          program { name: "icon_hide";
425             signal: "elm,state,icon,hidden";
426             source: "elm";
427             action: STATE_SET "default" 0.0;
428             target: "elm.swallow.content";
429             target: "padding_after_icon";
430             target: "icon_rect";
431             target: "bg";
432          }
433          program { name: "disable";
434             signal: "elm,state,disabled";
435             source: "elm";
436             action: STATE_SET "disabled" 0.0;
437             target: "button_image";
438             target: "disabler";
439             after: "disable_text";
440          }
441          program { name: "disable_text";
442             script {
443                new st[31];
444                new Float:vl;
445                get_state(PART:"elm.text", st, 30, vl);
446                if (!strcmp(st, "visible"))
447                  set_state(PART:"elm.text", "disabled_visible", 0.0);
448                else
449                  set_state(PART:"elm.text", "disabled", 0.0);
450                set_int(button_state, BUTTON_STATE_DISABLED);
451             }
452          }
453          program { name: "enable";
454             signal: "elm,state,enabled";
455             source: "elm";
456             action: STATE_SET "default" 0.0;
457             target: "button_image";
458             target: "disabler";
459             after: "enable_text";
460          }
461          program { name: "enable_text";
462             script {
463                new st[31];
464                new Float:vl;
465                get_state(PART:"elm.text", st, 30, vl);
466                if (!strcmp(st, "disabled_visible"))
467                  set_state(PART:"elm.text", "visible", 0.0);
468                else
469                  set_state(PART:"elm.text", "default", 0.0);
470                set_int(button_state, BUTTON_STATE_ENABLED);
471             }
472          }
473          program { name: "focused";
474             //signal: "elm,action,focus";
475             //source: "elm";
476             action: STATE_SET "focused" 0.0;
477             target: "button_image";
478             target: "elm.text";
479          }
480          program { name: "unfocused";
481             //signal: "elm,action,unfocus";
482             //source: "elm";
483             action: STATE_SET "default" 0.0;
484             target: "button_image";
485             after: "unfocus_text";
486          }
487          program { name: "unfocus_text";
488             action: STATE_SET "visible" 0.0;
489             target: "elm.text";
490          }
491       }
492 }
493
494 group { name: "elm/button/base/pwlock/bottom_btn";
495       images {
496          image: "A01-9_button_bottom_nomal.png" COMP;
497          image: "A01-9_button_bottom_nomal_press.png" COMP;
498          image: "A01-9_button_bottom_nomal_dim.png" COMP;
499          image: "A01-9_button_bottom_nomal_focus.png" COMP;
500       }
501       script {
502          public button_state = BUTTON_STATE_ENABLED;
503       }
504       parts {
505          part { name: "button_image";
506             scale: 0;
507             description { state: "default" 0.0;
508                image {
509                   normal: "A01-9_button_bottom_nomal.png";
510                   border: BUTTON_TEXT_STYLE2_BG_BORDER_INC;
511                   border_scale: 0;
512                }
513             }
514             description { state: "clicked" 0.0;
515                inherit: "default" 0.0;
516                image.normal: "A01-9_button_bottom_nomal_press.png";
517             }
518             description { state: "disabled" 0.0;
519                inherit: "default" 0.0;
520                image.normal: "A01-9_button_bottom_nomal_dim.png";
521             }
522             description { state: "focused" 0.0;
523                inherit: "default" 0.0;
524                image.normal: "A01-9_button_bottom_nomal_focus.png";
525             }
526          }
527          part { name: "padding_left_top";
528             type: RECT;
529             scale: 0;
530             mouse_events: 0;
531             description { state: "default" 0.0;
532                align: 0.0 0.0;
533                rel2.relative: 0.0 0.0;
534                min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC;
535                fixed: 1 1;
536                visible: 0;
537             }
538          }
539          part { name: "bg";
540             type: RECT;
541             scale: 0;
542             mouse_events: 0;
543             description { state: "default" 0.0;
544                min: BUTTON_TEXT_STYLE2_BG_MIN_INC;
545                visible: 0;
546             }
547             description { state: "visible" 0.0;
548                inherit: "default" 0.0;
549                min: BUTTON_TEXT_STYLE2_VISIBLE_BG_MIN_INC;
550             }
551             description { state: "icononly" 0.0;
552                inherit: "default" 0.0;
553                min: BUTTON_TEXT_STYLE2_ICONONLY_BG_MIN_INC;
554             }
555          }
556          part { name: "padding_right_bottom";
557             type: RECT;
558             scale: 0;
559             mouse_events: 0;
560             description { state: "default" 0.0;
561                align: 1.0 1.0;
562                rel1.relative: 1.0 1.0;
563                min: BUTTON_TEXT_STYLE2_PADDING_MIN_INC;
564                fixed: 1 1;
565                visible: 0;
566             }
567          }
568          part { name: "icon_rect";
569             type: RECT;
570             scale: 0;
571             mouse_events: 0;
572             description { state: "default" 0.0;
573                visible: 0;
574                min: 0 0;
575                fixed: 1 0;
576                rel1 {
577                   relative: 1.0 1.0;
578                   to: "padding_left_top";
579                }
580                rel2 {
581                   relative: 1.0 0.0;
582                   to_x: "padding_left_top";
583                   to_y: "padding_right_bottom";
584                }
585                align: 0.0 0.5;
586             }
587             description { state: "visible" 0.0;
588                visible: 0;
589                min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC;
590                max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_RECT_MIN_MAX_INC;
591                fixed: 1 0;
592                rel1 {
593                   relative: 1.0 1.0;
594                   to: "padding_left_top";
595                }
596                rel2 {
597                   relative: 1.0 0.0;
598                   to_x: "padding_left_top";
599                   to_y: "padding_right_bottom";
600                }
601                align: 0.0 0.5;
602             }
603             description { state: "icononly" 0.0;
604                inherit: "default" 0.0;
605             }
606          }
607          part { name: "padding_after_icon";
608             type: RECT;
609             scale: 0;
610             mouse_events: 0;
611             description { state: "default" 0.0; //when only icon or no icon is there
612                align: 0.0 0.0;
613                rel1 {
614                   relative: 1.0 0.0;
615                   to: "icon_rect";
616                }
617                rel2.to: "icon_rect";
618                fixed: 1 0;
619                min: 0 0;
620                visible: 0;
621             }
622             description { state: "visible" 0.0;
623                visible: 0;
624                align: 0.0 0.0;
625                rel1 {
626                   relative: 1.0 0.0;
627                   to: "icon_rect";
628                }
629                rel2.to: "icon_rect";
630                fixed: 1 0;
631                min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
632             }
633             description { state: "icononly" 0.0;
634                inherit: "default" 0.0;
635             }
636          }
637          part { name: "padding_before_text";
638             type: RECT;
639             scale: 0;
640             mouse_events: 0;
641             description { state: "default" 0.0; //when only icon or no icon is there
642                align: 1.0 0.5;
643                rel1 {
644                   relative: 0.0 1.0;
645                   to_x: "elm.text";
646                   to_y: "padding_left_top";
647                }
648                rel2 {
649                   relative: 0.0 0.0;
650                   to_x: "elm.text";
651                   to_y: "padding_right_bottom";
652                }
653                fixed: 1 0;
654                min: BUTTON_TEXT_STYLE2_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
655                visible: 0;
656             }
657          }
658          part { name: "elm.swallow.content";
659             type: SWALLOW;
660             scale: 0;
661             clip_to: "clipper";
662             description { state: "default" 0.0;
663                visible: 0;
664                align: 0.0 0.5;
665                rel1 {
666                   relative: 1.0 1.0;
667                   to: "padding_left_top";
668                }
669                rel2 {
670                   relative: 1.0 0.0;
671                   to_x: "padding_left_top";
672                   to_y: "padding_right_bottom";
673                }
674                fixed: 1 0;
675             }
676             description { state: "visible" 0.0;
677                fixed: 1 0;
678                min: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC;
679                max: BUTTON_TEXT_STYLE2_VISIBLE_ICON_MIN_MAX_INC;
680                align: 1.0 0.5;
681                rel1 {
682                   relative: 0.0 1.0;
683                   to_x: "padding_before_text";
684                   to_y: "padding_left_top";
685                }
686                rel2 {
687                   relative: 0.0 0.0;
688                   to_x: "padding_before_text";
689                   to_y: "padding_right_bottom";
690                }
691             }
692             description { state: "icononly" 0.0;
693                min: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC;
694                max: BUTTON_TEXT_STYLE2_ICONONLY_ICON_MIN_MAX_INC;
695             }
696          }
697          part { name: "elm.text";
698             type: TEXT;
699             mouse_events: 0;
700             scale: 0;
701             clip_to: "clipper";
702             description { state: "default" 0.0;
703                visible: 0;
704                rel1 {
705                   relative: 1.0 1.0;
706                   to_x: "padding_after_icon";
707                   to_y: "padding_left_top";
708                }
709                rel2 {
710                   relative: 0.0 0.0;
711                   to: "padding_right_bottom";
712                }
713                color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
714                text {
715                   font: "SLP:style=Medium";
716                   size: BUTTON_TEXT_STYLE2_FONT_SIZE_INC;
717                   min: 0 0;
718                   max: 1 0;
719                   text_class: "slp_medium";
720                }
721             }
722             description { state: "visible" 0.0;
723                inherit: "default" 0.0;
724                visible: 1;
725             }
726             description { state: "clicked" 0.0;
727                inherit: "default" 0.0;
728                visible: 1;
729                color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
730             }
731             description { state: "disabled" 0.0;
732                inherit: "default" 0.0;
733                color: 0 0 0 128;
734             }
735             description { state: "disabled_visible" 0.0;
736                inherit: "default" 0.0;
737                color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
738                visible: 1;
739             }
740             description { state: "focused" 0.0;
741                inherit: "default" 0.0;
742                visible: 1;
743                color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
744             }
745          }
746          part { name: "over2";
747             type: RECT;
748             repeat_events: 1;
749             ignore_flags: ON_HOLD;
750             description { state: "default" 0.0;
751                color: 0 0 0 0;
752             }
753          }
754          part { name: "over3";
755             type: RECT;
756             repeat_events: 1;
757             description { state: "default" 0.0;
758                color: 0 0 0 0;
759             }
760          }
761          part { name: "clipper";
762             type: RECT;
763             description { state: "default" 0.0;
764                color: 255 255 255 255;
765             }
766          }
767          part { name: "disabler";
768             type: RECT;
769             description { state: "default" 0.0;
770                color: 0 0 0 0;
771                visible: 0;
772             }
773             description { state: "disabled" 0.0;
774                inherit: "default" 0.0;
775                visible: 1;
776             }
777          }
778       }
779       programs {
780          program { name: "button_click";
781             signal: "mouse,down,1";
782             source: "over2";
783             action: SIGNAL_EMIT "elm,action,press" "";
784             after: "button_click_anim";
785          }
786          program { name: "button_click_anim";
787             action: STATE_SET "clicked" 0.0;
788             target: "button_image";
789             after: "text_clicked";
790          }
791          program { name: "text_clicked";
792             script {
793                new st[31];
794                new Float:vl;
795                get_state(PART:"elm.text", st, 30, vl);
796                if (!strcmp(st, "visible"))
797                  set_state(PART:"elm.text", "clicked", 0.0);
798             }
799          }
800          program { name: "button_unpress";
801             action: SIGNAL_EMIT "elm,action,unpress" "";
802          }
803          program { name: "button_mouseout_clicked";
804             signal: "mouse,up,1";
805             source: "over3";
806             script {
807                new st[31];
808                new Float:vl;
809                get_state(PART:"elm.swallow.content", st, 30, vl);
810                if (strcmp(st, "icononly"))
811                  {
812                     emit("elm,action,default,text,set", "");
813                     set_state(PART:"elm.text", "visible", 0.0);
814                  }
815                if (get_int(button_state) != BUTTON_STATE_DISABLED)
816                  set_state(PART:"button_image", "default", 0.0);
817             }
818             after: button_unpress;
819          }
820          program { name: "touch_snd";
821             signal: "mouse,clicked,1";
822             source: "over2";
823             action: PLAY_SAMPLE "touch_sound" 1.0;
824             after: button_unclick3;
825          }
826          program { name: "button_unclick3";
827             action: SIGNAL_EMIT "elm,action,click" "";
828          }
829          program { name: "text_show";
830             signal: "elm,state,text,visible";
831             source: "elm";
832             script {
833                new st[31];
834                new Float:vl;
835                get_state(PART:"elm.swallow.content", st, 30, vl);
836                if (!strcmp(st, "icononly"))
837                  {
838                     set_state(PART:"elm.swallow.content", "visible", 0.0);
839                     set_state(PART:"icon_rect", "visible", 0.0);
840                     set_state(PART:"padding_after_icon", "visible", 0.0);
841                     set_state(PART:"bg", "visible", 0.0);
842                  }
843                if (get_int(button_state) != BUTTON_STATE_DISABLED)
844                  set_state(PART:"elm.text", "visible", 0.0);
845                else
846                  set_state(PART:"elm.text", "disabled_visible", 0.0);
847             }
848          }
849          program { name: "text_hide";
850             signal: "elm,state,text,hidden";
851             source: "elm";
852             script {
853                new st[31];
854                new Float:vl;
855                get_state(PART:"elm.swallow.content", st, 30, vl);
856                if (!strcmp(st, "visible"))
857                  {
858                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
859                     set_state(PART:"icon_rect", "icononly", 0.0);
860                     set_state(PART:"padding_after_icon", "icononly", 0.0);
861                     set_state(PART:"bg", "icononly", 0.0);
862                  }
863                set_state(PART:"elm.text", "default", 0.0);
864             }
865          }
866          program { name: "icon_show";
867             signal: "elm,state,icon,visible";
868             source: "elm";
869             script {
870                new st[31];
871                new Float:vl;
872                get_state(PART:"elm.text", st, 30, vl);
873                if (!strcmp(st, "visible"))
874                  {
875                     set_state(PART:"elm.swallow.content", "visible", 0.0);
876                     set_state(PART:"icon_rect", "visible", 0.0);
877                     set_state(PART:"padding_after_icon", "visible", 0.0);
878                     set_state(PART:"bg", "visible", 0.0);
879                  }
880                else
881                  {
882                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
883                     set_state(PART:"icon_rect", "icononly", 0.0);
884                     set_state(PART:"padding_after_icon", "icononly", 0.0);
885                     set_state(PART:"bg", "icononly", 0.0);
886                  }
887             }
888          }
889          program { name: "icon_hide";
890             signal: "elm,state,icon,hidden";
891             source: "elm";
892             action: STATE_SET "default" 0.0;
893             target: "elm.swallow.content";
894             target: "padding_after_icon";
895             target: "icon_rect";
896             target: "bg";
897          }
898          program { name: "disable";
899             signal: "elm,state,disabled";
900             source: "elm";
901             action: STATE_SET "disabled" 0.0;
902             target: "button_image";
903             target: "disabler";
904             after: "disable_text";
905          }
906          program { name: "disable_text";
907             script {
908                new st[31];
909                new Float:vl;
910                get_state(PART:"elm.text", st, 30, vl);
911                if (!strcmp(st, "visible"))
912                  set_state(PART:"elm.text", "disabled_visible", 0.0);
913                else
914                  set_state(PART:"elm.text", "disabled", 0.0);
915                set_int(button_state, BUTTON_STATE_DISABLED);
916             }
917          }
918          program { name: "enable";
919             signal: "elm,state,enabled";
920             source: "elm";
921             action: STATE_SET "default" 0.0;
922             target: "button_image";
923             target: "disabler";
924             after: "enable_text";
925          }
926          program { name: "enable_text";
927             script {
928                new st[31];
929                new Float:vl;
930                get_state(PART:"elm.text", st, 30, vl);
931                if (!strcmp(st, "disabled_visible"))
932                  set_state(PART:"elm.text", "visible", 0.0);
933                else
934                  set_state(PART:"elm.text", "default", 0.0);
935                set_int(button_state, BUTTON_STATE_ENABLED);
936             }
937          }
938          program { name: "focused";
939             //signal: "elm,action,focus";
940             //source: "elm";
941             action: STATE_SET "focused" 0.0;
942             target: "button_image";
943             target: "elm.text";
944          }
945          program { name: "unfocused";
946             //signal: "elm,action,unfocus";
947             //source: "elm";
948             action: STATE_SET "default" 0.0;
949             target: "button_image";
950             after: "unfocus_text";
951          }
952          program { name: "unfocus_text";
953             action: STATE_SET "visible" 0.0;
954             target: "elm.text";
955          }
956       }
957 }
958