void CFrame::TogglePane() { // Get the first notebook wxAuiNotebook * NB = NULL; for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++) { if (m_Mgr->GetAllPanes()[i].window->IsKindOf(CLASSINFO(wxAuiNotebook))) NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window; } if (NB) { if (NB->GetPageCount() == 0) { m_Mgr->GetPane(_T("Pane 1")).Hide(); m_Mgr->Update(); } else ShowResizePane(); } }
void CFrame::OnResize(wxSizeEvent& event) { event.Skip(); if (!IsMaximized() && !(SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && RendererIsFullscreen()) && !(Core::GetState() != Core::CORE_UNINITIALIZED && SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize)) { SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth = GetSize().GetWidth(); SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight = GetSize().GetHeight(); } // Make sure the logger pane is a sane size if (!g_pCodeWindow && m_LogWindow && m_Mgr->GetPane(_T("Pane 1")).IsShown() && !m_Mgr->GetPane(_T("Pane 1")).IsFloating() && (m_LogWindow->x > GetClientRect().GetWidth() || m_LogWindow->y > GetClientRect().GetHeight())) ShowResizePane(); }