/* * 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-picker-efl_macro.edc" collections { group { name: "picker_view"; images { image: "I01_picker_panel_bg.png" COMP; image: "I01_picker_arrow_left.png" COMP; image: "I01_picker_arrow_left_press.png" COMP; image: "I01_picker_arrow_right.png" COMP; image: "I01_picker_arrow_right_press.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 81; 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: "I01_picker_panel_bg.png"; } } PADDING("padding.top", 0, 6, 0, 1, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, panel, panel) PADDING("padding.left", 6, 0, 1, 0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, panel, panel) PADDING("padding.right", 6, 0, 1, 0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, panel, panel) part { name: "btn_prev"; type: SWALLOW; scale: 1; mouse_events: 1; description { state: "default" 0.0; min: 69 63; max: 69 63; 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; } } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "btn_prev_arrow"; type: IMAGE; scale: 1; mouse_events: 0; repeat_events: 1; description { state: "default" 0.0; min: 30 30; max: 30 30; fixed: 1 1; align: 0.5 0.5; rel1 { relative: 0.0 0.0; to: btn_prev; } rel2 { relative: 1.0 1.0; to: btn_prev; } image.normal: "I01_picker_arrow_left.png"; } description { state: "press" 0.0; inherit: "default" 0.0; image.normal: "I01_picker_arrow_left_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; // image.normal: "I01_picker_arrow_left_press.png"; visible: 0; } } PADDING("padding.btn_prev.right", 10, 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; scale: 1; mouse_events: 1; description { state: "default" 0.0; min: 69 63; max: 69 63; 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; } } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "btn_next_arrow"; type: IMAGE; scale: 1; mouse_events: 0; repeat_events: 1; description { state: "default" 0.0; min: 30 30; max: 30 30; fixed: 1 1; align: 0.5 0.5; rel1 { relative: 0.0 0.0; to: btn_next; } rel2 { relative: 1.0 1.0; to: btn_next; } image.normal: "I01_picker_arrow_right.png"; } description { state: "press" 0.0; inherit: "default" 0.0; image.normal: "I01_picker_arrow_right_press.png"; } description { state: "disabled" 0.0; inherit: "default" 0.0; // image.normal: "I01_picker_arrow_right_press.png"; visible: 0; } } part { name: "btn_done"; type: SWALLOW; scale: 1; mouse_events: 1; description { state: "default" 0.0; min: 135 63; max: 135 63; 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: "btn_done_text"; type: TEXT; repeat_events: 1; scale: 1; description { state: "default" 0.0; visible: 1; fixed: 1 1; rel1.to: "btn_done"; rel2.to: "btn_done"; color: 0 0 0 255; text { font: "SLP:style=Medium"; size: 33; min: 1 1; align: 0.5 0.5; } } } part { name: "separation_line"; type: RECT; mouse_events: 0; description { state: "default" 0.0; visible: 1; min: 0 1; max: 0 1; fixed: 0 1; align: 0.0 1.0; color: 202 202 202 255; rel1 { relative: 0.0 1.0; to: panel; } rel2 { relative: 1.0 1.0; to: panel; } } } part { name: "list_bg"; type: RECT; 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; } color: 230 230 230 255; } } 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; } } } } programs{ program { name: "disable_prev"; signal: "disable_prev,signal"; action: STATE_SET "disabled" 0.0; target: "btn_prev_arrow"; target: "btn_prev"; } program { name: "enable_prev"; signal: "enable_prev,signal"; action: STATE_SET "default" 0.0; target: "btn_prev_arrow"; target: "btn_prev"; } program { name: "disable_next"; signal: "disable_next,signal"; action: STATE_SET "disabled" 0.0; target: "btn_next_arrow"; target: "btn_next"; } program { name: "enable_next"; signal: "enable_next,signal"; action: STATE_SET "default" 0.0; target: "btn_next_arrow"; target: "btn_next"; } program { name: "prev_bt_click"; signal: "mouse,down,1"; source: "btn_prev"; // action: STATE_SET "press" 0.0; // target: "btn_prev_arrow"; script { new st[31]; new Float:vl; get_state(PART:"btn_prev_arrow", st, 30, vl); if (strcmp(st, "disabled")) { set_state(PART:"btn_prev_arrow", "press", 0.0); } } } program { name: "prev_bt_unclick"; signal: "mouse,up,1"; source: "btn_prev"; // action: STATE_SET "default" 0.0; // target: "btn_prev_arrow"; script { new st[31]; new Float:vl; get_state(PART:"btn_prev_arrow", st, 30, vl); if (strcmp(st, "disabled")) { set_state(PART:"btn_prev_arrow", "default", 0.0); } } } program { name: "next_bt_click"; signal: "mouse,down,1"; source: "btn_next"; // action: STATE_SET "press" 0.0; // target: "btn_next_arrow"; script { new st[31]; new Float:vl; get_state(PART:"btn_next_arrow", st, 30, vl); if (strcmp(st, "disabled")) { set_state(PART:"btn_next_arrow", "press", 0.0); } } } program { name: "next_bt_unclick"; signal: "mouse,up,1"; source: "btn_next"; // action: STATE_SET "default" 0.0; // target: "btn_next_arrow"; script { new st[31]; new Float:vl; get_state(PART:"btn_next_arrow", st, 30, vl); if (strcmp(st, "disabled")) { set_state(PART:"btn_next_arrow", "default", 0.0); } } } } } }