mirror of https://github.com/stella-emu/stella.git
oops, added missing files
This commit is contained in:
parent
a7c37e1d0c
commit
b41f228e25
|
@ -0,0 +1,54 @@
|
|||
//============================================================================
|
||||
//
|
||||
// SSSS tt lll lll
|
||||
// SS SS tt ll ll
|
||||
// SS tttttt eeee ll ll aaaa
|
||||
// SSSS tt ee ee ll ll aa
|
||||
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
||||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#include "RamWidget.hxx"
|
||||
#include "DataGridRamWidget.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
DataGridRamWidget::DataGridRamWidget(GuiObject* boss, const RamWidget& ram,
|
||||
const GUI::Font& font,
|
||||
int x, int y, int cols, int rows,
|
||||
int colchars, int bits,
|
||||
Common::Base::Fmt base,
|
||||
bool useScrollbar)
|
||||
: DataGridWidget(boss, font, x, y, cols, rows, colchars,
|
||||
bits, base, useScrollbar),
|
||||
_ram(ram)
|
||||
{
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string DataGridRamWidget::getToolTip(const Common::Point& pos) const
|
||||
{
|
||||
const int idx = getToolTipIndex(pos);
|
||||
|
||||
if(idx < 0)
|
||||
return EmptyString;
|
||||
|
||||
const Int32 addr = _addrList[idx];
|
||||
const string label = _ram.getLabel(addr);
|
||||
const string tip = DataGridWidget::getToolTip(pos);
|
||||
|
||||
if(label.empty())
|
||||
return tip;
|
||||
|
||||
ostringstream buf;
|
||||
|
||||
buf << _ram.getLabel(addr) << '\n' << tip;
|
||||
|
||||
return buf.str();
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
//============================================================================
|
||||
//
|
||||
// SSSS tt lll lll
|
||||
// SS SS tt ll ll
|
||||
// SS tttttt eeee ll ll aaaa
|
||||
// SSSS tt ee ee ll ll aa
|
||||
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
||||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#ifndef DATA_GRID_RAM_WIDGET_HXX
|
||||
#define DATA_GRID_RAM_WIDGET_HXX
|
||||
|
||||
class RamWidget;
|
||||
|
||||
#include "DataGridWidget.hxx"
|
||||
#include "Base.hxx"
|
||||
|
||||
class DataGridRamWidget : public DataGridWidget
|
||||
{
|
||||
public:
|
||||
DataGridRamWidget(GuiObject* boss, const RamWidget& ram,
|
||||
const GUI::Font& font,
|
||||
int x, int y, int cols, int rows,
|
||||
int colchars, int bits,
|
||||
Common::Base::Fmt format = Common::Base::Fmt::_DEFAULT,
|
||||
bool useScrollbar = false);
|
||||
~DataGridRamWidget() override = default;
|
||||
|
||||
string getToolTip(const Common::Point& pos) const override;
|
||||
|
||||
private:
|
||||
const RamWidget& _ram;
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
DataGridRamWidget() = delete;
|
||||
DataGridRamWidget(const DataGridRamWidget&) = delete;
|
||||
DataGridRamWidget(DataGridRamWidget&&) = delete;
|
||||
DataGridRamWidget& operator=(const DataGridRamWidget&) = delete;
|
||||
DataGridRamWidget& operator=(DataGridRamWidget&&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue