GNOME Bugzilla – Bug 88610
Need nice hierarchy picture
Last modified: 2005-02-14 11:47:29 UTC
I'd like someone to draw a nice graph/picture of the gtkmm widget hierarchy. The doxygen-generated hierarchy graph is a bit wacky. You could start with just the Gtk:: widgets. Ideally you would do this in an editable format, such as Dia, but I'm no expert on linux drawing programs.
Just to understand what you want, what's wacky about doxygen's class diagrams?
They include irrelevant classes, resulting in a very flat (but left-to-right). Install doxygen and enable the hierarchy graph option to see the result. We need something like this: http://doc.trolltech.com/3.0/classchart.html or this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_hierarchy_chart.asp
Ok, I have something, it's far from finished, but I'd like to avoid duplication of effort. Look at http://people.debian.org/~mmagallo/gtkmm.dia.gz; any help or comments are welcomed.
Thanks for starting this. It doesn't need to include Pango and Gdk stuff - that can be in a separate picture. It might need the Gtk:: prefixes, but that not be necessary if it only shows stuff from Gtk::. What do the colors mean? Do you have any idea about how to make the output into a clickable image map so that we can click on a box to go to the reference page for that widget?
> What do the colors mean? Those are the namespaces. Gtk is the yellow one. I'll add a legend. > Do you have any idea about how to make the output into a clickable > image map so that we can click on a box to go to the reference page > for that widget? Hmmm... no, dia doesn't support this, but writing an imagemap output module shouldn't be that hard. It's just a matter of adding a bit of inteligence to the PNG exporter I guess. There should be an imagemap creation tool for unix somewhere, one could use that, too. I'll give this some thought.
I would prefer to just leave the other namespaces out of it. It's widgets that people care about.
Are you still working on this, or shall I mention it on the list?
We still need this.
This GTK+ heirarchy might help: http://developer.gnome.org/doc/API/2.0/gtk/ch01.html
I just downloaded the hierarchy chart that mmagallo@debian.org was working on and it looks like it just needs some polishing and some quick fixes. I'll keep working on it and post my progress on Monday. I can't promise anything spectacular because of school (it's 5 weeks until the end of the semester), but I'll do what I can.
Quick question: do you want multiple inheritance shown on the diagram? For example, Gtk::ListStore inherits from Glib::Object, Gtk::TreeModel, Gtk::TreeSortable, Gtk::TreeDragSource, and Gtk::TreeDragDest. Do you want all those lines on the diagram?
Multiple inheritance might be nice if it doesn't complicate things, but for now you might choose just to show widgets to make it simpler. Do read my comments from before - this doesn't need to be complicated.
Created attachment 15585 [details] This is what I have done so far. Is this what you're looking for? If not, let me know and I'll figure something else out.
Please mention the file name when attaching files. It's not clear what file type this is. It looks quite nice, but still a little confusing. I really think we should just start with the Gtk:: namespace, and maybe just the widgets. For instance, that might mean just the things that derive from Gtk::Widget.
Hello?
I notice there's been no activity on this for more than a year, but I assume this is still needed? I'm going to go ahead and start working on it tonight, because, well, I need something to do.
Yes, it's still need. You help is welcome.
Did you make any progress with this?
Created attachment 36037 [details] widget hierarchy It's a boring job but someone has got to do it. So i made this widget hierarchy chart. Comments are welcome, please check it for completeness and typo's. If this seems usefull then i will make a html page with an imagemap and links to the reference documentation (that sounds even more boring) I will then also submit the dia source document of course.
That looks really good. Thanks. Some minor comments: 1. FileSelectionDialog is deprecated. FileChooserDialog should be used now. 2. We need to show the new gtkmm 2.6 widgets - see the NEWS file. 3. "HBottunBox" is misspelt. I hope that you are creating this with a vector-graphics program (such as Inkscape, for instance). If so, could you upload the original vector-based document?
Created attachment 36101 [details] gtkmm widget hierarchy Changed FileSelectionDialog to FileChooserDialog Corrected HBottunBox. Added: ComboBoxEntry ComboBoxEntryText ComboBoxText FileChooserButton FileChooserWidget these are the new widgets i found in NEWS, please inform me if i missed any.
Created attachment 36102 [details] dia source file
Created attachment 36243 [details] updated picture Added: ColorButton FontButton SeparatorToolItem ToolButton MenuToolButton ToggleToolButton RadioToolButton
Created attachment 36245 [details] Dia source file
Created attachment 36253 [details] updated picture added: HSeparator VSeparator AboutDialog SpinButton I think i got them all now. I tried to to keep the picture small enough to fit it in a browser on a 1280x1024 display, but it has become a little cramped, it would probably be clearer with a higher picture. What should we favor, picture size or clarity?
Created attachment 36486 [details] Imagemap widget_hierarchy.dia -> dia source file gtkmm_logo_small.png -> logo used in dia source These files should be placed in the documentation /reference/html/ directory: widget_hierarchy.html widget_hierarchy.png Imagemap with links to reference documentation. If these should go in another directory just say so and i will change it (takes just one find/replace operation)
Well done. What is the filename (with extension) of that ImageMap? I have not used one before. I would prefer to put this in docs/reference/ instead of docs/reference/html, because the html directory is for generated files and is sometimes completely deleted. > I tried to to keep the picture small enough to fit it in a browser on a 1280x1024 display. Let's not worry about that too much, though that would be nice. I would prefer to have some vertical space between groups of widgets. For instance, I would like some space between Window (the last child of Bin) and HPaned (the first child of Paned). Hopefully this would not make the right-most side too spaced-out.
That last attachment was widget_hierarchy.tar.gz containing: widget_hierarchy.html widget_hierarchy.png widget_hierarchy.dia gtkmm_logo_small.png The imagemap is the combination of the first two (just open the html). I will move it to docs/reference/ and i will see what i can do about that space between groups.
Created attachment 36912 [details] widget_hierarchy.tar.z I added some space between groups. I think it looks better this way. The html and png should go in /docs/reference/
Wonderful. I am really pleased with this. Added to the gtkmm HEAD branch. Could you please make some notes about how you made the image map from the dia original? I hope that you did not have to figure out all those coordinates by hand.
Thanks, i'm glad you like it. Creating an imagemap is really quite simple, i exported the png image from dia then i used The Gimp imagemap plugin and KImageMapEditor to make the map, with these you drag a rectangle in the image and attach an url to that. I dont't know if this is te best or most simple way to do this because this is the first time i ever did something like this, but it worked fine for me.