Commit e6257360 authored by thrust26's avatar thrust26
Browse files

added some more debugger help links

parent ea62581d
......@@ -117,7 +117,7 @@ CartRamWidget::InternalRamWidget::InternalRamWidget(GuiObject* boss,
CartDebugWidget& dbg)
: RamWidget(boss, lfont, nfont, x, y, w, h,
dbg.internalRamSize(), std::min(dbg.internalRamSize() / 16, 16U),
std::min(dbg.internalRamSize() / 16, 16U) * 16),
std::min(dbg.internalRamSize() / 16, 16U) * 16, "CartridgeRAMInformation"),
myCart(dbg)
{
}
......
......@@ -48,6 +48,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
"PC ", TextAlign::Left);
myPCGrid =
new DataGridWidget(boss, nfont, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::Fmt::_16);
myPCGrid->setHelpAnchor("CPURegisters", true);
myPCGrid->setTarget(this);
myPCGrid->setID(kPCRegID);
addFocusWidget(myPCGrid);
......@@ -79,6 +80,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
xpos = myCpuGridDecValue->getRight() + fontWidth * 2;
myCpuGridBinValue =
new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 8, 8, Common::Base::Fmt::_2);
myCpuGridBinValue->setHelpAnchor("CPURegisters", true);
myCpuGridBinValue->setTarget(this);
myCpuGridBinValue->setID(kCpuRegBinID);
addFocusWidget(myCpuGridBinValue);
......@@ -123,6 +125,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
new StaticTextWidget(boss, lfont, xpos, ypos + 2, lwidth-2, fontHeight,
"PS ", TextAlign::Left);
myPSRegister = new ToggleBitWidget(boss, nfont, xpos+lwidth, ypos, 8, 1);
myPSRegister->setHelpAnchor("CPURegisters", true);
myPSRegister->setTarget(this);
addFocusWidget(myPSRegister);
......
......@@ -540,22 +540,27 @@ void DebuggerDialog::addRomArea()
b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Step", kDDStepCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b);
buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Trace", kDDTraceCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b);
buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Scan +1", kDDSAdvCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b);
buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Frame +1", kDDAdvCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b);
buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Run", kDDRunCmd);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b);
addCancelWidget(b);
......@@ -567,6 +572,7 @@ void DebuggerDialog::addRomArea()
myRewindButton =
new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, LEFT_ARROW.data(), 7, 11, kDDRewindCmd, true);
myRewindButton->setHelpAnchor("GlobalButtons", true);
myRewindButton->clearFlags(Widget::FLAG_ENABLED);
buttonY += bheight + 4;
......@@ -575,6 +581,7 @@ void DebuggerDialog::addRomArea()
myUnwindButton =
new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, RIGHT_ARROW.data(), 7, 11, kDDUnwindCmd, true);
myUnwindButton->setHelpAnchor("GlobalButtons", true);
myUnwindButton->clearFlags(Widget::FLAG_ENABLED);
int xpos = buttonX - 8*myLFont->getMaxCharWidth() - 20, ypos = 30;
......@@ -632,8 +639,7 @@ void DebuggerDialog::addRomArea()
addToFocusList(myRom->getFocusList(), myRomTab, tabID);
// The 'cart-specific' information tab (optional)
tabID = myRomTab->addTab(" " + instance().console().cartridge().name() + " ", TabWidget::AUTO_WIDTH);
tabID = myRomTab->addTab(" " + instance().console().cartridge().name() + " ", TabWidget::AUTO_WIDTH);
myCartInfo = instance().console().cartridge().infoWidget(
myRomTab, *myLFont, *myNFont, 2, 2, tabWidth - 1,
tabHeight - myRomTab->getTabHeight() - 2);
......
......@@ -30,7 +30,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h,
uInt32 ramsize, uInt32 numrows, uInt32 pagesize)
uInt32 ramsize, uInt32 numrows, uInt32 pagesize,
const string& helpAnchor)
: Widget(boss, lfont, x, y, w, h),
CommandSender(boss),
_nfont{nfont},
......@@ -56,6 +57,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
bool useScrollbar = ramsize / numrows > 16;
myRamGrid = new DataGridRamWidget(_boss, *this, _nfont, xpos, ypos,
16, myNumRows, 2, 8, Common::Base::Fmt::_16, useScrollbar);
myRamGrid->setHelpAnchor(helpAnchor, true);
myRamGrid->setTarget(this);
myRamGrid->setID(kRamGridID);
addFocusWidget(myRamGrid);
......@@ -66,18 +68,21 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
myUndoButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Undo", kUndoCmd);
myUndoButton->setHelpAnchor("M6532Search", true);
wid.push_back(myUndoButton);
myUndoButton->setTarget(this);
by += bheight + VGAP;
myRevertButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Revert", kRevertCmd);
myRevertButton->setHelpAnchor("M6532Search", true);
wid.push_back(myRevertButton);
myRevertButton->setTarget(this);
by += bheight + VGAP * 6;
mySearchButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Search" + ELLIPSIS, kSearchCmd);
mySearchButton->setHelpAnchor("M6532Search", true);
mySearchButton->setToolTip("Search and highlight found values.");
wid.push_back(mySearchButton);
mySearchButton->setTarget(this);
......@@ -85,6 +90,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
by += bheight + VGAP;
myCompareButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Compare" + ELLIPSIS, kCmpCmd);
myCompareButton->setHelpAnchor("M6532Search", true);
myCompareButton->setToolTip("Compare highlighted values.");
wid.push_back(myCompareButton);
myCompareButton->setTarget(this);
......@@ -92,6 +98,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
by += bheight + VGAP;
myRestartButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Reset", kRestartCmd);
myRestartButton->setHelpAnchor("M6532Search", true);
myRestartButton->setToolTip("Reset search/compare mode.");
wid.push_back(myRestartButton);
myRestartButton->setTarget(this);
......@@ -135,6 +142,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
s = new StaticTextWidget(boss, lfont, xpos, ypos, "%");
myBinValue = new DataGridWidget(boss, nfont, s->getRight() + myFontWidth * 0.1, ypos-2,
1, 1, 8, 8, Common::Base::Fmt::_2);
myBinValue->setHelpAnchor(helpAnchor, true);
myBinValue->setTarget(this);
myBinValue->setID(kRamBinID);
......@@ -143,6 +151,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
s = new StaticTextWidget(boss, lfont, xpos, ypos, "#");
myDecValue = new DataGridWidget(boss, nfont, s->getRight(), ypos-2,
1, 1, 3, 8, Common::Base::Fmt::_10);
myDecValue->setHelpAnchor(helpAnchor, true);
myDecValue->setTarget(this);
myDecValue->setID(kRamDecID);
......@@ -150,6 +159,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
xpos -= 4.5 * myFontWidth;
myHexValue = new DataGridWidget(boss, nfont, xpos, ypos - 2,
1, 1, 2, 8, Common::Base::Fmt::_16);
myHexValue->setHelpAnchor(helpAnchor, true);
myHexValue->setTarget(this);
myHexValue->setID(kRamHexID);
......
......@@ -35,7 +35,8 @@ class RamWidget : public Widget, public CommandSender
public:
RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h,
uInt32 ramsize, uInt32 numrows, uInt32 pagesize);
uInt32 ramsize, uInt32 numrows, uInt32 pagesize,
const string& helpAnchor);
~RamWidget() override;
void loadConfig() override;
......
......@@ -24,9 +24,10 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RiotRamWidget::RiotRamWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont, int x, int y, int w)
: RamWidget(boss, lfont, nfont, x, y, w, 0, 128, 8, 128),
: RamWidget(boss, lfont, nfont, x, y, w, 0, 128, 8, 128, "M6532"),
myDbg{instance().debugger().cartDebug()}
{
// setHelpAnchor("M6532"); TODO: does not work due to use of "boss" insted of "this"
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment