1737e7d543cb77db2507527951a4ecd5102f04b4
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / datetime.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18
19 ///////////////////////////////////////////////////////////////////////////////
20 // datetime
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #define DATETIME_FIELD(_pos, _after) \
24    part {\
25       name: "field"#_pos; \
26       type: SWALLOW; \
27       scale: 1;\
28       clip_to: "clipper";\
29       repeat_events: 1;\
30       description { state: "default" 0.0; \
31          visible: 0;\
32          min: 0 0;\
33          align: 0.0 0.5;\
34          fixed: 1 1;\
35          rel1 {\
36             relative: 1.0 0.0;\
37             to: "separator"#_after;\
38          }\
39          rel2 {\
40             relative: 1.0 1.0;\
41             to: "separator"#_after;\
42          }\
43       }\
44       description { state: "enable" 0.0;\
45          inherit: "default" 0.0;\
46          visible: 1;\
47          min: DATETIME_FIELD_MIN_SIZE_INC;\
48       }\
49    }\
50    programs{\
51       program {\
52          name: "field_"#_pos"enabled";\
53          signal: "field"#_pos",enable";\
54          source: "elm";\
55          action: STATE_SET "enable" 0.0;\
56          target: "field"#_pos;\
57       }\
58       program {\
59          name: "field_"#_pos"disabled";\
60          signal: "field"#_pos",disable";\
61          source: "elm";\
62          action: STATE_SET "default" 0.0;\
63          target: "field"#_pos;\
64       }\
65     }
66
67 #define DATETIME_SEPARATOR(_pos) \
68    part {\
69       name: "separator"#_pos; \
70       type: TEXT;\
71       scale: 1;\
72       clip_to: "clipper";\
73       repeat_events: 1;\
74       description {\
75          state: "default" 0.0;\
76          visible: 0;\
77          min: 0 0;\
78          max: 0 99999;\
79          align: 0.0 0.5;\
80          fixed: 1 1;\
81          rel1 {\
82             relative: 1.0 0.0;\
83             to: "field"#_pos;\
84          }\
85          rel2 {\
86             relative: 1.0 1.0;\
87             to: "field"#_pos;\
88          }\
89          color: DATETIME_SEPARATOR_TEXT_COLOR_INC;\
90          text {\
91             font: "Tizen:style=Regular";\
92             size: DATETIME_TEXT_FONT_SIZE_INC;\
93             min: 1 0; \
94             text_class: "tizen";\
95          }\
96       }\
97       description { state: "enable" 0.0;\
98          inherit: "default" 0.0;\
99          visible: 1;\
100          min: DATETIME_SEPARATOR_MIN_SIZE_INC;\
101       }\
102    }\
103    programs {\
104       program {\
105          name: "separator"#_pos",enabled";\
106          signal: "field"#_pos",enable";\
107          source: "elm";\
108          action: STATE_SET "enable" 0.0;\
109          target: "separator"#_pos;\
110       }\
111       program {\
112          name: "separator"#_pos",disabled";\
113          signal: "field"#_pos",separator,disable";\
114          source: "elm";\
115          action: STATE_SET "default" 0.0;\
116          target: "separator"#_pos;\
117       }\
118    }
119
120
121 group { name: "elm/datetime/base/default";
122    parts {
123       part {
124          name: "bg";
125          type: RECT;
126          scale: 1;
127          description {
128             state: "default" 0.0;
129             color: 0 0 0 0;
130          }
131       }
132       part {
133          name: "field0";
134          type: SWALLOW;
135          scale: 1;
136          clip_to: "clipper";
137          repeat_events: 1;
138          description {
139             state: "default" 0.0;
140             visible: 0;
141             min: 0 0;
142             align: 0.0 0.5;
143             fixed: 1 0;
144             rel1.to: "bg";
145             rel2 {
146                relative: 0.0 1.0;
147                to: "bg";
148             }
149          }
150          description { state: "enable" 0.0;
151             inherit: "default" 0.0;
152             visible: 1;
153             min: DATETIME_FIELD_MIN_SIZE_INC;
154          }
155       }
156       DATETIME_SEPARATOR(0)
157       DATETIME_FIELD(1, 0)
158       DATETIME_SEPARATOR(1)
159       DATETIME_FIELD(2, 1)
160       DATETIME_SEPARATOR(2)
161       DATETIME_FIELD(3, 2)
162       DATETIME_SEPARATOR(3)
163       DATETIME_FIELD(4, 3)
164       DATETIME_SEPARATOR(4)
165       DATETIME_FIELD(5, 4)
166       DATETIME_SEPARATOR(5)
167       part {
168          name: "clipper";
169          type: RECT;
170          description { state: "default" 0.0;
171             rel1.to: "field0";
172             rel2.to: "separator5";
173             color: 255 255 255 255;
174          }
175          description { state: "visible" 0.0;
176             inherit: "default" 0.0;
177             color: 255 255 255 102;
178          }
179       }
180       part {
181          name: "disabler";
182          type: RECT;
183          description { state: "default" 0.0;
184             color: 0 0 0 0;
185             visible: 0;
186          }
187          description { state: "visible" 0.0;
188             inherit: "default" 0.0;
189             visible: 1;
190          }
191       }
192    }
193    programs {
194       program {
195          name: "disble_datetime";
196          signal: "elm,state,disabled";
197          source: "elm";
198          action: STATE_SET "visible" 0.0;
199          target: "disabler";
200          target: "clipper";
201       }
202       program {
203          name: "enable_datetime";
204          signal: "elm,state,enabled";
205          source: "elm";
206          action: STATE_SET "default" 0.0;
207          target: "disabler";
208          target: "clipper";
209       }
210       program {
211          name: "field0,enabled";
212          signal: "field0,enable";
213          source: "elm";
214          action: STATE_SET "enable" 0.0;
215          target: "field0";
216       }
217       program {
218          name: "field0,disabled";
219          signal: "field0,disable";
220          source: "elm";
221          action: STATE_SET "default" 0.0;
222          target: "field0";
223       }
224    }
225 }