I am building app that is something similar to photoshop or illustrator where
you have several tools to choose.

I want to use a State Object pattern, where selecting a tool changes the state
of the app. I then want to have the mouse throw different events depending on,
which tool is selected rather than have state objects in my listeners or having
conditionals or table look up in my listeners.

I am using custom mouse pointers for tools so what I am wondering is, is it
possible for my custom systemmanager or cursormanager to tell when a click,
doubleclick, or drag happens? If so then I was thinking the systemmanager or
cursormanager could know what tool is selected, thus what mode/state the app is
in, and send out different events for say mouse clicks.

So:

fingermouse's click = open thing clicked
zoommouse's click = zoom in 25%
mousepointer click = select to transform
pointer with a + on it = add a new thing to stage
ponter with a - on it = sub a new thing from stage

TIA, J

Reply via email to