/* * efl-theme-tizen * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0 * * 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. */ /////////////////////////////////////////////////////////////////////////////// // datetime /////////////////////////////////////////////////////////////////////////////// #define DATETIME_FIELD(_pos, _after) \ part {\ name: "field"#_pos; \ type: SWALLOW; \ scale: 1;\ clip_to: "clipper";\ repeat_events: 1;\ description { state: "default" 0.0; \ visible: 0;\ min: 0 0;\ align: 0.0 0.5;\ fixed: 1 1;\ rel1 {\ relative: 1.0 0.0;\ to: "separator"#_after;\ }\ rel2 {\ relative: 1.0 1.0;\ to: "separator"#_after;\ }\ }\ description { state: "enable" 0.0;\ inherit: "default" 0.0;\ visible: 1;\ min: DATETIME_FIELD_MIN_SIZE_INC;\ }\ }\ programs{\ program {\ name: "field_"#_pos"enabled";\ signal: "field"#_pos",enable";\ source: "elm";\ action: STATE_SET "enable" 0.0;\ target: "field"#_pos;\ }\ program {\ name: "field_"#_pos"disabled";\ signal: "field"#_pos",disable";\ source: "elm";\ action: STATE_SET "default" 0.0;\ target: "field"#_pos;\ }\ } #define DATETIME_SEPARATOR(_pos) \ part {\ name: "separator"#_pos; \ type: TEXT;\ scale: 1;\ clip_to: "clipper";\ repeat_events: 1;\ description {\ state: "default" 0.0;\ visible: 0;\ min: DATETIME_SEPARATOR_MIN_SIZE_INC;\ max: DATETIME_SEPARATOR_MIN_SIZE_INC;\ align: 0.0 0.5;\ fixed: 1 1;\ rel1 {\ relative: 1.0 0.0;\ to: "field"#_pos;\ }\ rel2 {\ relative: 1.0 1.0;\ to: "field"#_pos;\ }\ color: DATETIME_SEPARATOR_TEXT_COLOR_INC;\ text {\ font: "Tizen:style=Regular";\ size: DATETIME_SEPARATOR_TEXT_FONT_SIZE_INC;\ min: 1 0; \ text_class: "tizen";\ }\ }\ description { state: "enable" 0.0;\ inherit: "default" 0.0;\ visible: 1;\ }\ description { state: "hide" 0.0;\ inherit: "default" 0.0;\ min: 0 0;\ max: 0 0;\ }\ }\ programs {\ program {\ name: "separator"#_pos",enabled";\ signal: "field"#_pos",separator,enable";\ source: "elm";\ action: STATE_SET "enable" 0.0;\ target: "separator"#_pos;\ }\ program {\ name: "separator"#_pos",disabled";\ signal: "field"#_pos",separator,disable";\ source: "elm";\ script {\ new st[31];\ new Float:vl;\ get_state(PART:"separator"#_pos, st, 30, vl);\ if (strcmp(st, "hide")) \ {\ set_state(PART:"separator"#_pos, "default", 0.0);\ }\ }\ }\ program {\ name: "separator"#_pos",hide";\ signal: "field"#_pos",disable";\ source: "elm";\ action: STATE_SET "hide" 0.0;\ target: "separator"#_pos;\ }\ } group { name: "elm/datetime/base/default"; parts { part { name: "bg"; type: RECT; scale: 1; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "left.padding"; type: RECT; scale: 1; clip_to: "clipper"; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: DATETIME_LEFT_PADDING_SIZE_INC; max: DATETIME_LEFT_PADDING_SIZE_INC; align: 0.0 0.5; fixed: 1 1; rel1.to: "bg"; rel2 { relative: 0.0 1.0; to: "bg"; } } } part { name: "field0"; type: SWALLOW; scale: 1; clip_to: "clipper"; repeat_events: 1; description { state: "default" 0.0; visible: 0; min: 0 0; align: 0.0 0.5; fixed: 1 0; rel1 { relative: 0.5 0.0; to_x: "left.padding"; } rel2 { relative: 0.5 1.0; to_x: "left.padding"; } } description { state: "enable" 0.0; inherit: "default" 0.0; visible: 1; min: DATETIME_FIELD_MIN_SIZE_INC; } } DATETIME_SEPARATOR(0) DATETIME_FIELD(1, 0) DATETIME_SEPARATOR(1) DATETIME_FIELD(2, 1) DATETIME_SEPARATOR(2) DATETIME_FIELD(3, 2) DATETIME_SEPARATOR(3) DATETIME_FIELD(4, 3) DATETIME_SEPARATOR(4) DATETIME_FIELD(5, 4) DATETIME_SEPARATOR(5) part { name: "right.padding"; type: RECT; scale: 1; clip_to: "clipper"; mouse_events: 0; description { state: "default" 0.0; visible: 0; min: DATETIME_LEFT_PADDING_SIZE_INC; max: DATETIME_LEFT_PADDING_SIZE_INC; align: 1.0 0.5; fixed: 1 1; rel2 { relative: 1.0 0.0; to: "bg"; } rel2.to: "bg"; } } 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; } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } } } 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: "field0,enabled"; signal: "field0,enable"; source: "elm"; action: STATE_SET "enable" 0.0; target: "field0"; } program { name: "field0,disabled"; signal: "field0,disable"; source: "elm"; action: STATE_SET "default" 0.0; target: "field0"; } } }