[Progressbar] issue image getting invisible for list progressbar. fixed.
[profile/ivi/efl-theme-tizen.git] / themes / groups / layout.edc
1 /*
2  *  nBeat-theme
3  *
4  * Copyright (c) 2000 - 2010 Samsung Electronics Co., Ltd.
5  *
6  * Contact: Seokjae Jeong <seok.j.jeong@samsung.com>, Myoungwoon Roy Kim <Myoungwoon.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>, Jaehwan Kim <jae.hwan.kim@samsung.com>, 
7  *              Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>, 
8  *              Hyunsil Park <hyunsil.park@samsung.com>, Sohyun Kim <anna1014.kim@samsung.com>, Seunggyun Kim <sgyun.kim@samsung.com>
9  * 
10  * This library is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU Lesser General Public License as published by the
12  * Free Software Foundation; either version 2.1 of the License, or (at your option)
13  * any later version.
14  * 
15  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this library; if not, write to the Free Software Foundation, Inc., 51
22  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25
26    /*************************************************/
27    /* elm_layout -> integrated style       */
28    /*************************************************/
29    group { name: "elm/standard/window/integration";
30       parts {
31          /* for event blocking */
32          part { name: "base_event";
33             type: RECT;
34             repeat_events: 0;
35             description { state: "default" 0.0;
36                visible: 1;
37                color: 0 0 0 0;
38             }
39             description { state: "block_events" 0.0;
40                inherit: "default" 0.0;
41             }
42             description { state: "repeat_events" 0.0;
43                inherit: "default" 0.0;
44                visible: 0;
45             }
46          }
47          part { name: "base";
48             type: RECT;
49             mouse_events: 1;
50             repeat_events: 1;
51             description { state: "default" 0.0;
52                color: LAYOUT_BG_COLOR_INC;
53             }
54             description { state: "white_bg" 0.0;
55                color: 255 255 255 255;
56             }
57             description { state: "black_bg" 0.0;
58                color: 0 0 0 255;
59             }
60             description { state: "beige_bg" 0.0;
61                color: 246 245 237 255;
62             }
63             description { state: "group_list_bg" 0.0;
64                color: LAYOUT_GROUP_LIST_BG_COLOR_INC;
65             }
66             description { state: "transparent_bg" 0.0;
67                color: 0 0 0 0;
68             }
69             description { state: "edit_mode" 0.0;
70                color: LAYOUT_EDIT_MODE_BG_COLOR_INC;
71             }
72          }
73          part { name: "indicator_bg";
74             type: RECT;
75             scale: 1;
76             mouse_events: 0;
77             description { state: "default" 0.0;
78                visible: 0;
79                rel1.to: "elm.swallow.indicator";
80                rel2.to: "elm.swallow.indicator";
81                color: 0 0 0 255;
82             }
83             description { state: "show" 0.0;
84                inherit: "default" 0.0;
85                visible: 1;
86             }
87          }
88          part { name: "elm.swallow.indicator";
89             type: SWALLOW;
90             scale: 1;
91             description { state: "default" 0.0;
92                visible: 0;
93                min: 0 INDICATOR_H;
94                fixed: 0 1;
95                rel1 { relative: 0.0 0.0; }
96                rel2 { relative: 1.0 0.0; }
97                align: 0.5 0.0;
98             }
99             description { state: "show" 0.0;
100                inherit: "default" 0.0;
101                visible: 1;
102             }
103          }
104          part { name: "elm.swallow.content";
105             type: SWALLOW;
106             description {
107                state: "default" 0.0;
108                visible: 0;
109                rel1 { relative: 0.0 0.0; }
110                rel2 { relative: 1.0 1.0; }
111             }
112             description { state: "show" 0.0;
113                inherit: "default" 0.0;
114                visible: 1;
115             }
116             description { state: "show_with_indicator" 0.0;
117                inherit: "default" 0.0;
118                visible: 1;
119                rel1 { relative: 0.0 1.0; to_y: "elm.swallow.indicator"; }
120             }
121             description { state: "show_with_navi_bar" 0.0;
122                inherit: "default" 0.0;
123                visible: 1;
124                rel1 { relative: 0.0 1.0; to_y: "elm.swallow.navi_bar"; }
125             }
126             description { state: "show" 1.0;
127                inherit: "default" 0.0;
128                visible: 1;
129                rel2 { relative: 1.0 0.0; to_y: "elm.swallow.controlbar"; }
130             }
131             description { state: "show_with_indicator" 1.0;
132                inherit: "default" 0.0;
133                visible: 1;
134                rel1 { relative: 0.0 1.0; to_y: "elm.swallow.indicator"; }
135                rel2 { relative: 1.0 0.0; to_y: "elm.swallow.controlbar"; }
136             }
137             description { state: "show_with_navi_bar" 1.0;
138                inherit: "default" 0.0;
139                visible: 1;
140                rel1 { relative: 0.0 1.0; to_y: "elm.swallow.navi_bar"; }
141                rel2 { relative: 1.0 0.0; to_y: "elm.swallow.controlbar"; }
142             }
143          }
144          part { name: "elm.swallow.navi_bar";
145             type: SWALLOW;
146             scale: 1;
147             description {
148                state: "default" 0.0;
149                visible: 0;
150                min: 0 NAVI_BAR_H;
151                fixed: 0 1;
152                rel1 { relative: 0.0 0.0; }
153                rel2 { relative: 1.0 0.0; }
154                align: 0.5 0;
155             }
156             description { state: "show" 0.0;
157                inherit: "default" 0.0;
158                visible: 1;
159             }
160             description { state: "show_with_indicator" 0.0;
161                inherit: "default" 0.0;
162                visible: 1;
163                rel1 { relative: 0.0 1.0; to_y: "elm.swallow.indicator"; }
164                rel2 { relative: 1.0 1.0; to_y: "elm.swallow.indicator"; }
165             }
166          }
167          part { name: "elm.swallow.controlbar";
168             type: SWALLOW;
169             scale: 1;
170             description { state: "default" 0.0;
171                visible: 0;
172                min: 0 TAB_BAR_H;
173                fixed: 0 1;
174                rel1 { relative: 0.0 1.0; }
175                rel2 { relative: 1.0 1.0; }
176                align: 0.5 1.0;
177             }
178             description { state: "show" 0.0;
179                inherit: "default" 0.0;
180                visible: 1;
181             }
182          }
183       }
184       programs {
185          program { name: "block_events";
186             signal: "elm,base_event,block_events";
187             source: "elm";
188             action: STATE_SET "block_events" 0.0;
189             target: "base_event";
190          }
191          program { name: "repeat_events";
192             signal: "elm,base_event,repeat_events";
193             source: "elm";
194             action: STATE_SET "repeat_events" 0.0;
195             target: "base_event";
196          }
197          program { name: "show_default_bg";
198             signal: "elm,bg,show,default";
199             source: "elm";
200             script {
201                set_state(PART:"base", "default", 0.0);
202             }
203          }
204          program { name: "show_black_bg";
205             signal: "elm,bg,show,black";
206             source: "elm";
207             script {
208                set_state(PART:"base", "black_bg", 0.0);
209             }
210          }
211          program { name: "show_white_bg";
212             signal: "elm,bg,show,white";
213             source: "elm";
214             script {
215                set_state(PART:"base", "white_bg", 0.0);
216             }
217          }
218          program { name: "show_beige_bg";
219             signal: "elm,bg,show,beige";
220             source: "elm";
221             script {
222                set_state(PART:"base", "beige_bg", 0.0);
223             }
224          }
225          program { name: "show_group_list_bg";
226             signal: "elm,bg,show,group_list";
227             source: "elm";
228             script {
229                set_state(PART:"base", "group_list_bg", 0.0);
230             }
231          }
232          program { name: "show_transparent_bg";
233             signal: "elm,bg,show,transparent";
234             source: "elm";
235             script {
236                set_state(PART:"base", "transparent_bg", 0.0);
237             }
238          }
239          program { name: "show_edit_mode_bg";
240             signal: "elm,bg,show,edit_mode";
241             source: "elm";
242             script {
243                set_state(PART:"base", "edit_mode", 0.0);
244             }
245          }
246          program { name: "show_indicator";
247             signal: "elm,state,show,indicator";
248             source: "elm";
249             script {
250                set_state(PART:"elm.swallow.indicator", "show", 0.0);
251                set_state(PART:"indicator_bg", "show", 0.0);
252                run_program(PROGRAM:"check_location");
253             }
254          }
255          program { name: "hide_indicator";
256             signal: "elm,state,hide,indicator";
257             source: "elm";
258             script {
259                set_state(PART:"elm.swallow.indicator", "default", 0.0);
260                set_state(PART:"indicator_bg", "default", 0.0);
261                run_program(PROGRAM:"check_location");
262             }
263          }
264          program { name: "show_navi_bar";
265             signal: "elm,state,show,navi_bar";
266             source: "elm";
267             script {
268                set_state(PART:"elm.swallow.navi_bar", "show", 0.0);
269                run_program(PROGRAM:"check_location");
270             }
271          }
272          program { name: "hide_navi_bar";
273             signal: "elm,state,hide,navi_bar";
274             source: "elm";
275             script {
276                set_state(PART:"elm.swallow.navi_bar", "default", 0.0);
277                run_program(PROGRAM:"check_location");
278             }
279          }
280          program { name: "show_content";
281             signal: "elm,state,show,content";
282             source: "elm";
283             script {
284                set_state(PART:"elm.swallow.content", "show", 0.0);
285                run_program(PROGRAM:"check_location");
286             }
287          }
288          program { name: "hide_content";
289             signal: "elm,state,hide,content";
290             source: "elm";
291             script {
292                set_state(PART:"elm.swallow.content", "hide", 0.0);
293                run_program(PROGRAM:"check_location");
294             }
295          }
296          program { name: "show_controlbar";
297             signal: "elm,state,show,controlbar";
298             source: "elm";
299             script {
300                set_state(PART:"elm.swallow.controlbar", "show", 0.0);
301                run_program(PROGRAM:"check_location");
302             }
303          }
304          program { name: "hide_controlbar";
305             signal: "elm,state,hide,controlbar";
306             source: "elm";
307             script {
308                set_state(PART:"elm.swallow.controlbar", "default", 0.0);
309                run_program(PROGRAM:"check_location");
310             }
311          }
312          program { name: "check_location";
313             script {
314                new st[30];
315                new Float:vl;
316                new indicator = 0, navi_bar = 0, content = 0, controlbar = 0;
317
318                get_state(PART:"elm.swallow.indicator", st, 30, vl)
319                if (!strncmp(st, "show", 4))  indicator = 1;
320                get_state(PART:"elm.swallow.navi_bar", st, 30, vl)
321                if (!strncmp(st, "show", 4))  navi_bar = 1;
322                get_state(PART:"elm.swallow.content", st, 30, vl)
323                if (!strncmp(st, "show", 4))  content = 1;
324                get_state(PART:"elm.swallow.controlbar", st, 30, vl)
325                if (!strncmp(st, "show", 4))  controlbar = 1;
326
327                // set navi bar
328                if (navi_bar == 1) {
329                   if (indicator == 1) {
330                      set_state(PART:"elm.swallow.navi_bar", "show_with_indicator", 0.0)
331                   } else {
332                      set_state(PART:"elm.swallow.navi_bar", "show", 0.0)
333                   }
334                }
335
336                // set content
337                if (content == 1) {
338                   if (navi_bar == 1) {
339                      set_state(PART:"elm.swallow.content", "show_with_navi_bar", 0.0)
340                   } else if (indicator == 1) {
341                      set_state(PART:"elm.swallow.content", "show_with_indicator", 0.0)
342                   } else {
343                      set_state(PART:"elm.swallow.content", "show", 0.0)
344                   }
345                   get_state(PART:"elm.swallow.content", st, 30, vl)
346
347                   if (controlbar == 1) {
348                      set_state(PART:"elm.swallow.content", st, 1.0)
349                   }
350                }
351             }
352          }
353       }
354    }
355
356    /*************************************************/
357    /* elm_layout -> searchbar style                 */
358    /*************************************************/
359    group { name: "elm/layout/searchbar/default";
360       parts {
361          part { name: "bg";
362             mouse_events: 0;
363             type: RECT;
364             description { state: "default" 0.0;
365                visible: 1;
366                color: 0 0 0 0;
367             }
368          }
369          part { name: "searchbar";
370             type: EXTERNAL;
371             source: "elm/searchbar";
372             mouse_events: 1;
373             scale: 1;
374                  description { state: "default" 0.0;
375                min: 0 SEARCHBAR_H;
376                fixed: 0 1;
377                align: 0.0 1.0;
378                     rel1.to: "bg";
379                     rel2 {
380                   relative: 1.0 0.0;
381                   to: "bg";
382                }
383                params {
384                   //string: "label" "my test";
385                   bool: "cancel_button_animation" "1";
386                }
387             }
388             description { state: "visible" 0.0;
389                inherit: "default" 0.0;
390                align: 0.0 0.0;
391             }
392          }
393          part { name: "elm.swallow.content";
394             type: SWALLOW;
395             mouse_events: 1;
396             scale: 1;
397             description { state: "default" 0.0;
398                align: 0.0 0.0;
399                rel1 {
400                   relative: 0.0 1.0;
401                   to: "searchbar";
402                }
403                rel2.to: "bg";
404             }
405          }
406       } //end parts
407       programs {
408          program { name: "show_searchbar";
409             signal: "elm,state,show,searchbar";
410             source: "elm";
411             action: STATE_SET "visible" 0.0;
412             target: "searchbar";
413          }
414          program { name: "show_searchbar_with_animation";
415             signal: "elm,state,show,searchbar,animation";
416             source: "elm";
417             action: STATE_SET "visible" 0.0;
418             transition: DECELERATE 0.3;
419             target: "searchbar";
420          }
421          program { name: "hide_searchbar";
422             signal: "elm,state,hide,searchbar";
423             source: "elm";
424             action: STATE_SET "default" 0.0;
425             target: "searchbar";
426          }
427          program { name: "hide_searchbar_with_animation";
428             signal: "elm,state,hide,searchbar,animation";
429             source: "elm";
430             action: STATE_SET "default" 0.0;
431             transition: ACCELERATE 0.3;
432             target: "searchbar";
433          }
434       } // end programs
435    } //end group