Tizen 2.1 base
[framework/uifw/cbhm.git] / data / themes / extstyles.edc
1 /*
2  * cbhm
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 ////////////////////////////////////////////////////////////////////////////////
21    group { name: "elm/check/base/extended/itemcheck";
22       images {
23          image: "B12_button_delete.png" COMP;
24          image: "B12_button_delete_press.png" COMP;
25       }
26       script {
27          new st[31];
28          new Float:vl;
29       }
30       parts {
31          part { name: "bg";
32             mouse_events: 1;
33             scale: 1;
34             type: RECT;
35             description { state: "default" 0.0;
36                rel2.relative: 0.0 1.0;
37                fixed: 1 0;
38                align: 0.0 0.5;
39                min: 122 32;
40                max: 122 32;
41                color: 0 0 0 0;
42             }
43          }
44          part { name: "bg2";
45             type: RECT;
46             mouse_events: 0;
47             scale: 1;
48             description { state: "default" 0.0;
49                rel2.relative: 1.0 1.0;
50                align: 0.95 0.01;
51                min: 46 40;
52                max: 46 40;
53                color:  0 0 0 0;
54                visible: 1;
55             }
56             description { state: "pressed" 0.0;
57                inherit: "default" 0.0;
58             }
59             description { state: "disabled" 0.0;
60                inherit: "default" 0.0;
61                visible: 1;
62             }
63          }
64          part { name: "check";
65             mouse_events: 0;
66             scale: 1;
67             description { state: "default" 0.0;
68                rel1.to: "bg2";
69                rel2.to: "bg2";
70                visible: 1;
71                image {
72                   normal: "B12_button_delete.png";
73                   //border: 16 12 14 14;
74                   //middle: 1;
75                   //border_scale: 1;
76                }
77             }
78             description { state: "visible" 0.0;
79                inherit: "default" 0.0;
80                image {
81                   //normal: "00_check_on.png";
82                }
83             }
84             description { state: "pressed" 0.0;
85                inherit: "default" 0.0;
86                image {
87                   normal: "B12_button_delete_press.png";
88                }
89             }
90             description { state: "visible_pressed" 0.0;
91                inherit: "default" 0.0;
92                image {
93                   //normal: "00_check_on_press.png";
94                }
95             }
96          }
97          part { name: "elm.swallow.content";
98             type: SWALLOW;
99             description { state: "default" 0.0;
100                fixed: 1 0;
101                visible: 0;
102                color: 255 255 255 255;
103                align: 0.0 0.5;
104                rel1.to_x: "bg";
105                rel1.relative: 1.0 0.0;
106                rel1.offset: 1 1;
107                rel2.to_x: "bg";
108                rel2.relative: 1.0 1.0;
109                rel2.offset: 2 -2;
110             }
111             description { state: "visible" 0.0;
112                inherit: "default" 0.0;
113                fixed: 1 1;
114                visible: 1;
115                aspect: 1.0 1.0;
116                aspect_preference: VERTICAL;
117             }
118             description { state: "disabled" 0.0;
119                inherit: "default" 0.0;
120                color: 128 128 128 128;
121             }
122             description { state: "disabled_visible" 0.0;
123                inherit: "default" 0.0;
124                color: 128 128 128 128;
125                fixed: 1 1;
126                visible: 1;
127                aspect: 1.0 1.0;
128             }
129          }
130          part { name: "events";
131             type: RECT;
132             ignore_flags: ON_HOLD;
133             description { state: "default" 0.0;
134                color: 0 0 0 0;
135             }
136          }
137          part { name: "disabler";
138             type: RECT;
139             description { state: "default" 0.0;
140                color: 0 0 0 0;
141                visible: 0;
142             }
143             description { state: "disabled" 0.0;
144                inherit: "default" 0.0;
145                visible: 1;
146                color: 0 0 0 128;
147             }
148          }
149       }
150       programs {
151          program { name: "click";
152             signal: "mouse,up,1";
153             source: "events";
154             action: SIGNAL_EMIT "elm,action,check,toggle" "";
155          }
156          program { name: "pressed";
157             signal: "mouse,down,1";
158             source: "events";
159             script {
160                get_state(PART:"check", st, 30, vl);
161                if (!strcmp(st, "visible"))
162                   set_state(PART:"check", "visible_pressed", 0.0);
163                else if (!strcmp(st, "default"))
164                   set_state(PART:"check", "pressed", 0.0);
165             }
166             after: "checkpressed";
167          }
168          program { name: "checkpressed";
169             signal: "mouse,up,1";
170             source: "check";
171             action: SIGNAL_EMIT "elm,action,click" "";
172          }
173          program { name: "mouseout";
174             signal: "mouse,out";
175             source: "events";
176             after: "bg_check_normal";
177          }
178          program { name: "bg_check_normal";
179             script {
180                get_state(PART:"check", st, 30, vl);
181                if (!strcmp(st, "pressed"))
182                   set_state(PART:"check", "default", 0.0);
183                else if (!strcmp(st, "visible_pressed"))
184                   set_state(PART:"check", "visible", 0.0);
185             }
186          }
187          program { name: "check_on";
188             signal: "elm,state,check,on";
189             source: "elm";
190             action:  STATE_SET "visible" 0.0;
191             target: "check";
192          }
193          program { name: "check_off";
194             signal: "elm,state,check,off";
195             source: "elm";
196             action:  STATE_SET "default" 0.0;
197             target: "check";
198          }
199          program { name: "icon_show";
200             signal: "elm,state,icon,visible";
201             source: "elm";
202             action:  STATE_SET "visible" 0.0;
203             target: "elm.swallow.content";
204          }
205          program { name: "icon_hide";
206             signal: "elm,state,icon,hidden";
207             source: "elm";
208             action:  STATE_SET "default" 0.0;
209             target: "elm.swallow.content";
210          }
211          program { name: "disable";
212             signal: "elm,state,disabled";
213             source: "elm";
214             action: STATE_SET "disabled" 0.0;
215             target: "disabler";
216          }
217          program { name: "enable";
218             signal: "elm,state,enabled";
219             source: "elm";
220             action: STATE_SET "default" 0.0;
221             target: "disabler";
222          }
223       }
224    }
225
226 #define W               187
227 #define H               151
228 #define PL              187 // Thumbnail Long
229 #define PS              151  // Thumbnail Short
230 #define INNER           6   // Inner line
231
232    group { name: "elm/gengrid/widestyle/horizontal_layout";
233       images {
234          image: "B12_button_delete.png" COMP;
235          image: "B12_button_delete_press.png" COMP;
236       }
237       script {
238          new st[31];
239          new Float:vl;
240       }
241       parts {
242          part { name: "bg";
243             type: RECT;
244             mouse_events: 1;
245             scale: 1;
246             description { state: "default" 0.0;
247                rel1 { relative: 0.0 0.0; }
248                rel2 { relative: 1.0 1.0; }
249                color: 0 0 0 0;
250             }
251          }
252          part { name: "icon_bg";
253             type: RECT;
254             scale: 1;
255             mouse_events: 0;
256             description { state: "default" 0.0;
257                rel1 { relative: 0.0 0.0; to: "bg"; }
258                rel2 { relative: 1.0 1.0; to: "bg"; }
259             }
260          }
261          part { name: "elm.swallow.icon";
262             type: SWALLOW;
263             scale: 1;
264             mouse_events: 0;
265             description { state: "default" 0.0;
266                rel1 { relative: 0.0 0.0; offset: 1 1; to: "icon_bg"; }
267                rel2 { relative: 1.0 1.0; offset: -2 -2; to: "icon_bg"; }
268             }
269          }
270          part { name: "cliprect";
271             type: RECT;
272             scale: 1;
273             description { state: "default" 0.0;
274                rel1 { relative: 0.0 0.0; to: "elm.swallow.icon"; }
275                rel2 { relative: 1.0 1.0; to: "elm.swallow.icon"; }
276             }
277          }
278          part { name: "elm.swallow.inner";
279             type: SWALLOW;
280             clip_to: "cliprect";
281             scale: 1;
282             mouse_events: 0;
283             description { state: "default" 0.0;
284                rel1 { relative: 0.0 0.0; offset: 1 1; to: "cliprect"; }
285                rel2 { relative: 1.0 1.0; offset: -1 -1; to: "cliprect"; }
286             }
287          }
288          part { name: "elm.rect.dim";
289             type: RECT;
290             scale: 1;
291             mouse_events: 0;
292             description { state: "default" 0.0;
293                visible: 0;
294                color: 0 0 0 200;
295                rel1.to: "cliprect";
296                rel2.to: "cliprect";
297             }
298             description { state: "show" 0.0;
299                inherit: "default" 0.0;
300                visible: 1;
301             }
302          }
303          part { name: "delbtn";
304             type: RECT;
305             mouse_events: 0;
306             scale: 1;
307             description { state: "default" 0.0;
308                rel1.to: "elm.swallow.icon";
309                rel1.offset: -4 4;
310                rel2.to: "elm.swallow.icon";
311                rel2.offset: -4 4;
312                align: 1.0 0.0;
313                min: 60 60;
314                max: 60 60;
315                visible: 0;
316             }
317          }
318          part { name: "delbtn/img";
319             mouse_events: 1;
320             scale: 1;
321             description { state: "default" 0.0;
322                rel1.to: "delbtn";
323                rel2.to: "delbtn";
324                visible: 0;
325             }
326             description { state: "show" 0.0;
327                inherit: "default" 0.0;
328                visible: 1;
329                image {
330                   normal: "B12_button_delete.png";
331                }
332             }
333             description { state: "pressed" 0.0;
334                inherit: "default" 0.0;
335                visible: 1;
336                image {
337                   normal: "B12_button_delete_press.png";
338                }
339             }
340          }
341       }
342       programs {
343          program { name: "pressed";
344             signal: "mouse,down,1";
345             source: "delbtn/img";
346             script {
347                get_state(PART:"delbtn/img", st, 30, vl);
348                if (!strcmp(st, "show"))
349                   set_state(PART:"delbtn/img", "pressed", 0.0);
350             }
351          }
352          program { name: "mouseout";
353             signal: "mouse,out";
354             source: "delbtn/img";
355             script {
356                get_state(PART:"delbtn/img", st, 30, vl);
357                if (!strcmp(st, "pressed"))
358                   set_state(PART:"delbtn/img", "show", 0.0);
359             }
360          }
361          program { name: "mouse_up_delbtn_img";
362             signal: "mouse,up,1";
363             source: "delbtn/img";
364             action: SIGNAL_EMIT "elm,action,click" "";
365          }
366          program { name: "show_delbtn";
367             source: "elm";
368             signal: "elm,state,show,delbtn";
369             script {
370                set_state(PART:"delbtn/img", "show", 0.0);
371             }
372          }
373          program { name: "hide_delbtn";
374             source: "elm";
375             signal: "elm,state,hide,delbtn";
376             script {
377                set_state(PART:"delbtn/img", "default", 0.0);
378             }
379          }
380          program { name: "show_dim";
381             source: "elm";
382             signal: "elm,state,show,dim";
383             action: STATE_SET "show" 0.0;
384             target: "elm.rect.dim";
385          }
386          program { name: "hide_dim";
387             source: "elm";
388             signal: "elm,state,hide,dim";
389             action: STATE_SET "default" 0.0;
390             target: "elm.rect.dim";
391          }
392       }
393    }