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