diff options
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index aa7e65c3b6..2b23f85ef9 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -15,7 +15,6 @@ #include <wx/menu.h> #include <wx/menuitem.h> #include <wx/panel.h> -#include <wx/sizer.h> #include <wx/string.h> #include <wx/textctrl.h> #include <wx/textdlg.h> @@ -75,31 +74,30 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter { InitBitmaps(); - wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL); - wxBoxSizer* sizerLeft = new wxBoxSizer(wxVERTICAL); - DebugInterface* di = &PowerPC::debug_interface; codeview = new CCodeView(di, &g_symbolDB, this, wxID_ANY); - sizerBig->Add(sizerLeft, 2, wxEXPAND); - sizerBig->Add(codeview, 5, wxEXPAND); - sizerLeft->Add(callstack = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND); + callstack = new wxListBox(this, wxID_ANY); callstack->Bind(wxEVT_LISTBOX, &CCodeWindow::OnCallstackListChange, this); - sizerLeft->Add(symbols = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(90, 100), 0, nullptr, wxLB_SORT), 1, wxEXPAND); + symbols = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT); symbols->Bind(wxEVT_LISTBOX, &CCodeWindow::OnSymbolListChange, this); - sizerLeft->Add(calls = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND); + calls = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT); calls->Bind(wxEVT_LISTBOX, &CCodeWindow::OnCallsListChange, this); - sizerLeft->Add(callers = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND); + callers = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT); callers->Bind(wxEVT_LISTBOX, &CCodeWindow::OnCallersListChange, this); - SetSizer(sizerBig); - - sizerLeft->Fit(this); - sizerBig->Fit(this); + m_aui_manager.SetManagedWindow(this); + m_aui_manager.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE); + m_aui_manager.AddPane(callstack, wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(_("Callstack"))); + m_aui_manager.AddPane(symbols, wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(_("Symbols"))); + m_aui_manager.AddPane(calls, wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(_("Function calls"))); + m_aui_manager.AddPane(callers, wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(_("Function callers"))); + m_aui_manager.AddPane(codeview, wxAuiPaneInfo().CenterPane().CloseButton(false).Floatable(false)); + m_aui_manager.Update(); // Menu Bind(wxEVT_MENU, &CCodeWindow::OnCPUMode, this, IDM_INTERPRETER, IDM_JIT_SR_OFF); @@ -116,6 +114,11 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter Bind(wxEVT_HOST_COMMAND, &CCodeWindow::OnHostMessage, this); } +CCodeWindow::~CCodeWindow() +{ + m_aui_manager.UnInit(); +} + wxMenuBar *CCodeWindow::GetMenuBar() { return Parent->GetMenuBar(); |
