/* * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved * * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /////////////////////////////////////////////////////////////////////////////// // datetime /////////////////////////////////////////////////////////////////////////////// group { name: "elm/datetime/base/default"; parts { part { name: "bg"; type: RECT; scale: 1; description { state: "default" 0.0; color: 0 0 0 0; min: 0 DATETIME_WIDGET_HEIGHT; max: -1 DATETIME_WIDGET_HEIGHT; } } part { name: "date.btn"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; min: 0 0; align: 0.0 0.5; fixed: 1 0; rel1.to: "bg"; rel2 { relative: 0.0 1.0; to: "bg"; } } } part { name: "center.padding"; type: SPACER; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; min: DATETIME_WIDGET_PADDING_SIZE_INC; align: 0.0 0.5; fixed: 1 0; rel1 { relative: 1.0 0.0; to: "date.btn"; } rel2 { relative: 1.0 1.0; to: "date.btn"; } } description { state: "hidden" 0.0; inherit: "default" 0.0; min: 0 0; } } part { name: "time.btn"; type: SWALLOW; scale: 1; clip_to: "clipper"; description { state: "default" 0.0; min: 0 0; align: 0.0 0.5; fixed: 1 0; rel1 { relative: 1.0 0.0; to: "center.padding"; } rel2 { relative: 1.0 1.0; to: "center.padding"; } } } part { name: "clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 255; } description { state: "visible" 0.0; inherit: "default" 0.0; color: 255 255 255 102; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; rel1.to: "bg"; rel2.to: "bg"; } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } } } script { public center_padding_hidden = 0; //center padding shown/hidden status } programs { program { name: "disble_datetime"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "visible" 0.0; target: "disabler"; target: "clipper"; } program { name: "enable_datetime"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "disabler"; target: "clipper"; } program { name: "date_hide"; signal: "datepicker,hide"; source: "elm"; script { set_int(center_padding_hidden, 0); set_state(PART:"center.padding", "hidden", 0.0); } } program { name: "time_hide"; signal: "timepicker,hide"; source: "elm"; script { set_int(center_padding_hidden, 0); set_state(PART:"center.padding", "hidden", 0.0); } } program { name: "date_show"; signal: "datepicker,show"; source: "elm"; script { set_int(center_padding_hidden, (get_int(center_padding_hidden) + 1)); if (get_int(center_padding_hidden) == 2) set_state(PART:"center.padding", "default", 0.0); } } program { name: "time_show"; signal: "timepicker,show"; source: "elm"; script { set_int(center_padding_hidden, (get_int(center_padding_hidden) + 1)); if (get_int(center_padding_hidden) == 2) set_state(PART:"center.padding", "default", 0.0); } } } } group { name: "elm/datetime/base/pickerstyle"; parts { part { name: "date.btn"; type: SWALLOW; description { state: "default" 0.0; visible: 0; } } part { name: "time.btn"; type: SWALLOW; description { state: "default" 0.0; visible: 0; } } } } group { name: "elm/spinner/base/default"; alias: "elm/spinner/base/vertical"; parts { part { name: "bg"; type: SPACER; scale: 1; description { state: "default" 0.0; } } part { name: "access"; type: RECT; repeat_events: 1; description { state: "default" 0.0; fixed: 1 1; color: 0 0 0 0; rel1.to: "bg"; rel2.to: "bg"; visible: 1; } description { state: "active" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "elm.swallow.inc_button"; type: SWALLOW; scale: 1; description { state: "default" 0.0; align: 0.5 0.0; min: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC; max: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC; } } part { name: "elm.swallow.dec_button"; type: SWALLOW; scale: 1; description { state: "default" 0.0; align: 0.5 1.0; min: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC; max: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC; } } part { name: "elm.swallow.text_button"; type: SWALLOW; scale: 1; description { state: "default" 0.0; visible: 1; min: 0 SPINNER_TEXT_HEIGHT_INC; max: -1 SPINNER_TEXT_HEIGHT_INC; } description { state: "active" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "elm.swallow.entry"; type: SWALLOW; description { state: "default" 0.0; visible: 0; rel1.to: "elm.swallow.text_button"; rel2.to: "elm.swallow.text_button"; min: 0 SPINNER_TEXT_HEIGHT_INC; max: -1 SPINNER_TEXT_HEIGHT_INC; fixed: 1 1; } description { state: "active" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "disabler"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "disabled" 0.0; inherit: "default" 0.0; visible: 1; } } } programs { program { name: "active"; signal: "elm,state,active"; source: "elm"; action: STATE_SET "active" 0.0; target: "elm.swallow.text_button"; target: "elm.swallow.entry"; } program { name: "inactive"; signal: "elm,state,inactive"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.text_button"; target: "elm.swallow.entry"; } program { name: "access_activate"; signal: "elm,state,access,active"; source: "elm"; action: STATE_SET "default" 0.0; target: "access"; } program { name: "access_inactivate"; signal: "elm,state,access,inactive"; source: "elm"; action: STATE_SET "active" 0.0; target: "access"; } program { name: "disable"; signal: "elm,state,disabled"; source: "elm"; action: STATE_SET "disabled" 0.0; target: "disabler"; } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; action: STATE_SET "default" 0.0; target: "disabler"; } } } group { name: "elm/layout/datetime_popup/date_layout"; parts { part { name: "bg"; type: SPACER; scale: 1; description { state: "default" 0.0; min: DATETIME_POPUP_CONTENT_SIZE_INC; max: DATETIME_POPUP_CONTENT_SIZE_INC; } } part { name: "top.padding"; type: SPACER; scale: 1; description { state: "default" 0.0; min: 0 DATETIME_POPUP_CONTENT_TOP_PADDING_HEIGHT_INC; max: -1 DATETIME_POPUP_CONTENT_TOP_PADDING_HEIGHT_INC; fixed: 0 1; rel1.to: "bg"; rel2 { relative: 1.0 0.0; to: "bg"; } align: 0.5 0.0; } } part { name: "bottom.padding"; type: SPACER; scale: 1; description { state: "default" 0.0; min: 0 DATETIME_POPUP_CONTENT_BOTTOM_PADDING_HEIGHT_INC; max: -1 DATETIME_POPUP_CONTENT_BOTTOM_PADDING_HEIGHT_INC; fixed: 0 1; rel1 { relative: 0.0 1.0; to: "bg"; } rel2.to: "bg"; align: 0.5 1.0; } } part { name: "left.padding"; type: SPACER; scale: 1; description { state: "default" 0.0; min: DATETIME_POPUP_CONTENT_LEFT_PADDING_WIDTH_INC 0; max: DATETIME_POPUP_CONTENT_LEFT_PADDING_WIDTH_INC -1; fixed: 1 0; rel1 { relative: 0.0 1.0; to_x: "bg"; to_y: "top.padding"; } rel2 { relative: 0.0 0.0; to_x: "bg"; to_y: "bottom.padding"; } align: 0.0 0.5; } } part { name: "right.padding"; type: SPACER; scale: 1; description { state: "default" 0.0; min: DATETIME_POPUP_CONTENT_RIGHT_PADDING_WIDTH_INC 0; max: DATETIME_POPUP_CONTENT_RIGHT_PADDING_WIDTH_INC -1; fixed: 1 0; rel2.to: "bg"; rel1 { relative: 1.0 1.0; to_x: "bg"; to_y: "top.padding"; } rel2 { relative: 1.0 0.0; to_x: "bg"; to_y: "bottom.padding"; } align: 1.0 0.5; } } part { name: "field0"; type: SWALLOW; scale: 1; description { state: "default" 0.0; fixed: 1 0; min: DATETIME_POPUP_CONTENT_FIELD_WIDTH_INC 0; rel1 { relative: 1.0 0.0; to: "left.padding"; } rel2.to: "left.padding"; align: 0.0 0.5; } } part { name: "center.padding1"; type: SPACER; scale: 1; description { state: "default" 0.0; fixed: 1 0; min: DATETIME_POPUP_CONTENT_CENTER_PADDING_WIDTH_INC 0; max: DATETIME_POPUP_CONTENT_CENTER_PADDING_WIDTH_INC -1; rel1 { relative: 1.0 0.0; to: "field0"; } rel2.to: "field0"; align: 0.0 0.5; } } part { name: "field1"; type: SWALLOW; scale: 1; description { state: "default" 0.0; fixed: 1 0; min: DATETIME_POPUP_CONTENT_FIELD_WIDTH_INC 0; rel1 { relative: 1.0 0.0; to: "center.padding1"; } rel2 { relative: 0.0 1.0; to_x: "center.padding2"; to_y: "center.padding1"; } } } part { name: "center.padding2"; type: SPACER; scale: 1; description { state: "default" 0.0; fixed: 1 0; min: DATETIME_POPUP_CONTENT_CENTER_PADDING_WIDTH_INC 0; max: DATETIME_POPUP_CONTENT_CENTER_PADDING_WIDTH_INC -1; rel1.to: "field2"; rel2 { relative: 0.0 1.0; to: "field2"; } align: 1.0 0.5; } } part { name: "field2"; type: SWALLOW; scale: 1; description { state: "default" 0.0; fixed: 1 0; min: DATETIME_POPUP_CONTENT_FIELD_WIDTH_INC 0; rel1.to: "right.padding"; rel2 { relative: 0.0 1.0; to: "right.padding"; } align: 1.0 0.5; } } part { name: "event_area"; type: RECT; description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "access"; type: RECT; repeat_events: 1; description { state: "default" 0.0; fixed: 1 1; rel1.to: "bg"; rel2.to: "bg"; color: 0 0 0 0; } } } } group { name: "elm/layout/datetime_popup/time_layout"; inherit: "elm/layout/datetime_popup/date_layout"; parts { part { name: "hour.minute.color"; type: TEXT; scale: 1; description { state: "default" 0.0; rel1.to: "center.padding1"; rel2.to: "center.padding1"; color_class: "T1233"; text { min: 0 0; text_class: "T1233"; text: ":"; } } } part { name: "field2"; type: SWALLOW; scale: 1; description { state: "default" 0.0; fixed: 1 0; min: DATETIME_POPUP_CONTENT_FIELD_WIDTH_INC 0; max: -1 DATETIME_POPUP_CONTENT_FIELD_HEIGHT_INC; rel1.to: "right.padding"; rel2 { relative: 0.0 1.0; to: "right.padding"; } align: 1.0 0.5; } } } } group { name: "elm/layout/datetime_popup/time_layout_24hr"; inherit: "elm/layout/datetime_popup/date_layout"; parts { part { name: "field0"; type: SWALLOW; scale: 1; description { state: "default" 0.0; fixed: 1 0; min: DATETIME_POPUP_CONTENT_TIME_24HR_FIELD_WIDTH_INC 0; rel1 { relative: 1.0 0.0; to: "left.padding"; } rel2.to: "left.padding"; align: 0.0 0.5; } } part { name: "hour.minute.color"; type: TEXT; scale: 1; description { state: "default" 0.0; rel1.to: "center.padding1"; rel2.to: "center.padding1"; color_class: "T1233"; text { min: 0 0; text_class: "T1233"; text: ":"; } } } part { name: "field1"; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: DATETIME_POPUP_CONTENT_TIME_24HR_FIELD_WIDTH_INC 0; rel1 { relative: 1.0 0.0; to: "center.padding1"; } rel2 { relative: 0.0 1.0; to: "center.padding2"; } } } part { name: "center.padding2"; type: SPACER; scale: 1; description { state: "default" 0.0; min: 0 0; max: 0 -1; rel1.to: "right.padding"; rel2.to: "right.padding"; } } part { name: "field2"; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: 0 0; max: 0 -1; visible: 0; rel1.to: "right.padding"; rel2.to: "right.padding"; } } part { name: "access"; type: RECT; repeat_events: 1; description { state: "default" 0.0; fixed: 1 1; rel1.to: "bg"; rel2.to: "bg"; color: 0 0 0 0; } } } }