Hi Lyxers!
Back on the list again (after aprox. 3 years).
Downloaded lyx 1.0.3. I can see you've been quite busy.
For the moment I don't have concrete developing plans with Lyx,
I'll just watch this list for a while...
Anyway, here's a small patch for BufferView.C, method
BufferView::WorkAreaButtonPress(), line 986, where buttons
4 and 5 (the scroll wheel) are handled. Added acceleration support:
the faster the wheel is turned, the faster the screen is scrolled.
Something I also added to Xemacs, works really nice.
I know it's not an official cvs patch, so I hope it gets accepted. I'll
move to the cvs convention when I get deeper involved in Lyx
coding.
Cheers,
Robert van der Kamp
// I am not quite sure if this is the correct place to put this,
// but it will not cause any harm.
// Patch from Mark Huang ([EMAIL PROTECTED]) to make LyX recognise
// button 4 and 5. This enables LyX use use the scrollwhell on
// certain mice for something useful.
// Added wheel acceleration detection code. (RvdK).
static Time lastTime = 0;
if (ev->xbutton.button == 4){
ScrollUp(1);
if ( ev->xbutton.time - lastTime < 200 ) {
ScrollUp(1);
}
if ( ev->xbutton.time - lastTime < 50 ) {
ScrollUp(1);
ScrollUp(1);
ScrollUp(1);
}
if ( ev->xbutton.time - lastTime < 40 ) {
ScrollUp(1);
ScrollUp(1);
ScrollUp(1);
ScrollUp(1);
}
lastTime = ev->xbutton.time;
return 0;
}
if (ev->xbutton.button == 5){
ScrollDown(1);
if ( ev->xbutton.time - lastTime < 200 ) {
ScrollDown(1);
}
if ( ev->xbutton.time - lastTime < 50 ) {
ScrollDown(1);
ScrollDown(1);
ScrollDown(1);
}
if ( ev->xbutton.time - lastTime < 40 ) {
ScrollDown(1);
ScrollDown(1);
ScrollDown(1);
ScrollDown(1);
}
lastTime = ev->xbutton.time;
return 0;
}