[wxPython-dev] FloatCanvas Question...

Niki Spahiev niki at vintech.bg
Thu Oct 5 01:07:32 PDT 2006


Bill Baxter wrote:
> That suggests you might want something like a stack of edit modes.
> When spacebar is hit you push the canvas-pan GUImode on top, when you
> release the spacebar that mode is popped off.  Maybe a stack is going
> to far though.  Maybe you'd only ever really want two levels, a
> primary GUImode, and a second "temporary overlay" GUImode.

Stack is great for transparent zoom/pan for example. We use it heavily 
in our app.

> Hmm, somehow it doesn't seem right that the GUImode would have to know
> about every canvas object that's out there.  But if that infos not in
> the GUImode, I'm not sure where it would be.  I don't have a better
> suggestion off the top of my head.

We use selection objects to hold either whole canvas or some of canvas 
objects. Selection is best described in MVP pattern (from Taligent IIRC).

Also GUImode can be implemented with Taskmaster pattern. Once i wrote 
taskmaster demo for wxPython.

Niki Spahiev





More information about the wxpython-dev mailing list