From: Gustavo S. B. <bar...@pr...> - 2008-05-20 07:05:28
|
On Tue, May 20, 2008 at 12:10 AM, Jose Gonzalez <jos...@ju...> wrote: > Gustavo wrote: > >> Anyone else looked at this? May I add the clipped smart object (no >> layout stuff!) to evas? I can add some docs and even change basic >> smart object to refer to this one for simple implementations. >> >> > > For those who are irc challenged, maybe you could give a short > overview of what it is this is supposed to help address, why it should > be 'added' to evas, etc. :) It's just a way to help implementation of smart objects. Most common use smart objectcase: create an internal clipper, clip every child to it, move will move children relatively to parent, clip/clip_unset/color/show/hide will all go to the internal clipper. Resize is undefined. What this code provide is this set of default method implementation and an easy to extend base class, just do like in the examples and provide your own methods (be it constructor or resize or show... you name it), which can call the parent. I exposed all the base methods to make it easier to use, one can override show() to do fancy stuff and still call the original to do real work, this could be done differently, having users to copy (ie: parent_class) Smart_Class after evas_object_smart_clipped_smart_set() Why should it be added to Evas: because it's very simple, it's useful and can serve as base for other things. Actually the idea of such component was born while I was teaching INdT guys and after documenting that you should always do the same stuff for most of methods I opted to add such default implementation and errors went down by a huge factor... actually nowadays it's hard to find a good case to use plain smart object itself. Al, one of things that I failed to figure in the past why show, hide, color_set, clip_set and color_set are ALL marked as DELETE ME. I don't remember for sure, but I think it was rephorm that did say that the common use case is like that and maybe these methods would be replaced with this default implementation only. So it's a good thing in that direction. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: bar...@gm... Skype: gsbarbieri Mobile: +55 (19) 9225-2202 |