On Mon, Mar 24, 2008 at 9:12 PM, Gustavo Sverzut Barbieri
<[EMAIL PROTECTED]> wrote:
> http://staff.get-e.org/~barbieri/ehelpers.tar.gz
>
>  This should provide what I said these days in IRC. It's a draft, for
>  real code things like member_add() should check if's really a smart
>  and maybe check if this Evas_Object_Smart_Clipped_Data is correct,
>  maybe using an integer there with a magic number... I just left this
>  out as if we use hooks then it goes away.
>
>  As you can see the implementation is still generic enough and we could
>  write our "layout" stuff on top of that easily, just implement the
>  resize() callback to call reconfigure(), a function that would be
>  called internally on child_add() and whenever things changed (ie:
>  child size).
>
>  If you agree with that I'll provide a layout example on top of it.

Ok, since it was fresh in my mind I hacked a simple layout api + vbox
implementation. It's very raw, just a proof of concept that with such
api implementations are really simple. One of the things that it
doesn't do is care about dirty/clean state, as we discussed here and
some other places that if we had smart_pre_render exposed like for
other regular objects, we could do the recalcs there, so this per
object "freeze/thaw" would not be required anymore.

>From evas_object_layout_basic.c you can see that doing a real vbox is
just a matter of doing the math there to align, add borders/margins,
considering size hints/policy (once they're in Evas_Object*)

Also, one thing left out is a call to return the required size to fit
all children in that layout. We'd need this to allocate size properly
and also to align the bounding box of items inside the object area, if
the layout wants so... this would be like edje_object_size_min_get().
For some layouts, ie: vbox, is just to sum all the object's height and
their spacing/padding. For some others, like flow, it would require
more complex calculation that could be cached/shared with reconfigure.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi
Embedded Systems
--------------------------------------
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to