| 206 | } |
| 207 | |
| 208 | void ProgressSink::ShowDialog(ScriptDialog *config_dialog) |
| 209 | { |
| 210 | agi::dispatch::Main().Sync([=, this] { |
| 211 | wxDialog w; // container dialog box |
| 212 | w.SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY); |
| 213 | w.Create(bsr->GetParentWindow(), -1, to_wx(bsr->GetTitle())); |
| 214 | auto s = new wxBoxSizer(wxHORIZONTAL); // sizer for putting contents in |
| 215 | wxWindow *ww = config_dialog->CreateWindow(&w); // generate actual dialog contents |
| 216 | s->Add(ww, 0, wxALL, 5); // add contents to dialog |
| 217 | w.SetSizerAndFit(s); |
| 218 | w.SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED); |
| 219 | w.CenterOnParent(); |
| 220 | w.ShowModal(); |
| 221 | }); |
| 222 | } |
| 223 | |
| 224 | BackgroundScriptRunner::BackgroundScriptRunner(wxWindow *parent, std::string const& title) |
| 225 | : impl(new DialogProgress(parent, to_wx(title))) |
no test coverage detected