Added new winset styles (2.2.2.38-2.2.2.44) according to the GUI Guide 1.8
[profile/ivi/efl-theme-tizen.git] / themes / widgets / multisense_ui.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved 
3  *
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of SAMSUNG
7  * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
8  * software is owned by Samsung and you shall not disclose such Confidential
9  * Information and shall use it only in accordance with the terms of the license
10  * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
11  * representations or warranties about the suitability of the software, either
12  * express or implied, including but not limited to the implied warranties of
13  * merchantability, fitness for a particular purpose, or non-infringement.
14  * SAMSUNG shall not be liable for any damages suffered by licensee arising out
15  * of or releated to this software.
16  *
17  */
18
19 #include "multisense_sound.edc" 
20 #include "multisense_haptic.edc"
21
22 /*
23                 Sound and Haptic
24 */
25 ///////////////////////////////////////////////////////////////////////////////////////
26         group { name: "elm/button/base/sound_dark";
27                 images {
28                         image: "00_button_02_normal.png" COMP;
29                         image: "00_button_02_press.png" COMP;
30                         image: "00_button_02_focus.png" COMP;
31                 }
32                 script {
33                         public button_state = 0; //0:enabled, 1: disabled
34                 }
35                 parts {
36                         part { name: "button_image";
37                                 mouse_events: 0;
38                                 scale: 1;
39                                 description { state: "default" 0.0;
40                                         min: 16 50;
41                                         image {
42                                                 normal: "00_button_02_normal.png";
43                                                 border: 7 7 7 7;
44                                                 border_scale: 1;
45                                         }
46                                 }
47                                 description { state: "clicked" 0.0;
48                                         inherit: "default" 0.0;
49                                         image.normal: "00_button_02_press.png";
50                                 }
51                                 description { state: "disabled" 0.0;
52                                         inherit:  "default" 0.0;
53                                 }
54                                 description { state: "focused" 0.0;
55                                         inherit: "default" 0.0;
56                                         image.normal: "00_button_02_focus.png";
57                                 }
58                         }
59                         part {
60                                 name: "padding_left";
61                                 type: RECT;
62                                 scale: 1;
63                                 mouse_events: 0;
64                                 description { state: "default" 0.0;
65                                         align: 0.0 0.0;
66                                         rel1.relative: 0.0 0.0;
67                                         rel2.relative: 0.0 1.0;
68                                         min: 5 5;
69                                         fixed: 1 0;
70                                         color: 0 0 0 0;
71                                 }
72                         }
73                         part {
74                                 name: "padding_right";
75                                 type: RECT;
76                                 scale: 1;
77                                 mouse_events: 0;
78                                 description { state: "default" 0.0;
79                                         align: 1.0 0.0;
80                                         rel1.relative: 1.0 0.0;
81                                         rel2.relative: 1.0 1.0;
82                                         min: 5 5;
83                                         fixed: 1 0;
84                                         color: 0 0 0 0;
85                                 }
86                         }
87                         part {
88                                 name: "padding_top";
89                                 type: RECT;
90                                 scale: 1;
91                                 mouse_events: 0;
92                                 description { state: "default" 0.0;
93                                         align: 0.0 0.0;
94                                         rel1.relative: 0.0 0.0;
95                                         rel2.relative: 1.0 0.0;
96                                         min: 5 5;
97                                         fixed: 0 1;
98                                         color: 0 0 0 0;
99                                 }
100                         }
101                         part {
102                                 name: "padding_bottom";
103                                 type: RECT;
104                                 scale: 1;
105                                 mouse_events: 0;
106                                 description { state: "default" 0.0;
107                                         align: 1.0 1.0;
108                                         rel1.relative: 0.0 1.0;
109                                         rel2.relative: 1.0 1.0;
110                                         min: 5 5;
111                                         fixed: 0 1;
112                                         color: 0 0 0 0;
113                                 }
114                         }
115                         part {
116                                 name: "icon_rect";
117                                 type: RECT;
118                                 scale: 1;
119                                 mouse_events: 0;
120                                 description { state: "default" 0.0;
121                                         visible: 1;
122                                         min: 0 40;
123                                         fixed: 1 0;
124                                         rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; }
125                                         rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; }
126                                         align: 0.0 0.5;
127                                         color: 0 0 0 0;
128                                 }
129                         } 
130                         part {
131                                 name: "padding_icon_text";
132                                 type: RECT;
133                                 scale: 1;
134                                 mouse_events: 0;
135                                 description { state: "default" 0.0; //when only icon or no icon is there
136                                         align: 0.0 0.0;
137                                         rel1 { relative: 1.0 0.0; to: "icon_rect"; }
138                                         rel2 { relative: 1.0 1.0; to: "icon_rect"; }                    
139                                         fixed: 1 0;
140                                         min: 0 0;
141                                         color: 0 0 0 0;
142                                 }
143                                 description { state: "icononly" 0.0;
144                                         inherit: "default" 0.0;
145                                 }
146                                 description { state: "visible" 0.0; //when icon is visible
147                                         align: 0.0 0.0;
148                                         rel1 { relative: 1.0 0.0; to: "icon_rect"; }
149                                         rel2 { relative: 1.0 1.0; to: "icon_rect"; }                    
150                                         fixed: 1 0;
151                                         min: 5 0;
152                                         color: 0 0 0 0;
153                                 }
154                         }                                       
155                         part { name: "elm.swallow.content";
156                                 type: SWALLOW;
157                                 scale: 1;
158                                 description { state: "default" 0.0;
159                                         visible: 0;
160                                         align: 0.0 0.5;
161                                         rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
162                                         rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
163                                         fixed: 1 0;
164                                 }
165                                 description { state: "visible" 0.0;
166                                         fixed: 1 0;
167                                         visible: 1;
168                                         align: 0.0 0.5;
169                                         rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
170                                         rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
171                                         aspect: 1.0 1.0;
172                                         aspect_preference: VERTICAL;
173                                 }
174                                 description { state: "icononly" 0.0;;
175                                         visible: 1;
176                                         min: 40 40;
177                                         rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
178                                         rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
179                                         align: 0.5 0.5;
180                                         aspect: 1.0 1.0;
181                                         aspect_preference: VERTICAL;
182                                 }
183                         }
184                         part { name: "elm.text";
185                                 type:          TEXT;
186                                 effect:        SHADOW;
187                                 mouse_events:  0;
188                                 scale: 1;
189                                 description { state: "default" 0.0;
190                                         visible: 0;
191                                         rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
192                                         rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; }
193                                         align: 0.5 0.5;
194                                         color: 255 255 255 255;
195                                         color2: 0 0 0 0;
196                                         text {
197                                                 font: "SLP:style=Medium";
198                                                 size: 24;
199                                                 min:  0 0;
200                                                 align: 0.5 0.5;
201                                                 max: 1 0;
202                                                 text_class: "slp_medium";
203                                         }
204                                 }
205                                 description { state: "visible" 0.0;
206                                         inherit: "default" 0.0;
207                                         visible: 1;
208                                         min: 90 40;
209                                 }
210                                 description { state: "clicked" 0.0;
211                                         inherit: "default" 0.0;
212                                         visible: 1;
213                                         min: 0 0;
214                                         color: 255 255 255 255;
215                                         color2: 0 0 0 102;
216                                 }
217                                 description { state: "disabled" 0.0;
218                                         inherit: "default" 0.0;
219                                         color: 0 0 0 128;
220                                         color3: 0 0 0 0;
221                                 }
222                                 description { state: "disabled_visible" 0.0;
223                                         inherit: "default" 0.0;
224                                         color: 0 0 0 128;
225                                         color3: 0 0 0 0;
226                                         visible: 1;
227                                 }
228                                 description { state: "focused" 0.0;
229                                         inherit: "default" 0.0;
230                                         visible: 1;
231                                         min: 0 0;
232                                         color: 255 255 255 255;
233                                         color2: 0 0 0 102;
234                                 }
235                         }
236                         part { name: "over2";
237                                 type: RECT;
238                                 mouse_events: 1;
239                                 repeat_events: 1;
240                                 ignore_flags: ON_HOLD;
241                                 description { state: "default" 0.0;
242                                         color: 0 0 0 0;
243                                 }
244                                 description { state: "disabled" 0.0;
245                                         inherit:  "default" 0.0;
246                                         visible: 0;
247                                 }
248                         }
249                         part { name: "over3";
250                                 type: RECT;
251                                 mouse_events: 1;
252                                 repeat_events: 1;
253                                 description { state: "default" 0.0;
254                                         color: 0 0 0 0;
255                                 }
256                                 description { state: "clicked" 0.0;
257                                         inherit:  "default" 0.0;
258                                         visible: 1;
259                                 }
260                         }
261                         part { name: "disabler";
262                                 type: RECT;
263                                 description { state: "default" 0.0;
264                                         color: 0 0 0 0;
265                                         visible: 0;
266                                 }
267                                 description { state: "disabled" 0.0;
268                                         inherit: "default" 0.0;
269                                         visible: 1;
270                                 }
271                         }
272                 }
273                 programs {
274                         program { name: "button_click";
275                                 signal: "mouse,down,1";
276                                 source: "over2";
277                                 action: SIGNAL_EMIT "elm,action,press" "";
278                                 after:touch_sound ;
279                                 after: "button_click_anim";
280                         }
281                         program { name: touch_sound;
282                                 action: TOUCH_SOUND BUTTON_TOGGLE_OFF_SOUND 1 ;                            
283                         }                       
284                         program { name: "button_click_anim";
285                                 action: STATE_SET "clicked" 0.0;
286                                 target: "button_image";
287                                 after: "text_clicked";
288                         }
289                         program { name: "text_clicked";
290                                 script {
291                                         new st[31];
292                                         new Float:vl;
293                                         get_state(PART:"elm.text", st, 30, vl);
294                                         if (!strcmp(st, "visible"))
295                                                 set_state(PART:"elm.text", "clicked", 0.0);
296                                 }
297                         }
298                         program { name: "button_unpress";
299                                 action: SIGNAL_EMIT "elm,action,unpress" "";
300                         }
301                         program { name: "button_mouseout_clicked";
302                                 signal: "mouse,up,1";
303                                 source: "over3";
304                                 script {
305                                         new st[31];
306                                         new Float:vl;
307                                         get_state(PART:"elm.swallow.content", st, 30, vl);
308                                         if (strcmp(st, "icononly"))
309                                         {
310                                                 emit("elm,action,default,text,set", "");
311                                                 set_state(PART:"elm.text", "visible", 0.0);
312                                         }
313                                         if(get_int(button_state) !=1)
314                                                 set_state(PART:"button_image", "default", 0.0);
315                                 }
316                                 after: button_unpress;
317                         }
318                         program { name: "button_click2";
319                                 signal: "mouse,down,1";
320                                 source: "over3";
321                                 action: STATE_SET "clicked" 0.0;
322                                 target: "over3";
323                         }
324                         program { name: "button_unclick2";
325                                 signal: "mouse,clicked,1";
326                                 source: "over3";
327                                 action: STATE_SET "default" 0.0;
328                                 target: "over3";
329                         }
330                         program { name: "button_unclick3";
331                                 signal: "mouse,clicked,1";
332                                 source: "over2";
333                                 action: SIGNAL_EMIT "elm,action,click" "";
334                         }
335                         program { name: "text_show";
336                                 signal: "elm,state,text,visible";
337                                 source: "elm";
338                                 script {
339                                         new st[31];
340                                         new Float:vl;
341                                         get_state(PART:"elm.swallow.content", st, 30, vl);
342                                         if (!strcmp(st, "icononly"))
343                                         {
344                                                 set_state(PART:"elm.swallow.content", "visible", 0.0);
345                                                 set_state(PART:"padding_icon_text", "visible", 0.0);
346                                         }
347                                         set_state(PART:"elm.text", "visible", 0.0);
348                                 }
349                         }
350                         program { name: "text_hide";
351                                 signal: "elm,state,text,hidden";
352                                 source: "elm";
353                                 script {
354                                         new st[31];
355                                         new Float:vl;
356                                         get_state(PART:"elm.swallow.content", st, 30, vl);
357                                         if (!strcmp(st, "visible"))
358                                         {
359                                                 set_state(PART:"elm.swallow.content", "icononly", 0.0);
360                                                 set_state(PART:"padding_icon_text", "icononly", 0.0);
361                                         }
362                                         set_state(PART:"elm.text", "default", 0.0);
363                                 }
364                         }
365                         program { name: "icon_show";
366                                 signal: "elm,state,icon,visible";
367                                 source: "elm";
368                                 script {
369                                         new st[31];
370                                         new Float:vl;
371                                         get_state(PART:"elm.text", st, 30, vl);
372                                         if (!strcmp(st, "visible"))
373                                         {
374                                                 set_state(PART:"elm.swallow.content", "visible", 0.0);
375                                                 set_state(PART:"padding_icon_text", "visible", 0.0);
376                                         }
377                                         else
378                                         {
379                                                 set_state(PART:"elm.swallow.content", "icononly", 0.0);
380                                                 set_state(PART:"padding_icon_text", "icononly", 0.0);
381                                         }
382                                 }
383                         }
384                         program { name: "icon_hide";
385                                 signal: "elm,state,icon,hidden";
386                                 source: "elm";
387                                 action:  STATE_SET "default" 0.0;
388                                 target: "elm.swallow.content";
389                         }
390                         program { name: "disable";
391                                 signal: "elm,state,disabled";
392                                 source: "elm";
393                                 action: STATE_SET "disabled" 0.0;
394                                 target: "button_image";
395                                 target: "over2";
396                                 target: "disabler";
397                                 after: "disable_text";
398                         }
399                         program { name: "disable_text";
400                                 script {
401                                         new st[31];
402                                         new Float:vl;
403                                         get_state(PART:"elm.text", st, 30, vl);
404                                         if (!strcmp(st, "visible"))
405                                                 set_state(PART:"elm.text", "disabled_visible", 0.0);
406                                         else
407                                                 set_state(PART:"elm.text", "disabled", 0.0);
408                                         set_int(button_state, 1);
409                                 }
410                         }
411                         program { name: "enable";
412                                 signal: "elm,state,enabled";
413                                 source: "elm";
414                                 action: STATE_SET "default" 0.0;
415                                 target: "button_image";
416                                 target: "over2";
417                                 target: "disabler";
418                                 after: "enable_text";
419                         }
420                         program { name: "enable_text";
421                                 script {
422                                         new st[31];
423                                         new Float:vl;
424                                         get_state(PART:"elm.text", st, 30, vl);
425                                         if (!strcmp(st, "disabled_visible"))
426                                                 set_state(PART:"elm.text", "visible", 0.0);
427                                         else
428                                                 set_state(PART:"elm.text", "default", 0.0);
429                                         set_int(button_state, 0);
430                                 }
431                         }
432                         program { name: "focused";
433                                 signal: "elm,action,focus";
434                                 source: "elm";
435                                 action: STATE_SET "focused" 0.0;
436                                 target: "button_image";
437                                 target: "elm.text";
438                         }
439                         program { name: "unfocused";
440                                 signal: "elm,action,unfocus";
441                                 source: "elm";
442                                 action: STATE_SET "default" 0.0;
443                                 target: "button_image";
444                                 after: "unfocus_text";
445                         }
446                         program { name: "unfocus_text";
447                                 action: STATE_SET "visible" 0.0;
448                                 target: "elm.text";
449                         }
450                 }
451         }
452
453 /////////////////////////////////////////////////////////////////////////////////////// 
454         group { name: "elm/button/base/haptic";
455                 images {
456                         image: "00_message_button_add_recipient.png" COMP;
457                 }
458                 script {
459                         public button_state = 0; //0:enabled, 1: disabled
460                 }
461                 parts {
462                         part { name: "button_image";
463                                 mouse_events: 0;
464                                 scale: 1;
465                                 description { state: "default" 0.0;
466                                         rel1 { to_x: "padding.left"; to_y: "elm.text";}
467                                         rel2 { to_x: "padding.right"; to_y: "elm.text";}
468                                         min: 44 41;
469                                         image {
470                                                 normal: "00_message_button_add_recipient.png";
471                                                 border: 21 21 19 19;
472                                                 border_scale: 1;
473                                         }
474                                 }
475                                 description { state: "clicked" 0.0;
476                                         inherit: "default" 0.0;
477                                 }
478                                 description { state: "disabled" 0.0;
479                                         inherit: "default" 0.0;
480                                 }               
481                                 description { state: "focused" 0.0;
482                                         inherit: "default" 0.0;
483                                 }
484                         }
485                         part { name: "padding.left";
486                                 type: RECT;
487                                 scale: 1;
488                                 description { state: "default" 0.0;
489                                         visible: 0;
490                                         min: 10 1;
491                                         fixed: 1 0;
492                                         color: 0 0 0 0;
493                                         rel1.relative: 0 0;
494                                         rel2 { relative: 0.0 1.0; to_x: "elm.text";}
495                                         align: 1 0;
496                                 }
497                         }
498                         part { name: "padding.right";
499                                 type: RECT;
500                                 scale: 1;
501                                 description { state: "default" 0.0;
502                                         visible: 0;
503                                         min: 10 1;
504                                         fixed: 1 0;
505                                         color: 0 0 0 0;
506                                         rel1 { relative: 1.0 0.0; to_x: "elm.text";}
507                                         rel2.relative: 1.0 1.0;
508                                         align: 0 0;
509                                 }
510                         }
511                         part {  name: "elm.text";
512                                 type: TEXT;
513                                 effect: SHADOW;
514                                 mouse_events: 0;
515                                 scale: 1;
516                                 description { state: "default" 0.0;
517                                         visible: 0;
518                                         fixed: 1 1;
519                                         align: 0.5 0.5;
520                                         color: 255 255 255 255;
521                                         color2: 0 0 0 255;
522                                         text {
523                                                 font: "SLP:style=Medium";
524                                                 size: 28;
525                                                 min:  1 1;
526                                                 align: 0.5 0.5;
527                                                 text_class: "slp_medium";
528                                         }
529                                 }
530                                 description { state: "visible" 0.0;
531                                         inherit: "default" 0.0;
532                                         visible: 1;
533                                         min: 1 1;
534                                 }
535                                 description { state: "clicked" 0.0;
536                                         inherit: "default" 0.0;
537                                         visible: 1;
538                                         min: 1 1;
539                                         color: 53 45 39 255;
540                                         color2: 0 0 0 102;
541                                 }
542                                 description { state: "disabled" 0.0;
543                                         inherit: "default" 0.0;
544                                         color: 0 0 0 128;
545                                         color3: 0 0 0 0;
546                                 }
547                                 description { state: "disabled_visible" 0.0;
548                                         inherit: "default" 0.0;
549                                         color: 0 0 0 128;
550                                         color3: 0 0 0 0;
551                                         visible: 1;
552                                         min: 1 1;
553                                 }
554                                 description { state: "focused" 0.0;
555                                         inherit: "default" 0.0;
556                                         visible: 1;
557                                         min: 1 1;
558                                         color: 255 255 255 255;
559                                 }
560                         }
561                         part { name: "over1";
562                                 mouse_events: 0;
563                                 description { state: "default" 0.0;
564                                         rel2.relative: 1.0 0.5;
565                                 }
566                                 description { state: "disabled" 0.0;
567                                         inherit:  "default" 0.0;
568                                 }
569                         }
570                         part { name: "over2";
571                                 mouse_events: 1;
572                                 repeat_events: 1;
573                                 ignore_flags: ON_HOLD;
574                                 description { state: "default" 0.0;
575                                 rel1.to: "button_image";
576                                 rel2.to: "button_image";
577                                 }
578                                 description { state: "disabled" 0.0;
579                                         inherit:  "default" 0.0;
580                                         visible: 0;
581                                 }
582                         }
583                         part { name: "over3";
584                                 mouse_events: 1;
585                                 repeat_events: 1;
586                                 description { state: "default" 0.0;
587                                 rel1.to: "button_image";
588                                 rel2.to: "button_image";
589                                         color: 255 255 255 0;
590                                 }
591                                 description { state: "clicked" 0.0;
592                                         inherit:  "default" 0.0;
593                                         visible: 1;
594                                         color: 255 255 255 0;
595                                 }
596                         }
597                         part { name: "disabler";
598                                 type: RECT;
599                                 description { state: "default" 0.0;
600                                         rel1.to: "button_image";
601                                         rel2.to: "button_image";
602                                         color: 0 0 0 0;
603                                         visible: 0;
604                                 }
605                                 description { state: "disabled" 0.0;
606                                         inherit: "default" 0.0;
607                                         visible: 1;
608                                 }
609                         }
610                 }
611                 programs {
612                         program { name: "button_click";
613                                 signal: "mouse,down,1";
614                                 source: "over2";
615                                 action: SIGNAL_EMIT "elm,action,press" "";
616                                 after: touch_haptic;
617                                 after: "button_click_anim";
618                         }
619                         program { name: touch_haptic;
620                                 action: TOUCH_HAPTIC LONG_TAP_HAPTIC 3 ;                                   
621                         }                       
622                         program { name: "button_click_anim";
623                                 action: STATE_SET "clicked" 0.0;
624                                 target: "button_image";
625                                 target: "elm.text";
626                         }
627                         program { name: "button_unpress";
628                                 action: SIGNAL_EMIT "elm,action,unpress" "";
629                         }
630                         program { name: "button_mouseout_clicked";
631                                 signal: "mouse,up,1";
632                                 source: "over3";
633                                 script {
634                                         new st[31];
635                                         new Float:vl;
636                                         get_state(PART:"elm.text", st, 30, vl);
637                                         if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
638                                         {
639                                                 emit("elm,action,default,text,set", "");
640                                                 set_state(PART:"elm.text", "visible", 0.0);
641                                         }
642                                         if(get_int(button_state) !=1)
643                                                 set_state(PART:"button_image", "default", 0.0);
644                                 }
645                                 after: button_unpress;
646                         }
647                         program { name: "button_click2";
648                                 signal: "mouse,down,1";
649                                 source: "over3";
650                                 action: STATE_SET "clicked" 0.0;
651                                 target: "over3";
652                         }
653                         program { name: "button_unclick2";
654                                 signal: "mouse,clicked,1";
655                                 source: "over3";
656                                 action: STATE_SET "default" 0.0;
657                                 target: "over3";
658                         }
659                         program { name: "button_unclick3";
660                                 signal: "mouse,clicked,1";
661                                 source: "over2";
662                                 action: SIGNAL_EMIT "elm,action,click" "";
663                         }
664                         program { name: "text_show";
665                                 signal: "elm,state,text,visible";
666                                 source: "elm";
667                                 action: STATE_SET "visible" 0.0;
668                                 target: "elm.text";
669                         }
670                         program { name: "text_hide";
671                                 signal: "elm,state,text,hidden";
672                                 source: "elm";
673                                 action: STATE_SET "default" 0.0;
674                                 target: "elm.text";
675                         }
676                         
677                         program { name: "disable";
678                                 signal: "elm,state,disabled";
679                                 source: "elm";
680                                 action: STATE_SET "disabled" 0.0;
681                                 target: "button_image";
682                                 target: "over1";
683                                 target: "over2";
684                                 target: "disabler";
685                                 after: "disable_text";
686                         }
687                         program { name: "disable_text";
688                                 script {
689                                         new st[31];
690                                         new Float:vl;
691                                         get_state(PART:"elm.text", st, 30, vl);
692                                         if (!strcmp(st, "visible"))
693                                                 set_state(PART:"elm.text", "disabled_visible", 0.0);
694                                         else
695                                                 set_state(PART:"elm.text", "disabled", 0.0);
696                                         set_int(button_state, 1);
697                                 }
698                         }
699                         program { name: "enable";
700                                 signal: "elm,state,enabled";
701                                 source: "elm";
702                                 action: STATE_SET "default" 0.0;
703                                 target: "button_image";
704                                 target: "over1";
705                                 target: "over2";
706                                 target: "disabler";
707                                 after: "enable_text";
708                         }
709                         program { name: "enable_text";
710                                 script {
711                                         new st[31];
712                                         new Float:vl;
713                                         get_state(PART:"elm.text", st, 30, vl);
714                                         if (!strcmp(st, "disabled_visible"))
715                                                 set_state(PART:"elm.text", "visible", 0.0);
716                                         else
717                                                 set_state(PART:"elm.text", "default", 0.0);
718                                         set_int(button_state, 0);
719                                 }
720                         }
721                         program { name: "focused";
722                                 signal: "elm,action,focus";
723                                 source: "elm";
724                                 action: STATE_SET "focused" 0.0;
725                                 target: "button_image";
726                                 target: "elm.text";
727                         }
728                         program { name: "unfocused";
729                                 signal: "elm,action,unfocus";
730                                 source: "elm";
731                                 action: STATE_SET "default" 0.0;
732                                 target: "button_image";
733                                 action: STATE_SET "visible" 0.0;
734                                 target: "elm.text";
735                         }
736                 }
737         }
738 ///////////////////////////////////////////////////////////////////////////////////////
739         group { name: "elm/button/base/sound_haptic_multiline";
740                 images {
741                         image: "00_button_02_normal.png" COMP;
742                         image: "00_button_02_press.png" COMP;
743                         image: "00_button_02_focus.png" COMP;
744                 }
745                 script {
746                         public button_state = 0; //0:enabled, 1: disabled
747                 }
748                 styles{
749                         style { name: "btn_sound_haptic_style";
750                                 base: "font=SLP:style=Medium font_size=18 align=center color=#ffffff wrap=mixed text_class=slp_medium";
751                                 tag:  "br" "\n";
752                                 tag:  "ps" "ps";
753                                 tag:  "hilight" "+ font=SLP:style=Bold";
754                                 tag:  "b" "+ font=SLP:style=Bold";
755                                 tag:  "tab" "\t";
756                         }
757                 }
758                 parts {
759                         part { name: "button_image";
760                                 mouse_events: 0;
761                                 scale: 1;
762                                 description { state: "default" 0.0;
763                                         min: 16 50;
764                                         image {
765                                                 normal: "00_button_02_normal.png";
766                                                 border: 7 7 7 7;
767                                                 border_scale: 1;
768                                         }
769                                 }
770                                 description { state: "clicked" 0.0;
771                                         inherit: "default" 0.0;
772                                         image.normal: "00_button_02_press.png";
773                                 }
774                                 description { state: "disabled" 0.0;
775                                         inherit:  "default" 0.0;
776                                 }
777                                 description { state: "focused" 0.0;
778                                         inherit: "default" 0.0;
779                                         image.normal: "00_button_02_focus.png";
780                                 }
781                         }
782                         part {
783                                 name: "padding_left";
784                                 type: RECT;
785                                 scale: 1;
786                                 mouse_events: 0;
787                                 description { state: "default" 0.0;
788                                         align: 0.0 0.0;
789                                         rel1.relative: 0.0 0.0;
790                                         rel2.relative: 0.0 1.0;
791                                         min: 5 5;
792                                         fixed: 1 0;
793                                         color: 0 0 0 0;
794                                 }
795                         }
796                         part {
797                                 name: "padding_right";
798                                 type: RECT;
799                                 scale: 1;
800                                 mouse_events: 0;
801                                 description { state: "default" 0.0;
802                                         align: 1.0 0.0;
803                                         rel1.relative: 1.0 0.0;
804                                         rel2.relative: 1.0 1.0;
805                                         min: 5 5;
806                                         fixed: 1 0;
807                                         color: 0 0 0 0;
808                                 }
809                         }
810                         part {
811                                 name: "padding_top";
812                                 type: RECT;
813                                 scale: 1;
814                                 mouse_events: 0;
815                                 description { state: "default" 0.0;
816                                         align: 0.0 0.0;
817                                         rel1.relative: 0.0 0.0;
818                                         rel2.relative: 1.0 0.0;
819                                         min: 5 5;
820                                         fixed: 0 1;
821                                         color: 0 0 0 0;
822                                 }
823                         }
824                         part {
825                                 name: "padding_bottom";
826                                 type: RECT;
827                                 scale: 1;
828                                 mouse_events: 0;
829                                 description { state: "default" 0.0;
830                                         align: 1.0 1.0;
831                                         rel1.relative: 0.0 1.0;
832                                         rel2.relative: 1.0 1.0;
833                                         min: 5 5;
834                                         fixed: 0 1;
835                                         color: 0 0 0 0;
836                                 }
837                         }
838                         part {
839                                 name: "icon_rect";
840                                 type: RECT;
841                                 scale: 1;
842                                 mouse_events: 0;
843                                 description { state: "default" 0.0;
844                                         visible: 1;
845                                         min: 0 40;
846                                         fixed: 1 0;
847                                         rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; }
848                                         rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; }
849                                         align: 0.0 0.5;
850                                         color: 0 0 0 0;
851                                 }
852                         } 
853                         part {
854                                 name: "padding_icon_text";
855                                 type: RECT;
856                                 scale: 1;
857                                 mouse_events: 0;
858                                 description { state: "default" 0.0; //when only icon or no icon is there
859                                         align: 0.0 0.0;
860                                         rel1 { relative: 1.0 0.0; to: "icon_rect"; }
861                                         rel2 { relative: 1.0 1.0; to: "icon_rect"; }                    
862                                         fixed: 1 0;
863                                         min: 0 0;
864                                         color: 0 0 0 0;
865                                 }
866                                 description { state: "icononly" 0.0;
867                                         inherit: "default" 0.0;
868                                 }
869                                 description { state: "visible" 0.0; //when icon is visible
870                                         align: 0.0 0.0;
871                                         rel1 { relative: 1.0 0.0; to: "icon_rect"; }
872                                         rel2 { relative: 1.0 1.0; to: "icon_rect"; }                    
873                                         fixed: 1 0;
874                                         min: 5 0;
875                                         color: 0 0 0 0;
876                                 }
877                         }                                       
878                         part { name: "elm.swallow.content";
879                                 type: SWALLOW;
880                                 scale: 1;
881                                 description { state: "default" 0.0;
882                                         visible: 0;
883                                         align: 0.0 0.5;
884                                         rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
885                                         rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
886                                         fixed: 1 0;
887                                 }
888                                 description { state: "visible" 0.0;
889                                         fixed: 1 0;
890                                         visible: 1;
891                                         align: 0.0 0.5;
892                                         rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
893                                         rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
894                                         aspect: 1.0 1.0;
895                                         aspect_preference: VERTICAL;
896                                 }
897                                 description { state: "icononly" 0.0;;
898                                         visible: 1;
899                                         min: 40 40;
900                                         rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
901                                         rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
902                                         align: 0.5 0.5;
903                                         aspect: 1.0 1.0;
904                                         aspect_preference: VERTICAL;
905                                 }
906                         }
907                         part { name: "elm.text";
908                                 type:          TEXTBLOCK;
909                                 effect:        SHADOW;
910                                 mouse_events:  0;
911                                 scale: 1;
912                                 description { state: "default" 0.0;
913                                         visible: 0;
914                                         rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
915                                         rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; }
916                                         align: 0.5 0.5;
917                                         color: 255 255 255 255;
918                                         color2: 0 0 0 0;
919                                         text {
920                                                 style: "btn_sound_haptic_style";
921                                                 min:  0 0;
922                                                 max: 0 1;
923                                         }
924                                 }
925                                 description { state: "visible" 0.0;
926                                         inherit: "default" 0.0;
927                                         visible: 1;
928                                         min: 90 40;
929                                 }
930                                 description { state: "clicked" 0.0;
931                                         inherit: "default" 0.0;
932                                         visible: 1;
933                                         min: 0 0;
934                                         color: 255 255 255 255;
935                                         color2: 0 0 0 102;
936                                 }
937                                 description { state: "disabled" 0.0;
938                                         inherit: "default" 0.0;
939                                         color: 0 0 0 128;
940                                         color3: 0 0 0 0;
941                                 }
942                                 description { state: "disabled_visible" 0.0;
943                                         inherit: "default" 0.0;
944                                         color: 0 0 0 128;
945                                         color3: 0 0 0 0;
946                                         visible: 1;
947                                 }
948                                 description { state: "focused" 0.0;
949                                         inherit: "default" 0.0;
950                                         visible: 1;
951                                         min: 0 0;
952                                         color: 255 255 255 255;
953                                         color2: 0 0 0 102;
954                                 }
955                         }
956                         part { name: "over2";
957                                 type: RECT;
958                                 mouse_events: 1;
959                                 repeat_events: 1;
960                                 ignore_flags: ON_HOLD;
961                                 description { state: "default" 0.0;
962                                         color: 0 0 0 0;
963                                 }
964                                 description { state: "disabled" 0.0;
965                                         inherit:  "default" 0.0;
966                                         visible: 0;
967                                 }
968                         }
969                         part { name: "over3";
970                                 type: RECT;
971                                 mouse_events: 1;
972                                 repeat_events: 1;
973                                 description { state: "default" 0.0;
974                                         color: 0 0 0 0;
975                                 }
976                                 description { state: "clicked" 0.0;
977                                         inherit:  "default" 0.0;
978                                         visible: 1;
979                                 }
980                         }
981                         part { name: "disabler";
982                                 type: RECT;
983                                 description { state: "default" 0.0;
984                                         color: 0 0 0 0;
985                                         visible: 0;
986                                 }
987                                 description { state: "disabled" 0.0;
988                                         inherit: "default" 0.0;
989                                         visible: 1;
990                                 }
991                         }
992                 }
993                 programs {
994                         program { name: "button_click";
995                                 signal: "mouse,down,1";
996                                 source: "over2";
997                                 action: SIGNAL_EMIT "elm,action,press" "";
998                                 after:touch_sound ;
999                                 after:touch_haptic ;
1000                                 after: "button_click_anim";
1001                         }
1002                         program { name: touch_sound;
1003                                 action: TOUCH_SOUND BUTTON_PRESSED_SOUND 1;                                
1004                         }
1005                         program { name: touch_haptic;
1006                                 action: TOUCH_HAPTIC WARNING_HAPTIC 3;                             
1007                         }
1008                         program { name: "button_click_anim";
1009                                 action: STATE_SET "clicked" 0.0;
1010                                 target: "button_image";
1011                                 after: "text_clicked";
1012                         }
1013                         program { name: "text_clicked";
1014                                 script {
1015                                         new st[31];
1016                                         new Float:vl;
1017                                         get_state(PART:"elm.text", st, 30, vl);
1018                                         if (!strcmp(st, "visible"))
1019                                                 set_state(PART:"elm.text", "clicked", 0.0);
1020                                 }
1021                         }
1022                         program { name: "button_unpress";
1023                                 action: SIGNAL_EMIT "elm,action,unpress" "";
1024                         }
1025                         program { name: "button_mouseout_clicked";
1026                                 signal: "mouse,up,1";
1027                                 source: "over3";
1028                                 script {
1029                                         new st[31];
1030                                         new Float:vl;
1031                                         get_state(PART:"elm.swallow.content", st, 30, vl);
1032                                         if (strcmp(st, "icononly"))
1033                                         {
1034                                                 emit("elm,action,default,text,set", "");
1035                                                 set_state(PART:"elm.text", "visible", 0.0);
1036                                         }
1037                                         if(get_int(button_state) !=1)
1038                                                 set_state(PART:"button_image", "default", 0.0);
1039                                 }
1040                                 after: button_unpress;
1041                         }
1042                         program { name: "button_click2";
1043                                 signal: "mouse,down,1";
1044                                 source: "over3";
1045                                 action: STATE_SET "clicked" 0.0;
1046                                 target: "over3";
1047                         }
1048                         program { name: "button_unclick2";
1049                                 signal: "mouse,clicked,1";
1050                                 source: "over3";
1051                                 action: STATE_SET "default" 0.0;
1052                                 target: "over3";
1053                         }
1054                         program { name: "button_unclick3";
1055                                 signal: "mouse,clicked,1";
1056                                 source: "over2";
1057                                 action: SIGNAL_EMIT "elm,action,click" "";
1058                         }
1059                         program { name: "text_show";
1060                                 signal: "elm,state,text,visible";
1061                                 source: "elm";
1062                                 script {
1063                                         new st[31];
1064                                         new Float:vl;
1065                                         get_state(PART:"elm.swallow.content", st, 30, vl);
1066                                         if (!strcmp(st, "icononly"))
1067                                         {
1068                                                 set_state(PART:"elm.swallow.content", "visible", 0.0);
1069                                                 set_state(PART:"padding_icon_text", "visible", 0.0);
1070                                         }
1071                                         set_state(PART:"elm.text", "visible", 0.0);
1072                                 }
1073                         }
1074                         program { name: "text_hide";
1075                                 signal: "elm,state,text,hidden";
1076                                 source: "elm";
1077                                 script {
1078                                         new st[31];
1079                                         new Float:vl;
1080                                         get_state(PART:"elm.swallow.content", st, 30, vl);
1081                                         if (!strcmp(st, "visible"))
1082                                         {
1083                                                 set_state(PART:"elm.swallow.content", "icononly", 0.0);
1084                                                 set_state(PART:"padding_icon_text", "icononly", 0.0);
1085                                         }
1086                                         set_state(PART:"elm.text", "default", 0.0);
1087                                 }
1088                         }
1089                         program { name: "icon_show";
1090                                 signal: "elm,state,icon,visible";
1091                                 source: "elm";
1092                                 script {
1093                                         new st[31];
1094                                         new Float:vl;
1095                                         get_state(PART:"elm.text", st, 30, vl);
1096                                         if (!strcmp(st, "visible"))
1097                                         {
1098                                                 set_state(PART:"elm.swallow.content", "visible", 0.0);
1099                                                 set_state(PART:"padding_icon_text", "visible", 0.0);
1100                                         }
1101                                         else
1102                                         {
1103                                                 set_state(PART:"elm.swallow.content", "icononly", 0.0);
1104                                                 set_state(PART:"padding_icon_text", "icononly", 0.0);
1105                                         }
1106                                 }
1107                         }
1108                         program { name: "icon_hide";
1109                                 signal: "elm,state,icon,hidden";
1110                                 source: "elm";
1111                                 action:  STATE_SET "default" 0.0;
1112                                 target: "elm.swallow.content";
1113                         }
1114                         program { name: "disable";
1115                                 signal: "elm,state,disabled";
1116                                 source: "elm";
1117                                 action: STATE_SET "disabled" 0.0;
1118                                 target: "button_image";
1119                                 target: "over2";
1120                                 target: "disabler";
1121                                 after: "disable_text";
1122                         }
1123                         program { name: "disable_text";
1124                                 script {
1125                                         new st[31];
1126                                         new Float:vl;
1127                                         get_state(PART:"elm.text", st, 30, vl);
1128                                         if (!strcmp(st, "visible"))
1129                                                 set_state(PART:"elm.text", "disabled_visible", 0.0);
1130                                         else
1131                                                 set_state(PART:"elm.text", "disabled", 0.0);
1132                                         set_int(button_state, 1);
1133                                 }
1134                         }
1135                         program { name: "enable";
1136                                 signal: "elm,state,enabled";
1137                                 source: "elm";
1138                                 action: STATE_SET "default" 0.0;
1139                                 target: "button_image";
1140                                 target: "over2";
1141                                 target: "disabler";
1142                                 after: "enable_text";
1143                         }
1144                         program { name: "enable_text";
1145                                 script {
1146                                         new st[31];
1147                                         new Float:vl;
1148                                         get_state(PART:"elm.text", st, 30, vl);
1149                                         if (!strcmp(st, "disabled_visible"))
1150                                                 set_state(PART:"elm.text", "visible", 0.0);
1151                                         else
1152                                                 set_state(PART:"elm.text", "default", 0.0);
1153                                         set_int(button_state, 0);
1154                                 }
1155                         }
1156                         program { name: "focused";
1157                                 signal: "elm,action,focus";
1158                                 source: "elm";
1159                                 action: STATE_SET "focused" 0.0;
1160                                 target: "button_image";
1161                                 target: "elm.text";
1162                         }
1163                         program { name: "unfocused";
1164                                 signal: "elm,action,unfocus";
1165                                 source: "elm";
1166                                 action: STATE_SET "default" 0.0;
1167                                 target: "button_image";
1168                                 after: "unfocus_text";
1169                         }
1170                         program { name: "unfocus_text";
1171                                 action: STATE_SET "visible" 0.0;
1172                                 target: "elm.text";
1173                         }
1174                 }
1175         }