When a WINDOW() graphic is created, the position on the screen can be set with the LOCATION keyword, that can be used only at the initial creation. When handling mouse clicks through a subclass of 'GraphicsEventAdapter', I would like to find out where the window is currently located (or the location of the click in the coordinate system of the entire screen), particularly if the window has been dragged around by the user. The 'ConvertCoord' doesn't seem to work for this, since with the /TO_DEVICE keyword set it only seems to return pixel coordinates within the WINDOW() itself, rather than the entire screen. If WIDGET_WINDOW is used within a WIDGET_BASE, then WIDGET_INFO(base,/GEOMETRY) does work to get the correct offset, even if the window was moved around since creation. I'm looking for a way to get the position with a regular WINDOW() object. (With the old-style, direct graphics the conversion with /TO_DEVICE would return coordinates on the screen.)
|