On 05.02.2010, at 14:26, Jose Marcelo Auler wrote: > Hello!! > I'm always with a good problem to share! eheh > I've made a key generator in order to automatic test stability of my > software, and turned out that Fl::run() returns(exits) after a while. > I first tried a key generator of 20Hz, and it takes a lot of time to be in > this condition, but with 50Hz(50 keys per second) it's very quick. > In my mainscreen I overwrote the handle to not do anything with FL_CLOSE or > FL_HIDE and it goes there, but even with the return 1;(in FL_CLOSE and > FL_HIDE) it returns from Fl::run(). Is there another way to return from > Fl::run()? I'm pressuming FL queue reached a maximum size or something like > that...
Only closing all windows ends the Fl::run() call. You probably generate the ESC key at some point which then closes the main window, exiting the Fl:run() loop. The easiest way around that is to set a callback for your main window. The callback can do nothing. The default callback hides the window when ESC is pressed or a close event is generated somehow (clicking the close icon etc.). > Another interesting fact, is that using Fl_Box(or even Fl_Label or Fl_Button) > to draw label could be slow(at least in my software). I will explain better. > If I use a buffer outside the Fl_Box/Fl_Label and when I change this buffer I > just call (Fl_Box object)->redraw(), it's ok, it's fast. But if every time > the buffer gets changed I call (Fl_Box)->label((new string array)); it gets > slow. And in my software this is done in cycles(every 1/2sec), so it's making > difference. Does anyone have a clue what could be or if I'm not using in the > intended way? I could subclass Fl_Label to solve this problem, but I want to > understand what is really happening. Remember that if you use outside labels, not only the widget is redrawn, but all widgets within that group. If you have hundreds of widgets in a group, and a single widget in there changes its "outside" label, all others are redrawn as well. Matthias _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

