Gustavo wrote: > On Mon, Oct 27, 2008 at 12:22 AM, Enlightenment SVN > <[EMAIL PROTECTED]> wrote: > >> Log: >> add evas_object_box. >> >> Box is a smart object to help with the common task of laying out lots >> of objects. It's very flexibile and one can customize the layout >> function on a per-object basis dynamically, just set a new layout >> function (the most common are provided). By default layouts use size >> hints from children to do their work, but one can also add new >> properties, just subclass with evas_object_smart_smart_set() and then >> define your own option_* callbacks. >> >> This code was ported from Guarana (widgets/sequence_box.c) with >> permission of ProFUSION embedded systems so it can be relicensed from >> LGPL to Evas license. >> >> Original author: Gustavo Lima Chaves <[EMAIL PROTECTED]> >> Port: Gustavo Sverzut Barbieri <[EMAIL PROTECTED]> >> > > This code is part of our effort to unify common code into base libs, > where its worth to avoid duplicating code over and over again. > > With that in Evas, we can now expose it in Edje and use it in Guarana > and Elementary and possible any other toolkit. It uses Evas_Object's > size hints infrastructure, but can be extended to have its own > properties if one wish. > > Attached is a test case and example. You can try to hack your own > fancy layout function, it's it's generic and useful to others, add it > to evas as well (Like layout using a Bezier or any other path). > > People implementing Ecore Evas can now use layout "stack" and > ecore_evas_object_associate() to provide the "main window" concept, > just add your background and then your object to the evas_object_box > and associate this box to the window. If you want your background to > scale in both directions, just set it's aligns to -1.0 and -1.0. > > This is the kind of thing that I hoped evas would avoid tending to, and yet both raster and gustavo seem prone to want to get into. :( I know it's tempting to add more and more specialized layout/widgetry 'objects' to the core evas lib/api, but I think it's a big mistake for evas in the long run.
It's not hard to start extending evas *and* edje to allow for custom objects, even if at first all such object modules need to access evas internals. Adding these kinds of things, whether text-grid objs, or box objs, or table objs, etc.. directly into the evas lib api is likely to become 'not a good idea'. ____________________________________________________________ Get help now! Click to find the right drug rehab solution for you. http://thirdpartyoffers.juno.com/TGL2141/fc/Ioyw6i3nCeLigAmJXBfTuEsSFYmM6hirn9RsaONj83V0V7Xrmvw3qE/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel