3 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 name: "elm/panes/vertical/default";
23 image: "00_splite_handler_bg_v.png" COMP;
24 image: "00_splite_handler_bg_press.png" COMP;
25 image: "00_splite_handler_v.png" COMP;
37 rel1.to_x: "pad_left";
38 rel2.to_x: "pad_right";
47 rel2.relative:0.0 1.0;
48 min: PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC 0;
55 inherit: "default" 0.0;
65 rel1.relative: 1.0 0.0;
66 min: PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC 0;
73 inherit: "default" 0.0;
98 inherit: "default" 0.0;
104 name: "elm.swallow.left";
106 clip_to: "whole_left";
109 state: "default" 0.0;
110 rel1.to: "whole_left";
111 rel2.to: "whole_left";
116 inherit: "default" 0.0;
117 rel1.relative: -1.0 0.0;
118 rel2.relative: 0.0 1.0;
128 state: "default" 0.0;
141 name: "elm.swallow.right";
143 clip_to: "whole_right";
146 state: "default" 0.0;
147 rel1.to: "whole_right";
148 rel2.to: "whole_right";
152 part { name: "elm.bar";
160 description { state: "default" 0.0;
161 min: PANES_STYLE_DEFAULT_MOVABLE_SIZE_INC 999999;
164 rel1.relative: 0.0 0.5;
165 rel2.relative: 1.0 0.5;
168 description { state: "default" 0.1;
169 inherit: "default" 0.0;
172 description { state: "disabled" 0.0;
173 inherit: "default" 0.0;
174 min: PANES_STYLE_DEFAULT_FIXED_SIZE_INC 999999;
176 description { state: "disabled" 0.1;
177 inherit: "default" 0.1;
180 part { name: "pad_bar_left";
184 description { state: "default" 0.0;
185 min: PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC 0;
187 rel1.to_x: "elm.bar";
197 inherit: "default" 0.0;
201 part { name: "pad_bar_right";
205 description { state: "default" 0.0;
206 min: PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC 0;
212 rel2.to_x: "elm.bar";
218 inherit: "default" 0.0;
222 part { name: "bar_bg";
225 description { state: "default" 0.0;
228 to_x: "pad_bar_left";
232 to_x: "pad_bar_right";
235 image.normal: "00_splite_handler_bg_v.png";
237 description { state: "clicked" 0.0;
238 inherit: "default" 0.0;
239 image.normal: "00_splite_handler_bg_press.png";
242 part { name:"bar_handler";
244 description { state:"default" 0.0;
254 min: 0 PANES_STYLE_DEFAULT_MIDDLE_SIZE_INC;
255 image.normal: "00_splite_handler_v.png";
257 description { state:"clicked" 0.0;
258 inherit: "default" 0.0;
260 description { state: "disabled" 0.0;
261 inherit: "default" 0.0;
264 part { name: "over2";
267 ignore_flags: ON_HOLD;
268 description { state: "default" 0.0;
272 description { state: "disabled" 0.0;
273 inherit: "default" 0.0;
277 part { name: "over3";
280 description { state: "default" 0.0;
284 description { state: "clicked" 0.0;
285 inherit: "default" 0.0;
288 part { name:"bar_disabled";
290 description { state:"default" 0.0;
291 rel1.to_x: "elm.bar";
292 rel2.to_x: "elm.bar";
296 description { state: "disabled" 0.0;
297 inherit: "default" 0.0;
303 public state_pair = 1; //0:both contents are not set, 1:both contents are set
304 public frame_num, whole_drag;
306 public drag_effect(val) {
307 new Float:time, Float:cur_drag, Float:drag;
310 num = get_int(frame_num);
311 drag = get_float(whole_drag);
314 time = 0.06 * num; // decide speed
315 cur_drag = drag - drag * sin(time * 90, DEGREES);
317 set_int(frame_num, num);
319 if (time < 1.0 && cur_drag > 0.0) {
320 set_drag(PART:"elm.bar", cur_drag, 0.0);
321 timer(0.02, "drag_effect", val);
324 set_drag(PART:"elm.bar", 0.0, 0.0);
325 run_program(PROGRAM:"left_content_reset");
331 name: "drag_effect_start";
332 signal: "elm,panes,left,hide";
335 new Float:x, Float:y;
337 get_drag(PART:"elm.bar", x, y);
338 set_float(whole_drag, x);
339 set_int(frame_num, 0);
341 timer(0.02, "drag_effect", 0);
343 after: "left_content_hide";
346 name: "left_content_hide";
347 action: STATE_SET "hide" 0.0;
348 transition: DECELERATE 0.4;
349 target: "elm.swallow.left";
350 target: "whole_left";
353 name: "left_content_reset";
354 action: STATE_SET "default" 0.0;
355 target: "elm.swallow.left";
356 target: "whole_left";
360 signal: "elm,panes,pair";
365 set_int(state_pair, 1);
366 get_state(PART:"elm.bar", st, 30, vl);
367 set_state(PART:"elm.bar", st, 0.0);
368 set_state(PART:"pad_left", "default", 0.0);
369 set_state(PART:"pad_right", "default", 0.0);
370 set_state(PART:"pad_bar_left", "default", 0.0);
371 set_state(PART:"pad_bar_right", "default", 0.0);
375 name: "panes_unpair";
376 signal: "elm,panes,unpair";
381 set_int(state_pair, 0);
382 get_state(PART:"elm.bar", st, 30, vl);
383 set_state(PART:"elm.bar", st, 0.1);
384 set_state(PART:"pad_left", "hidden", 0.0);
385 set_state(PART:"pad_right", "hidden", 0.0);
386 set_state(PART:"pad_bar_left", "hidden", 0.0);
387 set_state(PART:"pad_bar_right", "hidden", 0.0);
391 name: "button_click";
392 signal: "mouse,down,1";
394 action: SIGNAL_EMIT "elm,action,press" "";
395 after: "button_click_anim";
398 name: "button_click_anim";
400 set_state(PART:"bar_bg", "clicked", 0.0);
404 name: "button_unclick";
405 signal: "mouse,up,1";
407 action: SIGNAL_EMIT "elm,action,unpress" "";
408 after: "button_unclick_anim";
411 name: "button_unclick_anim";
413 set_state(PART:"bar_bg", "default", 0.0);
417 name: "button_click2";
418 signal: "mouse,down,1";
420 action: STATE_SET "clicked" 0.0;
424 name: "button_unclick2";
425 signal: "mouse,up,1";
427 action: STATE_SET "default" 0.0;
428 transition: DECELERATE 0.5;
432 name: "button_unclick3";
433 signal: "mouse,up,1";
435 action: SIGNAL_EMIT "elm,action,click" "";
438 name: "button_down_double";
439 signal: "mouse,down,1,double";
441 action: SIGNAL_EMIT "elm,action,click,double" "";
446 signal: "elm.panes.fixed";
448 action: STATE_SET "disabled" 0.0;
449 target: "bar_disabled";
450 after: "after_fixed";
455 if (get_int(state_pair))
456 set_state(PART:"elm.bar", "disabled", 0.0);
458 set_state(PART:"elm.bar", "disabled", 0.1);
461 //allow the movement by interaction
463 name: "panes_unfixed";
464 signal: "elm.panes.unfixed";
466 action: STATE_SET "default" 0.0;
467 target: "bar_disabled";
468 after: "after_unfixed";
471 name: "after_unfixed";
473 if (get_int(state_pair))
474 set_state(PART:"elm.bar", "default", 0.0);
476 set_state(PART:"elm.bar", "default", 0.1);
483 name: "elm/panes/horizontal/default";
485 image: "00_splite_handler_bg_h.png" COMP;
486 image: "00_splite_handler_bg_press.png" COMP;
487 image: "00_splite_handler_h.png" COMP;
490 public state_pair = 1; //0:both contents are not set, 1:both contents are set
500 state: "default" 0.0;
502 rel1.to_y: "pad_left";
503 rel2.to_y: "pad_right";
511 state: "default" 0.0;
512 rel2.relative:1.0 0.0;
513 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
520 inherit: "default" 0.0;
529 state: "default" 0.0;
530 rel1.relative: 0.0 1.0;
531 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
538 inherit: "default" 0.0;
550 state: "default" 0.0;
563 name: "elm.swallow.left";
565 clip_to: "whole_left";
568 state: "default" 0.0;
569 rel1.to: "whole_left";
570 rel2.to: "whole_left";
580 state: "default" 0.0;
593 name: "elm.swallow.right";
595 clip_to: "whole_right";
598 state: "default" 0.0;
599 rel1.to: "whole_right";
600 rel2.to: "whole_right";
604 part { name: "elm.bar";
612 description { state: "default" 0.0;
613 min: 999999 PANES_STYLE_DEFAULT_MOVABLE_SIZE_INC;
616 rel1.relative: 0.5 0.0;
617 rel2.relative: 0.5 1.0;
620 description { state: "default" 0.1;
621 inherit: "default" 0.0;
624 description { state: "disabled" 0.0;
625 inherit: "default" 0.0;
626 min: 999999 PANES_STYLE_DEFAULT_FIXED_SIZE_INC;
629 description { state: "disabled" 0.1;
630 inherit: "default" 0.1;
633 part { name: "pad_bar_left";
637 description { state: "default" 0.0;
638 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
640 rel1.to_y: "elm.bar";
650 inherit: "default" 0.0;
654 part { name: "pad_bar_right";
658 description { state: "default" 0.0;
659 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
665 rel2.to_y: "elm.bar";
670 state: "visible" 0.0;
671 inherit: "default" 0.0;
675 part { name: "bar_bg";
678 description { state: "default" 0.0;
681 to_y: "pad_bar_left";
685 to_y: "pad_bar_right";
688 image.normal: "00_splite_handler_bg_h.png";
690 description { state: "clicked" 0.0;
691 inherit: "default" 0.0;
692 image.normal: "00_splite_handler_bg_press.png";
695 part { name:"bar_handler";
697 description { state:"default" 0.0;
707 min: PANES_STYLE_DEFAULT_MIDDLE_SIZE_INC 0;
708 image.normal: "00_splite_handler_h.png";
710 description { state:"clicked" 0.0;
711 inherit: "default" 0.0;
713 description { state: "disabled" 0.0;
714 inherit: "default" 0.0;
717 part { name: "over2";
720 ignore_flags: ON_HOLD;
721 description { state: "default" 0.0;
725 description { state: "disabled" 0.0;
726 inherit: "default" 0.0;
730 part { name: "over3";
733 description { state: "default" 0.0;
737 description { state: "clicked" 0.0;
738 inherit: "default" 0.0;
741 part { name:"bar_disabled";
743 description { state:"default" 0.0;
744 rel1.to_y: "elm.bar";
745 rel2.to_y: "elm.bar";
749 description { state: "disabled" 0.0;
750 inherit: "default" 0.0;
758 signal: "elm,panes,pair";
763 set_int(state_pair, 1);
764 get_state(PART:"elm.bar", st, 30, vl);
765 set_state(PART:"elm.bar", st, 0.0);
766 set_state(PART:"pad_left", "default", 0.0);
767 set_state(PART:"pad_right", "default", 0.0);
768 set_state(PART:"pad_bar_left", "default", 0.0);
769 set_state(PART:"pad_bar_right", "default", 0.0);
773 name: "panes_unpair";
774 signal: "elm,panes,unpair";
779 set_int(state_pair, 0);
780 get_state(PART:"elm.bar", st, 30, vl);
781 set_state(PART:"elm.bar", st, 0.1);
782 set_state(PART:"pad_left", "hidden", 0.0);
783 set_state(PART:"pad_right", "hidden", 0.0);
784 set_state(PART:"pad_bar_left", "hidden", 0.0);
785 set_state(PART:"pad_bar_right", "hidden", 0.0);
789 name: "button_click";
790 signal: "mouse,down,1";
792 action: SIGNAL_EMIT "elm,action,press" "";
793 after: "button_click_anim";
796 name: "button_click_anim";
798 set_state(PART:"bar_bg", "clicked", 0.0);
802 name: "button_unclick";
803 signal: "mouse,up,1";
805 action: SIGNAL_EMIT "elm,action,unpress" "";
806 after: "button_unclick_anim";
809 name: "button_unclick_anim";
811 set_state(PART:"bar_bg", "default", 0.0);
815 name: "button_click2";
816 signal: "mouse,down,1";
818 action: STATE_SET "clicked" 0.0;
822 name: "button_unclick2";
823 signal: "mouse,up,1";
825 action: STATE_SET "default" 0.0;
826 transition: DECELERATE 0.5;
830 name: "button_unclick3";
831 signal: "mouse,up,1";
833 action: SIGNAL_EMIT "elm,action,click" "";
836 name: "button_down_double";
837 signal: "mouse,down,1,double";
839 action: SIGNAL_EMIT "elm,action,click,double" "";
844 signal: "elm.panes.fixed";
846 action: STATE_SET "disabled" 0.0;
847 target: "bar_disabled";
848 after: "after_fixed";
853 if (get_int(state_pair))
854 set_state(PART:"elm.bar", "disabled", 0.0);
856 set_state(PART:"elm.bar", "disabled", 0.1);
859 //allow the movement by interaction
861 name: "panes_unfixed";
862 signal: "elm.panes.unfixed";
864 action: STATE_SET "default" 0.0;
865 target: "bar_disabled";
866 after: "after_unfixed";
869 name: "after_unfixed";
871 if (get_int(state_pair))
872 set_state(PART:"elm.bar", "default", 0.0);
874 set_state(PART:"elm.bar", "default", 0.1);