diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-02-24 21:45:16 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-02-24 21:45:16 -0500 |
| commit | 792e166f87a2483dc33771fae4fcfd2a6ac29bab (patch) | |
| tree | 121d9aca5eed5c32e48d73f2e565bec1c4ecd942 /Source/Core/DolphinWX/Debugger/CodeWindow.cpp | |
| parent | f4e42b394c8a6d86463b2589f06598ae8bb217aa (diff) | |
| parent | fd11f8fd290fbbfe23cf2e8de07e0a7ecbc094c5 (diff) | |
Merge pull request #2118 from lioncash/aui
DolphinWX: Use AUI in the code window.
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(); |
