diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-02-24 10:56:01 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-02-24 21:31:28 -0500 |
| commit | fd11f8fd290fbbfe23cf2e8de07e0a7ecbc094c5 (patch) | |
| tree | 15ccd2d1357ffe406461238b1a50eab2972623cb /Source/Core | |
| parent | 7d5a558f31ee8eca26b2b5ee4775f07ffdb8b8bc (diff) | |
DolphinWX: Use AUI in the code window.
Allows for resizing of the callstack, function call/callers windows etc.
First step in slightly improving the code window.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 31 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeWindow.h | 4 |
2 files changed, 21 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(); diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.h b/Source/Core/DolphinWX/Debugger/CodeWindow.h index bbb501fec4..cda981adb1 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.h +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.h @@ -12,6 +12,7 @@ #include <wx/string.h> #include <wx/translation.h> #include <wx/windowid.h> +#include <wx/aui/framemanager.h> #include "Common/CommonTypes.h" #include "Common/Event.h" @@ -43,6 +44,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxBORDER_NONE, const wxString& name = _("Code")); + ~CCodeWindow(); void Load(); void Save(); @@ -133,4 +135,6 @@ private: wxListBox* callers; wxListBox* calls; Common::Event sync_event; + + wxAuiManager m_aui_manager; }; |
