문제

I'm trying to improve a plotting library that I wrote with GtkD (the D bindings for Gtk). Scatter plots with a lot of points take a long time to resize. I want to rescale the image, allowing pixelation, while the user is dragging the window edge to resize, and only re-render it when the mouse button is released.

Is there an API to detect whether the user is still holding down the mouse button to drag the window edge when a window is being resized? If you are not familiar with GtkD, a response in terms of the C Gtk API would still be appreciated.

도움이 되었습니까?

해결책

you can add a 500 millisecond timeout to the redraw (resetting the timer on each resize event) this allows a user to see a preview while dragging

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top