[elm_multibuttonentry]Changed UX:Added buttonto close expanded box
[profile/ivi/efl-theme-tizen.git] / themes / groups / multibuttonentry.edc
1 /*
2  *  nbeat-theme
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Seokjae Jeong <seok.j.jeong@samsung.com>, Myoungwoon Roy Kim <Myoungwoon.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>, Jaehwan Kim <jae.hwan.kim@samsung.com>, Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>, IlKook Yun <ilkook.yun@samsung.com>, CinWoo Kim <cinoo.kim@samsung.com> JiYeon Park <jy0703.park@samsung.com>
7  * 
8  * This library is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU Lesser General Public License as published by the
10  * Free Software Foundation; either version 2.1 of the License, or (at your option)
11  * any later version.
12  * 
13  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
14  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
15  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; if not, write to the Free Software Foundation, Inc., 51
20  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23
24 ///////////////////////////////////////////////////////////////////////////////////////
25    group {
26       name: "elm/multibuttonentry/base/default";
27       data.item: "closed_button_type" "image"; /* image, label, default : label */
28       data.item: "closed_height" MULTIBUTTONENTRY_CLOSEDBUTTON_AREA_HEIGHT;
29
30       parts {
31          part {
32             name: "elm.base";
33             type: RECT;
34             scale: 1;
35             description {
36                state: "default" 0.0;
37                align: 0 0;
38                color: 0 0 0 0;
39             }
40          }
41          part {
42             name: "top.left.pad";
43             type: RECT;
44             scale: 1;
45             description {
46                state: "default" 0.0;
47                min : MULTIBUTTONENTRY_WIDTH_PAD MULTIBUTTONENTRY_HEIGHT_PAD;
48                fixed: 1 1;
49                rel1 { relative: 0.0 0.0;to:elm.base; }
50                rel2 { relative: 0.0 0.0;to:elm.base; }
51                align: 0 0;
52                color: 0 0 0 0;
53             }
54          }
55          part {
56             name: "bottom.right.pad";
57             type: RECT;
58             scale: 1;
59             description {
60                state: "default" 0.0;
61                min : MULTIBUTTONENTRY_WIDTH_PAD MULTIBUTTONENTRY_HEIGHT_PAD;
62                fixed: 1 1;
63                rel1 { relative: 1.0 1.0;to:elm.base; }
64                rel2 { relative: 1.0 1.0;to:elm.base; }
65                align: 1 1;
66                color: 0 0 0 0;
67             }
68          }
69          part {
70             name: "box.swallow";
71             type: SWALLOW;
72             description {
73                state: "default" 0.0;
74                rel1 { relative: 1.0 1.0; to: "top.left.pad"; }
75                rel2 { relative: 0.0 0.0; to: "bottom.right.pad"; }
76                align: 0.0 0.0;
77             }
78          }
79       }
80    }
81
82 ///////////////////////////////////////////////////////////////////////////////////////
83    group {
84       name: "elm/multibuttonentry/guidetext/default";
85       parts {
86          part {
87             name: "elm.text.bg";
88             type: RECT;
89             scale: 1;
90             description {
91                state: "default" 0.0;
92                color: 0 0 0 0;
93                visible: 0;
94                rel1.to: "elm.text";
95                rel2.to: "elm.text";
96             }
97          }
98          part {
99             name: "elm.text";
100             type: TEXT;
101             scale: 1;
102             description {
103                state: "default" 0.0;
104                color: MULTIBUTTONENTRY_GUIDETEXT_COLOR_INC;
105                text {
106                   font: "SLP:style=Roman";
107                   size: MULTIBUTTONENTRY_GUIDETEXT_SIZE;
108                   min: 0 1;
109                   align: 0.0 0.5;
110                }
111             }
112          }
113       }
114    }
115
116 ///////////////////////////////////////////////////////////////////////////////////////
117    group {
118       name: "elm/multibuttonentry/btn/default";
119       data.item: "button_max_size" MULTIBUTTONENTRY_BUTTON_MAX_SIZE;
120       parts {
121          part {
122             name: "elm.base";
123             type: RECT;
124             mouse_events: 1;
125             scale: 1;
126             description {
127                state: "default" 0.0;
128                min: 0 MULTIBUTTONENTRY_BUTTON_BASE_SIZE;
129                max: 5000 MULTIBUTTONENTRY_BUTTON_BASE_SIZE;
130                fixed: 1 1;
131                color: 0 0 0 0;
132             }
133          }
134 //----------------------------------------------------padding
135          part{
136             name: "top.padding";
137             type: RECT;
138             scale: 1;
139             description {
140                state: "default" 0.0;
141                min : 0 MULTIBUTTONENTRY_BUTTON_TOP_BUTTOM_PAD;
142                fixed: 0 1;
143                rel1 { relative: 0.0 0.0;to:elm.base; }
144                rel2 { relative: 1.0 0.0;to:elm.base; }
145                color: 0 0 0 0;
146                align: 0 0;
147             }
148          }
149          part{
150            name: "bottom.padding";
151            type: RECT;
152            scale: 1;
153            description {
154               state: "default" 0.0;
155               min : 0 MULTIBUTTONENTRY_BUTTON_TOP_BUTTOM_PAD;
156               fixed: 0 1;
157               rel1 { relative: 0.0 1.0;to:elm.base; }
158               rel2 { relative: 1.0 1.0;to:elm.base; }
159               color: 0 0 0 0;
160               align: 0 1;
161            }
162          }
163          part {
164             name: "left.padding";
165             type: RECT;
166             scale: 1;
167             description {
168                state: "default" 0.0;
169                min : 0 0;
170                fixed: 1 0;
171                rel1 { relative: 0.0 0.0; to: "elm.base"; }
172                rel2 { relative: 0.0 1.0; to: "elm.base"; }
173                color: 0 0 0 0;
174                align: 0 0;
175             }
176          }
177          part {
178             name: "left.inner.padding";
179             type: RECT;
180             scale: 1;
181             description {
182                state: "default" 0.0;
183                min : MULTIBUTTONENTRY_BUTTON_LEFT_INNER_PAD 0;
184                fixed: 1 0;
185                rel1 { relative: 1.0 0.0; to_x:"left.padding"; to_y:"elm.base";  }
186                rel2 { relative: 1.0 1.0; to_x:"left.padding"; to_y:"elm.base";  }
187                color: 0 0 0 0;
188                align: 0 0;
189             }
190          }
191          part {
192             name: "right.padding";
193             type: RECT;
194             scale: 1;
195             description {
196                state: "default" 0.0;
197                min : MULTIBUTTONENTRY_BUTTON_RIGHT_PAD 0;
198                fixed: 1 0;
199                rel1 { relative: 1.0 0.0; to: "elm.base"; }
200                rel2 { relative: 1.0 1.0; to: "elm.base"; }
201                color: 0 0 0 0;
202                align: 1 0;
203             }
204          }
205          part {
206             name: "right.inner.padding";
207             type: RECT;
208             scale: 1;
209             description {
210                state: "default" 0.0;
211                min : MULTIBUTTONENTRY_BUTTON_RIGHT_INNER_PAD 0;
212                fixed: 1 0;
213                rel1 { relative: 0.0 0.0; to_x:right.padding; to_y:elm.base;  }
214                rel2 { relative: 0.0 1.0; to_x:right.padding; to_y:elm.base;  }
215                color: 0 0 0 0;
216                align: 1 0;
217             }
218          }
219 //---------------------------------------------------- contents
220          part {
221             name: "elm.btn.bg";
222             type: RECT;
223             mouse_events: 1;
224             scale: 1;
225             description {
226                state: "default" 0.0;
227                rel1 { relative: 1.0 1.0; to_x:"left.padding";to_y:"top.padding";}
228                rel2 { relative: 0.0 0.0; to_x:"right.padding";to_y:"bottom.padding";}
229                color: MULTIBUTTONENTRY_NORMAL_BUTTON_COLOR_INC;
230             }
231             description {
232                state: "focused" 0.0;
233                inherit: "default" 0.0;
234                color: MULTIBUTTONENTRY_PRESSED_BUTTON_COLOR_INC;
235             }
236          }
237          part {
238             name: "elm.btn.text";
239             type: TEXTBLOCK;
240             mouse_events: 1;
241             scale:1;
242             description {
243                state: "default" 0.0;
244                min: 10 10;
245                max: 500 50;
246                align: 0.5 0.5;
247                text {
248                   style: "multibuttonentry_textblock_style";
249                   min: 0 1;
250                }
251                rel1 { relative: 1.0 1.0; to_x:"left.inner.padding";to_y:"top.padding";}
252                rel2 { relative: 0.0 0.0; to_x:"right.inner.padding";to_y:"bottom.padding";}
253             }
254          }
255       }
256
257       programs {
258          program {
259             name: "clicked";
260             signal: "mouse,clicked,1";
261             source: "elm.btn.bg";
262             action: SIGNAL_EMIT "clicked" "elm";
263          }
264          program {
265             name: "default";
266             signal: "default";
267             action: STATE_SET "default" 0.0;
268             target: "elm.btn.bg";
269          }
270          program {
271             name: "focused";
272             signal: "focused";
273             action: STATE_SET "focused" 0.0;
274             target: "elm.btn.bg";
275          }
276       }
277    }
278    styles {
279       style { name: "multibuttonentry_textblock_style";
280          base: "font=SLP:style=Medium align=center font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE" color="MULTIBUTTONENTRY_BUTTON_TEXT_COLOR_INT" text_class=label";
281       }
282    }
283
284 ///////////////////////////////////////////////////////////////////////////////////////
285    group {
286       name: "elm/label/base/extended/multibuttonentry_default";
287
288       styles {
289          style {
290             name: "textblock_style_multibuttonentry_default";
291             base: "font=SLP:style=Medium font_size=24 color=#000000 wrap=char";
292             tag:  "br" "\n";
293             tag:  "ps" "ps";
294             tag:  "hilight" "+ font=SLP:style=Bold";
295             tag:  "b" "+ font=SLP:style=Bold";
296             tag:  "tab" "\t";
297          }
298       }
299
300       parts {
301          part {
302             name: "label.swallow.background";
303             type: SWALLOW;
304             description {
305                state: "default" 0.0;
306                visible: 1;
307                rel1 { relative: 0 0; to: "elm.text"; }
308                rel2 { relative: 1 1; to: "elm.text"; }
309             }
310          }
311          part {
312             name: "elm.text";
313             type: TEXTBLOCK;
314             mouse_events: 0;
315             scale: 1;
316             description {
317                state: "default" 0.0;
318                text {
319                   style: "textblock_style_multibuttonentry_default";
320                   min: 1 1;
321                }
322             }
323          }
324       }
325    }
326
327 ///////////////////////////////////////////////////////////////////////////////////////
328    group {
329       name: "elm/multibuttonentry/closedbutton/default";
330       images {
331          image: "00_mbe_btn_circle_bg_normal.png" COMP;
332          image: "00_mbe_btn_circle_bg_press.png" COMP;
333          image: "00_mbe_btn_expand_closed.png" COMP;
334          image: "00_mbe_btn_expand_closed_press.png" COMP;
335          image: "00_mbe_btn_expand_opened.png" COMP;
336       }
337       data.item: "closed_button_height" MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE;
338       data.item: "closed_button_width" MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE;
339
340       parts {
341          part {
342             name: "closed_button_bg";
343             scale: 1;
344             mouse_events: 0;
345             type: IMAGE;
346             description {
347                state: "default" 0.0;
348                align: 0.5 0.5;
349                min: MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE;
350                visible: 1;
351                image.normal: "00_mbe_btn_circle_bg_normal.png";
352                rel1 { relative: 0.0 0.0; }
353                rel2 { relative: 1.0 1.0; }
354             }
355             description {
356                state: "clicked" 0.0;
357                inherit: "default" 0.0;
358                image.normal: "00_mbe_btn_circle_bg_press.png";
359             }
360             description {
361                state: "closed" 0.0;
362                inherit: "default" 0.0;
363                image.normal: "00_mbe_btn_circle_bg_normal.png";
364             }
365          }
366          part {
367             name: "closed_button";
368             scale: 1;
369             mouse_events: 1;
370             type: IMAGE;
371             description {
372                state: "default" 0.0;
373                align: 0.5 0.5;
374                min: MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE;
375                visible: 1;
376                image.normal: "00_mbe_btn_expand_opened.png";
377                rel1 { relative: 0.0 0.0; }
378                rel2 { relative: 1.0 1.0; }
379             }
380             description {
381                state: "clicked" 0.0;
382                inherit: "default" 0.0;
383                image.normal: "00_mbe_btn_expand_closed_press.png";
384             }
385             description {
386                state: "closed" 0.0;
387                inherit: "default" 0.0;
388                image.normal: "00_mbe_btn_expand_closed.png";
389             }
390          }
391       }
392
393       programs {
394          program {
395             name: "button_click";
396             signal: "mouse,down,1";
397             source: "closed_button";
398             action: STATE_SET "clicked" 0.0;
399             target: "closed_button_bg";
400             target: "closed_button";
401          }
402          program {
403             name: "button_unclick";
404             signal: "mouse,up,1";
405             source: "closed_button";
406             action: STATE_SET "default" 0.0;
407             target: "closed_button_bg";
408             target: "closed_button";
409          }
410          program {
411             name: "closed";
412             signal: "closed";
413             action: STATE_SET "closed" 0.0;
414             target: "closed_button_bg";
415             target: "closed_button";
416          }
417       }
418    }
419
420    group {
421       name: "elm/multibuttonentry/label/default";
422       parts {
423          part {
424             name: "mbe.label.bg";
425             type: RECT;
426             scale: 1;
427             description {
428                state: "default" 0.0;
429                color: 0 0 0 0;
430                min: 0 0;
431                fixed: 1 1;
432             }
433             description {
434                state: "no_text" 0.0;
435                inherit: "default" 0.0;
436                visible: 0;
437             }
438          }
439          part {
440             name: "mbe.label.left.padding";
441             type: RECT;
442             scale: 1;
443             description {
444                state: "default" 0.0;
445                color: 0 0 0 0;
446                min: 0 0;
447                fixed: 1 1;
448                rel1.to: "mbe.label.bg";
449                rel2 {
450                   to: "mbe.label.bg";
451                   relative: 0.0 1.0;
452                }
453                align: 0 0.5;
454             }
455             description {
456                state: "no_text" 0.0;
457                inherit: "default" 0.0;
458                visible: 0;
459             }
460          }
461          part {
462             name: "mbe.label.right.padding";
463             type: RECT;
464             scale: 1;
465             description {
466                state: "default" 0.0;
467                color: 0 0 0 0;
468                min: MULTIBUTTONENTRY_LABEL_RIGHT_PAD 0;
469                fixed: 1 1;
470                rel1 {
471                   to: "mbe.label.bg";
472                   relative: 1.0 0.0;
473                }
474                rel2.to: "mbe.label.bg";
475                align: 1 1.0;
476             }
477             description {
478                state: "no_text" 0.0;
479                inherit: "default" 0.0;
480                visible: 0;
481             }
482          }
483          part {
484             name: "mbe.label";
485             type: TEXT;
486             scale: 1;
487             description {
488                state: "default" 0.0;
489                color: MULTIBUTTONENTRY_LABEL_TEXT_COLOR_INC;
490                min: 0 MULTIBUTTONENTRY_LABEL_MIN_HEIGHT;
491                fixed: 1 1;
492                text {
493                   font: "SLP:style=Roman";
494                   size: MULTIBUTTONENTRY_LABEL_TEXT_SIZE;
495                   min: 1 1;
496                   align: 0.0 0.428;
497                }
498                rel1 { relative: 1.0 1.0; to: "mbe.label.left.padding"; }
499                rel2 { relative: 0.0 0.0; to: "mbe.label.right.padding"; }
500             }
501             description {
502                state: "no_text" 0.0;
503                inherit: "default" 0.0;
504                min: 10 50;
505             }
506          }
507       }
508
509       programs {
510          program {
511             name: "has_text";
512             signal: "elm,mbe,set_text";
513             source: "";
514             action: STATE_SET "default" 0.0;
515             target: "mbe.label.bg";
516             target: "mbe.label.left.padding";
517             target: "mbe.label.right.padding";
518             target: "mbe.label";
519          }
520          program {
521             name: "no_text";
522             signal: "elm,mbe,clear_text";
523             source: "";
524             action: STATE_SET "no_text" 0.0;
525             target: "mbe.label.bg";
526             target: "mbe.label.left.padding";
527             target: "mbe.label.right.padding";
528             target: "mbe.label";
529          }
530       }
531    }
532