On Sat, 05 Jul 2003, Krzysztof Foltman wrote:
> This patch is supposed to make middle button pan (scroll) the viewing
> area, unless menu bar is turned off (when middle button is used for
> invoking the main menu). To implement that, I needed to add two
> functions: tool_get and tool_restore, which will need to be adjusted
> after adding more complex tools (complex = requiring any parameters,
> like create object tool).
Thanks for the patch. I really like the idea, it gives an advantage to
having menu toolbar. However, I'm not applying it in its present form, as
it is rather kludgy. There's no reason to introduce two new static
variables for this -- the Tool already has userdata that could hold the
former tool data. So instead of storing the ToolState in
before_drag_state, store it in the userdata field of the new scroll tool.
Then, is_middle_panning becomes (tool->type == SCROLL_TOOL &&
tool->userdata != NULL). Just make sure that the normal scroll tool sets
its userdata to NULL.
> What about this mode: pressing middle button = panning, mousewheel =
> zooming ? I'm sure I've seen it somewhere, although instant zoom
> function may be not as useful in Dia as it is in other apps.
Instant zoom would probably be highly useful. That sounds like a good
combo.
Now on to other patches!
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HĂ„rdgrim of Numenor
"I do not agree with a word that you say, but I |----------------------------
will defend to the death your right to say it." | Where are we going, and
--Evelyn Beatrice Hall paraphrasing Voltaire | what's with the handbasket?