MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / HL_Wheel_scroll_worker

Function HL_Wheel_scroll_worker

src/Helpers.c:2372–2403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2370 return 0;
2371}
2372VOID HL_Wheel_scroll_worker ( int lines )
2373{
2374 int anch , sel = 0;
2375 //
2376 if ( _hl_wheel_timer ) {
2377 HL_Trace ( "wheel timer blocked" );
2378 return;
2379 }
2380 _hl_wheel_timer = TRUE;
2381 SetTimer ( NULL , HL_WHEEL_TIMER_ID , _hl_wheel_timer_to , HL_wheel_timer_proc );
2382#if 0
2383 //
2384 anch = SendMessage ( hwndEdit , SCI_GETSELECTIONSTART , 0 , 0 );
2385 sel = SendMessage ( hwndEdit , SCI_GETSELECTIONEND , 0 , 0 );
2386 //
2387 if ( lines > 0 ) {
2388 SendMessage ( hwndEdit , SCI_PAGEDOWN , 0, 0 );
2389 } else if ( lines < 0 ) {
2390 SendMessage ( hwndEdit , SCI_PAGEUP , 0, 0 );
2391 }
2392 //
2393 SendMessage ( hwndEdit , SCI_SETSELECTIONSTART , anch , 0 );
2394 SendMessage ( hwndEdit , SCI_SETSELECTIONEND , sel , 0 );
2395#else
2396 anch = SendMessage ( hwndEdit , SCI_LINESONSCREEN , 0 , 0 );
2397 if ( lines > 0 ) {
2398 SendMessage ( hwndEdit , SCI_LINESCROLL , 0, anch );
2399 } else if ( lines < 0 ) {
2400 SendMessage ( hwndEdit , SCI_LINESCROLL , 0, -anch );
2401 }
2402#endif
2403}
2404VOID HL_Set_wheel_scroll ( BOOL on )
2405{
2406 if ( on ) {

Callers

nothing calls this directly

Calls 1

HL_TraceFunction · 0.85

Tested by

no test coverage detected