MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / ShowDialog

Method ShowDialog

src/auto4_base.cpp:208–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)))

Callers 1

LuaDisplayDialogMethod · 0.80

Calls 8

SyncMethod · 0.80
GetTitleMethod · 0.80
CreateWindowMethod · 0.80
to_wxFunction · 0.70
CreateMethod · 0.45
GetParentWindowMethod · 0.45
AddMethod · 0.45
ShowModalMethod · 0.45

Tested by

no test coverage detected