mirror of https://github.com/stella-emu/stella.git
enhanced tooltips (per cell and/or whole widget) for DataGridWidget
updated debugger doc
This commit is contained in:
parent
c79dedae98
commit
d5dad489bf
|
@ -1098,11 +1098,11 @@ in another part of the debugger).</p>
|
|||
<p><img src="graphics/debugger_iotab.png"></p>
|
||||
|
||||
<p>As with the TIA tab, most of the values here will be self-explanatory to a 2600
|
||||
developer, and almost all can be modified. However, the SWCHx registers need
|
||||
developer, and many can be modified. However, the SWCHx registers need
|
||||
further explanation:<p>
|
||||
<p>SWCHx(W) can be modified; here, the (W) stands for write. Similarly,
|
||||
SWACNT/SWBCNT can be directly modified. However, the results of reading back from
|
||||
the SWCHx register are influenced by SWACNT/SWBCNT, and SWCHx(R) is a read-only display
|
||||
<p>SWCHx(W/R) can be modified; here (W) stands for write, (R) for read.
|
||||
Similarly, SWxCNT can be directly modified. However, the results of reading
|
||||
back from the SWCHx register are influenced by SWxCNT, and SWCHx(R) is
|
||||
reflecting this result.</p>
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.2 KiB |
|
@ -55,7 +55,8 @@ DataGridWidget::DataGridWidget(GuiObject* boss, const GUI::Font& font,
|
|||
{
|
||||
_addrList.push_back(0);
|
||||
_valueList.push_back(0);
|
||||
_valueStringList.push_back("");
|
||||
_valueStringList.push_back(EmptyString);
|
||||
_toolTipList.push_back(EmptyString);
|
||||
_changedList.push_back(0);
|
||||
_hiliteList.push_back(false);
|
||||
}
|
||||
|
@ -584,6 +585,13 @@ void DataGridWidget::handleCommand(CommandSender* sender, int cmd,
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DataGridWidget::setGridToolTip(int column, int row, const string& text)
|
||||
{
|
||||
if(row >= 0 && row < _rows && column >= 0 && column < _cols)
|
||||
_toolTipList[row * _cols + column] = text;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int DataGridWidget::getToolTipIndex(const Common::Point& pos) const
|
||||
{
|
||||
|
@ -607,9 +615,12 @@ string DataGridWidget::getToolTip(const Common::Point& pos) const
|
|||
const Int32 val = _valueList[idx];
|
||||
ostringstream buf;
|
||||
|
||||
buf << _toolTipText
|
||||
<< "$" << Common::Base::toString(val, Common::Base::Fmt::_16)
|
||||
<< " = #" << val;
|
||||
if(_toolTipList[idx] != EmptyString)
|
||||
buf << _toolTipList[idx];
|
||||
else
|
||||
buf << _toolTipText;
|
||||
buf << "$" << Common::Base::toString(val, Common::Base::Fmt::_16)
|
||||
<< " = #" << val;
|
||||
if(val < 0x100)
|
||||
{
|
||||
if(val >= 0x80)
|
||||
|
|
|
@ -84,6 +84,7 @@ class DataGridWidget : public EditableWidget
|
|||
|
||||
void setCrossed(bool enable);
|
||||
|
||||
void setGridToolTip(int column, int row, const string& text);
|
||||
string getToolTip(const Common::Point& pos) const override;
|
||||
bool changedToolTip(const Common::Point& oldPos, const Common::Point& newPos) const override;
|
||||
|
||||
|
@ -129,6 +130,7 @@ class DataGridWidget : public EditableWidget
|
|||
IntArray _addrList;
|
||||
IntArray _valueList;
|
||||
StringList _valueStringList;
|
||||
StringList _toolTipList;
|
||||
BoolArray _changedList;
|
||||
BoolArray _hiliteList;
|
||||
|
||||
|
|
|
@ -157,6 +157,8 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
}
|
||||
xpos += t->getWidth() + _fontWidth / 2;
|
||||
myTimRead = new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 4, 30, Common::Base::Fmt::_16);
|
||||
myTimRead->setGridToolTip(0, 1, "Timer interrupt flag in bit 7.\n");
|
||||
myTimRead->setGridToolTip(0, 2, "Number of CPU cycles since last TIMxxT write.\n");
|
||||
myTimRead->setTarget(this);
|
||||
myTimRead->setEditable(false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue