Removed some (long) dead debugging code.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2788 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-08-10 21:21:17 +00:00
parent 5d026334d6
commit c840bb9809
27 changed files with 12 additions and 121 deletions

View File

@ -32,8 +32,6 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font,
: Widget(boss, font, x, y, w, h),
CommandSender(boss)
{
_type = kAudioWidget;
const int fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight();

View File

@ -43,10 +43,7 @@ class CartDebugWidget : public Widget, public CommandSender
myFontWidth(font.getMaxCharWidth()),
myFontHeight(font.getFontHeight()),
myLineHeight(font.getLineHeight()),
myButtonHeight(myLineHeight + 4)
{
_type = kCartDebugWidget;
}
myButtonHeight(myLineHeight + 4) { }
virtual ~CartDebugWidget() { };

View File

@ -35,7 +35,6 @@ ColorWidget::ColorWidget(GuiObject* boss, const GUI::Font& font,
_cmd(cmd)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_type = kColorWidget;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -35,7 +35,6 @@ class ControllerWidget : public Widget, public CommandSender
CommandSender(boss),
myController(controller)
{
_type = kControllerWidget;
_w = 18 * font.getMaxCharWidth();
_h = 8 * font.getLineHeight();
}

View File

@ -36,8 +36,6 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
: Widget(boss, font, x, y, 16, 16),
CommandSender(boss)
{
_type = kCpuWidget;
const int fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight();

View File

@ -32,8 +32,6 @@ DataGridOpsWidget::DataGridOpsWidget(GuiObject* boss, const GUI::Font& font,
_shiftLeftButton(NULL),
_shiftRightButton(NULL)
{
_type = kDataGridOpsWidget;
const int bwidth = _font.getMaxCharWidth() * 4,
bheight = _font.getFontHeight() + 3,
space = 6;

View File

@ -51,7 +51,6 @@ DataGridWidget::DataGridWidget(GuiObject* boss, const GUI::Font& font,
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS |
WIDGET_WANTS_RAWDATA;
_type = kDataGridWidget;
_editMode = false;
// The item is selected, thus _bgcolor is used to draw the caret and

View File

@ -46,7 +46,6 @@ PromptWidget::PromptWidget(GuiObject* boss, const GUI::Font& font,
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS |
WIDGET_WANTS_TAB | WIDGET_WANTS_RAWDATA;
_type = kPromptWidget;
_textcolor = kTextColor;
_bgcolor = kWidColor;

View File

@ -38,8 +38,6 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
myUndoValue(-1),
myCurrentRamBank(0)
{
_type = kRamWidget;
const int fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight(),

View File

@ -55,8 +55,6 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
: Widget(boss, font, x, y, w, h),
CommandSender(boss)
{
_type = kRiotWidget;
const int fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight();

View File

@ -40,7 +40,6 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& font,
_currentKeyDown(KBDK_UNKNOWN)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_type = kRomListWidget;
_bgcolor = kWidColor;
_bgcolorhi = kWidColor;
_textcolor = kTextColor;

View File

@ -39,8 +39,6 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& font,
CommandSender(boss),
myListIsDirty(true)
{
_type = kRomWidget;
int xpos, ypos;
StaticTextWidget* t;
WidgetArray wid;

View File

@ -34,8 +34,6 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& font,
: Widget(boss, font, x, y, 16, 16),
CommandSender(boss)
{
_type = kTiaInfoWidget;
x += 5;
const int lineHeight = font.getLineHeight();
int xpos = x, ypos = y, lwidth = font.getStringWidth("F. Cyc:");

View File

@ -40,8 +40,6 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font,
myMenu(NULL),
myZoom(NULL)
{
_type = kTiaOutputWidget;
// Create context menu for commands
VariantList l;
l.push_back("Fill to scanline", "scanline");

View File

@ -38,8 +38,6 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
: Widget(boss, font, x, y, w, h),
CommandSender(boss)
{
_type = kTiaWidget;
const int fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight();

View File

@ -35,7 +35,6 @@ TiaZoomWidget::TiaZoomWidget(GuiObject* boss, const GUI::Font& font,
myMenu(NULL)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_type = kTiaZoomWidget;
_bgcolor = _bgcolorhi = kDlgColor;
// Use all available space, up to the maximum bounds of the TIA image

View File

@ -30,8 +30,6 @@ ToggleBitWidget::ToggleBitWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int cols, int rows, int colchars)
: ToggleWidget(boss, font, x, y, cols, rows)
{
_type = kToggleBitWidget;
_rowHeight = font.getLineHeight();
_colWidth = colchars * font.getMaxCharWidth() + 8;

View File

@ -30,8 +30,6 @@ TogglePixelWidget::TogglePixelWidget(GuiObject* boss, const GUI::Font& font,
: ToggleWidget(boss, font, x, y, cols, rows),
_pixelColor(0)
{
_type = kTogglePixelWidget;
_rowHeight = _colWidth = font.getLineHeight();
// Calculate real dimensions

View File

@ -35,7 +35,6 @@ ToggleWidget::ToggleWidget(GuiObject* boss, const GUI::Font& font,
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS |
WIDGET_WANTS_RAWDATA;
_type = kToggleWidget;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -121,43 +121,10 @@ OSystem::OSystem()
ostringstream info;
const SDL_version* ver = SDL_Linked_Version();
info << "Build " << STELLA_BUILD << ", using ";
info << "SDL " << (int)ver->major << "." << (int)ver->minor << "." << (int)ver->patch << " ";
info << "[" << BSPF_ARCH << "]";
info << "Build " << STELLA_BUILD << ", using SDL " << (int)ver->major
<< "." << (int)ver->minor << "."<< (int)ver->patch
<< " [" << BSPF_ARCH << "]";
myBuildInfo = info.str();
#if 0
// Debugging info for the GUI widgets
ostringstream buf;
buf << " kStaticTextWidget = " << kStaticTextWidget << endl
<< " kEditTextWidget = " << kEditTextWidget << endl
<< " kButtonWidget = " << kButtonWidget << endl
<< " kCheckboxWidget = " << kCheckboxWidget << endl
<< " kSliderWidget = " << kSliderWidget << endl
<< " kListWidget = " << kListWidget << endl
<< " kScrollBarWidget = " << kScrollBarWidget << endl
<< " kPopUpWidget = " << kPopUpWidget << endl
<< " kTabWidget = " << kTabWidget << endl
<< " kEventMappingWidget = " << kEventMappingWidget << endl
<< " kEditableWidget = " << kEditableWidget << endl
<< " kAudioWidget = " << kAudioWidget << endl
<< " kColorWidget = " << kColorWidget << endl
<< " kCpuWidget = " << kCpuWidget << endl
<< " kDataGridOpsWidget = " << kDataGridOpsWidget << endl
<< " kDataGridWidget = " << kDataGridWidget << endl
<< " kPromptWidget = " << kPromptWidget << endl
<< " kRamWidget = " << kRamWidget << endl
<< " kRomListWidget = " << kRomListWidget << endl
<< " kRomWidget = " << kRomWidget << endl
<< " kTiaInfoWidget = " << kTiaInfoWidget << endl
<< " kTiaOutputWidget = " << kTiaOutputWidget << endl
<< " kTiaWidget = " << kTiaWidget << endl
<< " kTiaZoomWidget = " << kTiaZoomWidget << endl
<< " kToggleBitWidget = " << kToggleBitWidget << endl
<< " kTogglePixelWidget = " << kTogglePixelWidget << endl
<< " kToggleWidget = " << kToggleWidget << endl;
logMessage(buf.str(), 0);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -33,7 +33,6 @@ EditTextWidget::EditTextWidget(GuiObject* boss, const GUI::Font& font,
_changed(false)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_type = kEditTextWidget;
startEditMode(); // We're always in edit mode
}

View File

@ -43,7 +43,6 @@ ListWidget::ListWidget(GuiObject* boss, const GUI::Font& font,
_quickSelectTime(0)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_type = kListWidget;
_bgcolor = kWidColor;
_bgcolorhi = kWidColor;
_textcolor = kTextColor;

View File

@ -49,7 +49,6 @@ PopUpWidget::PopUpWidget(GuiObject* boss, const GUI::Font& font,
_labelWidth(labelWidth)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_type = kPopUpWidget;
_bgcolor = kDlgColor;
_bgcolorhi = kWidColor;
_textcolor = kTextColor;

View File

@ -71,7 +71,6 @@ ScrollBarWidget::ScrollBarWidget(GuiObject* boss, const GUI::Font& font,
_sliderDeltaMouseDownPos(0)
{
_flags = WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG;
_type = kScrollBarWidget;
_bgcolor = kWidColor;
_bgcolorhi = kWidColor;
}

View File

@ -39,7 +39,6 @@ TabWidget::TabWidget(GuiObject* boss, const GUI::Font& font,
_id = 0; // For dialogs with multiple tab widgets, they should specifically
// call ::setID to differentiate among them
_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
_type = kTabWidget;
_bgcolor = kDlgColor;
_bgcolorhi = kDlgColor;
_textcolor = kTextColor;

View File

@ -37,7 +37,6 @@
Widget::Widget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h)
: GuiObject(boss->instance(), boss->parent(), boss->dialog(), x, y, w, h),
_type(0),
_boss(boss),
_font(font),
_id(-1),
@ -293,7 +292,6 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, const GUI::Font& font,
_align(align)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
_type = kStaticTextWidget;
_bgcolor = kDlgColor;
_bgcolorhi = kDlgColor;
_textcolor = kTextColor;
@ -337,7 +335,6 @@ ButtonWidget::ButtonWidget(GuiObject *boss, const GUI::Font& font,
_cmd(cmd)
{
_flags = WIDGET_ENABLED | WIDGET_BORDER | WIDGET_CLEARBG;
_type = kButtonWidget;
_bgcolor = kBtnColor;
_bgcolorhi = kBtnColorHi;
_textcolor = kBtnTextColor;
@ -446,7 +443,6 @@ CheckboxWidget::CheckboxWidget(GuiObject *boss, const GUI::Font& font,
_textY(0)
{
_flags = WIDGET_ENABLED;
_type = kCheckboxWidget;
_bgcolor = _bgcolorhi = kWidColor;
_editable = true;
@ -555,7 +551,6 @@ SliderWidget::SliderWidget(GuiObject *boss, const GUI::Font& font,
_labelWidth(labelWidth)
{
_flags = WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG;
_type = kSliderWidget;
_bgcolor = kDlgColor;
_bgcolorhi = kDlgColor;

View File

@ -50,39 +50,6 @@ enum {
WIDGET_WANTS_RAWDATA = 1 << 8
};
enum {
kStaticTextWidget = 'TEXT',
kEditTextWidget = 'EDIT',
kButtonWidget = 'BTTN',
kCheckboxWidget = 'CHKB',
kSliderWidget = 'SLDE',
kListWidget = 'LIST',
kScrollBarWidget = 'SCRB',
kPopUpWidget = 'POPU',
kTabWidget = 'TABW',
kEventMappingWidget = 'EVMP',
kEditableWidget = 'EDLE',
kAudioWidget = 'AUDW',
kColorWidget = 'COLR',
kCpuWidget = 'CPUW',
kDataGridOpsWidget = 'BGRO',
kDataGridWidget = 'BGRI',
kPromptWidget = 'PROM',
kRamWidget = 'RAMW',
kRiotWidget = 'RIOW',
kRomListWidget = 'ROML',
kRomWidget = 'ROMW',
kTiaInfoWidget = 'TIAI',
kTiaOutputWidget = 'TIAO',
kTiaWidget = 'TIAW',
kTiaZoomWidget = 'TIAZ',
kToggleBitWidget = 'TGLB',
kTogglePixelWidget = 'TGLP',
kToggleWidget = 'TOGL',
kControllerWidget = 'CTRL',
kCartDebugWidget = 'CDBG'
};
/**
This is the base class for all widgets.
@ -160,7 +127,6 @@ class Widget : public GuiObject
{ assert(_boss); _boss->handleCommand(sender, cmd, data, id); }
protected:
int _type;
GuiObject* _boss;
const GUI::Font& _font;
Widget* _next;