On Mon, Oct 27, 2008 at 8:29 AM, Jose Gonzalez <[EMAIL PROTECTED]> wrote: > 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'.
this requires no access to internals, it's just a helper to avoid spreading this code everywhere (e_box, guarana, elementary, etk...). the point is, raster always planned to have dynamic layout options in Edje, so it's possible to specify in Edje if you want a stack, vertical or horizontal layout and in code you add the objects. To add this we need this kind of code. We could create yet another library (like split esmart into edje independent and dependent code) and add this there, make edje dependent on it, but it will be lot of work to get a simple and useful code in. Since evas already have internal libs in it, at some point we can create a libevas_utils and users can optionally link to it. That way we keep things in a common place and avoid extra overhead. Our point is to do now what others should have done already: unify stuff. Size hints, box, editable text block and these stuff should go in Evas and make it easy to share stuff and easier to use EFL. I always hear, at least from ETK, that some things were re-done in ETK just to work around some problems in Evas or Edje, I consider that wrong, these stuff should be fixed there, and that's what we're doing. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [EMAIL PROTECTED] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------- 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