On Mon, 2005-08-15 at 02:11 +0200, Steven De Groote wrote: > hi, > > I am a student in computer science and I'm currently working on a > project that involves graph drawing. > As some of you are probably quite experienced with drawing software I > would like to know how you keep track of objects that are drawn on the > canvas. > > I am drawing several things such as splines, however as the user clicks > I must be able to know which object he marked, but I'm stuck there.. > Do you have any advice on how to keep track what object is where? How is > that done in DIA?
When an object is selected. the application calls the SelectFunc on that object. Also, you could call object_is_selected to check if an object is selected or not (somewhat expensive operation) or diagram_get_sorted_selected(). This is better documented in current CVS. When you say "I must be able to know which object [the user] marked", what piece of code are you running? -Lars -- Lars Clausen <[EMAIL PROTECTED]> _______________________________________________ Dia-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/dia-list FAQ at http://www.gnome.org/projects/dia/faq.html Main page at http://www.gnome.org/projects/dia
