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;
265 part { name: "over2";
269 ignore_flags: ON_HOLD;
270 description { state: "default" 0.0;
275 description { state: "disabled" 0.0;
276 inherit: "default" 0.0;
280 part { name: "over3";
284 description { state: "default" 0.0;
289 description { state: "clicked" 0.0;
290 inherit: "default" 0.0;
293 part { name:"bar_disabled";
295 description { state:"default" 0.0;
296 rel1.to_x: "elm.bar";
297 rel2.to_x: "elm.bar";
301 description { state: "disabled" 0.0;
302 inherit: "default" 0.0;
308 public state_pair = 1; //0:both contents are not set, 1:both contents are set
309 public frame_num, whole_drag;
311 public drag_effect(val) {
312 new Float:time, Float:cur_drag, Float:drag;
315 num = get_int(frame_num);
316 drag = get_float(whole_drag);
319 time = 0.06 * num; // decide speed
320 cur_drag = drag - drag * sin(time * 90, DEGREES);
322 set_int(frame_num, num);
324 if (time < 1.0 && cur_drag > 0.0) {
325 set_drag(PART:"elm.bar", cur_drag, 0.0);
326 timer(0.02, "drag_effect", val);
329 set_drag(PART:"elm.bar", 0.0, 0.0);
330 run_program(PROGRAM:"left_content_reset");
336 name: "drag_effect_start";
337 signal: "left,hide,effect";
340 new Float:x, Float:y;
342 get_drag(PART:"elm.bar", x, y);
343 set_float(whole_drag, x);
344 set_int(frame_num, 0);
346 timer(0.02, "drag_effect", 0);
348 after: "left_content_hide";
351 name: "left_content_hide";
352 action: STATE_SET "hide" 0.0;
353 transition: DECELERATE 0.4;
354 target: "elm.swallow.left";
355 target: "whole_left";
358 name: "left_content_reset";
359 action: STATE_SET "default" 0.0;
360 target: "elm.swallow.left";
361 target: "whole_left";
362 after: "effect_finished";
365 name: "effect_finished";
366 action: SIGNAL_EMIT "left,hide,effect,finished" "";
370 signal: "elm,panes,pair";
375 set_int(state_pair, 1);
376 get_state(PART:"elm.bar", st, 30, vl);
377 set_state(PART:"elm.bar", st, 0.0);
378 set_state(PART:"pad_left", "default", 0.0);
379 set_state(PART:"pad_right", "default", 0.0);
380 set_state(PART:"pad_bar_left", "default", 0.0);
381 set_state(PART:"pad_bar_right", "default", 0.0);
385 name: "panes_unpair";
386 signal: "elm,panes,unpair";
391 set_int(state_pair, 0);
392 get_state(PART:"elm.bar", st, 30, vl);
393 set_state(PART:"elm.bar", st, 0.1);
394 set_state(PART:"pad_left", "hidden", 0.0);
395 set_state(PART:"pad_right", "hidden", 0.0);
396 set_state(PART:"pad_bar_left", "hidden", 0.0);
397 set_state(PART:"pad_bar_right", "hidden", 0.0);
401 name: "button_click";
402 signal: "mouse,down,1";
404 action: SIGNAL_EMIT "elm,action,press" "";
405 after: "button_click_anim";
408 name: "button_click_anim";
410 set_state(PART:"bar_bg", "clicked", 0.0);
414 name: "button_unclick";
415 signal: "mouse,up,1";
417 action: SIGNAL_EMIT "elm,action,unpress" "";
418 after: "button_unclick_anim";
421 name: "button_unclick_anim";
423 set_state(PART:"bar_bg", "default", 0.0);
427 name: "button_click2";
428 signal: "mouse,down,1";
430 action: STATE_SET "clicked" 0.0;
434 name: "button_unclick2";
435 signal: "mouse,up,1";
437 action: STATE_SET "default" 0.0;
438 transition: DECELERATE 0.5;
442 name: "button_unclick3";
443 signal: "mouse,up,1";
445 action: SIGNAL_EMIT "elm,action,click" "";
448 name: "button_down_double";
449 signal: "mouse,down,1,double";
451 action: SIGNAL_EMIT "elm,action,click,double" "";
456 signal: "elm.panes.fixed";
458 action: STATE_SET "disabled" 0.0;
459 target: "bar_disabled";
460 target: "bar_handler";
461 after: "after_fixed";
466 if (get_int(state_pair))
467 set_state(PART:"elm.bar", "disabled", 0.0);
469 set_state(PART:"elm.bar", "disabled", 0.1);
472 //allow the movement by interaction
474 name: "panes_unfixed";
475 signal: "elm.panes.unfixed";
477 action: STATE_SET "default" 0.0;
478 target: "bar_disabled";
479 target: "bar_handler";
480 after: "after_unfixed";
483 name: "after_unfixed";
485 if (get_int(state_pair))
486 set_state(PART:"elm.bar", "default", 0.0);
488 set_state(PART:"elm.bar", "default", 0.1);
495 name: "elm/panes/horizontal/default";
497 image: "00_splite_handler_bg_h.png" COMP;
498 image: "00_splite_handler_bg_press.png" COMP;
499 image: "00_splite_handler_h.png" COMP;
502 public state_pair = 1; //0:both contents are not set, 1:both contents are set
512 state: "default" 0.0;
514 rel1.to_y: "pad_left";
515 rel2.to_y: "pad_right";
523 state: "default" 0.0;
524 rel2.relative:1.0 0.0;
525 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
532 inherit: "default" 0.0;
541 state: "default" 0.0;
542 rel1.relative: 0.0 1.0;
543 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
550 inherit: "default" 0.0;
562 state: "default" 0.0;
575 name: "elm.swallow.left";
577 clip_to: "whole_left";
580 state: "default" 0.0;
581 rel1.to: "whole_left";
582 rel2.to: "whole_left";
592 state: "default" 0.0;
605 name: "elm.swallow.right";
607 clip_to: "whole_right";
610 state: "default" 0.0;
611 rel1.to: "whole_right";
612 rel2.to: "whole_right";
616 part { name: "elm.bar";
624 description { state: "default" 0.0;
625 min: 999999 PANES_STYLE_DEFAULT_MOVABLE_SIZE_INC;
628 rel1.relative: 0.5 0.0;
629 rel2.relative: 0.5 1.0;
632 description { state: "default" 0.1;
633 inherit: "default" 0.0;
636 description { state: "disabled" 0.0;
637 inherit: "default" 0.0;
638 min: 999999 PANES_STYLE_DEFAULT_FIXED_SIZE_INC;
641 description { state: "disabled" 0.1;
642 inherit: "default" 0.1;
645 part { name: "pad_bar_left";
649 description { state: "default" 0.0;
650 min: 0 PANES_STYLE_DEFAULT_PADDING_LEFT_SIZE_INC;
652 rel1.to_y: "elm.bar";
662 inherit: "default" 0.0;
666 part { name: "pad_bar_right";
670 description { state: "default" 0.0;
671 min: 0 PANES_STYLE_DEFAULT_PADDING_RIGHT_SIZE_INC;
677 rel2.to_y: "elm.bar";
682 state: "visible" 0.0;
683 inherit: "default" 0.0;
687 part { name: "bar_bg";
690 description { state: "default" 0.0;
693 to_y: "pad_bar_left";
697 to_y: "pad_bar_right";
700 image.normal: "00_splite_handler_bg_h.png";
702 description { state: "clicked" 0.0;
703 inherit: "default" 0.0;
704 image.normal: "00_splite_handler_bg_press.png";
707 part { name:"bar_handler";
709 description { state:"default" 0.0;
719 min: PANES_STYLE_DEFAULT_MIDDLE_SIZE_INC 0;
720 image.normal: "00_splite_handler_h.png";
722 description { state:"clicked" 0.0;
723 inherit: "default" 0.0;
725 description { state: "disabled" 0.0;
726 inherit: "default" 0.0;
730 part { name: "over2";
734 ignore_flags: ON_HOLD;
735 description { state: "default" 0.0;
740 description { state: "disabled" 0.0;
741 inherit: "default" 0.0;
745 part { name: "over3";
749 description { state: "default" 0.0;
754 description { state: "clicked" 0.0;
755 inherit: "default" 0.0;
758 part { name:"bar_disabled";
760 description { state:"default" 0.0;
761 rel1.to_y: "elm.bar";
762 rel2.to_y: "elm.bar";
766 description { state: "disabled" 0.0;
767 inherit: "default" 0.0;
775 signal: "elm,panes,pair";
780 set_int(state_pair, 1);
781 get_state(PART:"elm.bar", st, 30, vl);
782 set_state(PART:"elm.bar", st, 0.0);
783 set_state(PART:"pad_left", "default", 0.0);
784 set_state(PART:"pad_right", "default", 0.0);
785 set_state(PART:"pad_bar_left", "default", 0.0);
786 set_state(PART:"pad_bar_right", "default", 0.0);
790 name: "panes_unpair";
791 signal: "elm,panes,unpair";
796 set_int(state_pair, 0);
797 get_state(PART:"elm.bar", st, 30, vl);
798 set_state(PART:"elm.bar", st, 0.1);
799 set_state(PART:"pad_left", "hidden", 0.0);
800 set_state(PART:"pad_right", "hidden", 0.0);
801 set_state(PART:"pad_bar_left", "hidden", 0.0);
802 set_state(PART:"pad_bar_right", "hidden", 0.0);
806 name: "button_click";
807 signal: "mouse,down,1";
809 action: SIGNAL_EMIT "elm,action,press" "";
810 after: "button_click_anim";
813 name: "button_click_anim";
815 set_state(PART:"bar_bg", "clicked", 0.0);
819 name: "button_unclick";
820 signal: "mouse,up,1";
822 action: SIGNAL_EMIT "elm,action,unpress" "";
823 after: "button_unclick_anim";
826 name: "button_unclick_anim";
828 set_state(PART:"bar_bg", "default", 0.0);
832 name: "button_click2";
833 signal: "mouse,down,1";
835 action: STATE_SET "clicked" 0.0;
839 name: "button_unclick2";
840 signal: "mouse,up,1";
842 action: STATE_SET "default" 0.0;
843 transition: DECELERATE 0.5;
847 name: "button_unclick3";
848 signal: "mouse,up,1";
850 action: SIGNAL_EMIT "elm,action,click" "";
853 name: "button_down_double";
854 signal: "mouse,down,1,double";
856 action: SIGNAL_EMIT "elm,action,click,double" "";
861 signal: "elm.panes.fixed";
863 action: STATE_SET "disabled" 0.0;
864 target: "bar_disabled";
865 target: "bar_handler";
866 after: "after_fixed";
871 if (get_int(state_pair))
872 set_state(PART:"elm.bar", "disabled", 0.0);
874 set_state(PART:"elm.bar", "disabled", 0.1);
877 //allow the movement by interaction
879 name: "panes_unfixed";
880 signal: "elm.panes.unfixed";
882 action: STATE_SET "default" 0.0;
883 target: "bar_disabled";
884 target: "bar_handler";
885 after: "after_unfixed";
888 name: "after_unfixed";
890 if (get_int(state_pair))
891 set_state(PART:"elm.bar", "default", 0.0);
893 set_state(PART:"elm.bar", "default", 0.1);