I've been working to port EWL to textblock2 and it's coming along pretty
well, but I've run into an issue. When I try to setup my triggers (for
areas that get mouse overs and that kind of thing) they don't seem to be
working.

The way I'm doing this is to do:

        cur1 = evas_object_textblock2_cursor_new(t->textblock);
        cur2 = evas_object_textblock2_cursor_new(t->textblock);

        evas_textblock2_cursor_pos_set(cur1, tb_pos_start);
        evas_textblock2_cursor_pos_set(cur2, tb_pos_end);

        /* get all the rectangles and create areas with them */
        rects = evas_textblock2_cursor_range_geometry_get(cur1, cur2);

Except rects is always NULL. I've check tb_pos_start and tb_pos_end and
they both have numbers that make sense. So, I took a look a the
textblock2 code and ended up looking at evas_textblock2_cursor_pos_set
and wondering, what the hell?

void    
evas_textblock2_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos)
{       
   if (!cur) return;
   if (!cur->node) return;
   if (cur->node->type == NODE_FORMAT) pos = 0;
   if (pos < 0) pos = 0;
   else if (pos > cur->node->len) pos = cur->node->len;
   cur->pos = pos;  
}                      
      
This will only move the position of the cursor inside the node it is
currently pointing too? Is that useful? I'd expect, given the name, that
it would position the cursor inside the textblock at the given position,
not in whatever node it's pointing too.

If this isn't a bug, what is the correct way I should be doing my EWL
code above?

Thanks,
dan




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to