[Title] show appropriate zoom buttons when zoom level is changed
[profile/ivi/org.tizen.browser.git] / edc / browser-macro.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *    http://www.tizenopensource.org/license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17  
18 #define GENLIST_PART_BOTTOM_LINE_INC 199 199 199 255
19 #define GENLIST_PART_BG_COLOR_INC 249 249 249 255
20 #define GENLIST_PART_BG_SELECTED_COLOR_INC 50 65 74 180
21 #define GENLIST_PART_TEXT_SELECTED_COLOR_INC 255 255 255 255
22 #define GENLIST_PART_TEXT_COLOR_INC 0 0 0 255
23
24 #define FONT_BLD HelveticaNeueBld
25 #define FONT_MED HelveticaNeueMed
26 #define FONT_ROM HelveticaNeueRom
27 #define FONT_LIG HelveticaNeueLig
28
29 #define PADDING(title, w, h, fixed_w, fixed_h, align_w, align_h, l, t, r, b, rel1_to, rel2_to) \
30                 part { name: title; \
31                         type: RECT; \
32                         scale: 1; \
33                         description { \
34                                 state: "default" 0.0; \
35                                 visible: 0; \
36                                 min: w h; \
37                                 max: w h; \
38                                 fixed: fixed_w fixed_h; \
39                                 align: align_w align_h; \
40                                 rel1 { relative: l t; to: rel1_to; } \
41                                 rel2 { relative: r b; to: rel2_to; } \
42                         } \
43                 }
44
45
46 #define BUTTON(button_name, normal_image, press_image, l, r, t, b) \
47         group { name: "elm/button/base/browser/"#button_name; \
48                 images { \
49                         image: normal_image COMP; \
50                         image: press_image COMP; \
51                 } \
52                 styles { \
53                         style { name: #button_name"btn_textblock_style"; \
54                                 base: "font=FONT_CONTENT font_size=30 align=center color=#FFFFFF wrap=char"; \
55                                 tag:  "br" "\n"; \
56                                 tag:  "hilight" "+ font=FONT_CONTENT:style=Bold"; \
57                                 tag:  "b" "+ font=FONT_CONTENT:style=Bold"; \
58                                 tag:  "tab" "\t"; \
59                         } \
60                 } \
61                 parts { \
62                         part { name: "button_image"; \
63                                 scale: 1; \
64                                 mouse_events: 1; \
65                                 effect:        SOFT_SHADOW; \
66                                 description { state: "default" 0.0; \
67                                         image { \
68                                                 normal: normal_image; \
69                                                 border: l r t b; \
70                                         } \
71                                 } \
72                                 description { state: "clicked" 0.0; \
73                                         inherit: "default" 0.0; \
74                                         image.normal: press_image; \
75                                 } \
76                                 description { state: "disabled" 0.0; \
77                                         inherit:  "default" 0.0; \
78                                         image.normal: normal_image; \
79                                 } \
80                         } \
81                         part {  name: "elm.text"; \
82                                 type: TEXTBLOCK; \
83                                 effect: SHADOW; \
84                                 mouse_events: 0; \
85                                 scale: 1; \
86                                 description { state: "default" 0.0; \
87                                         visible: 0; \
88                                         fixed: 1 1; \
89                                         align: 0.5 0.5; \
90                                         rel1 { relative: 0.1 0; to: "button_image"; } \
91                                         rel2 { relative: 0.9 1; to: "button_image"; } \
92                                         color: 255 255 255 255; \
93                                         text { \
94                                                 style: #button_name"btn_textblock_style"; \
95                                                 min: 0 0; \
96                                                 max: 0 1; \
97                                         } \
98                                 } \
99                                 description { state: "visible" 0.0; \
100                                         inherit: "default" 0.0; \
101                                         visible: 1; \
102                                         min: 1 1; \
103                                 } \
104                                 description { state: "clicked" 0.0; \
105                                         inherit: "default" 0.0; \
106                                         visible: 1; \
107                                         min: 1 1; \
108                                 } \
109                                 description { state: "disabled" 0.0; \
110                                         inherit: "default" 0.0; \
111                                         color: 0 0 0 128; \
112                                         color3: 0 0 0 0; \
113                                 } \
114                                 description { state: "disabled_visible" 0.0; \
115                                         inherit: "default" 0.0; \
116                                         color: 0 0 0 128; \
117                                         color3: 0 0 0 0; \
118                                         visible: 1; \
119                                         min: 1 1; \
120                                 } \
121                         } \
122                         part { name: "over1"; \
123                                 mouse_events: 0; \
124                                 description { state: "default" 0.0; \
125                                         rel2.relative: 1.0 0.5; \
126                                 } \
127                                 description { state: "disabled" 0.0; \
128                                         inherit:  "default" 0.0; \
129                                 } \
130                         } \
131                         part { name: "over2"; \
132                                 mouse_events: 1; \
133                                 repeat_events: 1; \
134                                 ignore_flags: ON_HOLD; \
135                                 description { state: "default" 0.0; \
136                                 } \
137                                 description { state: "disabled" 0.0; \
138                                         inherit:  "default" 0.0; \
139                                         visible: 0; \
140                                 } \
141                         } \
142                         part { name: "over3"; \
143                                 mouse_events: 1; \
144                                 repeat_events: 1; \
145                                 description { state: "default" 0.0; \
146                                         color: 255 255 255 0; \
147                                 } \
148                                 description { state: "clicked" 0.0; \
149                                         inherit:  "default" 0.0; \
150                                         visible: 1; \
151                                         color: 255 255 255 0; \
152                                 } \
153                         } \
154                         part { name: "disabler"; \
155                                 type: RECT; \
156                                 description { state: "default" 0.0; \
157                                         color: 0 0 0 0; \
158                                         visible: 0; \
159                                 } \
160                                 description { state: "disabled" 0.0; \
161                                         inherit: "default" 0.0; \
162                                         visible: 1; \
163                                 } \
164                         } \
165                 } \
166                 programs { \
167                         program { name: "button_click"; \
168                                 signal: "mouse,down,1"; \
169                                 source: "over2"; \
170                                 action: SIGNAL_EMIT "elm,action,press" ""; \
171                                 after: "button_click_anim"; \
172                         } \
173                         program { name: "button_click_anim"; \
174                                 action: STATE_SET "clicked" 0.0; \
175                                 target: "button_image"; \
176                                 target: "elm.text"; \
177                         } \
178                         program { name: "button_unclick"; \
179                                 signal: "mouse,up,1"; \
180                                 source: "over2"; \
181                                 action: SIGNAL_EMIT "elm,action,unpress" ""; \
182                                 after: "button_unclick_anim"; \
183                         } \
184                         program { name: "button_unclick_anim"; \
185                                 action: STATE_SET "default" 0.0; \
186                                 target: "button_image"; \
187                                 action: STATE_SET "visible" 0.0; \
188                                 target: "elm.text"; \
189                         } \
190                         program { name: "button_mouseout_clicked"; \
191                                 signal: "mouse,out"; \
192                                 source: "over2"; \
193                                 script { \
194                                         new st[31]; \
195                                         new Float:vl; \
196                                         get_state(PART:"elm.text", st, 30, vl); \
197                                         if (!strcmp(st, "clicked")) \
198                                         { \
199                                                 set_state(PART:"elm.text", "visible", 0.0); \
200                                                 set_state(PART:"button_image", "visible", 0.0); \
201                                         } \
202                                 } \
203                         } \
204                         program { name: "button_click2"; \
205                                 signal: "mouse,down,1"; \
206                                 source: "over3"; \
207                                 action: STATE_SET "clicked" 0.0; \
208                                 target: "over3"; \
209                         } \
210                         program { name: "button_unclick2"; \
211                                 signal: "mouse,clicked,1"; \
212                                 source: "over3"; \
213                                 action: STATE_SET "default" 0.0; \
214                                 target: "over3"; \
215                         } \
216                         program { name: "button_unclick3"; \
217                                 signal: "mouse,clicked,1"; \
218                                 source: "over2"; \
219                                 action: SIGNAL_EMIT "elm,action,click" ""; \
220                         } \
221                         program { name: "text_show"; \
222                                 signal: "elm,state,text,visible"; \
223                                 source: "elm"; \
224                                 action: STATE_SET "visible" 0.0; \
225                                 target: "elm.text"; \
226                         } \
227                         program { name: "text_hide"; \
228                                 signal: "elm,state,text,hidden"; \
229                                 source: "elm"; \
230                                 action: STATE_SET "default" 0.0; \
231                                 target: "elm.text"; \
232                         } \
233                         program { name: "disable"; \
234                                 signal: "elm,state,disabled"; \
235                                 source: "elm"; \
236                                 action: STATE_SET "disabled" 0.0; \
237                                 target: "button_image"; \
238                                 target: "over1"; \
239                                 target: "over2"; \
240                                 target: "disabler"; \
241                                 after: "disable_text"; \
242                         } \
243                         program { name: "disable_text"; \
244                                 script { \
245                                         new st[31]; \
246                                         new Float:vl; \
247                                         get_state(PART:"elm.text", st, 30, vl); \
248                                         if (!strcmp(st, "visible")) \
249                                                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
250                                         else \
251                                                 set_state(PART:"elm.text", "disabled", 0.0); \
252                                 } \
253                         } \
254                         program { name: "enable"; \
255                                 signal: "elm,state,enabled"; \
256                                 source: "elm"; \
257                                 action: STATE_SET "default" 0.0; \
258                                 target: "button_image"; \
259                                 target: "over1"; \
260                                 target: "over2"; \
261                                 target: "disabler"; \
262                                 after: "enable_text"; \
263                         } \
264                         program { name: "enable_text"; \
265                                 script { \
266                                         new st[31]; \
267                                         new Float:vl; \
268                                         get_state(PART:"elm.text", st, 30, vl); \
269                                         if (!strcmp(st, "disabled_visible")) \
270                                                 set_state(PART:"elm.text", "visible", 0.0); \
271                                         else \
272                                                 set_state(PART:"elm.text", "default", 0.0); \
273                                 } \
274                         } \
275                 } \
276         }
277
278 #define ZOOM_BUTTON(button_name, normal_image, press_image, disable_image, l, r, t, b) \
279         group { name: "elm/button/base/browser/"#button_name; \
280                 images { \
281                         image: normal_image COMP; \
282                         image: press_image COMP; \
283                         image: disable_image COMP; \
284                 } \
285                 styles { \
286                         style { name: #button_name"btn_textblock_style"; \
287                                 base: "font=FONT_CONTENT font_size=30 align=center color=#4E4945 wrap=char"; \
288                                 tag:  "br" "\n"; \
289                                 tag:  "hilight" "+ font=FONT_CONTENT:style=Bold"; \
290                                 tag:  "b" "+ font=FONT_CONTENT:style=Bold"; \
291                                 tag:  "tab" "\t"; \
292                         } \
293                 } \
294                 parts { \
295                         part { name: "button_image"; \
296                                 scale: 1; \
297                                 mouse_events: 1; \
298                                 effect:        SOFT_SHADOW; \
299                                 description { state: "default" 0.0; \
300                                         image { \
301                                                 normal: normal_image; \
302                                                 border: l r t b; \
303                                         } \
304                                 } \
305                                 description { state: "clicked" 0.0; \
306                                         inherit: "default" 0.0; \
307                                         image.normal: press_image; \
308                                 } \
309                                 description { state: "disabled" 0.0; \
310                                         inherit:  "default" 0.0; \
311                                         image.normal: disable_image; \
312                                 } \
313                         } \
314                         part {  name: "elm.text"; \
315                                 type: TEXTBLOCK; \
316                                 effect: SHADOW; \
317                                 mouse_events: 0; \
318                                 scale: 1; \
319                                 description { state: "default" 0.0; \
320                                         visible: 0; \
321                                         fixed: 1 1; \
322                                         align: 0.5 0.5; \
323                                         rel1 { relative: 0.1 0; to: "button_image"; } \
324                                         rel2 { relative: 0.9 1; to: "button_image"; } \
325                                         color: 255 255 255 255; \
326                                         text { \
327                                                 style: #button_name"btn_textblock_style"; \
328                                                 min: 0 0; \
329                                                 max: 0 1; \
330                                         } \
331                                 } \
332                                 description { state: "visible" 0.0; \
333                                         inherit: "default" 0.0; \
334                                         visible: 1; \
335                                         min: 1 1; \
336                                 } \
337                                 description { state: "clicked" 0.0; \
338                                         inherit: "default" 0.0; \
339                                         visible: 1; \
340                                         min: 1 1; \
341                                 } \
342                                 description { state: "disabled" 0.0; \
343                                         inherit: "default" 0.0; \
344                                         color: 0 0 0 128; \
345                                         color3: 0 0 0 0; \
346                                 } \
347                                 description { state: "disabled_visible" 0.0; \
348                                         inherit: "default" 0.0; \
349                                         color: 0 0 0 128; \
350                                         color3: 0 0 0 0; \
351                                         visible: 1; \
352                                         min: 1 1; \
353                                 } \
354                         } \
355                         part { name: "over1"; \
356                                 mouse_events: 0; \
357                                 description { state: "default" 0.0; \
358                                         rel2.relative: 1.0 0.5; \
359                                 } \
360                                 description { state: "disabled" 0.0; \
361                                         inherit:  "default" 0.0; \
362                                 } \
363                         } \
364                         part { name: "over2"; \
365                                 mouse_events: 1; \
366                                 repeat_events: 1; \
367                                 ignore_flags: ON_HOLD; \
368                                 description { state: "default" 0.0; \
369                                         fixed: 1 1; \
370                                         rel1 { relative: 0.0 0.0; to: "button_image"; } \
371                                         rel2 { relative: 1.0 1.0; to: "button_image"; } \
372                                 } \
373                                 description { state: "disabled" 0.0; \
374                                         inherit:  "default" 0.0; \
375                                         visible: 0; \
376                                 } \
377                         } \
378                         part { name: "over3"; \
379                                 mouse_events: 1; \
380                                 repeat_events: 1; \
381                                 description { state: "default" 0.0; \
382                                         color: 255 255 255 0; \
383                                 } \
384                                 description { state: "clicked" 0.0; \
385                                         inherit:  "default" 0.0; \
386                                         visible: 1; \
387                                         color: 255 255 255 0; \
388                                 } \
389                         } \
390                         part { name: "disabler"; \
391                                 type: RECT; \
392                                 description { state: "default" 0.0; \
393                                         color: 0 0 0 0; \
394                                         visible: 0; \
395                                 } \
396                                 description { state: "disabled" 0.0; \
397                                         inherit: "default" 0.0; \
398                                         visible: 1; \
399                                 } \
400                         } \
401                 } \
402                 programs { \
403                         program { name: "button_click"; \
404                                 signal: "mouse,down,1"; \
405                                 source: "over2"; \
406                                 action: SIGNAL_EMIT "elm,action,press" ""; \
407                                 after: "button_click_anim"; \
408                         } \
409                         program { name: "button_click_anim"; \
410                                 action: STATE_SET "clicked" 0.0; \
411                                 target: "button_image"; \
412                                 target: "elm.text"; \
413                         } \
414                         program { name: "button_unclick"; \
415                                 signal: "mouse,up,1"; \
416                                 source: "over2"; \
417                                 action: SIGNAL_EMIT "elm,action,unpress" ""; \
418                                 after: "button_unclick_anim"; \
419                         } \
420                         program { name: "button_unclick_anim"; \
421                                 action: STATE_SET "default" 0.0; \
422                                 target: "button_image"; \
423                                 action: STATE_SET "visible" 0.0; \
424                                 target: "elm.text"; \
425                         } \
426                         program { name: "button_mouseout_clicked"; \
427                                 signal: "mouse,out"; \
428                                 source: "over2"; \
429                                 script { \
430                                         new st[31]; \
431                                         new Float:vl; \
432                                         get_state(PART:"elm.text", st, 30, vl); \
433                                         if (!strcmp(st, "clicked")) \
434                                         { \
435                                                 set_state(PART:"elm.text", "visible", 0.0); \
436                                                 set_state(PART:"button_image", "visible", 0.0); \
437                                         } \
438                                 } \
439                         } \
440                         program { name: "button_click2"; \
441                                 signal: "mouse,down,1"; \
442                                 source: "over3"; \
443                                 action: STATE_SET "clicked" 0.0; \
444                                 target: "over3"; \
445                         } \
446                         program { name: "button_unclick2"; \
447                                 signal: "mouse,clicked,1"; \
448                                 source: "over3"; \
449                                 action: STATE_SET "default" 0.0; \
450                                 target: "over3"; \
451                         } \
452                         program { name: "button_unclick3"; \
453                                 signal: "mouse,clicked,1"; \
454                                 source: "over2"; \
455                                 action: SIGNAL_EMIT "elm,action,click" ""; \
456                         } \
457                         program { name: "text_show"; \
458                                 signal: "elm,state,text,visible"; \
459                                 source: "elm"; \
460                                 action: STATE_SET "visible" 0.0; \
461                                 target: "elm.text"; \
462                         } \
463                         program { name: "text_hide"; \
464                                 signal: "elm,state,text,hidden"; \
465                                 source: "elm"; \
466                                 action: STATE_SET "default" 0.0; \
467                                 target: "elm.text"; \
468                         } \
469                         program { name: "disable"; \
470                                 signal: "elm,state,disabled"; \
471                                 source: "elm"; \
472                                 action: STATE_SET "disabled" 0.0; \
473                                 target: "button_image"; \
474                                 target: "over1"; \
475                                 target: "over2"; \
476                                 target: "disabler"; \
477                                 after: "disable_text"; \
478                         } \
479                         program { name: "disable_text"; \
480                                 script { \
481                                         new st[31]; \
482                                         new Float:vl; \
483                                         get_state(PART:"elm.text", st, 30, vl); \
484                                         if (!strcmp(st, "visible")) \
485                                                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
486                                         else \
487                                                 set_state(PART:"elm.text", "disabled", 0.0); \
488                                 } \
489                         } \
490                         program { name: "enable"; \
491                                 signal: "elm,state,enabled"; \
492                                 source: "elm"; \
493                                 action: STATE_SET "default" 0.0; \
494                                 target: "button_image"; \
495                                 target: "over1"; \
496                                 target: "over2"; \
497                                 target: "disabler"; \
498                                 after: "enable_text"; \
499                         } \
500                         program { name: "enable_text"; \
501                                 script { \
502                                         new st[31]; \
503                                         new Float:vl; \
504                                         get_state(PART:"elm.text", st, 30, vl); \
505                                         if (!strcmp(st, "disabled_visible")) \
506                                                 set_state(PART:"elm.text", "visible", 0.0); \
507                                         else \
508                                                 set_state(PART:"elm.text", "default", 0.0); \
509                                 } \
510                         } \
511                 } \
512         }
513
514 #define TITLE_BUTTON(button_name, normal_image, press_image, l, r, t, b) \
515         group { name: "elm/button/base/browser/"#button_name; \
516                 images { \
517                         image: normal_image COMP; \
518                         image: press_image COMP; \
519                 } \
520                 styles { \
521                         style { name: #button_name"btn_textblock_style"; \
522                                 base: "font=FONT_CONTENT font_size=30 align=center color=#FFFFFF wrap=char"; \
523                                 tag:  "br" "\n"; \
524                                 tag:  "hilight" "+ font=FONT_CONTENT:style=Bold"; \
525                                 tag:  "b" "+ font=FONT_CONTENT:style=Bold"; \
526                                 tag:  "tab" "\t"; \
527                         } \
528                 } \
529                 parts { \
530                         part { name: "button_image"; \
531                                 scale: 1; \
532                                 mouse_events: 1; \
533                                 effect:        SOFT_SHADOW; \
534                                 description { state: "default" 0.0; \
535                                         image { \
536                                                 normal: normal_image; \
537                                                 border: l r t b; \
538                                         } \
539                                 } \
540                                 description { state: "clicked" 0.0; \
541                                         inherit: "default" 0.0; \
542                                         image.normal: press_image; \
543                                 } \
544                                 description { state: "disabled" 0.0; \
545                                         inherit:  "default" 0.0; \
546                                         image.normal: normal_image; \
547                                 } \
548                         } \
549                         part {  name: "elm.text"; \
550                                 type: TEXTBLOCK; \
551                                 effect: SHADOW; \
552                                 mouse_events: 0; \
553                                 scale: 1; \
554                                 description { state: "default" 0.0; \
555                                         visible: 0; \
556                                         fixed: 1 1; \
557                                         align: 0.5 0.5; \
558                                         rel1 { relative: 0.1 0; to: "button_image"; } \
559                                         rel2 { relative: 0.9 1; to: "button_image"; } \
560                                         color: 255 255 255 255; \
561                                         text { \
562                                                 style: #button_name"btn_textblock_style"; \
563                                                 min: 0 0; \
564                                                 max: 0 1; \
565                                         } \
566                                 } \
567                                 description { state: "visible" 0.0; \
568                                         inherit: "default" 0.0; \
569                                         visible: 1; \
570                                         min: 1 1; \
571                                 } \
572                                 description { state: "clicked" 0.0; \
573                                         inherit: "default" 0.0; \
574                                         visible: 1; \
575                                         min: 1 1; \
576                                 } \
577                                 description { state: "disabled" 0.0; \
578                                         inherit: "default" 0.0; \
579                                         color: 0 0 0 128; \
580                                         color3: 0 0 0 0; \
581                                 } \
582                                 description { state: "disabled_visible" 0.0; \
583                                         inherit: "default" 0.0; \
584                                         color: 0 0 0 128; \
585                                         color3: 0 0 0 0; \
586                                         visible: 1; \
587                                         min: 1 1; \
588                                 } \
589                         } \
590                         part { name: "over1"; \
591                                 mouse_events: 0; \
592                                 description { state: "default" 0.0; \
593                                         rel2.relative: 1.0 0.5; \
594                                 } \
595                                 description { state: "disabled" 0.0; \
596                                         inherit:  "default" 0.0; \
597                                 } \
598                         } \
599                         part { name: "over2"; \
600                                 mouse_events: 1; \
601                                 repeat_events: 1; \
602                                 ignore_flags: ON_HOLD; \
603                                 description { state: "default" 0.0; \
604                                 } \
605                                 description { state: "disabled" 0.0; \
606                                         inherit:  "default" 0.0; \
607                                         visible: 0; \
608                                 } \
609                         } \
610                         part { name: "over3"; \
611                                 mouse_events: 1; \
612                                 repeat_events: 1; \
613                                 description { state: "default" 0.0; \
614                                         color: 255 255 255 0; \
615                                 } \
616                                 description { state: "clicked" 0.0; \
617                                         inherit:  "default" 0.0; \
618                                         visible: 1; \
619                                         color: 255 255 255 0; \
620                                 } \
621                         } \
622                         part { name: "disabler"; \
623                                 type: RECT; \
624                                 description { state: "default" 0.0; \
625                                         color: 0 0 0 0; \
626                                         visible: 0; \
627                                 } \
628                                 description { state: "disabled" 0.0; \
629                                         inherit: "default" 0.0; \
630                                         visible: 1; \
631                                 } \
632                         } \
633                 } \
634                 programs { \
635                         program { name: "button_click"; \
636                                 signal: "mouse,down,1"; \
637                                 source: "over2"; \
638                                 action: SIGNAL_EMIT "elm,action,press" ""; \
639                                 after: "button_click_anim"; \
640                         } \
641                         program { name: "button_click_anim"; \
642                                 action: STATE_SET "clicked" 0.0; \
643                                 target: "button_image"; \
644                                 target: "elm.text"; \
645                         } \
646                         program { name: "button_unclick"; \
647                                 signal: "mouse,up,1"; \
648                                 source: "over2"; \
649                                 action: SIGNAL_EMIT "elm,action,unpress" ""; \
650                                 after: "button_unclick_anim"; \
651                         } \
652                         program { name: "button_unclick_anim"; \
653                                 action: STATE_SET "default" 0.0; \
654                                 target: "button_image"; \
655                                 action: STATE_SET "visible" 0.0; \
656                                 target: "elm.text"; \
657                         } \
658                         program { name: "button_mouseout_clicked"; \
659                                 signal: "mouse,out"; \
660                                 source: "over2"; \
661                                 script { \
662                                         new st[31]; \
663                                         new Float:vl; \
664                                         get_state(PART:"elm.text", st, 30, vl); \
665                                         if (!strcmp(st, "clicked")) \
666                                         { \
667                                                 set_state(PART:"elm.text", "visible", 0.0); \
668                                                 set_state(PART:"button_image", "visible", 0.0); \
669                                         } \
670                                 } \
671                         } \
672                         program { name: "button_click2"; \
673                                 signal: "mouse,down,1"; \
674                                 source: "over3"; \
675                                 action: STATE_SET "clicked" 0.0; \
676                                 target: "over3"; \
677                         } \
678                         program { name: "button_unclick2"; \
679                                 signal: "mouse,clicked,1"; \
680                                 source: "over3"; \
681                                 action: STATE_SET "default" 0.0; \
682                                 target: "over3"; \
683                         } \
684                         program { name: "button_unclick3"; \
685                                 signal: "mouse,clicked,1"; \
686                                 source: "over2"; \
687                                 action: SIGNAL_EMIT "elm,action,click" ""; \
688                         } \
689                         program { name: "text_show"; \
690                                 signal: "elm,state,text,visible"; \
691                                 source: "elm"; \
692                                 action: STATE_SET "visible" 0.0; \
693                                 target: "elm.text"; \
694                         } \
695                         program { name: "text_hide"; \
696                                 signal: "elm,state,text,hidden"; \
697                                 source: "elm"; \
698                                 action: STATE_SET "default" 0.0; \
699                                 target: "elm.text"; \
700                         } \
701                         program { name: "disable"; \
702                                 signal: "elm,state,disabled"; \
703                                 source: "elm"; \
704                                 action: STATE_SET "disabled" 0.0; \
705                                 target: "button_image"; \
706                                 target: "over1"; \
707                                 target: "over2"; \
708                                 target: "disabler"; \
709                                 after: "disable_text"; \
710                         } \
711                         program { name: "disable_text"; \
712                                 script { \
713                                         new st[31]; \
714                                         new Float:vl; \
715                                         get_state(PART:"elm.text", st, 30, vl); \
716                                         if (!strcmp(st, "visible")) \
717                                                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
718                                         else \
719                                                 set_state(PART:"elm.text", "disabled", 0.0); \
720                                 } \
721                         } \
722                         program { name: "enable"; \
723                                 signal: "elm,state,enabled"; \
724                                 source: "elm"; \
725                                 action: STATE_SET "default" 0.0; \
726                                 target: "button_image"; \
727                                 target: "over1"; \
728                                 target: "over2"; \
729                                 target: "disabler"; \
730                                 after: "enable_text"; \
731                         } \
732                         program { name: "enable_text"; \
733                                 script { \
734                                         new st[31]; \
735                                         new Float:vl; \
736                                         get_state(PART:"elm.text", st, 30, vl); \
737                                         if (!strcmp(st, "disabled_visible")) \
738                                                 set_state(PART:"elm.text", "visible", 0.0); \
739                                         else \
740                                                 set_state(PART:"elm.text", "default", 0.0); \
741                                 } \
742                         } \
743                 } \
744         }
745
746 #define BUTTON_WITH_TEXT(button_name, normal_image, press_image, l, r, t, b, bg_w, bg_h) \
747         group { name: "elm/button/base/browser/"#button_name; \
748                 images { \
749                         image: normal_image COMP; \
750                         image: press_image COMP; \
751                 } \
752                 styles { \
753                         style { name: #button_name"btn_textblock_style"; \
754                                 base: "font=FONT_CONTENT font_size=24 align=center color=#FFFFFF wrap=char"; \
755                                 tag:  "br" "\n"; \
756                                 tag:  "hilight" "+ font=FONT_CONTENT:style=Bold"; \
757                                 tag:  "b" "+ font=FONT_CONTENT:style=Bold"; \
758                                 tag:  "tab" "\t"; \
759                         } \
760                 } \
761                 parts { \
762                         part { name: "button_image"; \
763                                 mouse_events: 1; \
764                                 scale: 1; \
765                                 effect:        SOFT_SHADOW; \
766                                 description { state: "default" 0.0; \
767                                         align: 0.0 0.5; \
768                                         min: bg_w bg_h; \
769                                         max: bg_w bg_h; \
770                                         fixed: 1 1; \
771                                         image { \
772                                                 normal: normal_image; \
773                                                 border: l r t b; \
774                                         } \
775                                 } \
776                                 description { state: "clicked" 0.0; \
777                                         inherit: "default" 0.0; \
778                                         image.normal: press_image; \
779                                 } \
780                                 description { state: "disabled" 0.0; \
781                                         inherit:  "default" 0.0; \
782                                         image.normal: normal_image; \
783                                 } \
784                         } \
785                         part {  name: "elm.text"; \
786                                 type: TEXTBLOCK; \
787                                 effect: SHADOW; \
788                                 mouse_events: 0; \
789                                 scale: 1; \
790                                 description { state: "default" 0.0; \
791                                         visible: 0; \
792                                         fixed: 1 1; \
793                                         align: 0.5 0.5; \
794                                         rel1 { relative: 0.1 0; to: "button_image"; } \
795                                         rel2 { relative: 0.9 1; to: "button_image"; } \
796                                         color: 255 255 255 255; \
797                                         text { \
798                                                 style: #button_name"btn_textblock_style"; \
799                                                 min: 0 0; \
800                                                 max: 0 1; \
801                                         } \
802                                 } \
803                                 description { state: "visible" 0.0; \
804                                         inherit: "default" 0.0; \
805                                         visible: 1; \
806                                         min: 1 1; \
807                                 } \
808                                 description { state: "clicked" 0.0; \
809                                         inherit: "default" 0.0; \
810                                         visible: 1; \
811                                         min: 1 1; \
812                                 } \
813                                 description { state: "disabled" 0.0; \
814                                         inherit: "default" 0.0; \
815                                         color: 0 0 0 128; \
816                                         color3: 0 0 0 0; \
817                                 } \
818                                 description { state: "disabled_visible" 0.0; \
819                                         inherit: "default" 0.0; \
820                                         color: 0 0 0 128; \
821                                         color3: 0 0 0 0; \
822                                         visible: 1; \
823                                         min: 1 1; \
824                                 } \
825                         } \
826                         part { name: "over1"; \
827                                 mouse_events: 0; \
828                                 description { state: "default" 0.0; \
829                                         rel2.relative: 1.0 0.5; \
830                                 } \
831                                 description { state: "disabled" 0.0; \
832                                         inherit:  "default" 0.0; \
833                                 } \
834                         } \
835                         part { name: "over2"; \
836                                 mouse_events: 1; \
837                                 repeat_events: 1; \
838                                 ignore_flags: ON_HOLD; \
839                                 description { state: "default" 0.0; \
840                                 } \
841                                 description { state: "disabled" 0.0; \
842                                         inherit:  "default" 0.0; \
843                                         visible: 0; \
844                                 } \
845                         } \
846                         part { name: "over3"; \
847                                 mouse_events: 1; \
848                                 repeat_events: 1; \
849                                 description { state: "default" 0.0; \
850                                         color: 255 255 255 0; \
851                                 } \
852                                 description { state: "clicked" 0.0; \
853                                         inherit:  "default" 0.0; \
854                                         visible: 1; \
855                                         color: 255 255 255 0; \
856                                 } \
857                         } \
858                         part { name: "disabler"; \
859                                 type: RECT; \
860                                 description { state: "default" 0.0; \
861                                         color: 0 0 0 0; \
862                                         visible: 0; \
863                                 } \
864                                 description { state: "disabled" 0.0; \
865                                         inherit: "default" 0.0; \
866                                         visible: 1; \
867                                 } \
868                         } \
869                 } \
870                 programs { \
871                         program { name: "button_click"; \
872                                 signal: "mouse,down,1"; \
873                                 source: "over2"; \
874                                 action: SIGNAL_EMIT "elm,action,press" ""; \
875                                 after: "button_click_anim"; \
876                         } \
877                         program { name: "button_click_anim"; \
878                                 action: STATE_SET "clicked" 0.0; \
879                                 target: "button_image"; \
880                                 target: "elm.text"; \
881                         } \
882                         program { name: "button_unclick"; \
883                                 signal: "mouse,up,1"; \
884                                 source: "over2"; \
885                                 action: SIGNAL_EMIT "elm,action,unpress" ""; \
886                                 after: "button_unclick_anim"; \
887                         } \
888                         program { name: "button_unclick_anim"; \
889                                 action: STATE_SET "default" 0.0; \
890                                 target: "button_image"; \
891                                 action: STATE_SET "visible" 0.0; \
892                                 target: "elm.text"; \
893                         } \
894                         program { name: "button_mouseout_clicked"; \
895                                 signal: "mouse,out"; \
896                                 source: "over2"; \
897                                 script { \
898                                         new st[31]; \
899                                         new Float:vl; \
900                                         get_state(PART:"elm.text", st, 30, vl); \
901                                         if (!strcmp(st, "clicked")) \
902                                         { \
903                                                 set_state(PART:"elm.text", "visible", 0.0); \
904                                                 set_state(PART:"button_image", "visible", 0.0); \
905                                         } \
906                                 } \
907                         } \
908                         program { name: "button_click2"; \
909                                 signal: "mouse,down,1"; \
910                                 source: "over3"; \
911                                 action: STATE_SET "clicked" 0.0; \
912                                 target: "over3"; \
913                         } \
914                         program { name: "button_unclick2"; \
915                                 signal: "mouse,clicked,1"; \
916                                 source: "over3"; \
917                                 action: STATE_SET "default" 0.0; \
918                                 target: "over3"; \
919                         } \
920                         program { name: "button_unclick3"; \
921                                 signal: "mouse,clicked,1"; \
922                                 source: "over2"; \
923                                 action: SIGNAL_EMIT "elm,action,click" ""; \
924                         } \
925                         program { name: "text_show"; \
926                                 signal: "elm,state,text,visible"; \
927                                 source: "elm"; \
928                                 action: STATE_SET "visible" 0.0; \
929                                 target: "elm.text"; \
930                         } \
931                         program { name: "text_hide"; \
932                                 signal: "elm,state,text,hidden"; \
933                                 source: "elm"; \
934                                 action: STATE_SET "default" 0.0; \
935                                 target: "elm.text"; \
936                         } \
937                         program { name: "disable"; \
938                                 signal: "elm,state,disabled"; \
939                                 source: "elm"; \
940                                 action: STATE_SET "disabled" 0.0; \
941                                 target: "button_image"; \
942                                 target: "over1"; \
943                                 target: "over2"; \
944                                 target: "disabler"; \
945                                 after: "disable_text"; \
946                         } \
947                         program { name: "disable_text"; \
948                                 script { \
949                                         new st[31]; \
950                                         new Float:vl; \
951                                         get_state(PART:"elm.text", st, 30, vl); \
952                                         if (!strcmp(st, "visible")) \
953                                                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
954                                         else \
955                                                 set_state(PART:"elm.text", "disabled", 0.0); \
956                                 } \
957                         } \
958                         program { name: "enable"; \
959                                 signal: "elm,state,enabled"; \
960                                 source: "elm"; \
961                                 action: STATE_SET "default" 0.0; \
962                                 target: "button_image"; \
963                                 target: "over1"; \
964                                 target: "over2"; \
965                                 target: "disabler"; \
966                                 after: "enable_text"; \
967                         } \
968                         program { name: "enable_text"; \
969                                 script { \
970                                         new st[31]; \
971                                         new Float:vl; \
972                                         get_state(PART:"elm.text", st, 30, vl); \
973                                         if (!strcmp(st, "disabled_visible")) \
974                                                 set_state(PART:"elm.text", "visible", 0.0); \
975                                         else \
976                                                 set_state(PART:"elm.text", "default", 0.0); \
977                                 } \
978                         } \
979                 } \
980         }
981
982 #define BUTTON_WITH_BG(button_name, normal_image, press_image, main_image, main_image_disable, l, r, t, b, bg_w, bg_h, main_image_w, main_image_h) \
983         group { name: "elm/button/base/browser/"#button_name; \
984                 images { \
985                         image: normal_image COMP; \
986                         image: press_image COMP; \
987                         image: main_image COMP; \
988                         image: main_image_disable COMP; \
989                 } \
990                 styles { \
991                         style { name: #button_name"btn_textblock_style"; \
992                                 base: "font=FONT_CONTENT font_size=21 align=center color=#FFFFFF wrap=char"; \
993                                 tag:  "br" "\n"; \
994                                 tag:  "hilight" "+ font=FONT_CONTENT:style=Bold"; \
995                                 tag:  "b" "+ font=FONT_CONTENT:style=Bold"; \
996                                 tag:  "tab" "\t"; \
997                         } \
998                 } \
999                 parts { \
1000                         part { name: "button_image"; \
1001                                 mouse_events: 1; \
1002                                 scale: 1; \
1003                                 effect:        SOFT_SHADOW; \
1004                                 description { state: "default" 0.0; \
1005                                         align: 0.0 0.5; \
1006                                         min: bg_w bg_h; \
1007                                         max: bg_w bg_h; \
1008                                         fixed: 1 1; \
1009                                         image { \
1010                                                 normal: normal_image; \
1011                                                 border: l r t b; \
1012                                         } \
1013                                 } \
1014                                 description { state: "clicked" 0.0; \
1015                                         inherit: "default" 0.0; \
1016                                         image.normal: press_image; \
1017                                 } \
1018                                 description { state: "disabled" 0.0; \
1019                                         inherit:  "default" 0.0; \
1020                                         image.normal: normal_image; \
1021                                 } \
1022                         } \
1023                         part { name: "main_image"; \
1024                                 mouse_events: 1; \
1025                                 scale: 1; \
1026                                 repeat_events: 1; \
1027                                 effect:        SOFT_SHADOW; \
1028                                 description { state: "default" 0.0; \
1029                                         min: main_image_w main_image_h; \
1030                                         max: main_image_w main_image_h; \
1031                                         fixed: 1 1; \
1032                                         align: 0.5 0.5; \
1033                                         rel1 { relative: 0.0 0.0; to: "button_image"; } \
1034                                         rel2 { relative: 1.0 1.0; to: "button_image"; } \
1035                                         image { \
1036                                                 normal: main_image; \
1037                                         } \
1038                                 } \
1039                                 description { state: "disabled" 0.0; \
1040                                         inherit:  "default" 0.0; \
1041                                         image.normal: main_image_disable; \
1042                                 } \
1043                         } \
1044                         part {  name: "elm.text"; \
1045                                 type: TEXTBLOCK; \
1046                                 effect: SHADOW; \
1047                                 mouse_events: 0; \
1048                                 scale: 1; \
1049                                 description { state: "default" 0.0; \
1050                                         visible: 0; \
1051                                         fixed: 1 1; \
1052                                         align: 0.5 0.5; \
1053                                         rel1 { relative: 0.1 0; to: "button_image"; } \
1054                                         rel2 { relative: 0.9 1; to: "button_image"; } \
1055                                         color: 0 0 0 255; \
1056                                         text { \
1057                                                 style: #button_name"btn_textblock_style"; \
1058                                                 min: 0 0; \
1059                                                 max: 0 1; \
1060                                         } \
1061                                 } \
1062                                 description { state: "visible" 0.0; \
1063                                         inherit: "default" 0.0; \
1064                                         visible: 1; \
1065                                         min: 1 1; \
1066                                 } \
1067                                 description { state: "clicked" 0.0; \
1068                                         inherit: "default" 0.0; \
1069                                         visible: 1; \
1070                                         min: 1 1; \
1071                                 } \
1072                                 description { state: "disabled" 0.0; \
1073                                         inherit: "default" 0.0; \
1074                                         color: 0 0 0 128; \
1075                                         color3: 0 0 0 0; \
1076                                 } \
1077                                 description { state: "disabled_visible" 0.0; \
1078                                         inherit: "default" 0.0; \
1079                                         color: 0 0 0 128; \
1080                                         color3: 0 0 0 0; \
1081                                         visible: 1; \
1082                                         min: 1 1; \
1083                                 } \
1084                         } \
1085                         part { name: "over1"; \
1086                                 mouse_events: 0; \
1087                                 description { state: "default" 0.0; \
1088                                         rel2.relative: 1.0 0.5; \
1089                                 } \
1090                                 description { state: "disabled" 0.0; \
1091                                         inherit:  "default" 0.0; \
1092                                 } \
1093                         } \
1094                         part { name: "over2"; \
1095                                 mouse_events: 1; \
1096                                 repeat_events: 1; \
1097                                 ignore_flags: ON_HOLD; \
1098                                 description { state: "default" 0.0; \
1099                                 } \
1100                                 description { state: "disabled" 0.0; \
1101                                         inherit:  "default" 0.0; \
1102                                         visible: 0; \
1103                                 } \
1104                         } \
1105                         part { name: "over3"; \
1106                                 mouse_events: 1; \
1107                                 repeat_events: 1; \
1108                                 description { state: "default" 0.0; \
1109                                         color: 255 255 255 0; \
1110                                 } \
1111                                 description { state: "clicked" 0.0; \
1112                                         inherit:  "default" 0.0; \
1113                                         visible: 1; \
1114                                         color: 255 255 255 0; \
1115                                 } \
1116                         } \
1117                         part { name: "disabler"; \
1118                                 type: RECT; \
1119                                 description { state: "default" 0.0; \
1120                                         color: 0 0 0 0; \
1121                                         visible: 0; \
1122                                 } \
1123                                 description { state: "disabled" 0.0; \
1124                                         inherit: "default" 0.0; \
1125                                         visible: 1; \
1126                                 } \
1127                         } \
1128                 } \
1129                 programs { \
1130                         program { name: "button_click"; \
1131                                 signal: "mouse,down,1"; \
1132                                 source: "over2"; \
1133                                 action: SIGNAL_EMIT "elm,action,press" ""; \
1134                                 after: "button_click_anim"; \
1135                         } \
1136                         program { name: "button_click_anim"; \
1137                                 action: STATE_SET "clicked" 0.0; \
1138                                 target: "button_image"; \
1139                                 target: "elm.text"; \
1140                         } \
1141                         program { name: "button_unclick"; \
1142                                 signal: "mouse,up,1"; \
1143                                 source: "over2"; \
1144                                 action: SIGNAL_EMIT "elm,action,unpress" ""; \
1145                                 after: "button_unclick_anim"; \
1146                         } \
1147                         program { name: "button_unclick_anim"; \
1148                                 action: STATE_SET "default" 0.0; \
1149                                 target: "button_image"; \
1150                                 action: STATE_SET "visible" 0.0; \
1151                                 target: "elm.text"; \
1152                         } \
1153                         program { name: "button_mouseout_clicked"; \
1154                                 signal: "mouse,out"; \
1155                                 source: "over2"; \
1156                                 script { \
1157                                         new st[31]; \
1158                                         new Float:vl; \
1159                                         get_state(PART:"elm.text", st, 30, vl); \
1160                                         if (!strcmp(st, "clicked")) \
1161                                         { \
1162                                                 set_state(PART:"elm.text", "visible", 0.0); \
1163                                                 set_state(PART:"button_image", "visible", 0.0); \
1164                                         } \
1165                                 } \
1166                         } \
1167                         program { name: "button_click2"; \
1168                                 signal: "mouse,down,1"; \
1169                                 source: "over3"; \
1170                                 action: STATE_SET "clicked" 0.0; \
1171                                 target: "over3"; \
1172                         } \
1173                         program { name: "button_unclick2"; \
1174                                 signal: "mouse,clicked,1"; \
1175                                 source: "over3"; \
1176                                 action: STATE_SET "default" 0.0; \
1177                                 target: "over3"; \
1178                         } \
1179                         program { name: "button_unclick3"; \
1180                                 signal: "mouse,clicked,1"; \
1181                                 source: "over2"; \
1182                                 action: SIGNAL_EMIT "elm,action,click" ""; \
1183                         } \
1184                         program { name: "text_show"; \
1185                                 signal: "elm,state,text,visible"; \
1186                                 source: "elm"; \
1187                                 action: STATE_SET "visible" 0.0; \
1188                                 target: "elm.text"; \
1189                         } \
1190                         program { name: "text_hide"; \
1191                                 signal: "elm,state,text,hidden"; \
1192                                 source: "elm"; \
1193                                 action: STATE_SET "default" 0.0; \
1194                                 target: "elm.text"; \
1195                         } \
1196                         program { name: "disable"; \
1197                                 signal: "elm,state,disabled"; \
1198                                 source: "elm"; \
1199                                 action: STATE_SET "disabled" 0.0; \
1200                                 target: "button_image"; \
1201                                 target: "over1"; \
1202                                 target: "over2"; \
1203                                 target: "disabler"; \
1204                                 target: "main_image"; \
1205                                 after: "disable_text"; \
1206                         } \
1207                         program { name: "disable_text"; \
1208                                 script { \
1209                                         new st[31]; \
1210                                         new Float:vl; \
1211                                         get_state(PART:"elm.text", st, 30, vl); \
1212                                         if (!strcmp(st, "visible")) \
1213                                                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1214                                         else \
1215                                                 set_state(PART:"elm.text", "disabled", 0.0); \
1216                                 } \
1217                         } \
1218                         program { name: "enable"; \
1219                                 signal: "elm,state,enabled"; \
1220                                 source: "elm"; \
1221                                 action: STATE_SET "default" 0.0; \
1222                                 target: "button_image"; \
1223                                 target: "over1"; \
1224                                 target: "over2"; \
1225                                 target: "disabler"; \
1226                                 target: "main_image"; \
1227                                 after: "enable_text"; \
1228                         } \
1229                         program { name: "enable_text"; \
1230                                 script { \
1231                                         new st[31]; \
1232                                         new Float:vl; \
1233                                         get_state(PART:"elm.text", st, 30, vl); \
1234                                         if (!strcmp(st, "disabled_visible")) \
1235                                                 set_state(PART:"elm.text", "visible", 0.0); \
1236                                         else \
1237                                                 set_state(PART:"elm.text", "default", 0.0); \
1238                                 } \
1239                         } \
1240                 } \
1241         }
1242
1243 #define FIND_BUTTON_WITH_BG(button_name, normal_image, press_image, arrow_image, disable_image, l, r, t, b, bg_w, bg_h, main_image_w, main_image_h) \
1244         group { name: "elm/button/base/browser/"#button_name; \
1245                 images { \
1246                         image: normal_image COMP; \
1247                         image: press_image COMP; \
1248                         image: arrow_image COMP; \
1249                         image: disable_image COMP; \
1250                 } \
1251                 styles { \
1252                         style { name: #button_name"btn_textblock_style"; \
1253                                 base: "font=FONT_CONTENT font_size=21 align=center color=#FFFFFF wrap=char"; \
1254                                 tag:  "br" "\n"; \
1255                                 tag:  "hilight" "+ font=FONT_CONTENT:style=Bold"; \
1256                                 tag:  "b" "+ font=FONT_CONTENT:style=Bold"; \
1257                                 tag:  "tab" "\t"; \
1258                         } \
1259                 } \
1260                 parts { \
1261                         part { name: "button_image"; \
1262                                 mouse_events: 1; \
1263                                 scale: 1; \
1264                                 effect:        SOFT_SHADOW; \
1265                                 description { state: "default" 0.0; \
1266                                         align: 0.0 0.5; \
1267                                         min: bg_w bg_h; \
1268                                         max: bg_w bg_h; \
1269                                         fixed: 1 1; \
1270                                         image { \
1271                                                 normal: normal_image; \
1272                                                 border: l r t b; \
1273                                         } \
1274                                 } \
1275                                 description { state: "clicked" 0.0; \
1276                                         inherit: "default" 0.0; \
1277                                         image.normal: press_image; \
1278                                 } \
1279                                 description { state: "disabled" 0.0; \
1280                                         inherit:  "default" 0.0; \
1281                                         image.normal: disable_image; \
1282                                 } \
1283                         } \
1284                         part { name: "arrow_image"; \
1285                                 mouse_events: 1; \
1286                                 scale: 1; \
1287                                 repeat_events: 1; \
1288                                 effect:        SOFT_SHADOW; \
1289                                 description { state: "default" 0.0; \
1290                                         min: main_image_w main_image_h; \
1291                                         max: main_image_w main_image_h; \
1292                                         fixed: 1 1; \
1293                                         align: 0.5 0.5; \
1294                                         rel1 { relative: 0.0 0.0; to: "button_image"; } \
1295                                         rel2 { relative: 1.0 1.0; to: "button_image"; } \
1296                                         image { \
1297                                                 normal: arrow_image; \
1298                                         } \
1299                                 } \
1300                         } \
1301                         part {  name: "elm.text"; \
1302                                 type: TEXTBLOCK; \
1303                                 effect: SHADOW; \
1304                                 mouse_events: 0; \
1305                                 scale: 1; \
1306                                 description { state: "default" 0.0; \
1307                                         visible: 0; \
1308                                         fixed: 1 1; \
1309                                         align: 0.5 0.5; \
1310                                         rel1 { relative: 0.1 0; to: "button_image"; } \
1311                                         rel2 { relative: 0.9 1; to: "button_image"; } \
1312                                         color: 0 0 0 255; \
1313                                         text { \
1314                                                 style: #button_name"btn_textblock_style"; \
1315                                                 min: 0 0; \
1316                                                 max: 0 1; \
1317                                         } \
1318                                 } \
1319                                 description { state: "visible" 0.0; \
1320                                         inherit: "default" 0.0; \
1321                                         visible: 1; \
1322                                         min: 1 1; \
1323                                 } \
1324                                 description { state: "clicked" 0.0; \
1325                                         inherit: "default" 0.0; \
1326                                         visible: 1; \
1327                                         min: 1 1; \
1328                                 } \
1329                                 description { state: "disabled" 0.0; \
1330                                         inherit: "default" 0.0; \
1331                                         color: 0 0 0 128; \
1332                                         color3: 0 0 0 0; \
1333                                 } \
1334                                 description { state: "disabled_visible" 0.0; \
1335                                         inherit: "default" 0.0; \
1336                                         color: 0 0 0 128; \
1337                                         color3: 0 0 0 0; \
1338                                         visible: 1; \
1339                                         min: 1 1; \
1340                                 } \
1341                         } \
1342                         part { name: "over1"; \
1343                                 mouse_events: 0; \
1344                                 description { state: "default" 0.0; \
1345                                         rel2.relative: 1.0 0.5; \
1346                                 } \
1347                                 description { state: "disabled" 0.0; \
1348                                         inherit:  "default" 0.0; \
1349                                 } \
1350                         } \
1351                         part { name: "over2"; \
1352                                 mouse_events: 1; \
1353                                 repeat_events: 1; \
1354                                 ignore_flags: ON_HOLD; \
1355                                 description { state: "default" 0.0; \
1356                                 } \
1357                                 description { state: "disabled" 0.0; \
1358                                         inherit:  "default" 0.0; \
1359                                         visible: 0; \
1360                                 } \
1361                         } \
1362                         part { name: "over3"; \
1363                                 mouse_events: 1; \
1364                                 repeat_events: 1; \
1365                                 description { state: "default" 0.0; \
1366                                         color: 255 255 255 0; \
1367                                 } \
1368                                 description { state: "clicked" 0.0; \
1369                                         inherit:  "default" 0.0; \
1370                                         visible: 1; \
1371                                         color: 255 255 255 0; \
1372                                 } \
1373                         } \
1374                         part { name: "disabler"; \
1375                                 type: RECT; \
1376                                 description { state: "default" 0.0; \
1377                                         color: 0 0 0 0; \
1378                                         visible: 0; \
1379                                 } \
1380                                 description { state: "disabled" 0.0; \
1381                                         inherit: "default" 0.0; \
1382                                         visible: 1; \
1383                                 } \
1384                         } \
1385                 } \
1386                 programs { \
1387                         program { name: "button_click"; \
1388                                 signal: "mouse,down,1"; \
1389                                 source: "over2"; \
1390                                 action: SIGNAL_EMIT "elm,action,press" ""; \
1391                                 after: "button_click_anim"; \
1392                         } \
1393                         program { name: "button_click_anim"; \
1394                                 action: STATE_SET "clicked" 0.0; \
1395                                 target: "button_image"; \
1396                                 target: "elm.text"; \
1397                         } \
1398                         program { name: "button_unclick"; \
1399                                 signal: "mouse,up,1"; \
1400                                 source: "over2"; \
1401                                 action: SIGNAL_EMIT "elm,action,unpress" ""; \
1402                                 after: "button_unclick_anim"; \
1403                         } \
1404                         program { name: "button_unclick_anim"; \
1405                                 action: STATE_SET "default" 0.0; \
1406                                 target: "button_image"; \
1407                                 action: STATE_SET "visible" 0.0; \
1408                                 target: "elm.text"; \
1409                         } \
1410                         program { name: "button_mouseout_clicked"; \
1411                                 signal: "mouse,out"; \
1412                                 source: "over2"; \
1413                                 script { \
1414                                         new st[31]; \
1415                                         new Float:vl; \
1416                                         get_state(PART:"elm.text", st, 30, vl); \
1417                                         if (!strcmp(st, "clicked")) \
1418                                         { \
1419                                                 set_state(PART:"elm.text", "visible", 0.0); \
1420                                                 set_state(PART:"button_image", "visible", 0.0); \
1421                                         } \
1422                                 } \
1423                         } \
1424                         program { name: "button_click2"; \
1425                                 signal: "mouse,down,1"; \
1426                                 source: "over3"; \
1427                                 action: STATE_SET "clicked" 0.0; \
1428                                 target: "over3"; \
1429                         } \
1430                         program { name: "button_unclick2"; \
1431                                 signal: "mouse,clicked,1"; \
1432                                 source: "over3"; \
1433                                 action: STATE_SET "default" 0.0; \
1434                                 target: "over3"; \
1435                         } \
1436                         program { name: "button_unclick3"; \
1437                                 signal: "mouse,clicked,1"; \
1438                                 source: "over2"; \
1439                                 action: SIGNAL_EMIT "elm,action,click" ""; \
1440                         } \
1441                         program { name: "text_show"; \
1442                                 signal: "elm,state,text,visible"; \
1443                                 source: "elm"; \
1444                                 action: STATE_SET "visible" 0.0; \
1445                                 target: "elm.text"; \
1446                         } \
1447                         program { name: "text_hide"; \
1448                                 signal: "elm,state,text,hidden"; \
1449                                 source: "elm"; \
1450                                 action: STATE_SET "default" 0.0; \
1451                                 target: "elm.text"; \
1452                         } \
1453                         program { name: "disable"; \
1454                                 signal: "elm,state,disabled"; \
1455                                 source: "elm"; \
1456                                 action: STATE_SET "disabled" 0.0; \
1457                                 target: "button_image"; \
1458                                 target: "over1"; \
1459                                 target: "over2"; \
1460                                 target: "disabler"; \
1461                                 target: "button_image"; \
1462                                 after: "disable_text"; \
1463                         } \
1464                         program { name: "disable_text"; \
1465                                 script { \
1466                                         new st[31]; \
1467                                         new Float:vl; \
1468                                         get_state(PART:"elm.text", st, 30, vl); \
1469                                         if (!strcmp(st, "visible")) \
1470                                                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
1471                                         else \
1472                                                 set_state(PART:"elm.text", "disabled", 0.0); \
1473                                 } \
1474                         } \
1475                         program { name: "enable"; \
1476                                 signal: "elm,state,enabled"; \
1477                                 source: "elm"; \
1478                                 action: STATE_SET "default" 0.0; \
1479                                 target: "button_image"; \
1480                                 target: "over1"; \
1481                                 target: "over2"; \
1482                                 target: "disabler"; \
1483                                 target: "arrow_image"; \
1484                                 after: "enable_text"; \
1485                         } \
1486                         program { name: "enable_text"; \
1487                                 script { \
1488                                         new st[31]; \
1489                                         new Float:vl; \
1490                                         get_state(PART:"elm.text", st, 30, vl); \
1491                                         if (!strcmp(st, "disabled_visible")) \
1492                                                 set_state(PART:"elm.text", "visible", 0.0); \
1493                                         else \
1494                                                 set_state(PART:"elm.text", "default", 0.0); \
1495                                 } \
1496                         } \
1497                 } \
1498         }
1499 #define BROWSER_GENLIST_PART_DISCLIP \
1500          part { name: "disclip"; \
1501             type: RECT; \
1502             description { state: "default" 0.0; \
1503                rel1.to: "base"; \
1504                rel2.to: "base"; \
1505             } \
1506             description { state: "disabled" 0.0; \
1507                inherit: "default" 0.0; \
1508                color: 255 255 255 64; \
1509             } \
1510          }
1511
1512 #define BROWSER_GENLIST_TRANSPARENT_PART \
1513          part { name: "elm.between.layer"; \
1514             type: RECT; \
1515             clip_to: "disclip"; \
1516             mouse_events: 1; \
1517             description { state: "default" 0.0; \
1518                rel1.to: "base"; \
1519                rel2.to: "base"; \
1520                color: 0 0 0 0; \
1521             } \
1522             description { state: "repeat_events" 0.0; \
1523                inherit: "default" 0.0; \
1524                visible: 0; \
1525             } \
1526          }
1527
1528 #define BROWSER_GENLIST_BASE_PART_BASE( param_item_height ) \
1529          part { name: "base"; \
1530             clip_to: "disclip"; \
1531             scale: 1; \
1532             description { state: "default" 0.0; \
1533                min: 0 param_item_height; \
1534                image.normal: "theme/00_sweep_list_bg.png"; \
1535             } \
1536          }
1537
1538 #define BROWSER_GENLIST_BASE_PART_BOTTOM_LINE \
1539          part { name: "bottom_line"; \
1540             type: RECT; \
1541             clip_to: "disclip"; \
1542             mouse_events: 0; \
1543             description { state: "default" 0.0; \
1544                min: 0 1; \
1545                fixed: 0 1; \
1546                visible: 1; \
1547                color: 212 212 212 255; \
1548                rel1 { \
1549                   relative: 0.0 1.0; \
1550                   offset: 0 -1; \
1551                   to: "base"; \
1552                } \
1553                rel2.to: "base"; \
1554             } \
1555          }
1556
1557 #define BROWSER_GENLIST_BASE_PART_PADDING_LEFT( param_padding_size ) \
1558          part { name: "base.padding.left"; \
1559             type: RECT; \
1560             clip_to: "disclip"; \
1561             mouse_events: 0; \
1562             scale: 1; \
1563             description { state: "default" 0.0; \
1564                min: param_padding_size 0; \
1565                fixed: 1 0; \
1566                visible: 0; \
1567                rel1.to: "base"; \
1568                rel2 { \
1569                   relative: 0 1; \
1570                   to: "base"; \
1571                } \
1572             } \
1573          }
1574
1575 #define BROWSER_GENLIST_BASE_PART_PADDING_RIGHT( param_padding_size ) \
1576          part { name: "base.padding.right"; \
1577             type: RECT; \
1578             clip_to: "disclip"; \
1579             mouse_events: 0; \
1580             scale: 1; \
1581             description { state: "default" 0.0; \
1582                min: param_padding_size 0; \
1583                fixed: 1 0; \
1584                visible: 0; \
1585                rel1 { \
1586                   relative: 1 0; \
1587                   to: "base"; \
1588                } \
1589                rel2.to: "base"; \
1590             } \
1591          }
1592
1593 #define BROWSER_GENLIST_BASE_PART_PADDING_BOTTOM( param_padding_size ) \
1594          part { name: "base.padding.bottom"; \
1595             type: RECT; \
1596             clip_to: "disclip"; \
1597             mouse_events: 0; \
1598             scale: 1; \
1599             description { state: "default" 0.0; \
1600                min: 0 param_padding_size; \
1601                fixed: 0 1; \
1602                visible: 0; \
1603                align: 0.5 1; \
1604                rel1 { \
1605                   relative: 0 1; \
1606                   to: "base"; \
1607                } \
1608                rel2 { \
1609                   relative: 1 1; \
1610                   to: "base"; \
1611                } \
1612             } \
1613          }
1614
1615 #define BROWSER_GENLIST_BASE_PART_TEXT \
1616          part { name: "elm.base.text"; \
1617             type: TEXT; \
1618             clip_to: "disclip"; \
1619             mouse_events: 0; \
1620             scale: 1; \
1621             description { state: "default" 0.0; \
1622                                 /* \
1623                min: 0 36; \
1624                */ \
1625                min: 0 54; \
1626                fixed: 0 1; \
1627                align: 0.5 0; \
1628                rel1 { \
1629                   relative: 1 0; \
1630                   to_x: "base.padding.left"; \
1631                   to_y: "base"; \
1632                } \
1633                rel2 { \
1634                   relative: 0 0; \
1635                   to_x: "base.padding.right"; \
1636                   to_y: "base"; \
1637                } \
1638                color: 255 255 255 255; \
1639                text { \
1640                   font: "SLP:style=Roman"; \
1641                                         /* \
1642                   size: 22; \
1643                                         */ \
1644                   size: 33; \
1645                   min: 0 1; \
1646                   align: 0.5 0.5; \
1647                } \
1648             } \
1649          }
1650
1651 #define BROWSER_GENLIST_BASE_PART_PADDING_CENTER_VERTICAL( param_padding_size ) \
1652          part { name: "base.padding.center.vertical"; \
1653             type: RECT; \
1654             clip_to: "disclip"; \
1655             mouse_events: 0; \
1656             scale: 1; \
1657             description { state: "default" 0.0; \
1658                min: param_padding_size 0; \
1659                fixed: 1 0; \
1660                visible: 0; \
1661                align: 0.5 0.5; \
1662                rel1 { \
1663                   relative: 0.5 0; \
1664                   to: "base"; \
1665                } \
1666                rel2 { \
1667                   relative: 0.5 1; \
1668                   to: "base"; \
1669                } \
1670             } \
1671          }
1672
1673 #define BROWSER_GENLIST_BASE_PART_PADDING_CENTER_HORIZONTAL( param_padding_size ) \
1674          part { name: "base.padding.center.horizontal"; \
1675             type: RECT; \
1676             clip_to: "disclip"; \
1677             mouse_events: 0; \
1678             scale: 1; \
1679             description { state: "default" 0.0; \
1680                min: param_padding_size 0; \
1681                fixed: 0 1; \
1682                visible: 0; \
1683                align: 0.5 0.5; \
1684                rel1 { \
1685                   relative: 0 0.5; \
1686                   to: "base"; \
1687                } \
1688                rel2 { \
1689                   relative: 1 0.5; \
1690                   to: "base"; \
1691                } \
1692             } \
1693          }
1694
1695 #define BROWSER_GENLIST_BASE_PART_BUTTON_1 \
1696          part { name: "elm.base.swallow.button1"; \
1697             type: SWALLOW; \
1698             clip_to: "disclip"; \
1699             description { state: "default" 0.0; \
1700                rel1 { \
1701                   relative: 1 1; \
1702                   to_x: "base.padding.left"; \
1703                   to_y: "base.padding.center.horizontal"; \
1704                } \
1705                rel2 { \
1706                   relative: 0 0; \
1707                   to_x: "base.padding.center.vertical"; \
1708                   to_y: "base.padding.bottom"; \
1709                } \
1710             } \
1711          }
1712
1713 #define BROWSER_GENLIST_BASE_PART_BUTTON_2 \
1714          part { name: "elm.base.swallow.button2"; \
1715             type: SWALLOW; \
1716             clip_to: "disclip"; \
1717             description { state: "default" 0.0; \
1718                rel1 { \
1719                   relative: 1 1; \
1720                   to_x: "base.padding.center.vertical"; \
1721                   to_y: "base.padding.center.horizontal"; \
1722                } \
1723                rel2 { \
1724                   relative: 0 0; \
1725                   to_x: "base.padding.right"; \
1726                   to_y: "base.padding.bottom"; \
1727                } \
1728             } \
1729          }
1730
1731 #define BROWSER_GENLIST_SLIDE_PART_BASE( param_item_height ) \
1732          part { name: "slide_base"; \
1733             clip_to: "disclip"; \
1734             type: RECT; \
1735             repeat_events: 1; \
1736             scale: 1; \
1737             description { state: "default" 0.0; \
1738                min: 0 param_item_height; \
1739                color: 246 245 237 255; \
1740                rel1.to: "base"; \
1741                rel2.to: "base"; \
1742             } \
1743             description { state: "hide" 0.0; \
1744                inherit: "default" 0.0; \
1745                rel1 { relative: 0.025 0.0; } \
1746                rel2 { relative: 1.025 1.0; } \
1747             } \
1748             description { state: "hide" 0.1; \
1749                inherit: "default" 0.0; \
1750                rel1 { relative: 0.13 0.0; } \
1751                rel2 { relative: 1.13 1.0; } \
1752             } \
1753             description { state: "hide" 0.2; \
1754                inherit: "default" 0.0; \
1755                rel1 { relative: 0.5 0.0; } \
1756                rel2 { relative: 1.5 1.0; } \
1757             } \
1758             description { state: "hide" 0.3; \
1759                inherit: "default" 0.0; \
1760                rel1 { relative: 1.0 0.0; } \
1761                rel2 { relative: 2.0 1.0; } \
1762             } \
1763          }
1764
1765 #define BROWSER_GENLIST_SLIDE_PART_BOTTOM_LINE \
1766          part { name: "slide_bottom_line"; \
1767             type: RECT; \
1768             clip_to: "disclip"; \
1769             mouse_events: 0; \
1770             description { state: "default" 0.0; \
1771                min: 0 1; \
1772                fixed: 0 1; \
1773                visible: 1; \
1774                color: 212 212 212 255; \
1775                rel1 { \
1776                   relative: 0.0 1.0; \
1777                   offset: 0 -1; \
1778                   to: "slide_base"; \
1779                } \
1780                rel2.to: "slide_base"; \
1781             } \
1782          }
1783
1784 #define BROWSER_GENLIST_SLIDE_PART_PADDING_TOP( param_padding_size ) \
1785        part { name: "slide_base.padding.top"; \
1786             type: RECT; \
1787             clip_to: "disclip"; \
1788             mouse_events: 0; \
1789             scale: 1; \
1790             description { \
1791                state: "default" 0.0; \
1792                min: 0 param_padding_size; \
1793                fixed: 0 1; \
1794                visible: 0; \
1795                align: 0.5 0.0; \
1796                rel1 { \
1797                   relative: 0 0; \
1798                   to: "slide_base"; \
1799                } \
1800                rel2 { \
1801                   relative: 1 0; \
1802                   to: "slide_base"; \
1803                } \
1804             } \
1805          }
1806
1807 #define BROWSER_GENLIST_SLIDE_PART_PADDING_BOTTOM( param_padding_size ) \
1808        part { name: "slide_base.padding.bottom"; \
1809             type: RECT; \
1810             clip_to: "disclip"; \
1811             mouse_events: 0; \
1812             scale: 1; \
1813             description { \
1814                state: "default" 0.0; \
1815                min: 0 param_padding_size; \
1816                fixed: 0 1; \
1817                visible: 0; \
1818                align: 0.5 1; \
1819                rel1 { \
1820                   relative: 0 1; \
1821                   to: "slide_base"; \
1822                } \
1823                rel2 { \
1824                   relative: 1 1; \
1825                   to: "slide_base"; \
1826                } \
1827             } \
1828          }
1829
1830 #define BROWSER_GENLIST_SLIDE_PART_PADDING_LEFT( param_padding_size ) \
1831          part { name: "slide_base.padding.left"; \
1832             type: RECT; \
1833             scale: 1; \
1834             clip_to: "disclip"; \
1835             mouse_events: 0; \
1836             description { state: "default" 0.0; \
1837                min: param_padding_size 0; \
1838                fixed: 1 0; \
1839                visible: 0; \
1840                rel1.to: "slide_base"; \
1841                rel2 { \
1842                   relative: 0 1; \
1843                   to: "slide_base"; \
1844                } \
1845                align: 0.0 0.0; \
1846             } \
1847          }
1848
1849 #define BROWSER_GENLIST_SLIDE_PART_PADDING_RIGHT( param_padding_size ) \
1850        part { name: "slide_base.padding.right"; \
1851             type: RECT; \
1852             scale: 1; \
1853             clip_to: "disclip"; \
1854             mouse_events: 0; \
1855             description { state: "default" 0.0; \
1856                min: param_padding_size 0; \
1857                fixed: 1 0; \
1858                visible: 0; \
1859                rel1 { \
1860                   relative: 1 0; \
1861                   to: "slide_base"; \
1862                } \
1863                rel2.to: "slide_base"; \
1864                align: 1.0 0.0; \
1865             } \
1866          }
1867
1868 #define BEAT_GENLIST_PART_BASE( param_item_height ) \
1869          part { name: "base"; \
1870             type: RECT; \
1871             repeat_events: 1; \
1872             scale: 1; \
1873             description { state: "default" 0.0; \
1874                min: 0 param_item_height; \
1875                color: GENLIST_PART_BG_COLOR_INC; \
1876             } \
1877          }
1878
1879 #define BEAT_GENLIST_PART_BG_IMAGE \
1880          part { name: "bg_image"; \
1881             type: RECT; \
1882             clip_to: "disclip"; \
1883             mouse_events: 0; \
1884             description { state: "default" 0.0; \
1885                visible: 0; \
1886                color: GENLIST_PART_BG_SELECTED_COLOR_INC; \
1887             } \
1888             description { state: "selected" 0.0; \
1889                inherit: "default" 0.0; \
1890                visible: 1; \
1891             } \
1892          }
1893
1894 #define BEAT_GENLIST_PART_BOTTOM_LINE \
1895          part { name: "bottom_line"; \
1896             type: RECT; \
1897             clip_to: "disclip"; \
1898             mouse_events: 0; \
1899             description { state: "default" 0.0; \
1900                min: 0 1; \
1901                fixed: 0 1; \
1902                visible: 1; \
1903                color: GENLIST_PART_BOTTOM_LINE_INC; \
1904                rel1 { \
1905                   relative: 0.0 1.0; \
1906                   offset: 0 -1; \
1907                } \
1908             } \
1909          }
1910
1911 #define BEAT_GENLIST_PART_PADDING_TOP( param_padding_size ) \
1912        part { name: "elm.padding.top"; \
1913             type: RECT; \
1914             scale: 1; \
1915             description { \
1916                state: "default" 0.0; \
1917                min: 0 param_padding_size; \
1918                fixed: 0 1; \
1919                visible: 0; \
1920                rel2.relative: 1.0 0.0; \
1921                align: 0.0 0.0; \
1922             } \
1923          }
1924
1925 #define BEAT_GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \
1926        part { name: "elm.padding.bottom"; \
1927             type: RECT; \
1928             scale: 1; \
1929             description { state: "default" 0.0; \
1930                min: 0 param_padding_size; \
1931                fixed: 0 1; \
1932                visible: 0; \
1933                rel1.relative: 0.0 1.0; \
1934                align: 0.0 1.0; \
1935             } \
1936          }
1937
1938 #define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \
1939          part { name: "elm.padding.left"; \
1940             type: RECT; \
1941             scale: 1; \
1942             description { state: "default" 0.0; \
1943                min: param_padding_size 0; \
1944                fixed: 1 0; \
1945                visible: 0; \
1946                rel2.relative: 0.0 1.0; \
1947                align: 0.0 0.0; \
1948             } \
1949          }
1950
1951 #define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
1952        part { name: "elm.padding.right"; \
1953             type: RECT; \
1954             scale: 1; \
1955             description { state: "default" 0.0; \
1956                min: param_padding_size 0; \
1957                fixed: 1 0; \
1958                visible: 0; \
1959                rel1.relative: 1.0  0.0; \
1960                align: 1.0 0.0; \
1961             } \
1962          }
1963
1964 #define BEAT_GENLIST_PART_DISCLIP \
1965         part { name: "disclip"; \
1966             type: RECT; \
1967             description { state: "default" 0.0; \
1968             } \
1969             description { state: "disabled" 0.0; \
1970                inherit: "default" 0.0; \
1971                color: 255 255 255 64; \
1972             } \
1973          }
1974
1975 #define BEAT_GENLIST_SELECT_ALL_PART_DISCLIP \
1976         part { name: "disclip"; \
1977             type: RECT; \
1978             description { state: "default" 0.0; \
1979                rel1.to: "base"; \
1980                rel2.to: "base"; \
1981             } \
1982             description { state: "disabled" 0.0; \
1983                inherit: "default" 0.0; \
1984                color: 255 255 255 64; \
1985             } \
1986          }
1987