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";
236 normal: "00_splite_handler_bg_v.png";
241 description { state: "clicked" 0.0;
242 inherit: "default" 0.0;
243 image.normal: "00_splite_handler_bg_press.png";
246 part { name:"bar_handler";
248 description { state:"default" 0.0;
258 min: 0 PANES_STYLE_DEFAULT_MIDDLE_SIZE_INC;
259 image.normal: "00_splite_handler_v.png";
261 description { state:"clicked" 0.0;
262 inherit: "default" 0.0;
264 description { state: "disabled" 0.0;
265 inherit: "default" 0.0;
269 part { name: "over2";
273 ignore_flags: ON_HOLD;
274 description { state: "default" 0.0;
279 description { state: "disabled" 0.0;
280 inherit: "default" 0.0;
284 part { name: "over3";
288 description { state: "default" 0.0;
293 description { state: "clicked" 0.0;
294 inherit: "default" 0.0;
297 part { name:"bar_disabled";
299 description { state:"default" 0.0;
300 rel1.to_x: "elm.bar";
301 rel2.to_x: "elm.bar";
305 description { state: "disabled" 0.0;
306 inherit: "default" 0.0;
312 public state_pair = 1; //0:both contents are not set, 1:both contents are set
313 public frame_num, whole_drag;
315 public drag_effect(val) {
316 new Float:time, Float:cur_drag, Float:drag;
319 num = get_int(frame_num);
320 drag = get_float(whole_drag);
323 time = 0.06 * num; // decide speed
324 cur_drag = drag - drag * sin(time * 90, DEGREES);
326 set_int(frame_num, num);
328 if (time < 1.0 && cur_drag > 0.0) {
329 set_drag(PART:"elm.bar", cur_drag, 0.0);
330 timer(0.02, "drag_effect", val);
333 set_drag(PART:"elm.bar", 0.0, 0.0);
334 run_program(PROGRAM:"left_content_reset");
344 set_int(state_pair, 1);
348 name: "drag_effect_start";
349 signal: "left,hide,effect";
352 new Float:x, Float:y;
354 get_drag(PART:"elm.bar", x, y);
355 set_float(whole_drag, x);
356 set_int(frame_num, 0);
358 timer(0.02, "drag_effect", 0);
360 after: "left_content_hide";
363 name: "left_content_hide";
364 action: STATE_SET "hide" 0.0;
365 transition: DECELERATE 0.4;
366 target: "elm.swallow.left";
367 target: "whole_left";
370 name: "left_content_reset";
371 action: STATE_SET "default" 0.0;
372 target: "elm.swallow.left";
373 target: "whole_left";
374 after: "effect_finished";
377 name: "effect_finished";
378 action: SIGNAL_EMIT "left,hide,effect,finished" "";
382 signal: "elm,panes,pair";
387 set_int(state_pair, 1);
388 get_state(PART:"elm.bar", st, 30, vl);
389 set_state(PART:"elm.bar", st, 0.0);
390 set_state(PART:"pad_left", "default", 0.0);
391 set_state(PART:"pad_right", "default", 0.0);
392 set_state(PART:"pad_bar_left", "default", 0.0);
393 set_state(PART:"pad_bar_right", "default", 0.0);
397 name: "panes_unpair";
398 signal: "elm,panes,unpair";
403 set_int(state_pair, 0);
404 get_state(PART:"elm.bar", st, 30, vl);
405 set_state(PART:"elm.bar", st, 0.1);
406 set_state(PART:"pad_left", "hidden", 0.0);
407 set_state(PART:"pad_right", "hidden", 0.0);
408 set_state(PART:"pad_bar_left", "hidden", 0.0);
409 set_state(PART:"pad_bar_right", "hidden", 0.0);
413 name: "button_click";
414 signal: "mouse,down,1";
416 action: SIGNAL_EMIT "elm,action,press" "";
417 after: "button_click_anim";
420 name: "button_click_anim";
422 set_state(PART:"bar_bg", "clicked", 0.0);
426 name: "button_unclick";
427 signal: "mouse,up,1";
429 action: SIGNAL_EMIT "elm,action,unpress" "";
430 after: "button_unclick_anim";
433 name: "button_unclick_anim";
435 set_state(PART:"bar_bg", "default", 0.0);
439 name: "button_click2";
440 signal: "mouse,down,1";
442 action: STATE_SET "clicked" 0.0;
446 name: "button_unclick2";
447 signal: "mouse,up,1";
449 action: STATE_SET "default" 0.0;
450 transition: DECELERATE 0.5;
454 name: "button_unclick3";
455 signal: "mouse,up,1";
457 action: SIGNAL_EMIT "elm,action,click" "";
460 name: "button_down_double";
461 signal: "mouse,down,1,double";
463 action: SIGNAL_EMIT "elm,action,click,double" "";
468 signal: "elm.panes.fixed";
470 action: STATE_SET "disabled" 0.0;
471 target: "bar_disabled";
472 target: "bar_handler";
473 after: "after_fixed";
478 if (get_int(state_pair))
479 set_state(PART:"elm.bar", "disabled", 0.0);
481 set_state(PART:"elm.bar", "disabled", 0.1);
484 //allow the movement by interaction
486 name: "panes_unfixed";
487 signal: "elm.panes.unfixed";
489 action: STATE_SET "default" 0.0;
490 target: "bar_disabled";
491 target: "bar_handler";
492 after: "after_unfixed";
495 name: "after_unfixed";
497 if (get_int(state_pair))
498 set_state(PART:"elm.bar", "default", 0.0);
500 set_state(PART:"elm.bar", "default", 0.1);
507 name: "elm/panes/horizontal/default";
509 image: "00_splite_handler_bg_h.png" COMP;
510 image: "00_splite_handler_bg_press.png" COMP;
511 image: "00_splite_handler_h.png" COMP;
514 public state_pair = 1; //0:both contents are not set, 1:both contents are set
524 state: "default" 0.0;
526 rel1.to_y: "pad_left";
527 rel2.to_y: "pad_right";
535 state: "default" 0.0;
536 rel2.relative:1.0 0.0;
537 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
544 inherit: "default" 0.0;
553 state: "default" 0.0;
554 rel1.relative: 0.0 1.0;
555 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
562 inherit: "default" 0.0;
574 state: "default" 0.0;
587 name: "elm.swallow.left";
589 clip_to: "whole_left";
592 state: "default" 0.0;
593 rel1.to: "whole_left";
594 rel2.to: "whole_left";
604 state: "default" 0.0;
617 name: "elm.swallow.right";
619 clip_to: "whole_right";
622 state: "default" 0.0;
623 rel1.to: "whole_right";
624 rel2.to: "whole_right";
628 part { name: "elm.bar";
636 description { state: "default" 0.0;
637 min: 999999 PANES_STYLE_DEFAULT_MOVABLE_SIZE_INC;
640 rel1.relative: 0.5 0.0;
641 rel2.relative: 0.5 1.0;
644 description { state: "default" 0.1;
645 inherit: "default" 0.0;
648 description { state: "disabled" 0.0;
649 inherit: "default" 0.0;
650 min: 999999 PANES_STYLE_DEFAULT_FIXED_SIZE_INC;
653 description { state: "disabled" 0.1;
654 inherit: "default" 0.1;
657 part { name: "pad_bar_left";
661 description { state: "default" 0.0;
662 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
664 rel1.to_y: "elm.bar";
674 inherit: "default" 0.0;
678 part { name: "pad_bar_right";
682 description { state: "default" 0.0;
683 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
689 rel2.to_y: "elm.bar";
694 state: "visible" 0.0;
695 inherit: "default" 0.0;
699 part { name: "bar_bg";
702 description { state: "default" 0.0;
705 to_y: "pad_bar_left";
709 to_y: "pad_bar_right";
713 normal: "00_splite_handler_bg_h.png";
718 description { state: "clicked" 0.0;
719 inherit: "default" 0.0;
720 image.normal: "00_splite_handler_bg_press.png";
723 part { name:"bar_handler";
725 description { state:"default" 0.0;
735 min: PANES_STYLE_DEFAULT_MIDDLE_SIZE_INC 0;
736 image.normal: "00_splite_handler_h.png";
738 description { state:"clicked" 0.0;
739 inherit: "default" 0.0;
741 description { state: "disabled" 0.0;
742 inherit: "default" 0.0;
746 part { name: "over2";
750 ignore_flags: ON_HOLD;
751 description { state: "default" 0.0;
756 description { state: "disabled" 0.0;
757 inherit: "default" 0.0;
761 part { name: "over3";
765 description { state: "default" 0.0;
770 description { state: "clicked" 0.0;
771 inherit: "default" 0.0;
774 part { name:"bar_disabled";
776 description { state:"default" 0.0;
777 rel1.to_y: "elm.bar";
778 rel2.to_y: "elm.bar";
782 description { state: "disabled" 0.0;
783 inherit: "default" 0.0;
794 set_int(state_pair, 1);
799 signal: "elm,panes,pair";
804 set_int(state_pair, 1);
805 get_state(PART:"elm.bar", st, 30, vl);
806 set_state(PART:"elm.bar", st, 0.0);
807 set_state(PART:"pad_left", "default", 0.0);
808 set_state(PART:"pad_right", "default", 0.0);
809 set_state(PART:"pad_bar_left", "default", 0.0);
810 set_state(PART:"pad_bar_right", "default", 0.0);
814 name: "panes_unpair";
815 signal: "elm,panes,unpair";
820 set_int(state_pair, 0);
821 get_state(PART:"elm.bar", st, 30, vl);
822 set_state(PART:"elm.bar", st, 0.1);
823 set_state(PART:"pad_left", "hidden", 0.0);
824 set_state(PART:"pad_right", "hidden", 0.0);
825 set_state(PART:"pad_bar_left", "hidden", 0.0);
826 set_state(PART:"pad_bar_right", "hidden", 0.0);
830 name: "button_click";
831 signal: "mouse,down,1";
833 action: SIGNAL_EMIT "elm,action,press" "";
834 after: "button_click_anim";
837 name: "button_click_anim";
839 set_state(PART:"bar_bg", "clicked", 0.0);
843 name: "button_unclick";
844 signal: "mouse,up,1";
846 action: SIGNAL_EMIT "elm,action,unpress" "";
847 after: "button_unclick_anim";
850 name: "button_unclick_anim";
852 set_state(PART:"bar_bg", "default", 0.0);
856 name: "button_click2";
857 signal: "mouse,down,1";
859 action: STATE_SET "clicked" 0.0;
863 name: "button_unclick2";
864 signal: "mouse,up,1";
866 action: STATE_SET "default" 0.0;
867 transition: DECELERATE 0.5;
871 name: "button_unclick3";
872 signal: "mouse,up,1";
874 action: SIGNAL_EMIT "elm,action,click" "";
877 name: "button_down_double";
878 signal: "mouse,down,1,double";
880 action: SIGNAL_EMIT "elm,action,click,double" "";
885 signal: "elm.panes.fixed";
887 action: STATE_SET "disabled" 0.0;
888 target: "bar_disabled";
889 target: "bar_handler";
890 after: "after_fixed";
895 if (get_int(state_pair))
896 set_state(PART:"elm.bar", "disabled", 0.0);
898 set_state(PART:"elm.bar", "disabled", 0.1);
901 //allow the movement by interaction
903 name: "panes_unfixed";
904 signal: "elm.panes.unfixed";
906 action: STATE_SET "default" 0.0;
907 target: "bar_disabled";
908 target: "bar_handler";
909 after: "after_unfixed";
912 name: "after_unfixed";
914 if (get_int(state_pair))
915 set_state(PART:"elm.bar", "default", 0.0);
917 set_state(PART:"elm.bar", "default", 0.1);