Proposal: Canvas Interaction Enhancements

Dmitry Kazakov dimula73 at gmail.com
Thu May 24 18:59:23 UTC 2012


Hi!

I was thinking about this problem last yeat as well. And there are a couple
of ideas that might be interesting to you:

1) About all these "modes" of the tools like "Color Picking" and
"Shift+Drag". You need to be quite careful with them, because there are
various sequences of pressing a modifier and mouse button. For all the good
applications it is common that the mode is exited only when *the last*
component of the modifier+key is released.

For example (in e.g. Gimp):
i) Press Ctrl+Left Button and start moving the mouse
ii) Release Ctrl. You are still in the color picking mode. And the mouse
cursor is still persist.
III) Now you and press *any* modifiers as many times as you wish but you
will not leave color picking mode unless you release the mouse.

Such behavior can be described with a state machine easily. Probably, it
can be implemented in a way like that.

2) A good way to describe modes of the tools is using of
KoInteractionTool+KoInteractionStrategy. We have it but it is not commonly
used yet. It is at least used in DefaultTool and KoZoomTool.

3) We still need to handle Ko-wide tools as well.

4) Last year I proposed a design of a system like that, but I never
implemented it. It should have had a central class as well as you proposed
(KoModifiersManager).

Here is a short description of it.
http://community.kde.org/Calligra/Libs/Interactional_Tools

You can use it as a base for your system ;)



-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20120524/3460d0a8/attachment.html>


More information about the kimageshop mailing list