On Tue, Dec 23, 2008 at 4:32 PM, Christopher Barker <[email protected]>wrote:
> Marcos Duarte wrote: > > I will be treating the different canvas completely independent. They can > > represent different views or not. > > > So, if you could demonstrate how to make a FC2 app with one guimode and > > more than one canvas, this would be great. > > 1st -- MDI is an abomination -- please reconsider! > > I heard that before, but MDI seemed to be convenient and easy to use (for a newbie) in win/wxpython... The possibility of seeing more than one image (canvas) at the same time and easily arranging them on the screen is a requirement for my application. It seems I can do something very similar (and many other things) with wx.AUI, I will switch to that. Thanks for the emphatic comment. > That being said: > > I think you have two options: > > 1) refactor the toolbar to set the GUImode on the current "selected" > canvas. The issue here is the the mode object itself keeps various state > parameters, so you may need to have a different instance of each GUIMode > for each Canvas -- or just make sure it gets re-set. > > 2) have a different toolbar for each Canvas, and swap them out when the > active canvas changes -- I'm not familiar enough with MDI to know if > that will work well. > > I tried to change the GUImode to work with multiple canvas but them I switched to option 2, which was much easier. Now, I have two toolbars, a general toolbar for things like open, save, new canvas, open/export image, and a toolbar in each canvas, with the buttons move, zoom in, and zoom out (the buttons which I couldn't make them to work on the general toolbar); iIt works good. Later, I might refactor the GUImode for that but it is not a big deal. best Marcos
_______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
