Delivered-To: lablgtk at yquem.inria.fr Date: Sat, 05 Jan 2008 17:09:33 +0900 (JST) Message-Id: <20080105.170933.98869039.garrigue at math.nagoya-u.ac.jp> To: lablgtk at yquem.inria.fr From: gmalecha at rice.edu Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Lablgtk] GnomeCanvas Enumerate Items Content-Type: Text/Plain; charset=us-ascii Content-Length: 868 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. _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk