On Wed, 11 May 2011 21:53:44 +0300 Mika Laitio <lam...@pilppa.org> said:
> >> http://ists.pl/~alias/enlightenment/docs/cookbook/ch03s03.html > >> > >> was the most uptodate example I found from smart object creation > >> altought it still used "evas_smart_new" which has now been replaced with > >> struct Evas_Smart_Class and evas_smart_class_new method. > > > > what kind of enlightenment widget? elm? e17 itself? or just inside your app? > > I think it would be cool to have generic "xy graph widget" like > filedialogs, clocks, etc. in elementary. I assume that once done in that don't see how it's useful for file dialogs or clocks... tho for things like "cpu monitor graphs" and stuff i can see a use. > way, one could then re-use it on apps by creating edje file for example > with editje and then setup there some default values like: ok. so this would make elm depend on cairo. that's a much bigger leap. one i'd be, currently, unwilling to make. > - size and position > - title > - x-axis unit > - y-axis unit > - max and min x and y values > - some kind of grid_size_x and grid_size_y and values to indicate grid > size and sub-values shown in axises > - colors used for drawing axises (r,g,b,a) > - colors used for displaying caption texts (r,g,b,a) > - backround image/color > - array of values to show > > Of course it should be possible to override these values set to edje > file later from the code. that makes life much more difficult. the fact that the style, look, feel etc. cant be abstracted into a theme if you just draw with cairo and edje right now has nothing much of use here. at BEST you could use edje to provide parts of the graph - like the lines themselves and a polyline really is just a series of objects rotated and joined together. edje could then provide the look of the line segments themselves. but then what about the space between line and graph boundary (eg filling in the area under a graph and so on). basically you're opening up a can of worms as to how to do this and i think that before you jump into "make an elm widget and use cairo"... this needs to be solved at the edje level - what things does "drawing a graph" need and can it be abstracted by edje, and if so, how? > So you still think, I should write the graph drawing code with cairo and > then try to find out example code from Barbieri howto render cairo graph > to image that could be used by this widget. above. i think this is time to look at it from the edje side of things. as such almost all of what u need could be accomplished via evas's map feature and mapping quad points with filled in image content. i can begin to consider how this might be implemented, but edje probably needs a new primitive. a bit like dragable parts were a feature of a primitive created just so sliders and scrollbars can be made easily, and the textblock paret now has a whole entry blob of code behind it for editing text.. we probably need to look at a multi-segment part/element that can have N input values (eg 0.0 to 1.0) along a given axis and then edje defines how to display the line itself, the filled in regions above/below the line, how to limit the 3 of segments to a minimum size or maximum count for the primitive, and then it has to actually implement this using evas objects. i know it sounds hard, but doing things so they are later flexible and abstracted is. it can be done, but the place imho is edje. elm later can just take this edje feature and "drive it" at a higher level, much like elm_entry. -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel