Help with interactive cursor and the draw widget (long) [message #42003] |
Wed, 15 December 2004 12:00  |
bgarwood
Messages: 2 Registered: December 2004
|
Junior Member |
|
|
I have a simple problem I can't seem to figure out how to solve.
Essentially, I want to have the functional equivalent of CURSOR in a
draw widget embedded in a larger widget. Seems simple enough. The
trouble is that everything I've tried so far seems to queue up the
events - including expose events, so that when the widget is fully
exposed it isn't being redrawn in the previously exposed regions -
while my function is waiting and nothing happens.
The documentation I've read says not to use CURSOR with draw widgets.
Okay (and when I do try and use it, it works, except for the nasty
problem of not redrawing the un-exposed parts when they are exposed
before the cursor click is seen). So I've tried do something else -
mostly involving having the widgets existing event handler set a common
block or global value and, in my cursor-replacement function, watch for
that value to change. Only problem, the loop to watch for that value
to change in my function seems to prevent the actual events from
reaching the event handler and so the state never changes.
Sure, I could do it all inside the GUI. My problem is that we have
users who want to be able to also interact with that GUI from commands,
i.e.
start_my_gui
; stuff happens, GUI fires up
cursor, x, y
; do something with x and y after the user clicks on it.
How do I make that work? It works just fine with a simple PLOT window.
Why won't it work with an embedded draw widget?
Thanks.
Bob Garwood
|
|
|