GnomeCanvas Enumerate Items
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm working on some graphing code using GnomeCanvas and I need to enumerate all
of the items in a tree. Something like the following:
let rec enumerate deep root =
whitespace deep;
match annotate root with
Group grp ->
print_string "- Group\r\n";
List.iter enumerate grp#get_items
| Line lne ->
print_string "- Line\r\n";
| Polygon poly ->
print_string "- Polygon\r\n";
| ...
This is going to be part of a PostScript writer, so eventually I'll need to get
the essential information about each of these but right now I'm just working on
the enumeration part. How would you go about writing the annotate function? Or
is there an easier way to do this?
Thank you very much.