Thanks for the quick replies, all!
>
> MSWindows does not allow any GUI calls from threads other than the main
> thread. You either need to move all GUI calls into the main thread, or use
> timeouts instead of threads to do your calculations. This is a limitation of
> MSWindows.
>
Perhaps If I give you an example of how my library is used, you (or
someone) can give me a better way to achieve this.
Picture* pic = robot.takePicture("color");
pic->show(); //blocks until image is closed
This code should take a picture from the robot, and then open a display
window, and display the picture. From my understanding, this should be
easy: open a window, and then call Fl::run(), which will return once the
image is closed.
Here's the more complicated use case, we provide a "VideoStream" object,
which will create a window, and constantly update it with the current
display from the robot.
VideoStream vs(robot);
vs.startStream(); // Non-blocking, creates an image window and allows
// user to continue
robot.move(...); // Or do whatever
robot.move(...);
vs.endStream(); // Closes VideoStream window
This is really the reason why I have everything in the threads, for the
videostream object. Likewise, users should also be able to show() an
image while a videostream window also exists.
Thanks for your help,
John Hoare
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk