4 * Copyright (c) 2000 - 2010 Samsung Electronics Co., Ltd.
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>,
7 * 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>,
8 * Hyunsil Park <hyunsil.park@samsung.com>, Sohyun Kim <anna1014.kim@samsung.com>, Seunggyun Kim <sgyun.kim@samsung.com>
10 * This library is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU Lesser General Public License as published by the
12 * Free Software Foundation; either version 2.1 of the License, or (at your option)
15 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation, Inc., 51
22 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 #define SLIDINGDRAWER_BG_COLOR 246 245 237 255
27 #define SLIDINGDRAWER_HANDLER_WIDTH 53
28 #define SLIDINGDRAWER_HANDLER_HEIGHT 20
29 #define SLIDINGDRAWER_TOPDOWN_HANDLER_HEIGHT 40
30 #define SLIDINGDRAWER_LEFTRIGHT_HANDLER_WIDTH 40
33 name: "elm/slidingdrawer/bottom/default";
35 image: "slidingdrawer_bottom_handler.png" COMP;
36 image: "slidingdrawer_bottom_handler_bar.png" COMP;
39 public g_mouse_state = 0;
40 public animator_up(val, Float:step) {
43 get_drag(PART:"elm.dragable.handler", vx, vy);
47 set_drag(PART:"elm.dragable.handler", 1.0, vy);
49 public animator_down(val, Float:step) {
52 get_drag(PART:"elm.dragable.handler", vx, vy);
56 set_drag(PART:"elm.dragable.handler", 1.0, vy);
61 name: "elm.swallow.dragable_rect";
74 rel1 {to:"elm.swallow.content";}
75 rel2 {to:"elm.swallow.content";}
76 color: SLIDINGDRAWER_BG_COLOR;
80 name: "elm.swallow.content";
84 rel1 {to: "elm.dragable.handler"; relative: 0 1;}
93 rel1 {to: "elm.dragable.handler";}
94 rel2 {to: "elm.dragable.handler";}
96 normal: "slidingdrawer_bottom_handler_bar.png";
101 name: "elm.dragable.handler";
106 confine: "elm.swallow.dragable_rect";
111 min: 1 SLIDINGDRAWER_TOPDOWN_HANDLER_HEIGHT;
114 rel1 {relative: 0 0; to: "elm.swallow.dragable_rect";}
115 rel2 {relative: 1 0; to: "elm.swallow.dragable_rect";}
119 name: "elm.image.handler";
124 min: SLIDINGDRAWER_HANDLER_WIDTH SLIDINGDRAWER_HANDLER_HEIGHT;
125 max: SLIDINGDRAWER_HANDLER_WIDTH SLIDINGDRAWER_HANDLER_HEIGHT;
129 normal: "slidingdrawer_bottom_handler.png";
131 rel1 {to:"elm.dragable.handler";}
132 rel2 {to:"elm.dragable.handler";}
138 name: "drag_handler";
140 source: "elm.dragable.handler";
142 set_int (g_mouse_state, 1);
146 name: "down_handler";
147 signal: "mouse,down,*";
148 source: "elm.dragable.handler";
150 set_int (g_mouse_state, 0);
154 name: "handler_clicked";
155 signal: "mouse,clicked,1";
156 source: "elm.dragable.handler";
160 if (get_int(g_mouse_state) == 0) {
161 emit("animation_start", "elm.dragable.handler");
162 get_drag(PART:"elm.dragable.handler", x, y);
164 anim(1, "animator_up", 1);
167 anim(1, "animator_down", 1);
219 name: "elm/slidingdrawer/left/default";
221 image: "slidingdrawer_left_handler.png" COMP;
222 image: "slidingdrawer_left_handler_bar.png" COMP;
225 public g_mouse_state = 0;
226 public animator_right(val, Float:step) {
229 get_drag(PART:"elm.dragable.handler", vx, vy);
233 set_drag(PART:"elm.dragable.handler", vx, 1.0);
235 public animator_left(val, Float:step) {
238 get_drag(PART:"elm.dragable.handler", vx, vy);
242 set_drag(PART:"elm.dragable.handler", vx, 1.0);
247 name: "elm.swallow.dragable_rect";
260 rel1 {to:"elm.swallow.content";}
261 rel2 {to:"elm.swallow.content";}
262 color: SLIDINGDRAWER_BG_COLOR;
266 name: "elm.swallow.content";
270 rel2 {to: "elm.dragable.handler"; relative: 0 1;}
279 rel1 {to: "elm.dragable.handler";}
280 rel2 {to: "elm.dragable.handler";}
282 normal: "slidingdrawer_left_handler_bar.png";
287 name: "elm.dragable.handler";
292 confine: "elm.swallow.dragable_rect";
297 min: SLIDINGDRAWER_LEFTRIGHT_HANDLER_WIDTH 1;
300 rel1 {relative: 1 0; to: "elm.swallow.dragable_rect";}
301 rel2 {relative: 1 1; to: "elm.swallow.dragable_rect";}
305 name: "elm.image.handler";
310 min: SLIDINGDRAWER_HANDLER_HEIGHT SLIDINGDRAWER_HANDLER_WIDTH;
311 max: SLIDINGDRAWER_HANDLER_HEIGHT SLIDINGDRAWER_HANDLER_WIDTH;
315 normal: "slidingdrawer_left_handler.png";
317 rel1 {to:"elm.dragable.handler";}
318 rel2 {to:"elm.dragable.handler";}
324 name: "drag_handler";
326 source: "elm.dragable.handler";
328 set_int (g_mouse_state, 1);
332 name: "down_handler";
333 signal: "mouse,down,*";
334 source: "elm.dragable.handler";
336 set_int (g_mouse_state, 0);
340 name: "handler_clicked";
341 signal: "mouse,clicked,1";
342 source: "elm.dragable.handler";
346 if (get_int(g_mouse_state) == 0) {
347 emit("animation_start", "elm.dragable.handler");
348 get_drag(PART:"elm.dragable.handler", x, y);
350 anim(1, "animator_right", 1);
353 anim(1, "animator_left", 1);
361 name: "elm/slidingdrawer/top/default";
363 image: "slidingdrawer_top_handler.png" COMP;
364 image: "slidingdrawer_top_handler_bar.png" COMP;
367 public g_mouse_state = 0;
368 public animator_up(val, Float:step) {
371 get_drag(PART:"elm.dragable.handler", vx, vy);
375 set_drag(PART:"elm.dragable.handler", 1.0, vy);
377 public animator_down(val, Float:step) {
380 get_drag(PART:"elm.dragable.handler", vx, vy);
384 set_drag(PART:"elm.dragable.handler", 1.0, vy);
389 name: "elm.swallow.dragable_rect";
402 rel1 {to:"elm.swallow.content";}
403 rel2 {to:"elm.swallow.content";}
404 color: SLIDINGDRAWER_BG_COLOR;
408 name: "elm.swallow.content";
412 rel2 {to: "elm.dragable.handler"; relative: 1 0;}
421 rel1 {to: "elm.dragable.handler";}
422 rel2 {to: "elm.dragable.handler";}
424 normal: "slidingdrawer_top_handler_bar.png";
429 name: "elm.dragable.handler";
434 confine: "elm.swallow.dragable_rect";
439 min: 1 SLIDINGDRAWER_TOPDOWN_HANDLER_HEIGHT;
442 rel1 {relative: 0 1; to: "elm.swallow.dragable_rect";}
443 rel2 {relative: 1 1; to: "elm.swallow.dragable_rect";}
447 name: "elm.image.handler";
452 min: SLIDINGDRAWER_HANDLER_WIDTH SLIDINGDRAWER_HANDLER_HEIGHT;
453 max: SLIDINGDRAWER_HANDLER_WIDTH SLIDINGDRAWER_HANDLER_HEIGHT;
457 normal: "slidingdrawer_top_handler.png";
459 rel1 {to:"elm.dragable.handler";}
460 rel2 {to:"elm.dragable.handler";}
466 name: "drag_handler";
468 source: "elm.dragable.handler";
470 set_int (g_mouse_state, 1);
474 name: "down_handler";
475 signal: "mouse,down,*";
476 source: "elm.dragable.handler";
478 set_int (g_mouse_state, 0);
482 name: "handler_clicked";
483 signal: "mouse,clicked,1";
484 source: "elm.dragable.handler";
488 if (get_int(g_mouse_state) == 0) {
489 emit("animation_start", "elm.dragable.handler");
490 get_drag(PART:"elm.dragable.handler", x, y);
492 anim(1, "animator_down", 1);
495 anim(1, "animator_up", 1);
505 name: "elm/slidingdrawer/right/default";
507 image: "slidingdrawer_right_handler.png" COMP;
508 image: "slidingdrawer_right_handler_bar.png" COMP;
511 public g_mouse_state = 0;
512 public animator_right(val, Float:step) {
515 get_drag(PART:"elm.dragable.handler", vx, vy);
519 set_drag(PART:"elm.dragable.handler", vx, 1.0);
521 public animator_left(val, Float:step) {
524 get_drag(PART:"elm.dragable.handler", vx, vy);
528 set_drag(PART:"elm.dragable.handler", vx, 1.0);
533 name: "elm.swallow.dragable_rect";
546 rel1 {to:"elm.swallow.content";}
547 rel2 {to:"elm.swallow.content";}
548 color: SLIDINGDRAWER_BG_COLOR;
552 name: "elm.swallow.content";
556 rel1 {to: "elm.dragable.handler"; relative: 1 0;}
565 rel1 {to: "elm.dragable.handler";}
566 rel2 {to: "elm.dragable.handler";}
568 normal: "slidingdrawer_right_handler_bar.png";
573 name: "elm.dragable.handler";
578 confine: "elm.swallow.dragable_rect";
583 min: SLIDINGDRAWER_LEFTRIGHT_HANDLER_WIDTH 1;
586 rel1 {relative: 0 0; to: "elm.swallow.dragable_rect";}
587 rel2 {relative: 0 1; to: "elm.swallow.dragable_rect";}
591 name: "elm.image.handler";
596 min: SLIDINGDRAWER_HANDLER_HEIGHT SLIDINGDRAWER_HANDLER_WIDTH;
597 max: SLIDINGDRAWER_HANDLER_HEIGHT SLIDINGDRAWER_HANDLER_WIDTH;
601 normal: "slidingdrawer_right_handler.png";
603 rel1 {to:"elm.dragable.handler";}
604 rel2 {to:"elm.dragable.handler";}
610 name: "drag_handler";
612 source: "elm.dragable.handler";
614 set_int (g_mouse_state, 1);
618 name: "down_handler";
619 signal: "mouse,down,*";
620 source: "elm.dragable.handler";
622 set_int (g_mouse_state, 0);
626 name: "handler_clicked";
627 signal: "mouse,clicked,1";
628 source: "elm.dragable.handler";
632 if (get_int(g_mouse_state) == 0) {
633 emit("animation_start", "elm.dragable.handler");
634 get_drag(PART:"elm.dragable.handler", x, y);
636 anim(1, "animator_right", 1);
639 anim(1, "animator_left", 1);