Hi. I want to create a simple progress bar, and do not need any user input. I cannot block my main app as it already has its own GUI. What will happen if I use the following from a worker thread ?
Fl_Window win(220,90); win.begin(); // add progress bar to it..
Fl_Progress *progress = new Fl_Progress(10,50,200,30);
progress->minimum(0); // set progress range to be 0.0 ~ 1.0
progress->maximum(1);
progress->color(0x88888800); // background color
progress->selection_color(0x4444ff00); // progress bar color
progress->labelcolor(FL_WHITE); // percent text color
50 win.end();
And I update it from main thread.
progress->value(t/500.0);
progress->label(percent); // update progress bar's label
Fl::check();
I read the docs, and its clear that the main thread owns the window, but if I dont care about user input, is there any harm in this ?
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/d0b5654f-38f7-429e-b51b-fd032dd4aac3n%40googlegroups.com.
[ Direct Link to Message ] |