Re: [Doxygen-develop] [Doxygen] SVG/Layout
Brought to you by:
dimitri
From: Fred P. <j2...@ho...> - 2004-04-13 05:54:20
|
>Hi Fred, > >Sorry for the slow reply. That's okay. >On Thu, Mar 25, 2004 at 07:56:40PM +0000, Fred P. wrote: > > >I prefer to leave the non-dot algorithm as is for now and focus on the >dot > > >part only. > > > > Does this means you don't want 3rd party users (like me) > > modify the non-dot part and provide patch? > >You can always provide a patch if you think that the best approach is to >modify the non-dot part. Currently, I sent you complete file replacement instead of a "patch"... " For patches please use "diff -uN" or include the files you modified. If you send more than one file please tar or zip everything, so I only have to save and download one file. " Anything else? I'll clean it up and resent it to you, I will need a Config_getBool() thing. > > If you have any source code quality requirements or source code taste >let > > me know... > >If you can make it look like the rest of the code then that would be nice. That's fine, that's what I did, hopefully... >Also I don't like it if you would introduce new dependencies on external >libraries. Currently, I'm not. But if I was to do so, that would be #ifdef USING_DOT_LIB .... #endif so the thing compiles anyway without it, but developper could do otherwise... I really don't like to break things up... by experience ;-) In other words, you could build doxygen AS IS without it. However, you can use DOT as a library. You can also change it as needed (see AT&T license) as long as you provide them your changes too. The entire thing is documented. I also found out that we can use something like pos= arguments in neato to fix node in place before applying the neato algorithm. I also found out that we can 'extend' the DOT internal structure to add more 'custom' data into nodes/edges. So, if I was to use DOT as a internal or external library (libagraph.so)... http://www.research.att.com/sw/tools/graphviz/refs.html http://www.research.att.com/sw/tools/graphviz/Agraph.pdf http://www.research.att.com/sw/tools/graphviz/libguide.pdf I could simply feed it to neato in the described steps: int nG; /* number of vertices in g */ neato_init_graph(g); nG = scan_graph(g); shortest_path(g, nG); /* circuit_model(g,nG)) */ initial_positions(g, nG); diffeq_model(g, nG); solve_model(g, nG); adjustNodes(g); spline_edges(g); dotneato_postprocess(g, dot_nodesize); I might also simply try to go as far as I can go with the DOT file format, instead... will see. Currently, I'm still investigating what would be "the best approach". > > Currently, the simplest way for me 'right now' is to enhance the old >algo, > > until I merge or modify dot crazily. > > > > I need to produce UML diagram like these with 'all the extra >information' > > in it. > > In other words, the SVG diagram must know that a "function" is a >function, > > it must know where it is in the code (LOC/offset), the parameters, etc. > > in XML format or CDATA embedded inside SVG. > > Samething for namespace, class, function, variable. > > > > Think of it, as an 'intelligent' diagram. > > Obviously the level of verboseness should be configurable using the >Config > > file > > > > Currently, Doxygen produce "static" document with some clickable map >areas, > > the goal I try to accomplish is to create "dynamic" plus-value enhanced >web > > documents. > > > > Basically, someone could: > > - Drag and drop class around That's trivial, simple JavaScript/SVG. > > - Add/Remove class/functions/variables The difficult part is to calculate (x,y) where the text should go in JavaScript/SVG and reajust the length of the box in consequence. Basically, getBBox for the current font, would be easier if hard-coded, since getBBox don't give accurate results on ASV3/6... > > - Add/Remove/Modify source code If it's generated, it could be edited using a CGI form, you can also edit it using SVG, but scrolling/resizing text is still tricky/painful. Currently, it would work like webmail clients, sort of. I could also make it to accept diff/patch on the fly... as an option. > > - Add/Remove links Just delete it or make it invisible from the SVG using DOM. This is important since people will want to duplicate diagrams and "simplify them" for visualization purposes. In situation X, I want to create a new diagram Y and highlight A --> B --> C relationship or some design patterns, so I delete everything else which is useless for that given situation. > > - Reorganized things If [pos=] works as stated, figure 8, page 9 http://www.research.att.com/sw/tools/graphviz/neatoguide.pdf graph G { n0 [ pos = "0,0!" ]; n1 [ pos = "2,0" ]; n2 [ pos = "2,2!" ]; n0 -- n1 -- n2 -- n3 -- n0; } that's easy, just drag'n'drop things around with JavaScript and with XForms or XML-RPC, you can save that information. We would have to find a way to feed that information back into Doxygen... Any preference? Should it be internal or external to some header files or could be both!? Syntax: dot like, xml like, something else, something easy for flex? :-P The easiest? External file with simplified pseudo-static XML, basically something flex could parse. In other words, attributes would only be mandatory and accepted in a specific order. Another way a perl script server with XML::Simple doing the conversion. > > - Create new diagrams views explicitly and maintain those. Combination of above. > > - Visualize changes from CVS from v1.4 to 1.5 what was changed >graphically. That's more tricky, but I'm working on it. The easiest way would be parallel view, doxygen v1.4 in left frame and doxygen v1.5 in right frame, with a bottom frame for chosing the version comparision... let say. > > - Commit those graphical change back into data files, patches and >hopefully > > source code to be round-trip engineered. Combination of above. >That's quite a lot. But if you can add all this than that's definitely >nice. Hopefully, yes... if I want to graduate at some time! =P This is mostly research stuff, but I thing that your framework is quite nice to work with and it would be useful for lots of people. I might also submit you some "documentation" patch or documents or diagrams as I find my way into your source code, to help others. Some of it is "obvious" but some part is just a bit tricky. ;-) BTW, it might be useful to have SHTML or PHP3/4 output to reduce the doxygen'ed doxygen output under 90-100MB so you could put it live on sourceforge or simply cut off libpng, zlib and qtools from the generation process. If you ever do that make the generation into many sub dir, else good luck with ls, mv and rm... (I had to write a perl script to ls, mv or rm these files! eek..) " [doxygen.docs]% ls c* -bash: /bin/ls: Argument list too long " Also, if I want to add more "Config_getBool" fields I need to change: config.h and config.l --> config.cpp So, I will probably let you add those flex fields and use HARD compile-time #ifdef in the mean time. Sincerely yours, Fred. _________________________________________________________________ Add photos to your messages with MSN Premium. Get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines |