summaryrefslogtreecommitdiff
path: root/legacy/elementary/data
diff options
context:
space:
mode:
authorSumanth Krishna Mannam <sumanth.m@samsung.com>2012-03-05 11:07:05 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-05 11:07:05 +0000
commit14df28cdaebb78613411753f2445765c6e2468ec (patch)
tree8c49f1d5944fb7d14b66b3b4ce3b01b6a26f7dcc /legacy/elementary/data
parent7a8cef6b6fc82d5a71c8f5a95c4518ade2b6881f (diff)
From: Sumanth Krishna Mannam <sumanth.m@samsung.com>
Subject: [E-devel] [Patch] Elementary : New widget Elm_datetime patch Attached to the mail is the patch for new elementary widget elm_datetime. Refer to the below EFL post history for more details. The datetime widget provides an option to display Date & time based on current locale format and the user can edit them through dynamic Modules. Dynamic modules can be based on 1. Content Popup/diskselector based list 2. Elm_entry with ISE based input 3. Elm_Spinner based etc. Refer to the Screenshots: <1.ctxpopup_diskselector_UI> <2.entry_ise_UI> <3.spinner_selection_UI> Can someone review and push this patch to EFL repository? Change description: New widget Elm_datetime is added. Datetime widget displays the Date &Time fields and provides a customizable way to edit them. The widget is implemented in a modular fashion for date/time field inputs. Ctxpopup based input is proposed as the default selection module. Localization support based on Libc is also supported. Sign-Off By: Sumanth M.V.K <sumanth.m@samsug.com> SVN revision: 68696
Diffstat (limited to 'legacy/elementary/data')
-rw-r--r--legacy/elementary/data/themes/default.edc1
-rw-r--r--legacy/elementary/data/themes/widgets/datetime.edc349
2 files changed, 350 insertions, 0 deletions
diff --git a/legacy/elementary/data/themes/default.edc b/legacy/elementary/data/themes/default.edc
index 555cb7b..5111d77 100644
--- a/legacy/elementary/data/themes/default.edc
+++ b/legacy/elementary/data/themes/default.edc
@@ -324,6 +324,7 @@ collections {
324#include "widgets/button.edc" 324#include "widgets/button.edc"
325#include "widgets/toggle.edc" 325#include "widgets/toggle.edc"
326#include "widgets/clock.edc" 326#include "widgets/clock.edc"
327#include "widgets/datetime.edc"
327#include "widgets/menu.edc" 328#include "widgets/menu.edc"
328#include "widgets/frame.edc" 329#include "widgets/frame.edc"
329#include "widgets/tooltip.edc" 330#include "widgets/tooltip.edc"
diff --git a/legacy/elementary/data/themes/widgets/datetime.edc b/legacy/elementary/data/themes/widgets/datetime.edc
new file mode 100644
index 0000000..fe68ab3
--- /dev/null
+++ b/legacy/elementary/data/themes/widgets/datetime.edc
@@ -0,0 +1,349 @@
1///////////////////////////////////////////////////////////////////////////////
2// datetime
3///////////////////////////////////////////////////////////////////////////////
4
5#define DATETIME_FIELD(_pos) \
6 part {\
7 name: "field"#_pos; \
8 type: SWALLOW; \
9 scale: 1;\
10 clip_to: "clipper";\
11 description { state: "default" 0.0; \
12 visible: 0;\
13 min: 0 0;\
14 align: 0.0 0.5;\
15 fixed: 1 0;\
16 rel1 {\
17 relative: 1.0 0.0;\
18 to: "separator"#_pos;\
19 }\
20 rel2 {\
21 relative: 1.0 1.0;\
22 to: "separator"#_pos;\
23 }\
24 }\
25 description { state: "enable" 0.0;\
26 inherit: "default" 0.0;\
27 visible: 1;\
28 min: 25 25;\
29 }\
30 }\
31 programs{\
32 program {\
33 name: "field_"#_pos"enabled";\
34 signal: "field"#_pos",enable";\
35 source: "elm";\
36 action: STATE_SET "enable" 0.0;\
37 target: "field"#_pos;\
38 }\
39 program {\
40 name: "field_"#_pos"disabled";\
41 signal: "field"#_pos",disable";\
42 source: "elm";\
43 action: STATE_SET "default" 0.0;\
44 target: "field"#_pos;\
45 }\
46 }
47
48#define DATETIME_SEPARATOR(_pos,_after) \
49 part {\
50 name: "separator"#_pos; \
51 type: TEXT;\
52 scale: 1;\
53 description {\
54 state: "default" 0.0;\
55 visible: 0;\
56 min: 0 0;\
57 align: 0.0 0.5;\
58 fixed: 1 0;\
59 rel1 {\
60 relative: 1.0 0.0;\
61 to: "field"#_after;\
62 }\
63 rel2 {\
64 relative: 1.0 1.0;\
65 to: "field"#_after;\
66 }\
67 color: 100 100 100 255;\
68 text {\
69 font: "SLP:style=Roman";\
70 size: 13;\
71 min: 1 0;\
72 align: 0.2 0.5;\
73 }\
74 }\
75 description { state: "enable" 0.0;\
76 inherit: "default" 0.0;\
77 visible: 1;\
78 min: 13 25;\
79 }\
80 }\
81 programs {\
82 program {\
83 name: "separator"#_pos",enabled";\
84 signal: "field"#_after",enable";\
85 source: "elm";\
86 action: STATE_SET "enable" 0.0;\
87 target: "separator"#_pos;\
88 }\
89 program {\
90 name: "separator"#_pos",disabled";\
91 signal: "field"#_after",disable";\
92 source: "elm";\
93 action: STATE_SET "default" 0.0;\
94 target: "separator"#_pos;\
95 }\
96 }
97
98
99group { name: "elm/datetime/base/default";
100 parts {
101 part {
102 name: "bg";
103 type: RECT;
104 scale: 1;
105 description {
106 state: "default" 0.0;
107 color: 0 0 0 0;
108 }
109 }
110 part {
111 name: "separator0";
112 type: RECT;
113 scale: 1;
114 description {
115 state: "default" 0.0;
116 visible: 0;
117 min: 13 25;
118 align: 0.0 0.5;
119 fixed: 1 0;
120 rel2 {
121 relative: 0.0 1.0;
122 to: "bg";
123 }
124 }
125 }
126 DATETIME_FIELD(0)
127 DATETIME_SEPARATOR(1,0)
128 DATETIME_FIELD(1)
129 DATETIME_SEPARATOR(2,1)
130 DATETIME_FIELD(2)
131 DATETIME_SEPARATOR(3,2)
132 DATETIME_FIELD(3)
133 DATETIME_SEPARATOR(4,3)
134 DATETIME_FIELD(4)
135 DATETIME_SEPARATOR(5,4)
136 DATETIME_FIELD(5)
137 DATETIME_SEPARATOR(6,5)
138 part {
139 name: "clipper";
140 type: RECT;
141 description { state: "default" 0.0;
142 rel1 {
143 relative: 0.0 0.0;
144 to: "separator0";
145 }
146 rel2 {
147 relative: 1.0 1.0;
148 to: "separator6";
149 }
150 color: 255 255 255 255;
151 }
152 description { state: "enable" 0.0;
153 inherit: "default" 0.0;
154 color: 255 255 255 127;
155 }
156 }
157 part {
158 name: "disabler";
159 type: RECT;
160 description { state: "default" 0.0;
161 color: 0 0 0 0;
162 visible: 0;
163 }
164 description { state: "visible" 0.0;
165 inherit: "default" 0.0;
166 visible: 1;
167 }
168 }
169 }
170 programs {
171 program {
172 name: "disble_datetime";
173 signal: "elm,state,disabled";
174 source: "elm";
175 action: STATE_SET "visible" 0.0;
176 target: "disabler";
177 target: "clipper";
178 }
179 program {
180 name: "enable_datetime";
181 signal: "elm,state,enabled";
182 source: "elm";
183 action: STATE_SET "default" 0.0;
184 target: "disabler";
185 target: "clipper";
186 }
187 }
188}//end datetime group
189
190///////////////////////////////////////////////////////////////////////////////
191// diskselector item : datetime style
192///////////////////////////////////////////////////////////////////////////////
193group { name: "elm/diskselector/item/datetime/default";
194 data {
195 item: "len_threshold" "10";
196 item: "min_height" "-1";
197 item: "min_width" "-1";
198 }
199 parts {
200 part {
201 name: "elm.text";
202 type: TEXT;
203 mouse_events: 0;
204 scale: 1;
205 description {
206 state: "default" 0.0;
207 min: 25 25;
208 fixed: 1 1;
209 align: 0.0 0.0;
210 color: 172 172 172 255;
211 visible: 1;
212 text {
213 font: "Sans,Edje-Vera";
214 size: 13;
215 min: 1 1;
216 }
217 }
218 description {
219 state: "center_sel" 0.0;
220 inherit: "default" 0.0;
221 color: 255 255 255 255;
222 }
223 description { state: "left_side" 0.0;
224 inherit: "default" 0.0;
225 color: 152 152 152 255;
226 text.size: 10;
227 text.align: 0.2 0.5;
228 }
229 description { state: "left_side_sel" 0.0;
230 inherit: "default" 0.0;
231 color: 255 255 255 255;
232 text.size: 10;
233 text.align: 0.2 0.5;
234 }
235 description { state: "right_side" 0.0;
236 inherit: "default" 0.0;
237 color: 152 152 152 255;
238 text.size: 10;
239 text.align: 0.8 0.5;
240 }
241 description { state: "right_side_sel" 0.0;
242 inherit: "default" 0.0;
243 color: 255 255 255 255;
244 text.size: 10;
245 text.align: 0.8 0.5;
246 }
247 }
248 part {
249 name: "over1";
250 mouse_events: 1;
251 repeat_events: 1;
252 ignore_flags: ON_HOLD;
253 description {
254 state: "default" 0.0;
255 }
256 }
257 }
258 programs {
259 script {
260 public field_pos; // center = 0,left = 1, right =2.
261 public field_selected; //field is selected(1) or not(0).
262
263 public update_state() {
264 new pos, is_sel;
265 pos = get_int(field_pos)
266 is_sel = get_int(field_selected);
267
268 if (is_sel == 1)
269 {
270 if (pos == 0)
271 set_state(PART:"elm.text", "center_sel", 0.0);
272 else if (pos == 1)
273 set_state(PART:"elm.text", "left_side_sel", 0.0);
274 else if (pos == 2)
275 set_state(PART:"elm.text", "right_side_sel", 0.0);
276 }
277 else if (is_sel == 0)
278 {
279 if (pos == 0)
280 set_state(PART:"elm.text", "default", 0.0);
281 else if (pos == 1)
282 set_state(PART:"elm.text", "left_side", 0.0);
283 else if (pos == 2)
284 set_state(PART:"elm.text", "right_side", 0.0);
285 }
286 }
287 }
288 program {
289 name: "selected_text";
290 signal: "elm,state,selected";
291 source: "elm";
292 script {
293 set_int(field_selected, 1);
294 update_state();
295 }
296 }
297 program {
298 name: "default_text";
299 signal: "elm,state,default";
300 source: "elm";
301 script {
302 set_int(field_selected, 0);
303 update_state();
304 }
305 }
306 program { name: "center_text";
307 signal: "elm,state,center";
308 source: "elm";
309 script {
310 set_int(field_pos, 0);
311 update_state();
312 }
313 }
314 program { name: "center_small_text";
315 signal: "elm,state,center_small";
316 source: "elm";
317 script {
318 set_int(field_pos, 0);
319 update_state();
320 }
321 }
322 program { name: "l_side_text";
323 signal: "elm,state,left_side";
324 source: "elm";
325 script {
326 set_int(field_pos, 1);
327 update_state();
328 }
329 }
330 program { name: "r_side_text";
331 signal: "elm,state,right_side";
332 source: "elm";
333 script {
334 set_int(field_pos, 2);
335 update_state();
336 }
337 }
338 program {
339 name: "field_click";
340 signal: "mouse,clicked,1";
341 source: "over1";
342 action: SIGNAL_EMIT "elm,action,click" "";
343 }
344 }
345}
346
347///////////////////////////////////////////////////////////////////////////////
348// end of datetime style
349///////////////////////////////////////////////////////////////////////////////