37d6bc41df90ebcd1a00750d254beed22e7110d6
[apps/home/gallery.git] / res / edc / gl-editfield.edc
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *     http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #define ENTRY_TEXT_SIZE_INC 44
18
19 #define EDITFIELD_GUIDE_TEXT_COLOR_INC 189 189 189 255 // 70 70 70 255
20 #define EDITFIELD_DEFAULT_ERASER_MINW_INC 48
21 #define EDITFIELD_DEFAULT_ERASER_MINH_INC 48
22 #define EDITFIELD_DEFAULT_MINH_INC 112
23 #define EDITFIELD_DEFAULT_TOP1_SINGLE_INC 20
24 #define EDITFIELD_DEFAULT_TOP2_INC 6
25 #define EDITFIELD_DEFAULT_LEFT1_INC 0
26 #define EDITFIELD_DEFAULT_LEFT2_INC 0
27 #define EDITFIELD_DEFAULT_RIGHT1_ERASER_SHOW_INC 56
28 #define EDITFIELD_DEFAULT_RIGHT2_INC 0
29 #define EDITFIELD_DEFAULT_BOTTOM1_SINGLE_INC 20
30 #define EDITFIELD_DEFAULT_BOTTOM2_SINGLE_INC 32
31 #define EDITFIELD_DEFAULT_BOTTOM3_SINGLE_INC 85
32
33
34 group { name: "elm/layout/editfield/gallery";
35    images {
36       image: GALLERY_EDC_IMAGE_FIELD_BTN_DELETE COMP;
37    }
38    parts {
39       part {
40          name: "base";
41          type: RECT;
42          scale: 1;
43          ignore_flags: ON_HOLD;
44          description {
45             state: "default" 0.0;
46             min: 0 EDITFIELD_DEFAULT_MINH_INC;
47             color: 0 0 0 0;
48          }
49       }
50       part {
51          name: "top1";
52          type: RECT;
53          scale: 1;
54          ignore_flags: ON_HOLD;
55          description {
56             state: "default" 0.0;
57             visible: 0;
58             min: 0 EDITFIELD_DEFAULT_TOP1_SINGLE_INC;
59             fixed: 1 1;
60             rel1.relative: 0.0 0.0;
61             rel2.relative: 1.0 0.0;
62             align: 0.5 0;
63          }
64       }
65       part {
66          name: "top2";
67          type: RECT;
68          scale: 1;
69          ignore_flags: ON_HOLD;
70          description {
71             state: "default" 0.0;
72             visible: 0;
73             min: 0 EDITFIELD_DEFAULT_TOP2_INC;
74             fixed: 1 1;
75             rel1.relative: 0.0 0.0;
76             rel2.relative: 1.0 0.0;
77             align: 0.5 0;
78          }
79       }
80       part {
81          name: "left1";
82          type: RECT;
83          scale: 1;
84          ignore_flags: ON_HOLD;
85          description {
86             state: "default" 0.0;
87             visible: 0;
88             min: EDITFIELD_DEFAULT_LEFT1_INC 0;
89             fixed: 1 1;
90             align: 0 0;
91             rel1.relative : 0.0 0.0;
92             rel2.relative : 0.0 1.0;
93          }
94       }
95       part {
96          name: "left2";
97          type: RECT;
98          scale: 1;
99          ignore_flags: ON_HOLD;
100          description {
101             state: "default" 0.0;
102             visible: 0;
103             min: EDITFIELD_DEFAULT_LEFT2_INC 0;
104             fixed: 1 1;
105             align: 0 0;
106             rel1.relative : 0.0 0.0;
107             rel2.relative : 0.0 1.0;
108          }
109       }
110       part {
111          name: "right1";
112          type: RECT;
113          scale: 1;
114          ignore_flags: ON_HOLD;
115          description {
116             state: "default" 0.0;
117             visible: 0;
118             min: EDITFIELD_DEFAULT_RIGHT1_ERASER_SHOW_INC 0;
119             fixed: 1 1;
120             align: 1 0;
121             rel1.relative : 1.0 0.0;
122             rel2.relative : 1.0 1.0;
123          }
124       }
125       part {
126          name: "right2";
127          type: RECT;
128          scale: 1;
129          ignore_flags: ON_HOLD;
130          description {
131             state: "default" 0.0;
132             visible: 0;
133             min: EDITFIELD_DEFAULT_RIGHT2_INC 0;
134             fixed: 1 1;
135             align: 1 0;
136             rel1.relative : 1.0 0.0;
137             rel2.relative : 1.0 1.0;
138          }
139       }
140       part {
141          name: "bottom1";
142          type: RECT;
143          scale: 1;
144          ignore_flags: ON_HOLD;
145          description {
146             state: "default" 0.0;
147             visible: 0;
148             min: 0 EDITFIELD_DEFAULT_BOTTOM1_SINGLE_INC;
149             fixed: 1 1;
150             align: 0 1;
151             rel1.relative: 0.0 1.0;
152          }
153       }
154       part {
155          name: "bottom2";
156          type: RECT;
157          scale: 1;
158          ignore_flags: ON_HOLD;
159          description {
160             state: "default" 0.0;
161             visible: 0;
162             min: 0 EDITFIELD_DEFAULT_BOTTOM2_SINGLE_INC;
163             fixed: 0 1;
164             rel1.relative: 0.0 1.0;
165             align: 0 1;
166          }
167       }
168       part {
169          name: "bottom3";
170          type: RECT;
171          scale: 1;
172          ignore_flags: ON_HOLD;
173          description {
174             state: "default" 0.0;
175             visible: 0;
176             min: 0 EDITFIELD_DEFAULT_BOTTOM3_SINGLE_INC;
177             fixed: 0 1;
178             rel1.relative: 0.0 1.0;
179             align: 0 1;
180          }
181       }
182       part {
183          name: "elm.guidetext";
184          type: TEXT;
185          scale: 1;
186          ignore_flags: ON_HOLD;
187          description {
188             state: "default" 0.0;
189             align: 0.0 0.0;
190             fixed: 1 1;
191             rel1.to: "elm.swallow.content";
192             rel2.to: "elm.swallow.content";
193             color: EDITFIELD_GUIDE_TEXT_COLOR_INC;
194             text {
195                font: "SLP:style=Roman";
196                size: ENTRY_TEXT_SIZE_INC;
197                min: 0 0;
198                align: 0.0 0.5;
199             }
200          }
201          description {
202             state: "hidden" 0.0;
203             inherit: "default" 0.0;
204             visible: 0;
205          }
206       }
207       part {
208          name: "elm.swallow.content";
209          type: SWALLOW;
210          scale: 1;
211          ignore_flags: ON_HOLD;
212          description {
213             state: "default" 0.0;
214             min: 0 40;
215             rel1 {
216                relative : 1.0 1.0;
217                to_x: "left1";
218                to_y: "top1";
219             }
220             rel2 {
221                relative : 0.0 0.0;
222                to_x: "right1";
223                to_y: "bottom1";
224             }
225             align: 0.0 0.5;
226          }
227       }
228       part {
229          name: "eraser_image";
230          scale: 1;
231          description {
232             state: "default" 0.0;
233             visible: 0;
234             min: EDITFIELD_DEFAULT_ERASER_MINW_INC EDITFIELD_DEFAULT_ERASER_MINH_INC;
235             fixed: 1 1;
236             align: 1 1;
237             rel1 {
238                relative: 0.0 0.0;
239                to_x : "right2";
240                to_y : "bottom2";
241             }
242             rel2 {
243                relative: 0.0 0.0;
244                to_x : "right2";
245                to_y : "bottom2";
246             }
247             image {
248                normal: GALLERY_EDC_IMAGE_FIELD_BTN_DELETE;
249                border: 10 10 10 10;
250                border_scale: 1;
251             }
252          }
253          description {
254             state: "elm.eraser.show" 0.0;
255             inherit: "default" 0.0;
256             visible: 1;
257          }
258       }
259       part {
260          name: "eraser";
261          mouse_events: 1;
262          ignore_flags: ON_HOLD;
263          description {
264             state: "default" 0.0;
265             visible: 0;
266             color: 0 0 0 0;
267             rel1 {
268                relative: 0.0 0.0;
269                to_x : "eraser_image";
270                to_y : "bottom3";
271             }
272          }
273          description {
274             state: "elm.eraser.show" 0.0;
275             inherit: "default" 0.0;
276             visible: 1;
277          }
278       }
279    }
280    programs {
281       program {
282          name: "guidetext_show";
283          signal: "elm,state,guidetext,show";
284          source: "elm";
285          action: STATE_SET "default" 0.0;
286          target: "elm.guidetext";
287       }
288       program {
289          name: "guidetext_hide";
290          signal: "elm,state,guidetext,hide";
291          source: "elm";
292          action: STATE_SET "hidden" 0.0;
293          target: "elm.guidetext";
294       }
295       program {
296          name: "eraser_show";
297          signal: "elm,state,eraser,show";
298          source: "elm";
299          action: STATE_SET "elm.eraser.show" 0.0;
300          target: "eraser_image";
301          target: "eraser";
302       }
303       program {
304          name: "eraser_hide";
305          signal: "elm,state,eraser,hide";
306          source: "elm";
307          action: STATE_SET "default" 0.0;
308          target: "eraser_image";
309          target: "eraser";
310       }
311       program {
312          name: "eraser_clicked";
313          signal: "mouse,clicked,1";
314          source: "eraser";
315          action: SIGNAL_EMIT "elm,eraser,clicked" "elm";
316       }
317    }
318 }