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;
111 rel1.to: "whole_left";
112 rel2.to: "whole_left";
117 inherit: "default" 0.0;
118 rel1.relative: -1.0 0.0;
119 rel2.relative: 0.0 1.0;
129 state: "default" 0.0;
142 name: "elm.swallow.right";
144 clip_to: "whole_right";
147 state: "default" 0.0;
149 rel1.to: "whole_right";
150 rel2.to: "whole_right";
154 part { name: "elm.bar";
162 description { state: "default" 0.0;
163 min: PANES_STYLE_DEFAULT_MOVABLE_SIZE_INC 999999;
166 rel1.relative: 0.0 0.5;
167 rel2.relative: 1.0 0.5;
170 description { state: "default" 0.1;
171 inherit: "default" 0.0;
174 description { state: "disabled" 0.0;
175 inherit: "default" 0.0;
176 min: PANES_STYLE_DEFAULT_FIXED_SIZE_INC 999999;
178 description { state: "disabled" 0.1;
179 inherit: "default" 0.1;
182 part { name: "pad_bar_left";
186 description { state: "default" 0.0;
187 min: PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC 0;
189 rel1.to_x: "elm.bar";
199 inherit: "default" 0.0;
203 part { name: "pad_bar_right";
207 description { state: "default" 0.0;
208 min: PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC 0;
214 rel2.to_x: "elm.bar";
220 inherit: "default" 0.0;
224 part { name: "bar_bg";
227 description { state: "default" 0.0;
230 to_x: "pad_bar_left";
234 to_x: "pad_bar_right";
238 normal: "00_splite_handler_bg_v.png";
243 description { state: "clicked" 0.0;
244 inherit: "default" 0.0;
245 image.normal: "00_splite_handler_bg_press.png";
248 part { name:"bar_handler";
250 description { state:"default" 0.0;
260 min: 0 PANES_STYLE_DEFAULT_MIDDLE_SIZE_INC;
261 image.normal: "00_splite_handler_v.png";
263 description { state:"clicked" 0.0;
264 inherit: "default" 0.0;
266 description { state: "disabled" 0.0;
267 inherit: "default" 0.0;
271 part { name: "over2";
275 ignore_flags: ON_HOLD;
276 description { state: "default" 0.0;
281 description { state: "disabled" 0.0;
282 inherit: "default" 0.0;
286 part { name: "over3";
290 description { state: "default" 0.0;
295 description { state: "clicked" 0.0;
296 inherit: "default" 0.0;
299 part { name:"bar_disabled";
301 description { state:"default" 0.0;
302 rel1.to_x: "elm.bar";
303 rel2.to_x: "elm.bar";
307 description { state: "disabled" 0.0;
308 inherit: "default" 0.0;
314 public state_pair = 1; //0:both contents are not set, 1:both contents are set
315 public frame_num, whole_drag;
317 public drag_effect(val) {
318 new Float:time, Float:cur_drag, Float:drag;
321 num = get_int(frame_num);
322 drag = get_float(whole_drag);
325 time = 0.06 * num; // decide speed
326 cur_drag = drag - drag * sin(time * 90, DEGREES);
328 set_int(frame_num, num);
330 if (time < 1.0 && cur_drag > 0.0) {
331 set_drag(PART:"elm.bar", cur_drag, 0.0);
332 timer(0.02, "drag_effect", val);
335 set_drag(PART:"elm.bar", 0.0, 0.0);
336 run_program(PROGRAM:"left_content_reset");
346 set_int(state_pair, 1);
350 name: "drag_effect_start";
351 signal: "left,hide,effect";
354 new Float:x, Float:y;
356 get_drag(PART:"elm.bar", x, y);
357 set_float(whole_drag, x);
358 set_int(frame_num, 0);
360 timer(0.02, "drag_effect", 0);
362 after: "left_content_hide";
365 name: "left_content_hide";
366 action: STATE_SET "hide" 0.0;
367 transition: DECELERATE 0.4;
368 target: "elm.swallow.left";
369 target: "whole_left";
372 name: "left_content_reset";
373 action: STATE_SET "default" 0.0;
374 target: "elm.swallow.left";
375 target: "whole_left";
376 after: "effect_finished";
379 name: "effect_finished";
380 action: SIGNAL_EMIT "left,hide,effect,finished" "";
384 signal: "elm,panes,pair";
389 set_int(state_pair, 1);
390 get_state(PART:"elm.bar", st, 30, vl);
391 set_state(PART:"elm.bar", st, 0.0);
392 set_state(PART:"pad_left", "default", 0.0);
393 set_state(PART:"pad_right", "default", 0.0);
394 set_state(PART:"pad_bar_left", "default", 0.0);
395 set_state(PART:"pad_bar_right", "default", 0.0);
399 name: "panes_unpair";
400 signal: "elm,panes,unpair";
405 set_int(state_pair, 0);
406 get_state(PART:"elm.bar", st, 30, vl);
407 set_state(PART:"elm.bar", st, 0.1);
408 set_state(PART:"pad_left", "hidden", 0.0);
409 set_state(PART:"pad_right", "hidden", 0.0);
410 set_state(PART:"pad_bar_left", "hidden", 0.0);
411 set_state(PART:"pad_bar_right", "hidden", 0.0);
415 name: "button_click";
416 signal: "mouse,down,1";
418 action: SIGNAL_EMIT "elm,action,press" "";
419 after: "button_click_anim";
422 name: "button_click_anim";
424 set_state(PART:"bar_bg", "clicked", 0.0);
428 name: "button_unclick";
429 signal: "mouse,up,1";
431 action: SIGNAL_EMIT "elm,action,unpress" "";
432 after: "button_unclick_anim";
435 name: "button_unclick_anim";
437 set_state(PART:"bar_bg", "default", 0.0);
441 name: "button_click2";
442 signal: "mouse,down,1";
444 action: STATE_SET "clicked" 0.0;
448 name: "button_unclick2";
449 signal: "mouse,up,1";
451 action: STATE_SET "default" 0.0;
452 transition: DECELERATE 0.5;
456 name: "button_unclick3";
457 signal: "mouse,up,1";
459 action: SIGNAL_EMIT "elm,action,click" "";
462 name: "button_down_double";
463 signal: "mouse,down,1,double";
465 action: SIGNAL_EMIT "elm,action,click,double" "";
470 signal: "elm.panes.fixed";
472 action: STATE_SET "disabled" 0.0;
473 target: "bar_disabled";
474 target: "bar_handler";
475 after: "after_fixed";
480 if (get_int(state_pair))
481 set_state(PART:"elm.bar", "disabled", 0.0);
483 set_state(PART:"elm.bar", "disabled", 0.1);
486 //allow the movement by interaction
488 name: "panes_unfixed";
489 signal: "elm.panes.unfixed";
491 action: STATE_SET "default" 0.0;
492 target: "bar_disabled";
493 target: "bar_handler";
494 after: "after_unfixed";
497 name: "after_unfixed";
499 if (get_int(state_pair))
500 set_state(PART:"elm.bar", "default", 0.0);
502 set_state(PART:"elm.bar", "default", 0.1);
509 name: "elm/panes/horizontal/default";
511 image: "00_splite_handler_bg_h.png" COMP;
512 image: "00_splite_handler_bg_press.png" COMP;
513 image: "00_splite_handler_h.png" COMP;
516 public state_pair = 1; //0:both contents are not set, 1:both contents are set
526 state: "default" 0.0;
528 rel1.to_y: "pad_left";
529 rel2.to_y: "pad_right";
537 state: "default" 0.0;
538 rel2.relative:1.0 0.0;
539 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
546 inherit: "default" 0.0;
555 state: "default" 0.0;
556 rel1.relative: 0.0 1.0;
557 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
564 inherit: "default" 0.0;
576 state: "default" 0.0;
589 name: "elm.swallow.left";
591 clip_to: "whole_left";
594 state: "default" 0.0;
596 rel1.to: "whole_left";
597 rel2.to: "whole_left";
607 state: "default" 0.0;
620 name: "elm.swallow.right";
622 clip_to: "whole_right";
625 state: "default" 0.0;
627 rel1.to: "whole_right";
628 rel2.to: "whole_right";
632 part { name: "elm.bar";
640 description { state: "default" 0.0;
641 min: 999999 PANES_STYLE_DEFAULT_MOVABLE_SIZE_INC;
644 rel1.relative: 0.5 0.0;
645 rel2.relative: 0.5 1.0;
648 description { state: "default" 0.1;
649 inherit: "default" 0.0;
652 description { state: "disabled" 0.0;
653 inherit: "default" 0.0;
654 min: 999999 PANES_STYLE_DEFAULT_FIXED_SIZE_INC;
657 description { state: "disabled" 0.1;
658 inherit: "default" 0.1;
661 part { name: "pad_bar_left";
665 description { state: "default" 0.0;
666 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
668 rel1.to_y: "elm.bar";
678 inherit: "default" 0.0;
682 part { name: "pad_bar_right";
686 description { state: "default" 0.0;
687 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
693 rel2.to_y: "elm.bar";
698 state: "visible" 0.0;
699 inherit: "default" 0.0;
703 part { name: "bar_bg";
706 description { state: "default" 0.0;
709 to_y: "pad_bar_left";
713 to_y: "pad_bar_right";
717 normal: "00_splite_handler_bg_h.png";
722 description { state: "clicked" 0.0;
723 inherit: "default" 0.0;
724 image.normal: "00_splite_handler_bg_press.png";
727 part { name:"bar_handler";
729 description { state:"default" 0.0;
739 min: PANES_STYLE_DEFAULT_MIDDLE_SIZE_INC 0;
740 image.normal: "00_splite_handler_h.png";
742 description { state:"clicked" 0.0;
743 inherit: "default" 0.0;
745 description { state: "disabled" 0.0;
746 inherit: "default" 0.0;
750 part { name: "over2";
754 ignore_flags: ON_HOLD;
755 description { state: "default" 0.0;
760 description { state: "disabled" 0.0;
761 inherit: "default" 0.0;
765 part { name: "over3";
769 description { state: "default" 0.0;
774 description { state: "clicked" 0.0;
775 inherit: "default" 0.0;
778 part { name:"bar_disabled";
780 description { state:"default" 0.0;
781 rel1.to_y: "elm.bar";
782 rel2.to_y: "elm.bar";
786 description { state: "disabled" 0.0;
787 inherit: "default" 0.0;
798 set_int(state_pair, 1);
803 signal: "elm,panes,pair";
808 set_int(state_pair, 1);
809 get_state(PART:"elm.bar", st, 30, vl);
810 set_state(PART:"elm.bar", st, 0.0);
811 set_state(PART:"pad_left", "default", 0.0);
812 set_state(PART:"pad_right", "default", 0.0);
813 set_state(PART:"pad_bar_left", "default", 0.0);
814 set_state(PART:"pad_bar_right", "default", 0.0);
818 name: "panes_unpair";
819 signal: "elm,panes,unpair";
824 set_int(state_pair, 0);
825 get_state(PART:"elm.bar", st, 30, vl);
826 set_state(PART:"elm.bar", st, 0.1);
827 set_state(PART:"pad_left", "hidden", 0.0);
828 set_state(PART:"pad_right", "hidden", 0.0);
829 set_state(PART:"pad_bar_left", "hidden", 0.0);
830 set_state(PART:"pad_bar_right", "hidden", 0.0);
834 name: "button_click";
835 signal: "mouse,down,1";
837 action: SIGNAL_EMIT "elm,action,press" "";
838 after: "button_click_anim";
841 name: "button_click_anim";
843 set_state(PART:"bar_bg", "clicked", 0.0);
847 name: "button_unclick";
848 signal: "mouse,up,1";
850 action: SIGNAL_EMIT "elm,action,unpress" "";
851 after: "button_unclick_anim";
854 name: "button_unclick_anim";
856 set_state(PART:"bar_bg", "default", 0.0);
860 name: "button_click2";
861 signal: "mouse,down,1";
863 action: STATE_SET "clicked" 0.0;
867 name: "button_unclick2";
868 signal: "mouse,up,1";
870 action: STATE_SET "default" 0.0;
871 transition: DECELERATE 0.5;
875 name: "button_unclick3";
876 signal: "mouse,up,1";
878 action: SIGNAL_EMIT "elm,action,click" "";
881 name: "button_down_double";
882 signal: "mouse,down,1,double";
884 action: SIGNAL_EMIT "elm,action,click,double" "";
889 signal: "elm.panes.fixed";
891 action: STATE_SET "disabled" 0.0;
892 target: "bar_disabled";
893 target: "bar_handler";
894 after: "after_fixed";
899 if (get_int(state_pair))
900 set_state(PART:"elm.bar", "disabled", 0.0);
902 set_state(PART:"elm.bar", "disabled", 0.1);
905 //allow the movement by interaction
907 name: "panes_unfixed";
908 signal: "elm.panes.unfixed";
910 action: STATE_SET "default" 0.0;
911 target: "bar_disabled";
912 target: "bar_handler";
913 after: "after_unfixed";
916 name: "after_unfixed";
918 if (get_int(state_pair))
919 set_state(PART:"elm.bar", "default", 0.0);
921 set_state(PART:"elm.bar", "default", 0.1);