Canvas gadget mouseX, MouseY
Posted: Sat Jan 11, 2014 4:21 pm
Hi,
the canvas gadget is now (as of PB 5.21 LTS) really really useful for custom control freaks like myself, - very pleased.
However, just one request please. The #PB_Canvas_MouseX and #PB_Canvas_MouseY attributes are very useful, but can only be used following an event specific to the canvas gadget. Any chance these can be altered so that they return valid results even when an event is not being processed? The reason I ask is that I use a lot of timers with canvas gadgets and they ideally need to be able to locate the cursor in client coords in a cross-platform manner when no events may have occurred. On Windows of course we can use MapWindowPoints_() etc. Unsure what the equivalent is on other platforms? I have tried posting dummy events in order to try and fool #PB_Canvas_MouseX, but no joy!
I have workarounds since my timers are presently only running when a mouse button is down and so I can track the cursor through #PB_Event_MouseMove etc, but it is a bit messy.
Thanks.
(My apologies if this has already been requested.)
the canvas gadget is now (as of PB 5.21 LTS) really really useful for custom control freaks like myself, - very pleased.

However, just one request please. The #PB_Canvas_MouseX and #PB_Canvas_MouseY attributes are very useful, but can only be used following an event specific to the canvas gadget. Any chance these can be altered so that they return valid results even when an event is not being processed? The reason I ask is that I use a lot of timers with canvas gadgets and they ideally need to be able to locate the cursor in client coords in a cross-platform manner when no events may have occurred. On Windows of course we can use MapWindowPoints_() etc. Unsure what the equivalent is on other platforms? I have tried posting dummy events in order to try and fool #PB_Canvas_MouseX, but no joy!

Thanks.
(My apologies if this has already been requested.)