scroll wheel on wx

Hi,

I have a patch which implements the scroll wheel on wx using the
wx mouse wheel event.

Rather than a simple up/down mouse event wx uses:
    delta: intervals per click
    rotation: number of clicks
    rate: number of lines per click

I convert this to:
    step = rotation*delta/rate

I've added the step attribute to the mpl MouseEvent in addition to the
usual up/down button (up if step >= 0, down otherwise).

I removed the mpl_connect from the scroll event to pick. I don't know
why it was there.

I tested the patch on OS X WxAgg examples/image_slice_viewer.

Let me know if it is okay to post to svn, or if we are still in feature
freeze.

  - Paul

mousewheel.diff (4.19 KB)

As long as you are reasonably confident that this won't break existing
code, go ahead and commit it. In the next day or two, if nothing else
serious arises, I'd like to cut 0.91.2 if Charlie has time.

JDH

···

On Dec 11, 2007 6:51 PM, Paul Kienzle <pkienzle@...537...> wrote:

I removed the mpl_connect from the scroll event to pick. I don't know
why it was there.

I tested the patch on OS X WxAgg examples/image_slice_viewer.

Let me know if it is okay to post to svn, or if we are still in feature
freeze.