MCPcopy Create free account
hub / github.com/audacity/audacity / OnViewportMessage

Method OnViewportMessage

src/ProjectWindow.cpp:1294–1318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1292}
1293
1294void ProjectWindow::OnViewportMessage(const ViewportMessage &message)
1295{
1296 // Activate events can fire during window teardown, so just
1297 // ignore them.
1298 if (mIsDeleting)
1299 return;
1300 auto pProject = FindProject();
1301 if (!pProject)
1302 return;
1303 auto &project = *pProject;
1304 auto &viewInfo = ViewInfo::Get(project);
1305 auto &trackPanel = GetProjectPanel(project);
1306
1307 auto [rescroll, scrollbarVisibilityChanged, resize] = message;
1308
1309 if (rescroll)
1310 trackPanel.Refresh(false);
1311
1312 // why? Is there a menu item whose availability depends on scroll position
1313 // or zoom level?
1314 CommandManager::Get(project).UpdateMenus();
1315
1316 if (scrollbarVisibilityChanged || resize)
1317 UpdateLayout();
1318}
1319
1320static ToolManager::TopPanelHook::Scope scope {
1321[]( wxWindow &window ){

Callers

nothing calls this directly

Calls 3

GetFunction · 0.85
RefreshMethod · 0.45
UpdateMenusMethod · 0.45

Tested by

no test coverage detected