diff options
| author | John Peterson <jpeterson57@gmail.com> | 2009-08-30 19:44:42 +0000 |
|---|---|---|
| committer | John Peterson <jpeterson57@gmail.com> | 2009-08-30 19:44:42 +0000 |
| commit | 3548ca586b2c6bf20e88fc5540c79f8b65d62153 (patch) | |
| tree | bb68c315a46c3aff8a4664e5768130c2e4c1018d /Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp | |
| parent | 44847c2ee3a1c7c8c06255946dba7f7675b9fe30 (diff) | |
GUI: Custom pane management, almost complete
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4109 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp')
| -rw-r--r-- | Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp index ae1b0a8697..ee8e535f42 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp @@ -333,6 +333,7 @@ int CCodeWindow::Limit(int i, int Low, int High) } void CCodeWindow::OpenPages() { + Parent->DoToggleWindow(IDM_CODEWINDOW, true); if (bRegisterWindow) Parent->DoToggleWindow(IDM_REGISTERWINDOW, true); if (bBreakpointWindow) Parent->DoToggleWindow(IDM_BREAKPOINTWINDOW, true); if (bMemoryWindow) Parent->DoToggleWindow(IDM_MEMORYWINDOW, true); @@ -344,14 +345,21 @@ void CCodeWindow::OnToggleWindow(wxCommandEvent& event) { Parent->DoToggleWindow(event.GetId(), GetMenuBar()->IsChecked(event.GetId())); } +void CCodeWindow::OnToggleCodeWindow(bool Show, int i) +{ + if (Show) + { + Parent->DoAddPage(this, i, "Code"); + } + else // hide + Parent->DoRemovePage (this); +} void CCodeWindow::OnToggleRegisterWindow(bool Show, int i) { if (Show) { - if (i < 0 || i > Parent->m_NB.size()-1) return; - if (m_RegisterWindow && Parent->m_NB[i]->GetPageIndex(m_RegisterWindow) != wxNOT_FOUND) return; - if (!m_RegisterWindow) m_RegisterWindow = new CRegisterWindow(Parent); - Parent->m_NB[i]->AddPage(m_RegisterWindow, wxT("Registers"), true, Parent->aNormalFile ); + if (!m_RegisterWindow) m_RegisterWindow = new CRegisterWindow(Parent); + Parent->DoAddPage(m_RegisterWindow, i, "Registers"); } else // hide Parent->DoRemovePage (m_RegisterWindow); @@ -361,10 +369,8 @@ void CCodeWindow::OnToggleBreakPointWindow(bool Show, int i) { if (Show) { - if (i < 0 || i > Parent->m_NB.size()-1) return; - if (m_BreakpointWindow && Parent->m_NB[i]->GetPageIndex(m_BreakpointWindow) != wxNOT_FOUND) return; - if (!m_BreakpointWindow) m_BreakpointWindow = new CBreakPointWindow(this, Parent); - Parent->m_NB[i]->AddPage(m_BreakpointWindow, wxT("Breakpoints"), true, Parent->aNormalFile ); + if (!m_RegisterWindow) m_BreakpointWindow = new CBreakPointWindow(this, Parent); + Parent->DoAddPage(m_BreakpointWindow, i, "Breakpoints"); } else // hide Parent->DoRemovePage(m_BreakpointWindow); @@ -374,10 +380,8 @@ void CCodeWindow::OnToggleJitWindow(bool Show, int i) { if (Show) { - if (i < 0 || i > Parent->m_NB.size()-1) return; - if (m_JitWindow && Parent->m_NB[i]->GetPageIndex(m_JitWindow) != wxNOT_FOUND) return; if (!m_JitWindow) m_JitWindow = new CJitWindow(Parent); - Parent->m_NB[i]->AddPage(m_JitWindow, wxT("JIT"), true, Parent->aNormalFile ); + Parent->DoAddPage(m_JitWindow, i, "JIT"); } else // hide Parent->DoRemovePage(m_JitWindow); @@ -388,10 +392,8 @@ void CCodeWindow::OnToggleMemoryWindow(bool Show, int i) { if (Show) { - if (i < 0 || i > Parent->m_NB.size()-1) return; - if (m_MemoryWindow && Parent->m_NB[i]->GetPageIndex(m_MemoryWindow) != wxNOT_FOUND) return; if (!m_MemoryWindow) m_MemoryWindow = new CMemoryWindow(Parent); - Parent->m_NB[i]->AddPage(m_MemoryWindow, wxT("Memory"), true, Parent->aNormalFile ); + Parent->DoAddPage(m_MemoryWindow, i, "Memory"); } else // hide Parent->DoRemovePage(m_MemoryWindow); @@ -404,7 +406,8 @@ void CCodeWindow::OnToggleSoundWindow(bool Show, int i) if (Show) { - if (i < 0 || i > Parent->m_NB.size()-1) return; + if (Parent->m_NB.size() == 0) return; + if (i < 0 || i > Parent->m_NB.size()-1) i = 0; #ifdef _WIN32 wxWindow *Win = Parent->GetWxWindow(wxT("Sound")); if (Win && Parent->m_NB[i]->GetPageIndex(Win) != wxNOT_FOUND) return; |
