FLTK logo

[fltk.coredev] Fl_Scroll: Add possibility to get notified when scroll position changes?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Fl_Scroll: Add possibility to get notified when scroll position changes? Jakub HolĂ˝ Sep 09, 2022  
 
Hello, awesome FLTK devs!

I find myself needing to get notified and run custom code when scrolling is happening / stops. Currently there seems no way to achieve that. Perhaps it would be generally useful if Fl_Scroll had callback(s) triggered when its x/yposition changes.

Background: I am making a file explorer for pictures, displaying thumbnails. For performance reasons I only show thumbnails of pictures in the visible viewport. When the user scrolls to a new position (or is scrolling slowly), I want to load and show also these newly visible pictures' thumbnails. Thus I want to trigger the image loading function when scrolling ends.

Obviously FLTK lived fine without this for many years and I was able to implement this by querying the scroll's yposition every 100ms, so it might not be worth the effort. But it would be nice.

Best regards, Jakub Holy

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/bc5dadc7-af1b-4631-a6f0-2e6a5f576f7en%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.