Add small lines between four byte groups in the memory view and fix status bar text not being displayed

This commit is contained in:
Kingcom 2014-07-19 10:53:40 +02:00
parent 50868f14f6
commit 6f101c0a0c
3 changed files with 19 additions and 2 deletions

View File

@ -145,6 +145,7 @@ void CtrlDisassemblyView::postEvent(wxEventType type, wxString text)
{
wxCommandEvent event( type, GetId() );
event.SetEventObject(this);
event.SetClientData(cpu);
event.SetString(text);
wxPostEvent(this,event);
}
@ -153,6 +154,7 @@ void CtrlDisassemblyView::postEvent(wxEventType type, int value)
{
wxCommandEvent event( type, GetId() );
event.SetEventObject(this);
event.SetClientData(cpu);
event.SetInt(value);
wxPostEvent(this,event);
}

View File

@ -94,6 +94,7 @@ void CtrlMemView::postEvent(wxEventType type, wxString text)
{
wxCommandEvent event( type, GetId() );
event.SetEventObject(this);
event.SetClientData(cpu);
event.SetString(text);
wxPostEvent(this,event);
}
@ -102,6 +103,7 @@ void CtrlMemView::postEvent(wxEventType type, int value)
{
wxCommandEvent event( type, GetId() );
event.SetEventObject(this);
event.SetClientData(cpu);
event.SetInt(value);
wxPostEvent(this,event);
}
@ -237,6 +239,19 @@ void CtrlMemView::render(wxDC& dc)
}
}
}
// TODO: make optional?
if (true)
{
dc.SetPen(wxColor(0xFFC0C0C0));
dc.SetBrush(wxColor(0xFFC0C0C0));
for (int i = 4; i < rowSize; i += 4)
{
int x = hexStart+i*3*charWidth-charWidth/2;
int y = (visibleRows+1)*rowHeight;
dc.DrawLine(x,0,x,y);
}
}
}
void CtrlMemView::onPopupClick(wxCommandEvent& evt)

View File

@ -354,8 +354,8 @@ void DisassemblyDialog::onDebuggerEvent(wxCommandEvent& evt)
wxEventType type = evt.GetEventType();
if (type == debEVT_SETSTATUSBARTEXT)
{
CtrlDisassemblyView* view = reinterpret_cast<CtrlDisassemblyView*>(evt.GetEventObject());
if (view != NULL && view == currentCpu->getDisassembly())
DebugInterface* cpu = reinterpret_cast<DebugInterface*>(evt.GetClientData());
if (cpu != NULL && cpu == currentCpu->getCpu())
GetStatusBar()->SetLabel(evt.GetString());
} else if (type == debEVT_UPDATELAYOUT)
{