diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index 66b75b207..3afd55999 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -32,6 +32,7 @@ #include "CartDebug.hxx" #include "CartDebugWidget.hxx" #include "CartRamWidget.hxx" +#include "RomWidget.hxx" #include "System.hxx" #include "Base.hxx" using Common::Base; diff --git a/src/debugger/gui/AmigaMouseWidget.hxx b/src/debugger/gui/AmigaMouseWidget.hxx index 853b569bf..e11665c4f 100644 --- a/src/debugger/gui/AmigaMouseWidget.hxx +++ b/src/debugger/gui/AmigaMouseWidget.hxx @@ -18,7 +18,8 @@ #ifndef AMIGAMOUSE_WIDGET_HXX #define AMIGAMOUSE_WIDGET_HXX -#include "Control.hxx" +class Controller; + #include "PointingDeviceWidget.hxx" class AmigaMouseWidget : public PointingDeviceWidget diff --git a/src/debugger/gui/AtariMouseWidget.hxx b/src/debugger/gui/AtariMouseWidget.hxx index 9b82dadca..df80c8b2a 100644 --- a/src/debugger/gui/AtariMouseWidget.hxx +++ b/src/debugger/gui/AtariMouseWidget.hxx @@ -18,7 +18,8 @@ #ifndef ATARIMOUSE_WIDGET_HXX #define ATARIMOUSE_WIDGET_HXX -#include "Control.hxx" +class Controller; + #include "PointingDeviceWidget.hxx" class AtariMouseWidget : public PointingDeviceWidget diff --git a/src/debugger/gui/AtariVoxWidget.hxx b/src/debugger/gui/AtariVoxWidget.hxx index 045d85eed..9fb0012fc 100644 --- a/src/debugger/gui/AtariVoxWidget.hxx +++ b/src/debugger/gui/AtariVoxWidget.hxx @@ -18,7 +18,8 @@ #ifndef ATARIVOX_WIDGET_HXX #define ATARIVOX_WIDGET_HXX -#include "Control.hxx" +class Controller; + #include "FlashWidget.hxx" class AtariVoxWidget : public FlashWidget diff --git a/src/debugger/gui/AudioWidget.cxx b/src/debugger/gui/AudioWidget.cxx index c874170fd..3fc2a53ec 100644 --- a/src/debugger/gui/AudioWidget.cxx +++ b/src/debugger/gui/AudioWidget.cxx @@ -19,6 +19,7 @@ #include "FrameBuffer.hxx" #include "GuiObject.hxx" #include "OSystem.hxx" +#include "Debugger.hxx" #include "TIADebug.hxx" #include "Widget.hxx" diff --git a/src/debugger/gui/BoosterWidget.cxx b/src/debugger/gui/BoosterWidget.cxx index d1a3640c3..eaf4d2fdd 100644 --- a/src/debugger/gui/BoosterWidget.cxx +++ b/src/debugger/gui/BoosterWidget.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "OSystem.hxx" -#include "EventHandler.hxx" #include "BoosterWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/BoosterWidget.hxx b/src/debugger/gui/BoosterWidget.hxx index 7e329a917..e6f28a202 100644 --- a/src/debugger/gui/BoosterWidget.hxx +++ b/src/debugger/gui/BoosterWidget.hxx @@ -19,7 +19,6 @@ #define BOOSTER_WIDGET_HXX #include "Control.hxx" -#include "Event.hxx" #include "ControllerWidget.hxx" class BoosterWidget : public ControllerWidget diff --git a/src/debugger/gui/Cart2KWidget.hxx b/src/debugger/gui/Cart2KWidget.hxx index 6a240c5bc..9f7ec17f3 100644 --- a/src/debugger/gui/Cart2KWidget.hxx +++ b/src/debugger/gui/Cart2KWidget.hxx @@ -19,6 +19,7 @@ #define CARTRIDGE2K_WIDGET_HXX class Cartridge2K; + #include "CartDebugWidget.hxx" class Cartridge2KWidget : public CartDebugWidget diff --git a/src/debugger/gui/Cart3EPlusWidget.cxx b/src/debugger/gui/Cart3EPlusWidget.cxx index 4aafabf2b..2954bb518 100644 --- a/src/debugger/gui/Cart3EPlusWidget.cxx +++ b/src/debugger/gui/Cart3EPlusWidget.cxx @@ -16,6 +16,7 @@ //============================================================================ #include "Cart3EPlus.hxx" +#include "EditTextWidget.hxx" #include "PopUpWidget.hxx" #include "Cart3EPlusWidget.hxx" diff --git a/src/debugger/gui/Cart3EPlusWidget.hxx b/src/debugger/gui/Cart3EPlusWidget.hxx index 4f4d0877b..fdc84aee8 100644 --- a/src/debugger/gui/Cart3EPlusWidget.hxx +++ b/src/debugger/gui/Cart3EPlusWidget.hxx @@ -20,6 +20,7 @@ class Cartridge3EPlus; class ButtonWidget; +class EditTextWidget; class PopUpWidget; #include "CartDebugWidget.hxx" diff --git a/src/debugger/gui/Cart4KSCWidget.cxx b/src/debugger/gui/Cart4KSCWidget.cxx index b441f5854..bc18a0e32 100644 --- a/src/debugger/gui/Cart4KSCWidget.cxx +++ b/src/debugger/gui/Cart4KSCWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "Cart4KSC.hxx" #include "Cart4KSCWidget.hxx" diff --git a/src/debugger/gui/Cart4KSCWidget.hxx b/src/debugger/gui/Cart4KSCWidget.hxx index 525ab07d8..570a8d514 100644 --- a/src/debugger/gui/Cart4KSCWidget.hxx +++ b/src/debugger/gui/Cart4KSCWidget.hxx @@ -19,6 +19,7 @@ #define CARTRIDGE4KSC_WIDGET_HXX class Cartridge4KSC; + #include "CartDebugWidget.hxx" class Cartridge4KSCWidget : public CartDebugWidget diff --git a/src/debugger/gui/Cart4KWidget.hxx b/src/debugger/gui/Cart4KWidget.hxx index 4417712ba..da0b49d9a 100644 --- a/src/debugger/gui/Cart4KWidget.hxx +++ b/src/debugger/gui/Cart4KWidget.hxx @@ -19,6 +19,7 @@ #define CARTRIDGE4K_WIDGET_HXX class Cartridge4K; + #include "CartDebugWidget.hxx" class Cartridge4KWidget : public CartDebugWidget diff --git a/src/debugger/gui/CartBFSCWidget.cxx b/src/debugger/gui/CartBFSCWidget.cxx index fe512396b..d95c6783b 100644 --- a/src/debugger/gui/CartBFSCWidget.cxx +++ b/src/debugger/gui/CartBFSCWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartBFSC.hxx" #include "PopUpWidget.hxx" #include "CartBFSCWidget.hxx" diff --git a/src/debugger/gui/CartCMWidget.cxx b/src/debugger/gui/CartCMWidget.cxx index c49c2b63a..28cb0b11a 100644 --- a/src/debugger/gui/CartCMWidget.cxx +++ b/src/debugger/gui/CartCMWidget.cxx @@ -16,6 +16,8 @@ //============================================================================ #include "CartCM.hxx" +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "RiotDebug.hxx" #include "DataGridWidget.hxx" #include "EditTextWidget.hxx" diff --git a/src/debugger/gui/CartCTYWidget.cxx b/src/debugger/gui/CartCTYWidget.cxx index 428050a48..1ed4fa98f 100644 --- a/src/debugger/gui/CartCTYWidget.cxx +++ b/src/debugger/gui/CartCTYWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartCTY.hxx" #include "PopUpWidget.hxx" #include "CartCTYWidget.hxx" diff --git a/src/debugger/gui/CartCVPlusWidget.cxx b/src/debugger/gui/CartCVPlusWidget.cxx index 98c98373d..6e5bb9c72 100644 --- a/src/debugger/gui/CartCVPlusWidget.cxx +++ b/src/debugger/gui/CartCVPlusWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartCVPlus.hxx" #include "PopUpWidget.hxx" #include "CartCVPlusWidget.hxx" diff --git a/src/debugger/gui/CartCVWidget.cxx b/src/debugger/gui/CartCVWidget.cxx index 3e9c85881..69fe77402 100644 --- a/src/debugger/gui/CartCVWidget.cxx +++ b/src/debugger/gui/CartCVWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartCV.hxx" #include "CartCVWidget.hxx" diff --git a/src/debugger/gui/CartCVWidget.hxx b/src/debugger/gui/CartCVWidget.hxx index 0bb1afc60..be5579c8b 100644 --- a/src/debugger/gui/CartCVWidget.hxx +++ b/src/debugger/gui/CartCVWidget.hxx @@ -19,6 +19,7 @@ #define CARTRIDGECV_WIDGET_HXX class CartridgeCV; + #include "CartDebugWidget.hxx" class CartridgeCVWidget : public CartDebugWidget diff --git a/src/debugger/gui/CartDASHWidget.cxx b/src/debugger/gui/CartDASHWidget.cxx index 0e3e38bed..8c865b5cc 100644 --- a/src/debugger/gui/CartDASHWidget.cxx +++ b/src/debugger/gui/CartDASHWidget.cxx @@ -16,6 +16,7 @@ //============================================================================ #include "CartDASH.hxx" +#include "EditTextWidget.hxx" #include "PopUpWidget.hxx" #include "CartDASHWidget.hxx" diff --git a/src/debugger/gui/CartDASHWidget.hxx b/src/debugger/gui/CartDASHWidget.hxx index b84c51de3..14b1695a3 100644 --- a/src/debugger/gui/CartDASHWidget.hxx +++ b/src/debugger/gui/CartDASHWidget.hxx @@ -20,6 +20,7 @@ class CartridgeDASH; class ButtonWidget; +class EditTextWidget; class PopUpWidget; #include "CartDebugWidget.hxx" diff --git a/src/debugger/gui/CartDFSCWidget.cxx b/src/debugger/gui/CartDFSCWidget.cxx index 290bba8c4..9979af959 100644 --- a/src/debugger/gui/CartDFSCWidget.cxx +++ b/src/debugger/gui/CartDFSCWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartDFSC.hxx" #include "PopUpWidget.hxx" #include "CartDFSCWidget.hxx" diff --git a/src/debugger/gui/CartDebugWidget.cxx b/src/debugger/gui/CartDebugWidget.cxx new file mode 100644 index 000000000..5727487dd --- /dev/null +++ b/src/debugger/gui/CartDebugWidget.cxx @@ -0,0 +1,96 @@ +//============================================================================ +// +// 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-2017 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 "Font.hxx" +#include "RomWidget.hxx" +#include "EditTextWidget.hxx" +#include "StringListWidget.hxx" +#include "StringParser.hxx" +#include "CartDebugWidget.hxx" + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +CartDebugWidget::CartDebugWidget(GuiObject* boss, const GUI::Font& lfont, + const GUI::Font& nfont, + int x, int y, int w, int h) + : Widget(boss, lfont, x, y, w, h), + CommandSender(boss), + _nfont(nfont), + myFontWidth(lfont.getMaxCharWidth()), + myFontHeight(lfont.getFontHeight()), + myLineHeight(lfont.getLineHeight()), + myButtonHeight(myLineHeight + 4), + myDesc(nullptr) { } + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +int CartDebugWidget::addBaseInformation(int bytes, const string& manufacturer, + const string& desc, const uInt16 maxlines) +{ + const int lwidth = _font.getStringWidth("Manufacturer "), + fwidth = _w - lwidth - 20; + EditTextWidget* w = nullptr; + ostringstream buf; + + int x = 10, y = 10; + + // Add ROM size, manufacturer and bankswitch info + new StaticTextWidget(_boss, _font, x, y, lwidth, + myFontHeight, "ROM Size ", kTextAlignLeft); + buf << bytes << " bytes"; + if(bytes >= 1024) + buf << " / " << (bytes/1024) << "KB"; + + w = new EditTextWidget(_boss, _nfont, x+lwidth, y, + fwidth, myLineHeight, buf.str()); + w->setEditable(false); + y += myLineHeight + 4; + + new StaticTextWidget(_boss, _font, x, y, lwidth, + myFontHeight, "Manufacturer ", kTextAlignLeft); + w = new EditTextWidget(_boss, _nfont, x+lwidth, y, + fwidth, myLineHeight, manufacturer); + w->setEditable(false); + y += myLineHeight + 4; + + StringParser bs(desc, (fwidth - kScrollBarWidth) / myFontWidth - 4); + const StringList& sl = bs.stringList(); + uInt32 lines = uInt32(sl.size()); + if(lines < 3) lines = 3; + if(lines > maxlines) lines = maxlines; + + new StaticTextWidget(_boss, _font, x, y, lwidth, + myFontHeight, "Description ", kTextAlignLeft); + myDesc = new StringListWidget(_boss, _nfont, x+lwidth, y, + fwidth, lines * myLineHeight, false); + myDesc->setEditable(false); + myDesc->setList(sl); + addFocusWidget(myDesc); + y += myDesc->getHeight() + 4; + + return y; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void CartDebugWidget::invalidate() +{ + sendCommand(RomWidget::kInvalidateListing, -1, -1); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void CartDebugWidget::loadConfig() +{ + myDesc->setSelected(0); +} diff --git a/src/debugger/gui/CartDebugWidget.hxx b/src/debugger/gui/CartDebugWidget.hxx index 4d0452ca7..fb16a3c6e 100644 --- a/src/debugger/gui/CartDebugWidget.hxx +++ b/src/debugger/gui/CartDebugWidget.hxx @@ -20,93 +20,36 @@ class GuiObject; class ButtonWidget; +class StringListWidget; -#include "Base.hxx" -#include "Font.hxx" +namespace GUI { + class Font; +} + +#include "Base.hxx" // not needed here, but all child classes need it #include "Command.hxx" -#include "Debugger.hxx" -#include "RomWidget.hxx" #include "Widget.hxx" -#include "EditTextWidget.hxx" -#include "StringListWidget.hxx" -#include "StringParser.hxx" class CartDebugWidget : public Widget, public CommandSender { public: CartDebugWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, - int x, int y, int w, int h) - : Widget(boss, lfont, x, y, w, h), - CommandSender(boss), - _nfont(nfont), - myFontWidth(lfont.getMaxCharWidth()), - myFontHeight(lfont.getFontHeight()), - myLineHeight(lfont.getLineHeight()), - myButtonHeight(myLineHeight + 4), - myDesc(nullptr) { } - + int x, int y, int w, int h); virtual ~CartDebugWidget() = default; public: int addBaseInformation(int bytes, const string& manufacturer, - const string& desc, const uInt16 maxlines = 10) - { - const int lwidth = _font.getStringWidth("Manufacturer "), - fwidth = _w - lwidth - 20; - EditTextWidget* w = nullptr; - ostringstream buf; - - int x = 10, y = 10; - - // Add ROM size, manufacturer and bankswitch info - new StaticTextWidget(_boss, _font, x, y, lwidth, - myFontHeight, "ROM Size ", kTextAlignLeft); - buf << bytes << " bytes"; - if(bytes >= 1024) - buf << " / " << (bytes/1024) << "KB"; - - w = new EditTextWidget(_boss, _nfont, x+lwidth, y, - fwidth, myLineHeight, buf.str()); - w->setEditable(false); - y += myLineHeight + 4; - - new StaticTextWidget(_boss, _font, x, y, lwidth, - myFontHeight, "Manufacturer ", kTextAlignLeft); - w = new EditTextWidget(_boss, _nfont, x+lwidth, y, - fwidth, myLineHeight, manufacturer); - w->setEditable(false); - y += myLineHeight + 4; - - StringParser bs(desc, (fwidth - kScrollBarWidth) / myFontWidth - 4); - const StringList& sl = bs.stringList(); - uInt32 lines = uInt32(sl.size()); - if(lines < 3) lines = 3; - if(lines > maxlines) lines = maxlines; - - new StaticTextWidget(_boss, _font, x, y, lwidth, - myFontHeight, "Description ", kTextAlignLeft); - myDesc = new StringListWidget(_boss, _nfont, x+lwidth, y, - fwidth, lines * myLineHeight, false); - myDesc->setEditable(false); - myDesc->setList(sl); - addFocusWidget(myDesc); - y += myDesc->getHeight() + 4; - - return y; - } + const string& desc, const uInt16 maxlines = 10); // Inform the ROM Widget that the underlying cart has somehow changed - void invalidate() - { - sendCommand(RomWidget::kInvalidateListing, -1, -1); - } + void invalidate(); // Some carts need to save old state in the debugger, so that we can // implement change tracking; most carts probably won't do anything here virtual void saveOldState() { } - virtual void loadConfig() override { myDesc->setSelected(0); } + virtual void loadConfig() override; virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) override { } // Query internal state of the cart (usually just bankswitching info) diff --git a/src/debugger/gui/CartEFSCWidget.cxx b/src/debugger/gui/CartEFSCWidget.cxx index 13d88c881..27c3428cf 100644 --- a/src/debugger/gui/CartEFSCWidget.cxx +++ b/src/debugger/gui/CartEFSCWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartEFSC.hxx" #include "PopUpWidget.hxx" #include "CartEFSCWidget.hxx" diff --git a/src/debugger/gui/CartF4SCWidget.cxx b/src/debugger/gui/CartF4SCWidget.cxx index b702c0ce6..d41ad6358 100644 --- a/src/debugger/gui/CartF4SCWidget.cxx +++ b/src/debugger/gui/CartF4SCWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartF4SC.hxx" #include "PopUpWidget.hxx" #include "CartF4SCWidget.hxx" diff --git a/src/debugger/gui/CartF6SCWidget.cxx b/src/debugger/gui/CartF6SCWidget.cxx index 5c7b47acd..b8bef75f4 100644 --- a/src/debugger/gui/CartF6SCWidget.cxx +++ b/src/debugger/gui/CartF6SCWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartF6SC.hxx" #include "PopUpWidget.hxx" #include "CartF6SCWidget.hxx" diff --git a/src/debugger/gui/CartF8SCWidget.cxx b/src/debugger/gui/CartF8SCWidget.cxx index f8cf69629..03366dc32 100644 --- a/src/debugger/gui/CartF8SCWidget.cxx +++ b/src/debugger/gui/CartF8SCWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartF8SC.hxx" #include "PopUpWidget.hxx" #include "CartF8SCWidget.hxx" diff --git a/src/debugger/gui/CartFA2Widget.cxx b/src/debugger/gui/CartFA2Widget.cxx index 1a992b096..93a761a44 100644 --- a/src/debugger/gui/CartFA2Widget.cxx +++ b/src/debugger/gui/CartFA2Widget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartFA2.hxx" #include "PopUpWidget.hxx" #include "CartFA2Widget.hxx" diff --git a/src/debugger/gui/CartFAWidget.cxx b/src/debugger/gui/CartFAWidget.cxx index 7a8a27e2d..1bca64bcc 100644 --- a/src/debugger/gui/CartFAWidget.cxx +++ b/src/debugger/gui/CartFAWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartFA.hxx" #include "PopUpWidget.hxx" #include "CartFAWidget.hxx" diff --git a/src/debugger/gui/CartRamWidget.cxx b/src/debugger/gui/CartRamWidget.cxx index 8071a6c8f..9ac4a6ad5 100644 --- a/src/debugger/gui/CartRamWidget.cxx +++ b/src/debugger/gui/CartRamWidget.cxx @@ -19,8 +19,10 @@ #include "GuiObject.hxx" #include "OSystem.hxx" #include "CartDebug.hxx" +#include "StringParser.hxx" #include "Widget.hxx" - +#include "StringListWidget.hxx" +#include "CartDebugWidget.hxx" #include "CartRamWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/CartRamWidget.hxx b/src/debugger/gui/CartRamWidget.hxx index d727a9a81..ebd68dc62 100644 --- a/src/debugger/gui/CartRamWidget.hxx +++ b/src/debugger/gui/CartRamWidget.hxx @@ -22,8 +22,8 @@ class GuiObject; class DataGridOpsWidget; class StringListWidget; class InternalRamWidget; +class CartDebugWidget; -#include "CartDebugWidget.hxx" #include "RamWidget.hxx" #include "Widget.hxx" #include "Command.hxx" diff --git a/src/debugger/gui/CartWDWidget.cxx b/src/debugger/gui/CartWDWidget.cxx index 71072cb94..123ef9ba2 100644 --- a/src/debugger/gui/CartWDWidget.cxx +++ b/src/debugger/gui/CartWDWidget.cxx @@ -15,6 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ +#include "Debugger.hxx" +#include "CartDebug.hxx" #include "CartWD.hxx" #include "PopUpWidget.hxx" #include "CartWDWidget.hxx" diff --git a/src/debugger/gui/DataGridWidget.hxx b/src/debugger/gui/DataGridWidget.hxx index 235670190..8bb4d3a9b 100644 --- a/src/debugger/gui/DataGridWidget.hxx +++ b/src/debugger/gui/DataGridWidget.hxx @@ -20,10 +20,9 @@ class DataGridOpsWidget; class ScrollBarWidget; +class CommandSender; #include "Widget.hxx" -#include "Command.hxx" -#include "Debugger.hxx" #include "EditableWidget.hxx" #include "Base.hxx" #include "Rect.hxx" diff --git a/src/debugger/gui/DrivingWidget.hxx b/src/debugger/gui/DrivingWidget.hxx index 189e66baf..f96a919f6 100644 --- a/src/debugger/gui/DrivingWidget.hxx +++ b/src/debugger/gui/DrivingWidget.hxx @@ -18,12 +18,11 @@ #ifndef DRIVING_WIDGET_HXX #define DRIVING_WIDGET_HXX +class Controller; class ButtonWidget; class CheckboxWidget; class DataGridWidget; -#include "Control.hxx" -#include "Event.hxx" #include "ControllerWidget.hxx" class DrivingWidget : public ControllerWidget diff --git a/src/debugger/gui/FlashWidget.cxx b/src/debugger/gui/FlashWidget.cxx index 084c024a6..d6d38cfa9 100644 --- a/src/debugger/gui/FlashWidget.cxx +++ b/src/debugger/gui/FlashWidget.cxx @@ -15,9 +15,9 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "FlashWidget.hxx" -#include "MT24LC256.hxx" #include "Base.hxx" +#include "MT24LC256.hxx" +#include "FlashWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FlashWidget::FlashWidget(GuiObject* boss, const GUI::Font& font, diff --git a/src/debugger/gui/FlashWidget.hxx b/src/debugger/gui/FlashWidget.hxx index 3fb15e94e..2ada70854 100644 --- a/src/debugger/gui/FlashWidget.hxx +++ b/src/debugger/gui/FlashWidget.hxx @@ -18,9 +18,9 @@ #ifndef FLASH_WIDGET_HXX #define FLASH_WIDGET_HXX +class Controller; class ButtonWidget; -#include "Control.hxx" #include "ControllerWidget.hxx" class FlashWidget : public ControllerWidget diff --git a/src/debugger/gui/GenesisWidget.cxx b/src/debugger/gui/GenesisWidget.cxx index 86554777d..f838a3d95 100644 --- a/src/debugger/gui/GenesisWidget.cxx +++ b/src/debugger/gui/GenesisWidget.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "OSystem.hxx" -#include "EventHandler.hxx" #include "GenesisWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/GenesisWidget.hxx b/src/debugger/gui/GenesisWidget.hxx index 30b761fad..936a43404 100644 --- a/src/debugger/gui/GenesisWidget.hxx +++ b/src/debugger/gui/GenesisWidget.hxx @@ -19,7 +19,6 @@ #define GENESIS_WIDGET_HXX #include "Control.hxx" -#include "Event.hxx" #include "ControllerWidget.hxx" class GenesisWidget : public ControllerWidget diff --git a/src/debugger/gui/JoystickWidget.cxx b/src/debugger/gui/JoystickWidget.cxx index 7b480b2c3..08927457c 100644 --- a/src/debugger/gui/JoystickWidget.cxx +++ b/src/debugger/gui/JoystickWidget.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "OSystem.hxx" -#include "EventHandler.hxx" #include "JoystickWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/JoystickWidget.hxx b/src/debugger/gui/JoystickWidget.hxx index 2f0a21d6b..1f8c5d5ae 100644 --- a/src/debugger/gui/JoystickWidget.hxx +++ b/src/debugger/gui/JoystickWidget.hxx @@ -19,7 +19,6 @@ #define JOYSTICK_WIDGET_HXX #include "Control.hxx" -#include "Event.hxx" #include "ControllerWidget.hxx" class JoystickWidget : public ControllerWidget diff --git a/src/debugger/gui/KeyboardWidget.cxx b/src/debugger/gui/KeyboardWidget.cxx index 0d790aa0e..9fd9a0a7b 100644 --- a/src/debugger/gui/KeyboardWidget.cxx +++ b/src/debugger/gui/KeyboardWidget.cxx @@ -15,7 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "OSystem.hxx" #include "EventHandler.hxx" #include "KeyboardWidget.hxx" diff --git a/src/debugger/gui/KeyboardWidget.hxx b/src/debugger/gui/KeyboardWidget.hxx index 45cc84b68..ce7ea2d55 100644 --- a/src/debugger/gui/KeyboardWidget.hxx +++ b/src/debugger/gui/KeyboardWidget.hxx @@ -18,7 +18,6 @@ #ifndef KEYBOARD_WIDGET_HXX #define KEYBOARD_WIDGET_HXX -#include "Control.hxx" #include "Event.hxx" #include "ControllerWidget.hxx" diff --git a/src/debugger/gui/PaddleWidget.cxx b/src/debugger/gui/PaddleWidget.cxx index 9d6979b3a..ecc75379b 100644 --- a/src/debugger/gui/PaddleWidget.cxx +++ b/src/debugger/gui/PaddleWidget.cxx @@ -15,9 +15,7 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "OSystem.hxx" #include "Paddles.hxx" -#include "EventHandler.hxx" #include "PaddleWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/PaddleWidget.hxx b/src/debugger/gui/PaddleWidget.hxx index beeab659f..77090d7e8 100644 --- a/src/debugger/gui/PaddleWidget.hxx +++ b/src/debugger/gui/PaddleWidget.hxx @@ -18,8 +18,8 @@ #ifndef PADDLE_WIDGET_HXX #define PADDLE_WIDGET_HXX -#include "Control.hxx" -#include "Event.hxx" +class Controller; + #include "ControllerWidget.hxx" class PaddleWidget : public ControllerWidget diff --git a/src/debugger/gui/PointingDeviceWidget.hxx b/src/debugger/gui/PointingDeviceWidget.hxx index f5be3001f..58cee51c7 100644 --- a/src/debugger/gui/PointingDeviceWidget.hxx +++ b/src/debugger/gui/PointingDeviceWidget.hxx @@ -18,9 +18,9 @@ #ifndef POINTINGDEVICE_WIDGET_HXX #define POINTINGDEVICE_WIDGET_HXX +class Controller; class DataGridWidget; -#include "Control.hxx" #include "ControllerWidget.hxx" class PointingDeviceWidget : public ControllerWidget diff --git a/src/debugger/gui/PromptWidget.hxx b/src/debugger/gui/PromptWidget.hxx index e3b046314..03ac6f605 100644 --- a/src/debugger/gui/PromptWidget.hxx +++ b/src/debugger/gui/PromptWidget.hxx @@ -18,7 +18,7 @@ #ifndef PROMPT_WIDGET_HXX #define PROMPT_WIDGET_HXX -#include +#include class ScrollBarWidget; class FilesystemNode; diff --git a/src/debugger/gui/RamWidget.cxx b/src/debugger/gui/RamWidget.cxx index ea5a744e7..1e26cfbed 100644 --- a/src/debugger/gui/RamWidget.cxx +++ b/src/debugger/gui/RamWidget.cxx @@ -20,6 +20,7 @@ #include "GuiObject.hxx" #include "InputTextDialog.hxx" #include "OSystem.hxx" +#include "Debugger.hxx" #include "CartDebug.hxx" #include "Widget.hxx" @@ -157,6 +158,11 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n if(_h == 0) _h = ypos + myLineHeight - y; } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +RamWidget::~RamWidget() +{ +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void RamWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) { diff --git a/src/debugger/gui/RamWidget.hxx b/src/debugger/gui/RamWidget.hxx index 23d32b9bd..1be0baddf 100644 --- a/src/debugger/gui/RamWidget.hxx +++ b/src/debugger/gui/RamWidget.hxx @@ -24,10 +24,10 @@ class DataGridWidget; class DataGridOpsWidget; class EditTextWidget; class StaticTextWidget; +class InputTextDialog; #include "Widget.hxx" #include "Command.hxx" -#include "InputTextDialog.hxx" class RamWidget : public Widget, public CommandSender { @@ -35,7 +35,7 @@ class RamWidget : public Widget, public CommandSender 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); - virtual ~RamWidget() = default; + virtual ~RamWidget(); void loadConfig() override; void setOpsWidget(DataGridOpsWidget* w); diff --git a/src/debugger/gui/RiotRamWidget.hxx b/src/debugger/gui/RiotRamWidget.hxx index 25f85058b..dd28fff61 100644 --- a/src/debugger/gui/RiotRamWidget.hxx +++ b/src/debugger/gui/RiotRamWidget.hxx @@ -25,8 +25,8 @@ class DataGridWidget; class DataGridOpsWidget; class EditTextWidget; class StaticTextWidget; +class CartDebug; -#include "CartDebug.hxx" #include "RamWidget.hxx" class RiotRamWidget : public RamWidget diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index 7964de9c2..5bc351a27 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -21,6 +21,7 @@ #include "FrameBuffer.hxx" #include "GuiObject.hxx" #include "OSystem.hxx" +#include "Debugger.hxx" #include "RiotDebug.hxx" #include "PopUpWidget.hxx" #include "ToggleBitWidget.hxx" diff --git a/src/debugger/gui/RiotWidget.hxx b/src/debugger/gui/RiotWidget.hxx index dc9bc969a..7933df668 100644 --- a/src/debugger/gui/RiotWidget.hxx +++ b/src/debugger/gui/RiotWidget.hxx @@ -24,8 +24,9 @@ class DataGridWidget; class PopUpWidget; class ToggleBitWidget; class ControllerWidget; +class Controller; -#include "Control.hxx" +#include "Widget.hxx" #include "Command.hxx" class RiotWidget : public Widget, public CommandSender diff --git a/src/debugger/gui/RomListWidget.hxx b/src/debugger/gui/RomListWidget.hxx index e76c53b70..14718bf1f 100644 --- a/src/debugger/gui/RomListWidget.hxx +++ b/src/debugger/gui/RomListWidget.hxx @@ -21,11 +21,11 @@ class ScrollBarWidget; class PackedBitArray; class CheckListWidget; +class RomListSettings; #include "Base.hxx" #include "CartDebug.hxx" #include "EditableWidget.hxx" -#include "RomListSettings.hxx" /** RomListWidget */ class RomListWidget : public EditableWidget diff --git a/src/debugger/gui/RomWidget.cxx b/src/debugger/gui/RomWidget.cxx index 76e680624..db8b7a3db 100644 --- a/src/debugger/gui/RomWidget.cxx +++ b/src/debugger/gui/RomWidget.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include - #include "Settings.hxx" #include "Debugger.hxx" #include "CartDebug.hxx" @@ -228,3 +226,9 @@ void RomWidget::patchROM(int disasm_line, const string& bytes, Common::Base::setFormat(oldbase); } } + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void RomWidget::scrollTo(int line) +{ + myRomList->setSelected(line); +} diff --git a/src/debugger/gui/RomWidget.hxx b/src/debugger/gui/RomWidget.hxx index b4a374114..16d9bfbd1 100644 --- a/src/debugger/gui/RomWidget.hxx +++ b/src/debugger/gui/RomWidget.hxx @@ -20,10 +20,11 @@ class GuiObject; class EditTextWidget; +class RomListWidget; #include "Base.hxx" #include "Command.hxx" -#include "RomListWidget.hxx" +#include "Widget.hxx" class RomWidget : public Widget, public CommandSender { @@ -41,7 +42,7 @@ class RomWidget : public Widget, public CommandSender void invalidate(bool forcereload = true) { myListIsDirty = true; if(forcereload) loadConfig(); } - void scrollTo(int line) { myRomList->setSelected(line); } + void scrollTo(int line); private: void handleCommand(CommandSender* sender, int cmd, int data, int id) override; diff --git a/src/debugger/gui/SaveKeyWidget.hxx b/src/debugger/gui/SaveKeyWidget.hxx index 1b461fc78..7bdfaf830 100644 --- a/src/debugger/gui/SaveKeyWidget.hxx +++ b/src/debugger/gui/SaveKeyWidget.hxx @@ -18,7 +18,8 @@ #ifndef SAVEKEY_WIDGET_HXX #define SAVEKEY_WIDGET_HXX -#include "Control.hxx" +class Controller; + #include "FlashWidget.hxx" class SaveKeyWidget : public FlashWidget diff --git a/src/debugger/gui/TiaInfoWidget.hxx b/src/debugger/gui/TiaInfoWidget.hxx index 525cf6c88..82a959edf 100644 --- a/src/debugger/gui/TiaInfoWidget.hxx +++ b/src/debugger/gui/TiaInfoWidget.hxx @@ -20,6 +20,7 @@ class GuiObject; class EditTextWidget; +class CheckboxWidget; #include "Widget.hxx" #include "Command.hxx" diff --git a/src/debugger/gui/TiaWidget.cxx b/src/debugger/gui/TiaWidget.cxx index e87ffa480..ef7749b50 100644 --- a/src/debugger/gui/TiaWidget.cxx +++ b/src/debugger/gui/TiaWidget.cxx @@ -21,6 +21,7 @@ #include "FrameBuffer.hxx" #include "GuiObject.hxx" #include "OSystem.hxx" +#include "Debugger.hxx" #include "CartDebug.hxx" #include "TIA.hxx" #include "TIADebug.hxx" diff --git a/src/debugger/gui/TrakBallWidget.hxx b/src/debugger/gui/TrakBallWidget.hxx index b39009702..2f22dc3fc 100644 --- a/src/debugger/gui/TrakBallWidget.hxx +++ b/src/debugger/gui/TrakBallWidget.hxx @@ -18,7 +18,8 @@ #ifndef TRAKBALL_WIDGET_HXX #define TRAKBALL_WIDGET_HXX -#include "Control.hxx" +class Controller; + #include "PointingDeviceWidget.hxx" class TrakBallWidget : public PointingDeviceWidget diff --git a/src/debugger/gui/module.mk b/src/debugger/gui/module.mk index 8b5f72660..95cd96088 100644 --- a/src/debugger/gui/module.mk +++ b/src/debugger/gui/module.mk @@ -48,6 +48,7 @@ MODULE_OBJS := \ src/debugger/gui/CartUAWidget.o \ src/debugger/gui/CartWDWidget.o \ src/debugger/gui/CartX07Widget.o \ + src/debugger/gui/CartDebugWidget.o \ src/debugger/gui/CpuWidget.o \ src/debugger/gui/DataGridOpsWidget.o \ src/debugger/gui/DataGridWidget.o \ diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 470ca7d0a..fe5cebdeb 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -15,9 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include -#include - #include "bspf.hxx" #include "CommandMenu.hxx"