[MBE] added sound to MBE.
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / multibuttonentry.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    sounds {
19       sample {
20          name: "touch_sound" AS_IS;
21          source: "S_Touch_30ms.wav";
22       }
23    }
24
25 group {
26    name: "elm/multibuttonentry/base/default";
27
28    data.item: "horizontal_pad" MULTIBUTTONENTRY_BOX_HORIZONTAL_PAD_INC;
29    data.item: "vertical_pad" MULTIBUTTONENTRY_BOX_VERTICAL_PAD_INC;
30    data.item: "closed_button_type" "label"; /* image, label, default: label */
31
32    parts {
33       part {
34          name: "top.left.pad";
35          type: RECT;
36          mouse_events: 0;
37          scale: 1;
38          description {
39             state: "default" 0.0;
40             min : MULTIBUTTONENTRY_WIDTH_PAD_INC MULTIBUTTONENTRY_HEIGHT_PAD_INC;
41             fixed: 1 1;
42             rel2.relative: 0.0 0.0;
43             align: 0.0 0.0;
44             color: 0 0 0 0;
45          }
46       }
47       part {
48          name: "bottom.right.pad";
49          type: RECT;
50          mouse_events: 0;
51          scale: 1;
52          description {
53             state: "default" 0.0;
54             min : MULTIBUTTONENTRY_WIDTH_PAD_INC MULTIBUTTONENTRY_HEIGHT_PAD_INC;
55             fixed: 1 1;
56             rel1.relative: 1.0 1.0;
57             align: 1.0 1.0;
58             color: 0 0 0 0;
59          }
60       }
61       part {
62          name: "box.swallow";
63          type: SWALLOW;
64          description {
65             state: "default" 0.0;
66             rel1 {
67                relative: 1.0 1.0;
68                to: "top.left.pad";
69             }
70             rel2 {
71                relative: 0.0 0.0;
72                to: "bottom.right.pad";
73             }
74          }
75       }
76       part { name: "block_events";
77          type: RECT;
78          description {
79             state: "default" 0.0;
80             color: 0 0 0 0;
81          }
82          description {
83             state: "invisible" 0.0;
84             visible: 0;
85          }
86       }
87       part { name: "events";
88          type: RECT;
89          repeat_events: 1;
90          ignore_flags: ON_HOLD;
91          description {
92             state: "default" 0.0;
93             color: 0 0 0 0;
94          }
95       }
96    }
97    programs {
98       program {
99          name: "clicked";
100          signal: "mouse,clicked,1";
101          source: "events";
102          action: SIGNAL_EMIT "elm,action,clicked" "";
103       }
104       program {
105          name: "event_allow";
106          signal: "elm,state,event,allow";
107          source: "";
108          action: STATE_SET "invisible" 0.0;
109          target: "block_events";
110       }
111       program {
112          name: "event_block";
113          signal: "elm,state,event,block";
114          source: "";
115          action: STATE_SET "default" 0.0;
116          target: "block_events";
117       }
118    }
119 }
120
121 group {
122    name: "elm/multibuttonentry/guidetext/default";
123
124    styles {
125       style {
126          name: "multibuttonentry_guide_style";
127          base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_GUIDE_TEXT_SIZE_INC" color="MULTIBUTTONENTRY_GUIDE_TEXT_COLOR_INC" wrap=char text_class=tizen";
128          tag:  "br" "\n";
129          tag:  "ps" "ps";
130          tag:  "hilight" "+ font=Tizen:style=Bold";
131          tag:  "b" "+ font=Tizen:style=Bold";
132          tag:  "tab" "\t";
133       }
134    }
135
136    parts {
137       part {
138          name: "elm.text";
139          type: TEXTBLOCK;
140          mouse_events: 0;
141          scale: 1;
142          description {
143             state: "default" 0.0;
144             min: 0 MULTIBUTTONENTRY_GUIDE_HEIGHT_INC;
145             text.style: "multibuttonentry_guide_style";
146          }
147       }
148    }
149 }
150
151 group {
152    name: "elm/multibuttonentry/btn/default";
153
154    images {
155       image: "00_contacts_button.png" COMP;
156       image: "00_contacts_button_press.png" COMP;
157    }
158
159    data.item: "button_max_size" MULTIBUTTONENTRY_BUTTON_MAX_INC;
160
161    parts {
162       part {
163          name: "elm.btn.bg";
164          type: IMAGE;
165          mouse_events: 0;
166          scale: 1;
167          description {
168             state: "default" 0.0;
169             min: 0 MULTIBUTTONENTRY_BUTTON_HEIGHT_INC;
170             image {
171                normal: "00_contacts_button.png";
172                border: MULTIBUTTONENTRY_BUTTON_NINEPATCH_INC;
173                border_scale: 1;
174             }
175          }
176          description {
177             state: "focused" 0.0;
178             inherit: "default" 0.0;
179             image.normal: "00_contacts_button_press.png";
180          }
181       }
182       part {
183          name: "left.padding";
184          type: RECT;
185          mouse_events: 0;
186          scale: 1;
187          description {
188             state: "default" 0.0;
189             min: MULTIBUTTONENTRY_BUTTON_PAD_INC 0;
190             fixed: 1 0;
191             rel2.relative: 0.0 1.0;
192             align: 0.0 0.5;
193             color: 0 0 0 0;
194          }
195       }
196       part {
197          name: "right.padding";
198          type: RECT;
199          mouse_events: 0;
200          scale: 1;
201          description {
202             state: "default" 0.0;
203             min: MULTIBUTTONENTRY_BUTTON_PAD_INC 0;
204             fixed: 1 0;
205             rel1.relative: 1.0 0.0;
206             align: 1.0 0.5;
207             color: 0 0 0 0;
208          }
209       }
210       part {
211          name: "elm.btn.text";
212          type: TEXT;
213          mouse_events: 0;
214          scale: 1;
215          description {
216             state: "default" 0.0;
217             color: MULTIBUTTONENTRY_BUTTON_TEXT_COLOR_INC;
218             text {
219                font: "Tizen:style=Regular";
220                size: MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC;
221                min: 1 0;
222                text_class: "tizen";
223             }
224             rel1 {
225                relative: 1.0 0.0;
226                to: "left.padding";
227             }
228             rel2 {
229                relative: 0.0 1.0;
230                to: "right.padding";
231             }
232          }
233          description {
234             state: "ellipsis" 0.0;
235             inherit: "default" 0.0;
236             min: MULTIBUTTONENTRY_BUTTON_TEXT_MAX_INC 0;
237             text.min: 0 0;
238          }
239       }
240       part { name: "events";
241          type: RECT;
242          ignore_flags: ON_HOLD;
243          description {
244             state: "default" 0.0;
245             color: 0 0 0 0;
246          }
247       }
248    }
249    programs {
250       program {
251          name: "text_ellipsis";
252          signal: "elm,state,text,ellipsis";
253          source: "";
254          action: STATE_SET "ellipsis" 0.0;
255          target: "elm.btn.text";
256       }
257       program {
258          name: "focused";
259          signal: "focused";
260          source: "";
261          action: STATE_SET "focused" 0.0;
262          target: "elm.btn.bg";
263          after: "selected";
264       }
265       program {
266          name: "unfocused";
267          signal: "default";
268          source: "";
269          action: STATE_SET "default" 0.0;
270          target: "elm.btn.bg";
271       }
272       program {
273          name: "clicked";
274          signal: "mouse,clicked,1";
275          source: "events";
276          action: SIGNAL_EMIT "elm,action,clicked" "";
277          after: "touch_snd";
278       }
279       program {
280          name: "touch_snd";
281          action: PLAY_SAMPLE "touch_sound" 1.0;
282       }
283       program {
284          name: "selected";
285          action: SIGNAL_EMIT "elm,action,selected" "";
286       }
287    }
288 }
289
290 group {
291    name: "elm/multibuttonentry/number/default";
292
293    parts {
294       part {
295          name: "left.pad";
296          type: RECT;
297          mouse_events: 0;
298          scale: 1;
299          description {
300             state: "default" 0.0;
301             min: MULTIBUTTONENTRY_LABEL_PAD_INC 0;
302             fixed: 1 0;
303             rel2.relative: 0.0 1.0;
304             align: 0.0 0.5;
305             color: 0 0 0 0;
306          }
307       }
308       part {
309          name: "elm.text";
310          type: TEXT;
311          mouse_events: 0;
312          scale: 1;
313          description {
314             state: "default" 0.0;
315             min: 0 MULTIBUTTONENTRY_LABEL_HEIGHT_INC;
316             color: MULTIBUTTONENTRY_NUMBER_TEXT_COLOR_INC;
317             text {
318                font: "Tizen:style=Regular";
319                size: MULTIBUTTONENTRY_LABEL_TEXT_SIZE_INC;
320                min: 1 0;
321                text_class: "tizen";
322             }
323             rel1 {
324                relative: 1.0 0.0;
325                to: "left.pad";
326             }
327          }
328       }
329    }
330 }
331
332 group {
333    name: "elm/multibuttonentry/closedbutton/default";
334
335    images {
336       image: "00_circle_button.png" COMP;
337       image: "00_button_expand_closed.png" COMP;
338    }
339
340    parts {
341       part {
342          name: "closed_button_bg";
343          scale: 1;
344          mouse_events: 0;
345          description {
346             state: "default" 0.0;
347             min: MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE_INC MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE_INC;
348             image.normal: "00_circle_button.png";
349          }
350       }
351       part {
352          name: "closed_button";
353          scale: 1;
354          mouse_events: 0;
355          description {
356             state: "default" 0.0;
357             image.normal: "00_button_expand_closed.png";
358          }
359       }
360    }
361 }
362
363 group {
364    name: "elm/multibuttonentry/label/default";
365
366    styles {
367       style {
368          name: "multibuttonentry_label_style";
369          base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_LABEL_TEXT_SIZE_INC" color="MULTIBUTTONENTRY_LABEL_TEXT_COLOR_INC" wrap=char text_class=tizen";
370          tag:  "br" "\n";
371          tag:  "ps" "ps";
372          tag:  "hilight" "+ font=Tizen:style=Bold";
373          tag:  "b" "+ font=Tizen:style=Bold";
374          tag:  "tab" "\t";
375       }
376    }
377
378    parts {
379       part {
380          name: "mbe.label.right.padding";
381          type: RECT;
382          mouse_events: 0;
383          scale: 1;
384          description {
385             state: "default" 0.0;
386             min: MULTIBUTTONENTRY_LABEL_PAD_INC 0;
387             fixed: 1 0;
388             rel1.relative: 1.0 0.0;
389             align: 1.0 0.5;
390             color: 0 0 0 0;
391          }
392       }
393       part {
394          name: "mbe.label";
395          type: TEXTBLOCK;
396          mouse_events: 0;
397          scale: 1;
398          description {
399             state: "default" 0.0;
400             min: 0 MULTIBUTTONENTRY_LABEL_HEIGHT_INC;
401             text {
402                style: "multibuttonentry_label_style";
403                min: 1 0;
404             }
405             rel2 {
406                relative: 0.0 1.0;
407                to: "mbe.label.right.padding";
408             }
409          }
410       }
411    }
412 }