Astan Chee wrote: > Hi Chris, > thanks for all the tips. Im putting them in now and see how that one goes.
keep us informed. > Also, unbinding and binding them back together, I was going to try it > but what if there are over a hundred of objects that have to be > re-binded? isnt this solution only ideal for small examples? maybe -- as I said there may be a need for some re-factoring -- maybe a way to have multiple bindings, so you can add one "on top" that will take over, then when that one is removed, the old binding remains. > Also good idea for GUIModes, it might be a possible solution. I know > what you mean. It seems I'm after the 'all-in-one' mode or a typical > windows-ish interface of drag n drop. Well, I don't know your application, but it's very common for mouse actions to have different effects at different times. Any sort of drawing program has modes to zoom in and out, select objeccts, edit objects, create particular objects, etc. Switching modes doesn't have to require the user clicking a button -- it could happen automatically, like when you are in "select object" mode, then, when the user selects and object, you go into "edit object" mode, for instance. > Christopher Barker wrote: >> "What object(s) just got hit?" >> > I thought the BBox.Inside does this? or at least the BBox methods. sort of -- you can use that, but you have to loop through all the objects, and then you only know if you've hit within the bounding box. imagine a diagonal line -- it's a skinny line, but it has a huge bounding box: ............. :\ : : \ : : \ : : \ : : \ : : \ : : \ : : \ : : \ : : \ : :..........\: (if this ASCII Art makes any sense) In general, you'll want to know if the line itself has been hit. There are various way to do that, and as I think about it, it's probably pretty easy to leverage the existing infrastructure so that you can "bind" and object to a None event, then it will be "hitable", and then we can make a method: FloatCanvas.GetHitObject((x, y)) And it will return the object hit (of those that have been bound to something -- hmmmm. You could also make all objects hitable by default, but that would cause a performance hit if you didn't really want them all hitable. I hope I'll have some time to work on this. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
