What I'd like to do with widgets seems simple, but I don't think it is possible due to the single-threaded nature of widgets. I have a normal IDL program running -- let's say it is reading images from disk and displaying them. I would like to use a widget to display the images so that I can take advantage of mouse click events. So, the top level program creates a draw widget, starts reading images and passes them to the widget using UVALUE. For each image, I'd like to manually trigger the widget event handler and let it grab the image from UVALUE and display it. You could do this using widget_control with TIMER=0, or using the SEND_EVENT keyword. The problem is, none of the events are handled until the top level program returns. All the events are correctly added to the event queue, but the handler does not preempt the top level program in order to display the images. Instead it waits for all the images to be queued and then displays them all rapidly, one after another. Is there any way to hand control over to the widget event system so that an event can be handled immediately? Thanks
|