// The Play, Stop, Step, Skip, Go to PC and Show PC buttons go here void CCodeWindow::OnCodeStep(wxCommandEvent& event) { switch (event.GetId()) { case IDM_STEP: SingleStep(); break; case IDM_STEPOVER: StepOver(); break; case IDM_TOGGLE_BREAKPOINT: ToggleBreakpoint(); break; case IDM_SKIP: PC += 4; Update(); break; case IDM_SETPC: PC = codeview->GetSelection(); Update(); break; case IDM_GOTOPC: JumpToAddress(PC); break; } UpdateButtonStates(); // Update all toolbars in the aui manager Parent->UpdateGUI(); }
void CtrlDisAsmView::contextMenu(const QPoint &pos) { QMenu menu(this); QAction *copyAddress = new QAction(tr("Copy &address"), this); connect(copyAddress, SIGNAL(triggered()), this, SLOT(CopyAddress())); menu.addAction(copyAddress); QAction *copyInstrHex = new QAction(tr("Copy instruction (&hex)"), this); connect(copyInstrHex, SIGNAL(triggered()), this, SLOT(CopyInstrHex())); menu.addAction(copyInstrHex); QAction *copyInstrDisAsm = new QAction(tr("Copy instruction (&disasm)"), this); connect(copyInstrDisAsm, SIGNAL(triggered()), this, SLOT(CopyInstrDisAsm())); menu.addAction(copyInstrDisAsm); menu.addSeparator(); QAction *runToHere = new QAction(tr("&Run to here"), this); connect(runToHere, SIGNAL(triggered()), this, SLOT(RunToHere())); menu.addAction(runToHere); QAction *setNextStatement = new QAction(tr("&Set Next Statement"), this); connect(setNextStatement, SIGNAL(triggered()), this, SLOT(SetNextStatement())); menu.addAction(setNextStatement); QAction *toggleBreakpoint = new QAction(tr("&Toggle breakpoint"), this); connect(toggleBreakpoint, SIGNAL(triggered()), this, SLOT(ToggleBreakpoint())); menu.addAction(toggleBreakpoint); QAction *followBranch = new QAction(tr("&Follow branch"), this); connect(followBranch, SIGNAL(triggered()), this, SLOT(FollowBranch())); menu.addAction(followBranch); menu.addSeparator(); //QAction *showDynarecResults = new QAction(tr("&Show Dynarec Results"), this); //connect(showDynarecResults, SIGNAL(triggered()), this, SLOT(ShowDynarecResults())); //menu.addAction(showDynarecResults); QAction *goToMemoryView = new QAction(tr("Go to in &Memory View"), this); connect(goToMemoryView, SIGNAL(triggered()), this, SLOT(GoToMemoryView())); menu.addAction(goToMemoryView); menu.addSeparator(); //QAction *killFunction = new QAction(tr("&Kill function"), this); //connect(killFunction, SIGNAL(triggered()), this, SLOT(KillFunction())); //menu.addAction(killFunction); QAction *renameFunction = new QAction(tr("&Rename function..."), this); connect(renameFunction, SIGNAL(triggered()), this, SLOT(RenameFunction())); menu.addAction(renameFunction); menu.exec( mapToGlobal(pos)); }
void CCodeView::OnMouseDown(wxMouseEvent& event) { int x = event.m_x; int y = event.m_y; if (x > 16) { m_oldSelection = m_selection; m_selection = YToAddress(y); // SetCapture(wnd); bool oldselecting = m_selecting; m_selecting = true; if (!oldselecting || (m_selection != m_oldSelection)) Refresh(); } else { ToggleBreakpoint(YToAddress(y)); } event.Skip(); }
void CodeViewWidget::mousePressEvent(QMouseEvent* event) { auto* item = itemAt(event->pos()); if (item == nullptr) return; const u32 addr = item->data(Qt::UserRole).toUInt(); m_context_address = addr; switch (event->button()) { case Qt::LeftButton: if (column(item) == 0) ToggleBreakpoint(); else SetAddress(addr, SetAddressUpdate::WithUpdate); Update(); break; default: break; } }