Task TT-75 Implement "Main page loading UI" view
[profile/tv/apps/web/browser.git] / services / SimpleUI / edc / BookmarksManager.edc
1 #define WIDTH 473
2 #define HEIGHT 490
3 #define DEBUG_RECT_OVER(over_part, r, g, b)                         \
4     part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__));   \
5                                                                     \
6 scale:1;                                                            \
7         type : RECT;                                                \
8         repeat_events: 1;                                           \
9         description {                                               \
10             state: "default" 0.0;                                   \
11             visible: 1;                                             \
12             color: r g b 128;                                       \
13             rel1 { to: over_part; relative: 0 0; }                  \
14             rel2 { to: over_part; relative: 1 1; }                  \
15         }                                                           \
16     }
17 data { item: "width" WIDTH; item: "height" HEIGHT; }
18 color_classes{
19     color_class{
20         name: "defaultFontColor";
21         color: 211 211 211 255;
22     }
23     color_class{
24         name: "disabledFontColor";
25         color: 60 60 60 160;
26     }
27     color_class{
28         name: "selectedItemFontColor";
29         color: 255 255 255 255;
30     }
31     color_class{
32         name: "transparent";
33         color: 0 0 0 0;
34     }
35     color_class{
36         name: "selectedBackground";
37         color: 69 143 255 255;
38     }
39     color_class{
40         name: "dimmColor";
41         color: 0 0 0 128;
42     }
43     color_class{
44         name: "on_offBackgroundColor";
45         color: 255 255 255 255;
46     }
47 }
48 collections {
49     group{ name: "elm/genlist/base/bookmarks_manager";
50         min: 473 426;
51         max: 473 426;
52         parts{
53             part { name: "clipper";
54                 type: RECT;
55                 mouse_events: 0;
56                 description { state: "default" 0.0;
57                     rel1 {
58                         relative: 0 0;
59                     }
60                     rel2{
61                         relative: 1 1;
62                     }
63                 }
64             }
65             part{
66                 name: "background";
67                 type: RECT;
68                 description{
69                     state: "default" 0.0;
70                     color: 18 22 34 255;
71                     rel1{
72                         relative: 0 0;
73                     }
74                     rel2{
75                         relative: 1 1;
76                     }
77                 }
78             }
79             part{
80                 name: "elm.swallow.content";
81                 type: SWALLOW;
82                 clip_to: "clipper";
83                 mouse_events: 1;
84                 description{
85                     state: "default" 0.0;
86                     align: 0.5 0.5;
87                     fixed: 1 1;
88                     rel1{
89                         relative: 0 0;
90                     }
91                     rel2{
92                         relative: 1 1;
93                     }
94                 }
95             }
96             part{
97                 name: "elm.swallow.empty";
98                 type: SWALLOW;
99                 description{
100                     state: "default" 0.0;
101                     fixed: 1 1;
102                     rel1{
103                         relative: 0.5 0.5;
104                     }
105                     rel2{
106                         relative: 0.5 0.5;
107                     }
108                 }
109             }
110             part{ name: "dimmer";
111                 type: RECT;
112                 description{
113                     state: "default" 0.0;
114                     color: 0 0 0 128;
115                     visible: 0;
116                 }
117                 description{
118                     state: "popup_show" 0.0;
119                     inherit: "default";
120                     visible:1;
121                 }
122             }
123         }//parts
124         programs{
125             program{
126                 name: "show_popup";
127                 signal: "show_popup";
128                 source: "SettingsModel";
129                 action: STATE_SET "popup_show" 0.0;
130                 target: "dimmer";
131             }
132             program{
133                 name: "hide_popup";
134                 signal: "hide_popup";
135                 source: "SettingsModel";
136                 action: STATE_SET "default" 0.0;
137                 target: "dimmer";
138             }
139         }
140     }//group
141     group{ name: "elm/genlist/item/bookmarks_manager_item/default";
142         alias: "elm/genlist/item_odd/bookmarks_manager_item/default";
143         alias: "elm/genlist/item_compress/bookmarks_manager_item/default";
144         alias: "elm/genlist/item_compress_odd/bookmarks_manager_item/default";
145         min: 473 80;
146         max: 473 80;
147         data.item: "texts" "optionName";
148         data.item: "contents" "optionValue";
149         parts{
150             part{
151                 name: "value_helper";
152                 mouse_events:0;
153                 description{
154                     state: "default" 0.0;
155                     color: 0 0 0 0;
156                 }
157                 description{
158                     state: "on" 0.0;
159                     color: 0 0 0 0;
160                 }
161                 description{
162                     state: "off" 0.0;
163                     color: 0 0 0 0;
164                 }
165             }
166             part{
167                 name: "optionBackground";
168                 type: RECT;
169                 mouse_events: 1;
170                 description{
171                     state: "default" 0.0;
172                     color_class: "transparent";
173                     rel1{
174                         relative: 0.0 0.0;
175                     }
176                     rel2{
177                         relative: 1.0 1.0;
178                     }
179                 }
180                 description{
181                     state: "mouseOver" 0.0;
182                     inherit: "default";
183                     color_class: "selectedBackground";
184                 }
185                 description{
186                     state: "mouseOut" 0.0;
187                     inherit: "default";
188                 }
189                 description{
190                     state: "selected" 0.0;
191                     inherit: "mouseOver";
192                 }
193             }
194             part{ name:"optionName";
195                 type: TEXT;
196                 description{
197                     state: "default" 0.0;
198                     align: 0 0.5;
199                     min: 298 80;
200                     max: 298 80;
201                     color_class: "defaultFontColor";
202                     rel1{
203                         relative: 0.0 0.0;
204                         offset: 25 0;
205                     }
206                     rel2.relative: 1.0 1.0;
207                     text{
208                         size: 30;
209                         align: 0 0.5;
210                     }
211                 }
212                 description{
213                     state: "mouseOut" 0.0;
214                     inherit: "default";
215                 }
216                 description{
217                     state: "mouseOver" 0.0;
218                     inherit: "default" 0.0;
219                     color_class: "selectedItemFontColor";
220                 }
221                 description{
222                     state: "disabled" 0.0;
223                     inherit: "default" 0.0;
224                     color_class: "disabledFontColor";
225                 }
226             }
227             part{ name: "optionValue";
228                 type: SWALLOW;
229                 description{
230                     state: "default" 0.0;
231                     align: 0 0.5;
232                     fixed: 1 1;
233                     min: 100 40;
234                     max: 100 40;
235                     visible: 1;
236                     rel1{
237                         relative: 1.0 0.0;
238                         to: "optionName";
239                         offset: 25 0;
240                     }
241                     rel2{
242                         relative: 1.0 1.0;
243                     }
244                 }
245             }
246             programs{
247                 program{ name: "mouse_in";
248                     signal: "mouse,in";
249                     source: "option*";
250                     script{
251                         new cur_state_helper[31];
252                         new Float:index;
253                         get_state(PART:"optionName", cur_state_helper, 30, index);
254                         if(!strcmp(cur_state_helper,"default")){
255                             set_state(PART:"optionBackground", "mouseOver", 0.0);
256                         }
257                     }
258                 }
259                 program{ name: "mouse_out";
260                     signal: "mouse,out";
261                     source: "option*";
262                     script{
263                         new st[31];
264                         new Float:vl
265                         get_state(PART:"optionBackground", st, 30, vl);
266                         if(strcmp(st,"selected")){
267                             set_state(PART:"optionBackground", "mouseOut", 0.0);
268                         }
269                     }
270                 }
271                 program{ signal: "selected";
272                     source: "SettingsModel";
273                     action: STATE_SET "selected" 0.0;
274                     target: "optionBackground";
275                 }
276                 program{ signal: "unselected";
277                     source: "SettingsModel";
278                     action: STATE_SET "mouseOut" 0.0;
279                     target: "optionBackground";
280                 }
281                 program{ name: "go_disabled";
282                     signal: "elm,state,disabled"; source: "elm";
283                     action: STATE_SET "disabled" 0.0;
284                     target: "optionName";
285                 }
286                 program{ name: "go_enabled";
287                     signal: "elm,state,enabled"; source: "elm";
288                     action: STATE_SET "default" 0.0;
289                     target: "optionName";
290                 }
291                 program{ name: "go_Off";
292                     signal: "switch,off";
293                     source: "SettingsModel";
294                     action: STATE_SET "off" 0.0;
295                     target: "value_helper";
296                 }
297                 program{ name: "go_On";
298                     signal: "switch,on";
299                     source: "SettingsModel";
300                     action: STATE_SET "on" 0.0;
301                     target: "value_helper";
302                 }
303                 program{ name: "go_switch_hide";
304                     signal: "switch,hide";
305                     source: "SettingsModel";
306                     action: STATE_SET "default" 0.0;
307                     target: "value_helper";
308                 }
309             }//programs
310         }//parts
311     }//group
312     group{ name: "elm/ctxpopup/bg/bookmarks_manager_button";
313         parts {
314             part{
315                 name: "base_bg";
316                 type: RECT;
317                 mouse_events: 1;
318                 description{
319                     state: "default" 0.0;
320                     color: 0 0 0 0;
321                 }
322             }
323         }
324         programs{
325             program {
326                 signal: "mouse,clicked,*";
327                 source: "base_bg";
328                 action: SIGNAL_EMIT "elm,action,click" "";
329             }
330         }
331     }//group: "elm/ctxpopup/bg/bookmarks_manager_button";
332     group{ name: "elm/ctxpopup/base/bookmarks_manager_button";
333         max: 0 0;
334         parts{
335             part{
336                 name: "base";
337                 scale: 1;
338                 type: RECT;
339                 description{
340                     state: "default" 0.0;
341                     min: 185 164;
342                     max: 185 164;
343                     //color: 0 0 0 0;
344                     color_class: "transparent";
345                     visible: 0;
346                 }
347                 description {
348                     state: "visible" 0.0;
349                     inherit: "default" 0.0;
350                     color_class: "on_offBackgroundColor";
351                     visible: 1;
352                 }
353             }
354             part{
355                 name: "elm.swallow.content";
356                 scale: 1;
357                 type: SWALLOW;
358                 description{
359                     state: "default" 0.0;
360                     rel1{
361                         to:"base";
362                         relative: 0 0;
363                     }
364                     rel2{
365                         to:"base";
366                         relative:1 1;
367                     }
368                 }
369             }
370         }
371         programs {
372             program {
373                 signal: "elm,state,show"; source: "elm";
374                 action: STATE_SET "visible" 0.0;
375                 transition: LINEAR 0.2;
376                 target: "base";
377             }
378             program {
379                 signal: "elm,state,hide"; source: "elm";
380                 action: STATE_SET "default" 0.0;
381                 transition: LINEAR 0.3;
382                 target: "base";
383                 after: "hide2";
384             }
385             program { name: "hide2";
386                 action: SIGNAL_EMIT "elm,action,hide,finished" "";
387             }
388         }
389     }//group "elm/ctxpopup/base/bookmarks_manager_button";
390     group{ name: "elm/radio/base/bookmarks_manager_radio";
391         images.image: "check_foc.png" COMP;
392         images.image: "check_nor.png" COMP;
393         parts{
394             part{name: "item_bg"; type: RECT; mouse_events:0;
395                 scale: 1;
396                 description{
397                     state: "default" 0.0;
398                     color_class: "transparent";
399                     min: 185 82;
400                     max: 185 82;
401                 }
402                 description{
403                     state: "mouse_over" 0.0;
404                     inherit: "default";
405                     color_class: "selectedBackground";
406                 }
407             }
408             part{name: "left_spacer"; type: SPACER;
409                 scale: 1;
410                 description{
411                     state: "default" 0.0;
412                     min: 20 82;
413                     max: 20 82;
414                     align: 0 0;
415                     rel1{
416                         relative:0 0;
417                         to: item_bg;
418                     }
419                 }
420             }
421             part{name: "elm.text"; type: TEXT; mouse_events: 0;
422                 scale: 1;
423                 description{
424                     state: "default" 0.0;
425                     color_class: "defaultFontColor";
426                     align: 0 0.5;
427                     rel1{
428                         relative: 1 0;
429                         to: "left_spacer";
430                     }
431                     rel2{
432                         relative: 0 1;
433                         to_x: "indicator";
434                         to_y: "right_spacer";
435                     }
436                     text{
437                         size: 30;
438                         align: 0 0.5;
439                     }
440                 }
441                 description{
442                     state: "mouse_over" 0.0;
443                     inherit: "default";
444                     color_class: "selectedItemFontColor";
445                 }
446             }
447             part { name: "indicator"; mouse_events: 0;
448                 scale: 1;
449                 type: IMAGE;
450                 description { state: "default" 0.0;
451                     align: 1 0.5;
452                     rel2{
453                         relative: 0 1;
454                         to: "right_spacer";
455                     }
456                     min: 38 38;
457                     max: 38 38;
458                     visible: 0;
459                 }
460                 description {
461                     state: "selected" 0.0;
462                     inherit: "default" 0.0;
463                     visible: 1;
464                     image.normal: "check_foc.png";
465                 }
466                 description{
467                     state: "selected_mouse_over" 0.0;
468                     inherit: "selected";
469                     image.normal: "check_nor.png";
470                 }
471             }
472             part{ name: "right_spacer"; type: SPACER;
473                 scale: 1;
474                 description{
475                     state: "default" 0.0;
476                     min: 20 82;
477                     max: 20 82;
478                     align: 1 1;
479                     rel2{
480                         relative:1 1;
481                         to: item_bg;
482                     }
483                 }
484             }
485             part{ name: "event"; type: RECT;
486                 description{
487                     state: "default" 0.0;
488                     color: 0 0 0 0;
489                 }
490             }
491         }//parts
492         script {
493             public mouse_in() {
494                 new st[31];
495                 new Float:vl
496                 get_state(PART:"indicator", st, 30, vl)
497                 if(!strcmp(st,"selected"))
498                     set_state(PART:"indicator", "selected_mouse_over", 0.0);
499                 set_state(PART:"item_bg", "mouse_over", 0.0);
500                 set_state(PART:"elm.text", "mouse_over", 0.0);
501             }
502             public mouse_out() {
503                 new st[31];
504                 new Float:vl
505                 get_state(PART:"indicator", st, 30, vl)
506                 if(!strcmp(st,"selected_mouse_over"))
507                     set_state(PART:"indicator", "selected", 0.0);
508                 set_state(PART:"item_bg", "default", 0.0);
509                 set_state(PART:"elm.text", "default", 0.0);
510             }
511         }
512         programs{
513             program{
514                 signal: "mouse,clicked,1"; source: "event";
515                 action: SIGNAL_EMIT "elm,action,radio,toggle" "";
516             }
517             program{
518                 signal: "mouse,in"; source: "event";
519                 script{
520                     mouse_in();
521                 }
522             }
523             program{
524                 signal: "mouse,out"; source: "event";
525                 script{
526                     mouse_out();
527                 }
528             }
529             program{
530                 signal: "elm,action,focus"; source: "elm";
531                 script{
532                     mouse_in();
533                 }
534             }
535             program{
536                 signal: "elm,action,unfocus"; source: "elm";
537                 script{
538                     mouse_out();
539                 }
540             }
541             program{
542                 signal: "elm,state,radio,on"; source: "elm";
543                 action: STATE_SET "selected" 0.0;
544                 target: "indicator";
545             }
546             program{
547                 signal: "elm,state,radio,off"; source: "elm";
548                 action: STATE_SET "default" 0.0;
549                 target: "indicator";
550             }
551         }
552     }//group "elm/radio/base/bookmarks_manager_radio";
553
554     group { name: "elm/label/base/bookmarks_manager_label";
555        styles {
556           style { name: "label_style";
557              base: "font="FNBD" font_size=30 text_class=tb_plain align=center color=#d3d3d3ff";
558              tag: "br" "\n";
559              tag: "hilight" "+ font="FNBD" color=#d3d3d3ff text_class=tb_plain";
560              tag: "b" "+ font="FNBD" color=#d3d3d3ff text_class=tb_light";
561           }
562        }
563        parts {
564           part { name: "elm.text"; type: TEXTBLOCK;
565              scale: 1;
566              description { state: "default" 0.0;
567                 text { style: "label_style";
568                    min: 1 1;
569                 }
570              }
571           }
572        }
573     }
574 }//collections