/* * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.tizenopensource.org/license * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define MAIN_W 480 #define MAIN_H 800 #include "ug-calendar-picker-efl_macro.edc" collections { group { name: "picker_view"; //min: MAIN_W MAIN_H; images { image: "00_calend_picker_panel.png" COMP; image: "00_picker_bg_brown.png" COMP; } parts { part { name: "background"; type: RECT; mouse_events: 0; description { state: "default" 0.0; visible: 0; rel1 { relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; } color: 0 0 0 0; } } part { name: "panel"; type: IMAGE; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 1; min: 0 66; fixed: 0 1; align: 0.0 0.0; rel1 { relative: 0.0 0.0; to: background; } rel2 { relative: 1.0 0.0; to: background; } image.normal: "00_calend_picker_panel.png"; } } PADDING("padding.top", 0, 8, 0, 1, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, panel, panel) PADDING("padding.left", 5, 0, 1, 0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, panel, panel) PADDING("padding.right", 5, 0, 1, 0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, panel, panel) part { name: "btn_prev"; type: SWALLOW; mouse_events: 1; description { state: "default" 0.0; min: 98 50; max: 98 50; fixed: 1 1; align: 0.0 0.0; rel1 { relative: 1.0 1.0; to_x:padding.left; to_y: padding.top; } rel2 { relative: 1.0 1.0; to_x: padding.left; to_y: padding.top; } } } PADDING("padding.btn_prev.right", 5, 0, 1, 0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, btn_prev, btn_prev) part { name: "btn_next"; type: SWALLOW; mouse_events: 1; description { state: "default" 0.0; min: 98 50; max: 98 50; fixed: 1 1; align: 0.0 0.0; rel1 { relative: 1.0 1.0; to_x: padding.btn_prev.right; to_y: padding.top; } rel2 { relative: 1.0 1.0; to_x: padding.btn_prev.right; to_y: padding.top; } } } part { name: "btn_done"; type: SWALLOW; mouse_events: 1; description { state: "default" 0.0; min: 98 50; max: 98 50; fixed: 1 1; align: 1.0 0.0; rel1 { relative: 0.0 1.0; to_x:padding.right; to_y: padding.top; } rel2 { relative: 0.0 1.0; to_x: padding.right; to_y: padding.top; } } } part { name: "separation_line"; type: RECT; mouse_events: 0; description { state: "default" 0.0; visible: 1; min: 0 2; max: 0 2; fixed: 0 1; align: 0.0 1.0; color: 104 97 92 255; rel1 { relative: 0.0 1.0; to: panel; } rel2 { relative: 1.0 1.0; to: panel; } } } part { name: "list_bg"; type: IMAGE; mouse_events: 0; description { state: "default" 0.0; visible: 1; align: 0.0 0.0; rel1 { relative: 0.0 1.0; to: separation_line; } rel2 { relative: 1.0 1.0; to: background; } image.normal: "00_picker_bg_brown.png"; } } part { name: "list_options"; type: SWALLOW; mouse_events: 1; description { state: "default" 0.0; align: 0.0 0.0; rel1 { relative: 0.0 0.0; to: list_bg; } rel2 { relative: 1.0 1.0; to: list_bg; } } } } } #define CAL_BTN_W 170 #define CAL_BTN_H 100 #define CAL_PADDING_H 20 #define CAL_SHOW_H 335 #define PICKER_SHOW_H 400 #define CAL_BTN_BASE_H 66 #define CAL_BTN_BASE_NBEAT_H 54 group { name: "calendar_picker"; images { image: "00_picker_arrow_left.png" COMP; image: "00_picker_arrow_left_press.png" COMP; image: "00_picker_arrow_right.png" COMP; image: "00_picker_arrow_right_press.png" COMP; image: "00_calend_picker_bar_button.png" COMP; image: "00_calend_picker_bar_button_press.png" COMP; image: "00_picker_btn_normal.png" COMP; image: "00_picker_btn_press.png" COMP; } parts{ part { name: "base"; type: RECT; scale: 1; description { state: "default" 0.0; rel1 { relative: 0 0; } rel2 { relative: 1 1; } color: 0 0 0 0; } } part { name: "picker_base"; type: RECT; scale: 1; description { state: "default" 0.0; visible: 0; min: 0 PICKER_SHOW_H; fixed: 0 1; rel1 { relative: 0.0 1.1; to: "base"; } rel2 { relative: 1.0 1.0; to: "base"; } align: 0.0 0.0; color: 255 0 0 0; } description { state: "show" 0.0; inherit: "default" 0.0; rel1 { relative: 0.0 350/800; to: "base"; } rel2 { relative: 1.0 1.0; to: "base"; } visible: 1; align: 0.0 1.0; } } part { name: "swallow.calendar"; type: SWALLOW; scale: 1; description { state: "default" 0.0; visible: 0; min: 0 CAL_SHOW_H; fixed: 0 1; // rel1 { relative: 0.0 1.0; to: "button_base"; } rel1 { relative: 0.0 1.0; to: "picker_base"; } rel2 { relative: 1.0 1.0; to: "picker_base"; } align: 0.0 1.0; } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "button_base"; type: RECT; mouse_events: 1; scale: 1; description { state: "default" 0.0; visible: 0; min: 24 CAL_BTN_BASE_NBEAT_H; max: 800 CAL_BTN_BASE_NBEAT_H; fixed: 1 1; // rel2 { relative: 1.0 54/400; to: "picker_base"; } // rel2 { relative: 1.0 0.0; to: "picker_base"; } rel1 { relative: 0.0 0.0; to: "swallow.calendar"; } rel2 { relative: 1.0 0.0; to: "swallow.calendar"; } color: 176 176 176 255; // align: 0.0 0.0; align: 0.0 1.0; } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "btn_prev"; mouse_events: 1; scale: 1; description { state: "default" 0.0; visible: 0; min: 46 42; max: 46 42; fixed: 1 1; rel1.to: "button_base"; rel1.offset: 6 0; rel2.to: "button_base"; image { normal: "00_picker_btn_normal.png"; border: 4 4 4 4; border_scale: 1; } align: 0.0 0.5; } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; image { normal: "00_picker_btn_press.png"; border: 4 4 4 4; border_scale: 1; } } } part { name: "btn_prev_icon"; repeat_events: 1; scale: 1; description { state: "default" 0.0; visible: 0; min: 20 20; max: 20 20; fixed: 1 1; rel1.to: "btn_prev"; rel2.to: "btn_prev"; align: 0.5 0.5; image { normal: "00_picker_arrow_left.png"; border: 4 4 4 4; border_scale: 1; } fill.smooth : 0; } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "show" 0.0; image.normal: "00_picker_arrow_left_press.png"; } } part { name: "btn_next"; mouse_events: 1; scale: 1; description { state: "default" 0.0; visible: 0; min: 46 42; max: 46 42; fixed: 1 1; rel1.to: "btn_prev"; rel1.relative: 1 0; rel1.offset: 6 0; rel2.to: "btn_prev"; rel2.relative: 1 1; image { normal: "00_picker_btn_normal.png"; border: 4 4 4 4; border_scale: 1; } align: 0.0 0.5; } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; image { normal: "00_picker_btn_press.png"; border: 4 4 4 4; border_scale: 1; } } } part { name: "btn_next_icon"; repeat_events: 1; scale: 1; description { state: "default" 0.0; visible: 0; min: 20 20; max: 20 20; fixed: 1 1; rel1.to: "btn_next"; rel2.to: "btn_next"; align: 0.5 0.5; image { normal: "00_picker_arrow_right.png"; border: 4 4 4 4; border_scale: 1; } fill.smooth : 0; } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "show" 0.0; image.normal: "00_picker_arrow_right_press.png"; } } part { name: "btn_done"; mouse_events: 1; scale: 1; description { state: "default" 0.0; visible: 0; min: 90 42; max: 90 42; fixed: 1 1; rel1.to: "button_base"; rel2.to: "button_base"; rel2.offset: -6 0; align: 1.0 0.5; image { normal: "00_picker_btn_normal.png"; border: 4 4 4 4; border_scale: 1; } } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "clicked" 0.0; inherit: "default" 0.0; visible: 1; image { normal: "00_picker_btn_press.png"; border: 4 4 4 4; border_scale: 1; } } } part { name: "btn_done_text"; type: TEXT; repeat_events: 1; scale: 1; description { state: "default" 0.0; visible: 0; fixed: 1 1; rel1.to: "btn_done"; rel2.to: "btn_done"; color: 0 0 0 255; text { font: "SLP:style=Medium"; size: 22; min: 1 1; align: 0.5 0.5; } } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "calendar.show.effect"; signal: "calendar.show"; source: "show"; action: STATE_SET "show" 0.0; target: "button_base"; target: "btn_prev"; target: "btn_prev_icon"; target: "btn_next"; target: "btn_next_icon"; target: "btn_done"; target: "btn_done_text"; target: "swallow.calendar"; after : "calendar.show.transition"; } program { name: "calendar.hide.effect"; action: STATE_SET "default" 0.0; target: "swallow.calendar"; target: "button_base"; target: "btn_prev"; target: "btn_prev_icon"; target: "btn_next"; target: "btn_next_icon"; target: "btn_done"; target: "btn_done_text"; } program { name: "calendar.show.transition"; action: STATE_SET "show" 0.0; target: "picker_base"; // transition: SINUSOIDAL 0.5; transition: DECELERATE 0.5; } program { name: "calendar.hide.transition"; signal: "calendar.hide"; source: "hide"; action: STATE_SET "default" 0.0; target: "picker_base"; transition: SINUSOIDAL 0.6; after : "calendar.hide.effect"; } program { name: "prev_bt_click"; signal: "mouse,down,1"; source: "btn_prev"; action: STATE_SET "clicked" 0.0; target: "btn_prev"; } program { name: "prev_bt_unclick"; signal: "mouse,up,1"; source: "btn_prev"; action: STATE_SET "show" 0.0; target: "btn_prev"; } program { name: "next_bt_click"; signal: "mouse,down,1"; source: "btn_next"; action: STATE_SET "clicked" 0.0; target: "btn_next"; } program { name: "next_bt_unclick"; signal: "mouse,up,1"; source: "btn_next"; action: STATE_SET "show" 0.0; target: "btn_next"; } program { name: "done_bt_click"; signal: "mouse,down,1"; source: "btn_done"; action: STATE_SET "clicked" 0.0; target: "btn_done"; } program { name: "done_bt_unclick"; signal: "mouse,up,1"; source: "btn_done"; action: STATE_SET "show" 0.0; target: "btn_done"; } } } }