create custom fltk dialog / modal window

会有一股神秘感。 提交于 2020-01-06 18:44:31

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!