Jamie Bullock wrote: > Does anyone know if there is an existing way to bind to a ZOOM event, > when zooming is done via the NavCanvas zoom tools?
nope. > I would like to be able to do something like: > > self.Bind(EVT_NC_ZOOM_IN, self.on_nc_zoom_in) > ?self.Bind(EVT_NC_ZOOM_OUT, self.on_nc_zoom_out) > If this functionality isn't in NC already, I'll happily submit a patch. That is a good idea. What I'd like to do is use wx.lib.pubsub to handle the events in NavCanvas. I came up with an issue where the use might want to chagne the Mode of the Canvas some other way than the toolbar. but we need the toolbar to update to reflect the change, so pubsub really makes sense -- That way the mode can be changed from anywhere, and both the Canvas and the toolbar, etc can be updated. Once pubsub is in place, the same mechanism could be used to capture zoom events. In the meantime, you could probably just add a new event to FloatCanvas, and have it raised when the FloatCanvas.Zoom() is called. I"d do that, rather than anything in NavCanvas. that way you can capture all zoom events, no matter how they are initiated. -Chris _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
