Re: Mouse scroll wheel in wily

  • From: Davor Cubranic <cubranic@xxxxxxxxx>
  • To: wilyfans@xxxxxxxxxxxxx
  • Date: Mon, 12 Jul 2004 11:50:56 -0700

My modification was virtually identical, except for the addition of code
to vshow.c to handle mousewheel events over the scrollbar (otherwise
mouse wheel works only over the body of the window):

*** vshow.c     2004/04/03 05:12:48     1.1
--- vshow.c     2004/04/03 05:12:52
*** 182,187 ****
--- 182,193 ----
                n = back_height(v->t, v->visible.p0,  v->f.font,
                Dx(v->f.r), m->xy.y - v->f.r.min.y);
                view_set(v, n);
+       case UP:
+               view_linesdown(v, 1, false);
+               break;
+       case DOWN:
+               view_linesdown(v, 1, true);
+               break;
                runepos = (text_length(v->t) * y) / Dy(v->f.r);
                n = text_startOfLine(v->t, runepos);

Also, I'm not sure if the checks for cancelled DOWN/UP in mouse.c can
actually happen with the current mousewheel hardware. That is, you can't
press mousewheel down, then before releasing it press another button in
order to cancel the operation, the way you can with regular mouse
buttons. Actually, maybe you can with that IBM mouse that has a little
up/down joystick rather than a wheel.

I then built on the mousewheel scroll patch to search backward and
forward with B3+wheel, although that was more of an exercise than a
functionality that's obviously needed in wily.


Other related posts: