Tizen 2.1 base
[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) \
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"#_pos;\
38          }\
39          rel2 {\
40             relative: 1.0 1.0;\
41             to: "separator"#_pos;\
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,_after) \
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          align: 0.0 0.5;\
79          fixed: 1 1;\
80          rel1 {\
81             relative: 1.0 0.0;\
82             to: "field"#_after;\
83          }\
84          rel2 {\
85             relative: 1.0 1.0;\
86             to: "field"#_after;\
87          }\
88          color: DATETIME_SEPARATOR_TEXT_COLOR_INC;\
89          text {\
90             font: "Tizen:style=Regular";\
91             size: DATETIME_TEXT_FONT_SIZE_INC;\
92             min: 1 0; \
93             text_class: "tizen";\
94          }\
95       }\
96       description { state: "enable" 0.0;\
97          inherit: "default" 0.0;\
98          visible: 1;\
99          min: DATETIME_SEPARATOR_MIN_SIZE_INC;\
100       }\
101    }\
102    programs {\
103       program {\
104          name: "separator"#_pos",enabled";\
105          signal: "field"#_after",enable";\
106          source: "elm";\
107          action: STATE_SET "enable" 0.0;\
108          target: "separator"#_pos;\
109       }\
110       program {\
111          name: "separator"#_pos",disabled";\
112          signal: "field"#_after",disable";\
113          source: "elm";\
114          action: STATE_SET "default" 0.0;\
115          target: "separator"#_pos;\
116       }\
117    }
118
119
120 group { name: "elm/datetime/base/default";
121    parts {
122       part {
123          name: "bg";
124          type: RECT;
125          scale: 1;
126          description {
127             state: "default" 0.0;
128             color: 0 0 0 0;
129          }
130       }
131       part {
132          name: "separator0";
133          type: RECT;
134          scale: 1;
135          description {
136             state: "default" 0.0;
137             visible: 0;
138             min: 0 0;
139             align: 0.0 0.5;
140             fixed: 1 0;
141             rel2 {
142                relative: 0.0 1.0;
143                to: "bg";
144             }
145          }
146       }
147       DATETIME_FIELD(0)
148       DATETIME_SEPARATOR(1,0)
149       DATETIME_FIELD(1)
150       DATETIME_SEPARATOR(2,1)
151       DATETIME_FIELD(2)
152       DATETIME_SEPARATOR(3,2)
153       DATETIME_FIELD(3)
154       DATETIME_SEPARATOR(4,3)
155       DATETIME_FIELD(4)
156       DATETIME_SEPARATOR(5,4)
157       DATETIME_FIELD(5)
158       DATETIME_SEPARATOR(6,5)
159       part {
160          name: "clipper";
161          type: RECT;
162          description { state: "default" 0.0;
163             rel1 {
164                relative: 0.0 0.0;
165                to: "separator0";
166             }
167             rel2 {
168                relative: 1.0 1.0;
169                to: "separator6";
170             }
171             color: 255 255 255 255;
172          }
173          description { state: "visible" 0.0;
174             inherit: "default" 0.0;
175             color: 255 255 255 102;
176          }
177       }
178       part {
179          name: "disabler";
180          type: RECT;
181          description { state: "default" 0.0;
182             color: 0 0 0 0;
183             visible: 0;
184          }
185          description { state: "visible" 0.0;
186             inherit: "default" 0.0;
187             visible: 1;
188          }
189       }
190    }
191    programs {
192       program {
193          name: "disble_datetime";
194          signal: "elm,state,disabled";
195          source: "elm";
196          action: STATE_SET "visible" 0.0;
197          target: "disabler";
198          target: "clipper";
199       }
200       program {
201          name: "enable_datetime";
202          signal: "elm,state,enabled";
203          source: "elm";
204          action: STATE_SET "default" 0.0;
205          target: "disabler";
206          target: "clipper";
207       }
208    }
209 }