summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-11-05 22:19:52 -0500
committerLioncash <mathew1800@gmail.com>2014-11-05 23:03:06 -0500
commitee22d091a0058eb12acad673bfc4e7346a195484 (patch)
tree4730e76cce5d6a71507cc56f1e3139d2e697cc89 /Source/Core/DolphinWX/Debugger/CodeWindow.cpp
parentbe386e974bdadceea3adefa04bf031e665bd0a8c (diff)
DolphinWX: Eliminate most usages of event tables in the debugger.
Moves things over to Bind.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeWindow.cpp64
1 files changed, 26 insertions, 38 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
index 4989cecff0..debf26345d 100644
--- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
@@ -60,35 +60,6 @@ extern "C" // Bitmaps
#include "DolphinWX/resources/toolbar_add_breakpoint.c" // NOLINT
}
-class DebugInterface;
-
-// -------
-// Main
-
-BEGIN_EVENT_TABLE(CCodeWindow, wxPanel)
-
- // Menu bar
- EVT_MENU_RANGE(IDM_INTERPRETER, IDM_JITSROFF, CCodeWindow::OnCPUMode)
- EVT_MENU(IDM_FONTPICKER, CCodeWindow::OnChangeFont)
- EVT_MENU_RANGE(IDM_CLEARCODECACHE, IDM_SEARCHINSTRUCTION, CCodeWindow::OnJitMenu)
- EVT_MENU_RANGE(IDM_CLEARSYMBOLS, IDM_PATCHHLEFUNCTIONS, CCodeWindow::OnSymbolsMenu)
- EVT_MENU_RANGE(IDM_PROFILEBLOCKS, IDM_WRITEPROFILE, CCodeWindow::OnProfilerMenu)
-
- // Toolbar
- EVT_MENU_RANGE(IDM_STEP, IDM_GOTOPC, CCodeWindow::OnCodeStep)
- EVT_TEXT(IDM_ADDRBOX, CCodeWindow::OnAddrBoxChange)
-
- // Other
- EVT_LISTBOX(ID_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
- EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
- EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange)
- EVT_LISTBOX(ID_CALLSLIST, CCodeWindow::OnCallsListChange)
-
- EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage)
-
-END_EVENT_TABLE()
-
-// Class
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *parent,
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
: wxPanel(parent, id, position, size, style, name)
@@ -109,23 +80,40 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
DebugInterface* di = &PowerPC::debug_interface;
- codeview = new CCodeView(di, &g_symbolDB, this, ID_CODEVIEW);
+ 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, ID_CALLSTACKLIST,
- wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND);
- sizerLeft->Add(symbols = new wxListBox(this, ID_SYMBOLLIST,
- wxDefaultPosition, wxSize(90, 100), 0, nullptr, wxLB_SORT), 1, wxEXPAND);
- sizerLeft->Add(calls = new wxListBox(this, ID_CALLSLIST, wxDefaultPosition,
- wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);
- sizerLeft->Add(callers = new wxListBox(this, ID_CALLERSLIST, wxDefaultPosition,
- wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);
+ sizerLeft->Add(callstack = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND);
+ 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->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->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->Bind(wxEVT_LISTBOX, &CCodeWindow::OnCallersListChange, this);
SetSizer(sizerBig);
sizerLeft->Fit(this);
sizerBig->Fit(this);
+
+ // Menu
+ Bind(wxEVT_MENU, &CCodeWindow::OnCPUMode, this, IDM_INTERPRETER, IDM_JITSROFF);
+ Bind(wxEVT_MENU, &CCodeWindow::OnChangeFont, this, IDM_FONTPICKER);
+ Bind(wxEVT_MENU, &CCodeWindow::OnJitMenu, this, IDM_CLEARCODECACHE, IDM_SEARCHINSTRUCTION);
+ Bind(wxEVT_MENU, &CCodeWindow::OnSymbolsMenu, this, IDM_CLEARSYMBOLS, IDM_PATCHHLEFUNCTIONS);
+ Bind(wxEVT_MENU, &CCodeWindow::OnProfilerMenu, this, IDM_PROFILEBLOCKS, IDM_WRITEPROFILE);
+
+ // Toolbar
+ Bind(wxEVT_MENU, &CCodeWindow::OnCodeStep, this, IDM_STEP, IDM_GOTOPC);
+ Bind(wxEVT_TEXT, &CCodeWindow::OnAddrBoxChange, this, IDM_ADDRBOX);
+
+ // Other
+ Bind(wxEVT_HOST_COMMAND, &CCodeWindow::OnHostMessage, this);
}
wxMenuBar *CCodeWindow::GetMenuBar()