MCPcopy Create free account
hub / github.com/baldurk/renderdoc / mainToolArea

Method mainToolArea

qrenderdoc/Windows/MainWindow.cpp:1633–1657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1631}
1632
1633ToolWindowManager::AreaReference MainWindow::mainToolArea()
1634{
1635 // bit of a hack. Maybe the ToolWindowManager should track this?
1636 // Try and identify where to add new windows, by searching a
1637 // priority list of other windows to use their area
1638 if(m_Ctx.HasTextureViewer() &&
1639 ui->toolWindowManager->toolWindows().contains(m_Ctx.GetTextureViewer()->Widget()))
1640 return ToolWindowManager::AreaReference(
1641 ToolWindowManager::AddTo, ui->toolWindowManager->areaOf(m_Ctx.GetTextureViewer()->Widget()));
1642 else if(m_Ctx.HasPipelineViewer() &&
1643 ui->toolWindowManager->toolWindows().contains(m_Ctx.GetPipelineViewer()->Widget()))
1644 return ToolWindowManager::AreaReference(
1645 ToolWindowManager::AddTo, ui->toolWindowManager->areaOf(m_Ctx.GetPipelineViewer()->Widget()));
1646 else if(m_Ctx.HasMeshPreview() &&
1647 ui->toolWindowManager->toolWindows().contains(m_Ctx.GetMeshPreview()->Widget()))
1648 return ToolWindowManager::AreaReference(
1649 ToolWindowManager::AddTo, ui->toolWindowManager->areaOf(m_Ctx.GetMeshPreview()->Widget()));
1650 else if(m_Ctx.HasCaptureDialog() &&
1651 ui->toolWindowManager->toolWindows().contains(m_Ctx.GetCaptureDialog()->Widget()))
1652 return ToolWindowManager::AreaReference(
1653 ToolWindowManager::AddTo, ui->toolWindowManager->areaOf(m_Ctx.GetCaptureDialog()->Widget()));
1654
1655 // if all else fails just add to the last place we placed something.
1656 return ToolWindowManager::AreaReference(ToolWindowManager::LastUsedArea);
1657}
1658
1659ToolWindowManager::AreaReference MainWindow::leftToolArea()
1660{

Callers 1

AddDockWindowMethod · 0.80

Calls 13

AreaReferenceClass · 0.85
toolWindowsMethod · 0.80
areaOfMethod · 0.80
HasTextureViewerMethod · 0.45
containsMethod · 0.45
WidgetMethod · 0.45
GetTextureViewerMethod · 0.45
HasPipelineViewerMethod · 0.45
GetPipelineViewerMethod · 0.45
HasMeshPreviewMethod · 0.45
GetMeshPreviewMethod · 0.45
HasCaptureDialogMethod · 0.45

Tested by

no test coverage detected