octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zoom GUI in fltk backend


From: Shai Ayal
Subject: Re: Zoom GUI in fltk backend
Date: Fri, 24 Jul 2009 15:21:35 +0300

On Fri, Jul 24, 2009 at 2:42 PM, Ben Abbott<address@hidden> wrote:
>
> On Jul 23, 2009, at 2:51 PM, Shai Ayal wrote:
>
>> On Wed, Jul 22, 2009 at 9:31 PM, Shai Ayal<address@hidden> wrote:
>>>
>>> On Wed, Jul 22, 2009 at 3:58 AM, John W. Eaton<address@hidden> wrote:
>>>>
>>>> On 21-Jul-2009, Shai Ayal wrote:
>>>>
>>>> | Before I submit a changeset, I'll wait a bit to see if anyone else has
>>>> | any input on which buttons to use for what.
>>>> | Anyone have any more suggestions?
>>>>
>>>> I don't have any strong preferences about how it should work, but I do
>>>> think it would be good to have a way to zoom other than the scroll
>>>> wheel (or similar functionality from a mouse pad).
>>>>
>>>> Would you like for me to commit your earlier patch now?
>>>>
>>>
>>> Let me send a better changeset in a fwe days ...
>>>
>>> Shai
>>>
>> I attach a changeset incorporating Soren's and my precious patch. It
>> implements the following behavior for the fltk backend:
>> Keyboard Shortcuts (operate on the current axes):
>> a - autoscale
>> g - toggle grid
>>
>> Mouse (operate on the axes below the mouse pointer)
>> left drag - pan
>> mouse wheel - zoom
>> right drag - rectangle zoom
>> left double click - autoscale
>>
>> It laso chages the help buttons label from "H" to "?" which might help
>> people realize what it is.
>> Hopefully this compromise will satisfy all (Probably, as compromises
>> go, it'll just annoy everyone). Maybe in the future there will be some
>> mechanism to customize the backend, so everyone can be happy
>>
>> Shai
>> <fltk_zoom.changeset>
>
> Shai,
>
> On my mac I have a trackpad that allows me to pan and zoom.
>
> (1) Pan: click and stroke.
> (2) Zoom in: two fingers on pad and pinch (move them closer together).
> (3) Zoom out: two finger on pad and separate (move them farther apart).
>
> Using your patch, he panning works as expected.
> However, the zoom-in/zoom-out behavior has changed.
>
> (1) Zoom-in: two fingers on the pad and stroked to the right, left, or up.
> (2) Zoom-out: two fingers on the pad stroked down.
>
> Is this expected behavior?
I have no idea ...
It all depends on how the fltk library interprets the gestures you
make, which probably depends on how the OS translates the gestures
into scrollwheel equivalent. I know that in x-windows the scroll wheel
is just interpreted as another pair of buttons (on for up and one for
down), I don't know what happens in OSX. Are you running X?

fltk has some test programs, one of which reports keyboard/mouse
events. If you have fltk compiled from source they should be in the
test subdir of the distribution. If not, you can try and download them
from the fltk svn repository:

http://svn.easysw.com/public/fltk/fltk/tags/release-1.1.9/test/

compiling them might be challenging -- the Makefile might help you.
the relevant test is called keyboard.

Shai


reply via email to

[Prev in Thread] Current Thread [Next in Thread]