mirror of https://github.com/PCSX2/pcsx2.git
debugger: Use Bind instead of Connect for events
This commit is contained in:
parent
4227477fc4
commit
35e17127af
|
@ -173,7 +173,7 @@ CtrlDisassemblyView::CtrlDisassemblyView(wxWindow* parent, DebugInterface* _cpu)
|
||||||
menu.Append(ID_DISASM_ADDFUNCTION, L"Add Function Here");
|
menu.Append(ID_DISASM_ADDFUNCTION, L"Add Function Here");
|
||||||
menu.Append(ID_DISASM_RENAMEFUNCTION, L"Rename Function");
|
menu.Append(ID_DISASM_RENAMEFUNCTION, L"Rename Function");
|
||||||
menu.Append(ID_DISASM_REMOVEFUNCTION, L"Remove Function");
|
menu.Append(ID_DISASM_REMOVEFUNCTION, L"Remove Function");
|
||||||
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)&CtrlDisassemblyView::onPopupClick, NULL, this);
|
menu.Bind(wxEVT_MENU, &CtrlDisassemblyView::onPopupClick, this);
|
||||||
|
|
||||||
SetScrollbar(wxVERTICAL,100,1,201,true);
|
SetScrollbar(wxVERTICAL,100,1,201,true);
|
||||||
SetDoubleBuffered(true);
|
SetDoubleBuffered(true);
|
||||||
|
|
|
@ -89,7 +89,7 @@ CtrlMemView::CtrlMemView(wxWindow* parent, DebugInterface* _cpu)
|
||||||
menu.Append(ID_MEMVIEW_COPYVALUE_128, L"Copy Value (128 bit)");
|
menu.Append(ID_MEMVIEW_COPYVALUE_128, L"Copy Value (128 bit)");
|
||||||
menu.Append(ID_MEMVIEW_DUMP, L"Dump...");
|
menu.Append(ID_MEMVIEW_DUMP, L"Dump...");
|
||||||
menu.Enable(ID_MEMVIEW_DUMP,false);
|
menu.Enable(ID_MEMVIEW_DUMP,false);
|
||||||
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)&CtrlMemView::onPopupClick, NULL, this);
|
menu.Bind(wxEVT_MENU, &CtrlMemView::onPopupClick, this);
|
||||||
|
|
||||||
SetScrollbar(wxVERTICAL,100,1,201,true);
|
SetScrollbar(wxVERTICAL,100,1,201,true);
|
||||||
SetDoubleBuffered(true);
|
SetDoubleBuffered(true);
|
||||||
|
|
|
@ -518,7 +518,7 @@ void CtrlRegisterList::mouseEvent(wxMouseEvent& evt)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)&CtrlRegisterList::onPopupClick, NULL, this);
|
menu.Bind(wxEVT_MENU, &CtrlRegisterList::onPopupClick, this);
|
||||||
PopupMenu(&menu,evt.GetPosition());
|
PopupMenu(&menu,evt.GetPosition());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,17 +16,17 @@
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "DebugEvents.h"
|
#include "DebugEvents.h"
|
||||||
|
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_SETSTATUSBARTEXT )
|
wxDEFINE_EVENT(debEVT_SETSTATUSBARTEXT, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_UPDATELAYOUT )
|
wxDEFINE_EVENT(debEVT_UPDATELAYOUT, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_GOTOINMEMORYVIEW )
|
wxDEFINE_EVENT(debEVT_GOTOINMEMORYVIEW, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_GOTOINDISASM )
|
wxDEFINE_EVENT(debEVT_GOTOINDISASM, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_RUNTOPOS )
|
wxDEFINE_EVENT(debEVT_RUNTOPOS, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_MAPLOADED )
|
wxDEFINE_EVENT(debEVT_MAPLOADED, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_STEPOVER )
|
wxDEFINE_EVENT(debEVT_STEPOVER, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_STEPINTO )
|
wxDEFINE_EVENT(debEVT_STEPINTO, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_STEPOUT )
|
wxDEFINE_EVENT(debEVT_STEPOUT, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_UPDATE )
|
wxDEFINE_EVENT(debEVT_UPDATE, wxCommandEvent);
|
||||||
DEFINE_LOCAL_EVENT_TYPE( debEVT_BREAKPOINTWINDOW )
|
wxDEFINE_EVENT(debEVT_BREAKPOINTWINDOW, wxCommandEvent);
|
||||||
|
|
||||||
bool parseExpression(const char* exp, DebugInterface* cpu, u64& dest)
|
bool parseExpression(const char* exp, DebugInterface* cpu, u64& dest)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,16 +17,16 @@
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include "DebugTools/DebugInterface.h"
|
#include "DebugTools/DebugInterface.h"
|
||||||
|
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_SETSTATUSBARTEXT, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_SETSTATUSBARTEXT, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_UPDATELAYOUT, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_UPDATELAYOUT, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_GOTOINMEMORYVIEW, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_GOTOINMEMORYVIEW, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_GOTOINDISASM, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_GOTOINDISASM, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_RUNTOPOS, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_RUNTOPOS, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_MAPLOADED, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_MAPLOADED, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_STEPOVER, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_STEPOVER, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_STEPINTO, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_STEPINTO, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_STEPOUT, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_STEPOUT, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_UPDATE, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_UPDATE, wxCommandEvent);
|
||||||
DECLARE_LOCAL_EVENT_TYPE( debEVT_BREAKPOINTWINDOW, wxNewEventType() )
|
wxDECLARE_EVENT(debEVT_BREAKPOINTWINDOW, wxCommandEvent);
|
||||||
|
|
||||||
bool executeExpressionWindow(wxWindow* parent, DebugInterface* cpu, u64& dest, const wxString& defaultValue = wxEmptyString);
|
bool executeExpressionWindow(wxWindow* parent, DebugInterface* cpu, u64& dest, const wxString& defaultValue = wxEmptyString);
|
||||||
|
|
|
@ -474,7 +474,7 @@ void BreakpointList::showMenu(const wxPoint& pos)
|
||||||
|
|
||||||
menu.Append(ID_BREAKPOINTLIST_ADDNEW, L"Add new");
|
menu.Append(ID_BREAKPOINTLIST_ADDNEW, L"Add new");
|
||||||
|
|
||||||
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)&BreakpointList::onPopupClick, NULL, this);
|
menu.Bind(wxEVT_MENU, &BreakpointList::onPopupClick, this);
|
||||||
PopupMenu(&menu,pos);
|
PopupMenu(&menu,pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -230,26 +230,26 @@ DisassemblyDialog::DisassemblyDialog(wxWindow* parent):
|
||||||
wxBoxSizer* topRowSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* topRowSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
breakRunButton = new wxButton(panel, wxID_ANY, L"Run");
|
breakRunButton = new wxButton(panel, wxID_ANY, L"Run");
|
||||||
Connect(breakRunButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DisassemblyDialog::onBreakRunClicked));
|
Bind(wxEVT_BUTTON, &DisassemblyDialog::onBreakRunClicked, this, breakRunButton->GetId());
|
||||||
topRowSizer->Add(breakRunButton,0,wxRIGHT,8);
|
topRowSizer->Add(breakRunButton,0,wxRIGHT,8);
|
||||||
|
|
||||||
stepIntoButton = new wxButton( panel, wxID_ANY, L"Step Into" );
|
stepIntoButton = new wxButton( panel, wxID_ANY, L"Step Into" );
|
||||||
stepIntoButton->Enable(false);
|
stepIntoButton->Enable(false);
|
||||||
Connect( stepIntoButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DisassemblyDialog::onStepIntoClicked ) );
|
Bind(wxEVT_BUTTON, &DisassemblyDialog::onStepIntoClicked, this, stepIntoButton->GetId());
|
||||||
topRowSizer->Add(stepIntoButton,0,wxBOTTOM,2);
|
topRowSizer->Add(stepIntoButton,0,wxBOTTOM,2);
|
||||||
|
|
||||||
stepOverButton = new wxButton( panel, wxID_ANY, L"Step Over" );
|
stepOverButton = new wxButton( panel, wxID_ANY, L"Step Over" );
|
||||||
stepOverButton->Enable(false);
|
stepOverButton->Enable(false);
|
||||||
Connect( stepOverButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DisassemblyDialog::onStepOverClicked ) );
|
Bind(wxEVT_BUTTON, &DisassemblyDialog::onStepOverClicked, this, stepOverButton->GetId());
|
||||||
topRowSizer->Add(stepOverButton);
|
topRowSizer->Add(stepOverButton);
|
||||||
|
|
||||||
stepOutButton = new wxButton( panel, wxID_ANY, L"Step Out" );
|
stepOutButton = new wxButton( panel, wxID_ANY, L"Step Out" );
|
||||||
stepOutButton->Enable(false);
|
stepOutButton->Enable(false);
|
||||||
Connect( stepOutButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DisassemblyDialog::onStepOutClicked ) );
|
Bind(wxEVT_BUTTON, &DisassemblyDialog::onStepOutClicked, this, stepOutButton->GetId());
|
||||||
topRowSizer->Add(stepOutButton,0,wxRIGHT,8);
|
topRowSizer->Add(stepOutButton,0,wxRIGHT,8);
|
||||||
|
|
||||||
breakpointButton = new wxButton( panel, wxID_ANY, L"Breakpoint" );
|
breakpointButton = new wxButton( panel, wxID_ANY, L"Breakpoint" );
|
||||||
Connect( breakpointButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DisassemblyDialog::onBreakpointClick ) );
|
Bind(wxEVT_BUTTON, &DisassemblyDialog::onBreakpointClick, this, breakpointButton->GetId());
|
||||||
topRowSizer->Add(breakpointButton);
|
topRowSizer->Add(breakpointButton);
|
||||||
|
|
||||||
topSizer->Add(topRowSizer,0,wxLEFT|wxRIGHT|wxTOP,3);
|
topSizer->Add(topRowSizer,0,wxLEFT|wxRIGHT|wxTOP,3);
|
||||||
|
@ -261,7 +261,7 @@ DisassemblyDialog::DisassemblyDialog(wxWindow* parent):
|
||||||
iopTab = new CpuTabPage(middleBook,&r3000Debug);
|
iopTab = new CpuTabPage(middleBook,&r3000Debug);
|
||||||
middleBook->AddPage(eeTab,L"R5900");
|
middleBook->AddPage(eeTab,L"R5900");
|
||||||
middleBook->AddPage(iopTab,L"R3000");
|
middleBook->AddPage(iopTab,L"R3000");
|
||||||
Connect(middleBook->GetId(),wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,wxCommandEventHandler( DisassemblyDialog::onPageChanging));
|
Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, &DisassemblyDialog::onPageChanging, this, middleBook->GetId());
|
||||||
topSizer->Add(middleBook,3,wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM,3);
|
topSizer->Add(middleBook,3,wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM,3);
|
||||||
currentCpu = eeTab;
|
currentCpu = eeTab;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue