Le Thu, 8 Mar 2007 19:57:40 -0300,
"Gustavo Sverzut Barbieri" <[EMAIL PROTECTED]> a écrit :

> Hi guys,
> 
> I'm writing some test applications to understand EFL better and check
> performance on Nokia 770 and N800.
> 
> My current app is to simulate a vertical list of text items that move
> on keydown "Up" or "Down". I'm using e_box as base for list and
> allocating one object per item, as you recommended on a previous
> thread.
> 
> Problems/Questions:
>  - How should I proceed to scroll it? Get the height of item, the
> height of visible box and calculate e_box_align_set() vertical value,
> or is there another way?
>  - How to make this scroll animated? I see rage-0.1 does add an
> Ecore_Timer and use e_box_align_set() to move 1 row.

Hi I had have same issues, and I resolve it with same way as in rage :
the use of Ecore_Timer to smooth transitions. I use e_box.c to manage
list too. You can look my code here  
svn co https://enna.svn.sourceforge.net/svnroot/enna enna

in src/bin/enna_fm.c you can look how I use e_box to scroll large list. 

>  - Trying to be fancy I tried to add horizontal animation for items on
> mouse in/out events. On mouse in I set to "selected" state, on mouse
> out I set it to "default". "selected" has x=0.1, while "default" is
> 0.0, transition is sinusoidal. Problems are:
>      * I can lock up evas moving in and out fast. GDB tells me that
> it's stuck in _ecore_list2_append_relative(), called from
> _ecore_timer_set()... Why? Shouldn't it just work, since it's entirely
> in Edje?

It seems it's due to inherit: "default" in text part in state selected
of list_item group. I don't know realy whi but I have ever seen strange
behaviour when I don't repeat all description for antoher state, only
with text type. Maybe an edje bug ? I have modified your edc file, in
fact only the list_item group, to be better : 

 group {
      name: "list_item";
      parts {
         part {
            name: "base";
            type: RECT;
            description {
               state: "default" 0.0;
               min: 0 56;
               max: 99999 56;
               color: 255 0 0 0;
               rel1 {
                  relative: 0 0;
               }
               rel2 {
                  relative: 1 1;
                }
            }
         }


         part {
            name: "label";
            type: TEXT;
            effect: SOFT_SHADOW;
            description {
               state: "default" 0.0;
               align: 0 0.5;
               color: 255 255 255 255;
               color3: 0 0 0 128;
               text {
                  font: "Sans";
                  size: 35;
                  text: "List item";
                  align: 0 0.5;
               }
               rel1 {
                  to: "base";
                  relative: 0.0 0.0;
                }
               rel2 {
                  to: "base";
                  relative: 1.0 1.0;
               }
            }

            description {
               state: "selected" 0.0;
               inherit: "default" 0.0;
               align: 0 0.5;
               color: 255 255 255 255;
               color3: 0 0 0 128;
               text {
                  font: "Sans";
                  size: 35;
                  text: "List item";
                  align: 0 0.5;
               }
               rel1 {
                  to: "base";
                  relative: 0.1 0.0;
                }
               rel2 {
                  to: "base";
                  relative: 1.0 1.0;
               }
            }
         }
         part {
              name: "mouse_zone";
              type: "RECT";
              description {
                 state : "normal" 0.0;
                 color : 255 255 255 0;
              }
         }
      }

      programs {
         program {
            name: "select_list_item";
            signal: "mouse,in";
            source: "mouse_zone";
            action: STATE_SET "selected" 0.0;
            target: "label";
            transition: SINUSOIDAL 0.8;
         }
         program {
            name: "unselect_list_item";
            signal: "mouse,out";
            source: "mouse_zone";
            action: STATE_SET "default" 0.0;
            target: "label";
            transition: SINUSOIDAL 0.8;
         }
      }
   }

I just add new zone for mouse event. 
Hope I can help you.

Nico






___________________________________________________________________________
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son 
interface r�volutionnaire.
http://fr.mail.yahoo.com


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to