问题
I want to create a custom dialog window with fltk. I will put the widgets. Background process should wait to the dialog's finish. I couldn't find any example for this. I am looking fl_input function. I found makeform() function but it didn't help very much.
回答1:
I found innate() function in the library. In the function there is a line following:
while (w->shown()) Fl::wait();
this is my solution. For example:
Fl_Window* w = new Fl_Window(400, 300);
w->set_modal();
w->show();
while (w->shown()) Fl::wait();
will wait the user to close the window.
回答2:
Just use Fl_Window and call set_modal() function.
来源:https://stackoverflow.com/questions/25805938/create-custom-fltk-dialog-modal-window