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

Method SetDisplayMode

src/frame_main.cpp:217–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void FrameMain::SetDisplayMode(int video, int audio) {
218 if (!IsShownOnScreen()) return;
219
220 bool sv = false, sa = false;
221
222 if (video == -1) sv = showVideo;
223 else if (video) sv = context->project->VideoProvider() && !context->dialog->Get<DialogDetachedVideo>();
224
225 if (audio == -1) sa = showAudio;
226 else if (audio) sa = !!context->project->AudioProvider();
227
228 // See if anything changed
229 if (sv == showVideo && sa == showAudio) return;
230
231 showVideo = sv;
232 showAudio = sa;
233
234 bool didFreeze = !IsFrozen();
235 if (didFreeze) Freeze();
236
237 context->videoController->Stop();
238
239 TopSizer->Show(videoBox, showVideo, true);
240 ToolsSizer->Show(audioBox, showAudio, true);
241
242 MainSizer->Layout();
243 Layout();
244
245 if (didFreeze) Thaw();
246}
247
248void FrameMain::UpdateTitle() {
249 wxString newTitle;

Callers 4

operator()Method · 0.80
operator()Function · 0.80
operator()Function · 0.80
app_display_subsClass · 0.80

Calls 4

VideoProviderMethod · 0.80
ShowMethod · 0.80
AudioProviderMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected