URL:
<http://gna.org/bugs/?18574>
Summary: Need a better abstraction of canvas interaction
modes
Project: MyPaint
Submitted by: achadwick
Submitted on: Sat 27 Aug 2011 12:46:51 AM GMT
Severity: 5 - Blocker
Priority: 6
Status: Wish
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: git 796d220
Planned Release: None
Operating System:
_______________________________________________________
Details:
Blocks bug 17856, bug 17983, and bug 18423; maybe others.
As mentioned in the bugs above and on the mailing list[1], we need a better
abstraction of how the user switches between different ways of interaction
with the canvas. Currently this is handled by gui/stategroup.py and a bunch of
special modifier key detection in the drawing motion handlers. Exiting a State
looks hairy and I find it difficult to wrap my head around!
So, planning this slice of work:
* MyPaint should be in just one mode at a time.
* Mode objects should provide drawing routines for any fancy overlays they
do, and handlers for what happens when the user mouses around on the canvas
while in the mode.
* Modes need to be bindable to gtk.Actions so they can be activated (entered)
reliably from menu and toolbar entries. Probably RadioActions would be the
best fit.
* Ideally, make the current modifiers enter and leave their equivalent Mode
while the key is held: in other words make them "spring loaded"[2] on shift,
ctrl or whatever. This may require a small history stack of modes, or a ref to
the previous mode somewhere.
* Retain existing State leaving conditions: timer, move-outside,
perform-action etc.
The list of modes should probably be something like that in [1].
Specifically:
* freehand painting (with the current brush blend mode)
* line drawing (x2: with continuation and without; using the current brush
blend mode)
* frame editing (as yet unimplemented ☺)
* colour changing (arguable; may not really be a mode; oneshot if it is)
* pickers (x3: layer, color, context; should be oneshots)
* (arguably) panning, rotation, zooming (x3; all oneshots)
* (arguably) resizing the brush with on-screen feedback (as yet
unimplemented; bug #18423)
A "one-shot mode"[3] is one which does one thing then resets to a different
mode when the action is complete.
[1] https://mail.gna.org/public/mypaint-discuss/2011-07/msg00030.html
[2] http://www.useit.com/alertbox/springload.html
[3]
http://books.google.com/books?id=oCTSeKfMaWUC&lpg=PA257&ots=mmf4eYTZPx&dq=designing%20interfaces%20%22spring%20loaded%20modes%22&pg=PA255#v=onepage&q&f=false
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?18574>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs