DolphinWX: Eliminate most usages of event tables in the debugger.

Moves things over to Bind.
This commit is contained in:
Lioncash
2014-11-05 22:19:52 -05:00
parent be386e974b
commit ee22d091a0
24 changed files with 81 additions and 171 deletions

View File

@ -58,19 +58,6 @@ enum
IDM_ADDFUNCTION,
};
BEGIN_EVENT_TABLE(CCodeView, wxControl)
EVT_ERASE_BACKGROUND(CCodeView::OnErase)
EVT_PAINT(CCodeView::OnPaint)
EVT_MOUSEWHEEL(CCodeView::OnScrollWheel)
EVT_LEFT_DOWN(CCodeView::OnMouseDown)
EVT_LEFT_UP(CCodeView::OnMouseUpL)
EVT_MOTION(CCodeView::OnMouseMove)
EVT_RIGHT_DOWN(CCodeView::OnMouseDown)
EVT_RIGHT_UP(CCodeView::OnMouseUpR)
EVT_MENU(-1, CCodeView::OnPopupMenu)
EVT_SIZE(CCodeView::OnResize)
END_EVENT_TABLE()
CCodeView::CCodeView(DebugInterface* debuginterface, SymbolDB *symboldb,
wxWindow* parent, wxWindowID Id)
: wxControl(parent, Id),
@ -86,6 +73,16 @@ CCodeView::CCodeView(DebugInterface* debuginterface, SymbolDB *symboldb,
m_lx(-1),
m_ly(-1)
{
Bind(wxEVT_ERASE_BACKGROUND, &CCodeView::OnErase, this);
Bind(wxEVT_PAINT, &CCodeView::OnPaint, this);
Bind(wxEVT_MOUSEWHEEL, &CCodeView::OnScrollWheel, this);
Bind(wxEVT_LEFT_DOWN, &CCodeView::OnMouseDown, this);
Bind(wxEVT_LEFT_UP, &CCodeView::OnMouseUpL, this);
Bind(wxEVT_MOTION, &CCodeView::OnMouseMove, this);
Bind(wxEVT_RIGHT_DOWN, &CCodeView::OnMouseDown, this);
Bind(wxEVT_RIGHT_UP, &CCodeView::OnMouseUpR, this);
Bind(wxEVT_MENU, &CCodeView::OnPopupMenu, this);
Bind(wxEVT_SIZE, &CCodeView::OnResize, this);
}
int CCodeView::YToAddress(int y)