I just checked the default behavior on Win32: 'line scroll' scrolls by 1 exactly as the Mac, but 'page scroll' works dirrently: on Mac, page scroll also scrolls by 1. On Win32, page scroll on a scroll bar (which is done by clicking inside the scroll bar, on the left or right of the scroll knob.)
The page scroll amount is actually calculated as the 'visible' part when calling SetSliderRange(). You can see it with in code from win32slider.cpp
So in order to be able to catch 'line scroll' and 'page scroll' event from EVENT_GADGETACTION like I posted for the Mac, you just have to modify this function a little bit:
I hope that this can help :)
Note: again, the preferable way to do this modification would be to have a new method 'SetSliderDelta' or similar that would allow the user to customize line and page scrolling value, but in any case it could be useful to be able to differenciate them from regular 'scroll bar dragging' scroll.
The page scroll amount is actually calculated as the 'visible' part when calling SetSliderRange(). You can see it with in code from win32slider.cpp
info.nPage=visible; SetScrollInfo( _gadget.hwnd(),SB_CTL,&info,true );
So in order to be able to catch 'line scroll' and 'page scroll' event from EVENT_GADGETACTION like I posted for the Mac, you just have to modify this function a little bit:
LRESULT Win32Slider::wndProc( HWND hwnd,UINT msg,WPARAM wp,LPARAM lp,WNDPROC proc ){ SCROLLINFO info={sizeof(info)}; int event_x = 0; ... switch( LOWORD(wp) ){ case SB_LINELEFT: event_x = -1; break; case SB_PAGELEFT: event_x = -10; break; case SB_LINERIGHT: event_x = 1; break; case SB_PAGERIGHT: event_x = 10; break; case SB_THUMBTRACK: case SB_THUMBPOSITION: ... } emit( BBEVENT_GADGETACTION,value(),0,event_x ); return 0; }
I hope that this can help :)
Note: again, the preferable way to do this modification would be to have a new method 'SetSliderDelta' or similar that would allow the user to customize line and page scrolling value, but in any case it could be useful to be able to differenciate them from regular 'scroll bar dragging' scroll.