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