2 * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
4 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
9 * 1. Redistributions of source code must retain the above copyright notice, this
10 * list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 name: "elm/multibuttonentry/base/default";
30 data.item: "horizontal_pad" MULTIBUTTONENTRY_BOX_HORIZONTAL_PAD_INC;
31 data.item: "vertical_pad" MULTIBUTTONENTRY_BOX_VERTICAL_PAD_INC;
32 data.item: "closed_button_type" "label"; /* image, label, default: label */
51 min : MULTIBUTTONENTRY_WIDTH_PAD_INC MULTIBUTTONENTRY_HEIGHT_PAD_INC;
53 rel2.relative: 0.0 0.0;
58 name: "bottom.right.pad";
63 min : MULTIBUTTONENTRY_WIDTH_PAD_INC MULTIBUTTONENTRY_BOTTOM_HEIGHT_PAD_INC;
65 rel1.relative: 1.0 1.0;
80 to: "bottom.right.pad";
84 part { name: "block_events";
91 state: "invisible" 0.0;
95 part { name: "events";
98 ignore_flags: ON_HOLD;
100 state: "default" 0.0;
108 signal: "mouse,clicked,1";
110 action: SIGNAL_EMIT "elm,action,clicked" "";
114 signal: "elm,state,event,allow";
116 action: STATE_SET "invisible" 0.0;
117 target: "block_events";
121 signal: "elm,state,event,block";
123 action: STATE_SET "default" 0.0;
124 target: "block_events";
130 name: "elm/multibuttonentry/guidetext/default";
134 name: "multibuttonentry_guide_style";
135 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_GUIDE_TEXT_SIZE_INC" color=#000000FF wrap=char text_class=tizen";
138 tag: "hilight" "+ font_weight=Bold";
139 tag: "b" "+ font_weight=Bold";
150 state: "default" 0.0;
151 min: 0 MULTIBUTTONENTRY_GUIDE_HEIGHT_INC;
152 text.style: "multibuttonentry_guide_style";
155 state: "invisible" 0.0;
156 inherit: "default" 0.0;
164 signal: "elm,state,guidetext,show";
166 action: STATE_SET "default" 0.0;
171 signal: "elm,state,guidetext,hide";
173 action: STATE_SET "invisible" 0.0;
180 name: "elm/multibuttonentry/btn/default";
184 name: "multibuttonentry_btn_text_style";
185 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#FFFFFFFF text_class=tizen align=center";
188 name: "multibuttonentry_btn_text_pressed_style";
189 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#FFFFFFFF text_class=tizen align=center";
192 name: "multibuttonentry_btn_text_dim_style";
193 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#FFFFFF7F text_class=tizen align=center";
196 name: "multibuttonentry_btn_text_ellipsis_style";
197 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#FFFFFFFF ellipsis=1 text_class=tizen";
200 name: "multibuttonentry_btn_text_ellipsis_pressed_style";
201 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#FFFFFFFF ellipsis=1 text_class=tizen";
204 name: "multibuttonentry_btn_text_ellipsis_dim_style";
205 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#FFFFFF7F ellipsis=1 text_class=tizen";
213 name: "core_list_button_bg.#";
215 image: SMALL"images/Controls/core_list_button_bg.#.png" COMP;
218 image: MEDIUM"images/Controls/core_list_button_bg.#.png" COMP;
223 data.item: "button_left_pad" MULTIBUTTONENTRY_BUTTON_PAD_INC;
224 data.item: "button_right_pad" MULTIBUTTONENTRY_BUTTON_PAD_INC;
225 data.item: "focus_highlight" "on";
228 part { name: "button_image";
230 description { state: "default" 0.0;
231 min: MULTIBUTTONENTRY_BUTTON_WIDTH_INC MULTIBUTTONENTRY_BUTTON_HEIGHT_INC;
232 image.normal: "core_list_button_bg.#";
233 color: 38 107 191 255; /*(Changeable UI) color_class: "W012";*/
235 description { state: "pressed" 0.0;
236 inherit: "default" 0.0;
237 color: 30 85 153 255; /*(Changeable UI) color_class: "W012P";*/
239 description { state: "disabled" 0.0;
240 inherit: "default" 0.0;
241 color: 76 128 191 255; /*(Changeable UI) color_class: "W012D";*/
245 name: "left.padding";
249 state: "default" 0.0;
250 min: MULTIBUTTONENTRY_BUTTON_PAD_INC 0;
252 rel2.relative: 0.0 1.0;
257 name: "right.padding";
261 state: "default" 0.0;
262 min: MULTIBUTTONENTRY_BUTTON_PAD_INC 0;
264 rel1.relative: 1.0 0.0;
269 name: "elm.btn.text";
275 state: "default" 0.0;
277 style: "multibuttonentry_btn_text_style";
290 state: "pressed" 0.0;
291 inherit: "default" 0.0;
292 text.style: "multibuttonentry_btn_text_pressed_style";
295 state: "disabled" 0.0;
296 inherit: "default" 0.0;
297 text.style: "multibuttonentry_btn_text_dim_style";
300 state: "ellipsis" 0.0;
301 inherit: "default" 0.0;
303 style: "multibuttonentry_btn_text_ellipsis_style";
308 state: "ellipsis_pressed" 0.0;
309 inherit: "ellipsis" 0.0;
310 text.style: "multibuttonentry_btn_text_ellipsis_pressed_style";
313 state: "ellipsis_disabled" 0.0;
314 inherit: "ellipsis" 0.0;
315 text.style: "multibuttonentry_btn_text_ellipsis_dim_style";
321 ignore_flags: ON_HOLD;
323 state: "default" 0.0;
337 state: "default" 0.0;
338 rel1.to: "button_image";
339 rel2.to: "button_image";
346 name: "text_ellipsis";
347 signal: "elm,state,text,ellipsis";
352 get_state(PART:"elm.btn.text", st, 30, vl);
353 if (!strcmp(st, "ellipsis_disabled"))
354 set_state(PART:"elm.btn.text", "ellipsis_disabled", 0.0);
356 set_state(PART:"elm.btn.text", "ellipsis", 0.0);
360 name: "text_default";
361 signal: "elm,state,text,default";
363 action: STATE_SET "default" 0.0;
364 target: "elm.btn.text";
368 signal: "mouse,down,1";
373 if (get_int(disabled) == 1)
375 get_state(PART:"elm.btn.text", st, 30, vl);
376 if (!strcmp(st, "default") || !strcmp(st, "pressed"))
377 set_state(PART:"elm.btn.text", "pressed", 0.0);
378 else if (!strcmp(st, "ellipsis") || !strcmp(st, "ellipsis_pressed"))
379 set_state(PART:"elm.btn.text", "ellipsis_pressed", 0.0);
380 set_state(PART:"button_image", "pressed", 0.0);
389 new Float:dx, Float:dy;
390 if (get_int(disabled) == 1)
392 get_drag(PART:"drag", dx, dy);
393 if ((abs(dx) > 20) || (abs(dy) > 20)) {
396 get_state(PART:"elm.btn.text", st, 30, vl);
397 if (!strcmp(st, "default") || !strcmp(st, "pressed"))
398 set_state(PART:"elm.btn.text", "default", 0.0);
399 else if (!strcmp(st, "ellipsis") || !strcmp(st, "ellipsis_pressed"))
400 set_state(PART:"elm.btn.text", "ellipsis", 0.0);
401 set_state(PART:"button_image", "default", 0.0);
407 signal: "mouse,up,1";
412 if (get_int(disabled) == 1)
414 get_state(PART:"elm.btn.text", st, 30, vl);
415 if (!strcmp(st, "default") || !strcmp(st, "pressed"))
416 set_state(PART:"elm.btn.text", "default", 0.0);
417 else if (!strcmp(st, "ellipsis") || !strcmp(st, "ellipsis_pressed"))
418 set_state(PART:"elm.btn.text", "ellipsis", 0.0);
419 set_state(PART:"button_image", "default", 0.0);
420 set_drag(PART:"drag", 0.0, 0.0);
425 name: "selected_elm";
426 signal: "elm,action,btn,selected";
431 get_state(PART:"elm.btn.text", st, 30, vl);
432 if (!strcmp(st, "default") || !strcmp(st, "pressed"))
433 set_state(PART:"elm.btn.text", "default", 0.0);
434 else if (!strcmp(st, "ellipsis") || !strcmp(st, "ellipsis_pressed"))
435 set_state(PART:"elm.btn.text", "ellipsis", 0.0);
436 set_state(PART:"button_image", "pressed", 0.0);
441 name: "unselected_elm";
442 signal: "elm,action,btn,unselected";
447 get_state(PART:"elm.btn.text", st, 30, vl);
448 if (!strcmp(st, "default") || !strcmp(st, "pressed"))
449 set_state(PART:"elm.btn.text", "default", 0.0);
450 else if (!strcmp(st, "ellipsis") || !strcmp(st, "ellipsis_pressed"))
451 set_state(PART:"elm.btn.text", "ellipsis", 0.0);
452 if (get_int(disabled) == 0)
453 set_state(PART:"button_image", "default", 0.0);
455 set_state(PART:"button_image", "disabled", 0.0);
456 set_drag(PART:"drag", 0.0, 0.0);
462 signal: "elm,state,enabled";
467 get_state(PART:"elm.btn.text", st, 30, vl);
468 if (!strcmp(st, "default") || !strcmp(st, "disabled"))
469 set_state(PART:"elm.btn.text", "default", 0.0);
470 else if (!strcmp(st, "ellipsis") || !strcmp(st, "ellipsis_disabled"))
471 set_state(PART:"elm.btn.text", "ellipsis", 0.0);
472 set_state(PART:"button_image", "default", 0.0);
473 set_int(disabled , 0);
478 signal: "elm,state,disabled";
483 get_state(PART:"elm.btn.text", st, 30, vl);
484 if (!strcmp(st, "default") || !strcmp(st, "disabled"))
485 set_state(PART:"elm.btn.text", "disabled", 0.0);
486 else if (!strcmp(st, "ellipsis") || !strcmp(st, "ellipsis_disabled"))
487 set_state(PART:"elm.btn.text", "ellipsis_disabled", 0.0);
488 set_state(PART:"button_image", "disabled", 0.0);
489 set_int(disabled , 1);
494 signal: "mouse,clicked,1";
496 action: SIGNAL_EMIT "elm,action,clicked" "";
501 action: RUN_PLUGIN "touch_sound" ;
505 action: SIGNAL_EMIT "elm,action,selected" "";
509 action: SIGNAL_EMIT "elm,action,unselected" "";
515 name: "elm/multibuttonentry/number/default";
519 name: "multibuttonentry_number_text_style";
520 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#023D84FF text_class=tizen";
523 name: "multibuttonentry_number_text_ellipsis_style";
524 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color=#023D84FF ellipsis=1 text_class=tizen";
533 state: "default" 0.0;
534 min: MULTIBUTTONENTRY_LABEL_PAD_INC 0;
536 rel2.relative: 0.0 1.0;
546 state: "default" 0.0;
547 min: 0 MULTIBUTTONENTRY_LABEL_HEIGHT_INC;
549 style: "multibuttonentry_number_text_style";
558 state: "ellipsis" 0.0;
559 inherit: "default" 0.0;
560 text.style: "multibuttonentry_number_text_ellipsis_style";
567 name: "text,default";
568 signal: "elm,state,number,default";
570 action: STATE_SET "default" 0.0;
574 name: "text,ellipsis";
575 signal: "elm,state,number,ellipsis";
577 action: STATE_SET "ellipsis" 0.0;
584 name: "elm/multibuttonentry/label/default";
588 name: "multibuttonentry_label_style";
589 base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_LABEL_TEXT_SIZE_INC" color=#000000FF wrap=char text_class=tizen";
592 tag: "hilight" "+ font_weight=Bold";
593 tag: "b" "+ font_weight=Bold";
600 name: "mbe.label.right.padding";
604 state: "default" 0.0;
605 min: MULTIBUTTONENTRY_LABEL_PAD_INC 0;
607 rel1.relative: 1.0 0.0;
617 state: "default" 0.0;
618 min: 0 MULTIBUTTONENTRY_LABEL_HEIGHT_INC;
620 style: "multibuttonentry_label_style";
625 to: "mbe.label.right.padding";