From 7b9169c18d36b393a0f2d8ec6fddfbe9dcac91a0 Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 8 Nov 2014 21:27:36 +0000 Subject: [PATCH] Convert all arrays in the codebase to vectors, so that we get all the advantages of C++11 (move semantics, list initialization, etc). I'd hoped to somehow wrap a vector behind Common::Array and not have to change the codebase to this extent, but it didn't work out. And I've since read that it's bad form to extend from std::vector anyway. This is *THE LAST* bit of work I'm doing with arrays; everything is now a proper vector. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3055 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/cheat/Cheat.hxx | 10 +- src/cheat/CheatCodeDialog.cxx | 1 - src/cheat/CheatManager.cxx | 9 +- src/cheat/CheatManager.hxx | 3 +- src/common/FSNodeZIP.hxx | 1 - src/common/FrameBufferSDL2.cxx | 12 +-- src/common/FrameBufferSDL2.hxx | 2 +- src/common/MouseControl.hxx | 3 +- src/common/StringList.hxx | 49 ---------- src/common/StringParser.hxx | 1 - src/common/Variant.hxx | 20 ++-- src/common/{Array.hxx => Vec.hxx} | 43 ++++----- src/common/bspf.hxx | 7 ++ src/debugger/CartDebug.cxx | 1 - src/debugger/CartDebug.hxx | 5 +- src/debugger/CpuDebug.cxx | 1 - src/debugger/CpuDebug.hxx | 1 - src/debugger/Debugger.hxx | 1 - src/debugger/DebuggerParser.cxx | 3 +- src/debugger/DebuggerParser.hxx | 2 - src/debugger/DiStella.hxx | 1 - src/debugger/RiotDebug.hxx | 1 - src/debugger/TIADebug.hxx | 1 - src/debugger/gui/Cart0840Widget.cxx | 4 +- src/debugger/gui/Cart3EWidget.cxx | 8 +- src/debugger/gui/Cart3FWidget.cxx | 2 +- src/debugger/gui/Cart4A50Widget.cxx | 16 ++-- src/debugger/gui/CartARWidget.cxx | 64 ++++++------- src/debugger/gui/CartBFSCWidget.cxx | 128 ++++++++++++------------- src/debugger/gui/CartBFWidget.cxx | 128 ++++++++++++------------- src/debugger/gui/CartCMWidget.cxx | 8 +- src/debugger/gui/CartCTYWidget.cxx | 14 +-- src/debugger/gui/CartDASHWidget.cxx | 6 +- src/debugger/gui/CartDFSCWidget.cxx | 64 ++++++------- src/debugger/gui/CartDFWidget.cxx | 64 ++++++------- src/debugger/gui/CartDPCPlusWidget.cxx | 12 +-- src/debugger/gui/CartDPCWidget.cxx | 4 +- src/debugger/gui/CartE0Widget.cxx | 6 +- src/debugger/gui/CartE7Widget.cxx | 4 +- src/debugger/gui/CartEFSCWidget.cxx | 32 +++---- src/debugger/gui/CartEFWidget.cxx | 32 +++---- src/debugger/gui/CartF0Widget.cxx | 32 +++---- src/debugger/gui/CartF4SCWidget.cxx | 16 ++-- src/debugger/gui/CartF4Widget.cxx | 16 ++-- src/debugger/gui/CartF6SCWidget.cxx | 8 +- src/debugger/gui/CartF6Widget.cxx | 8 +- src/debugger/gui/CartF8SCWidget.cxx | 4 +- src/debugger/gui/CartF8Widget.cxx | 4 +- src/debugger/gui/CartFA2Widget.cxx | 14 +-- src/debugger/gui/CartFAWidget.cxx | 6 +- src/debugger/gui/CartMCWidget.cxx | 4 +- src/debugger/gui/CartMDMWidget.cxx | 2 +- src/debugger/gui/CartSBWidget.cxx | 2 +- src/debugger/gui/CartUAWidget.cxx | 4 +- src/debugger/gui/CartX07Widget.cxx | 32 +++---- src/debugger/gui/DataGridWidget.hxx | 1 - src/debugger/gui/PromptWidget.cxx | 1 - src/debugger/gui/RamWidget.hxx | 1 - src/debugger/gui/RiotWidget.cxx | 8 +- src/debugger/gui/RiotWidget.hxx | 1 - src/debugger/gui/RomListWidget.hxx | 3 +- src/debugger/gui/RomWidget.cxx | 1 - src/debugger/gui/TiaOutputWidget.cxx | 10 +- src/debugger/gui/TiaZoomWidget.cxx | 6 +- src/debugger/gui/ToggleBitWidget.cxx | 1 - src/debugger/gui/ToggleBitWidget.hxx | 2 - src/debugger/gui/ToggleWidget.hxx | 1 - src/emucore/Cart.hxx | 1 - src/emucore/EventHandler.cxx | 27 ++++-- src/emucore/EventHandler.hxx | 12 +-- src/emucore/EventJoyHandler.cxx | 3 +- src/emucore/FSNode.hxx | 5 +- src/emucore/FrameBuffer.cxx | 2 +- src/emucore/FrameBuffer.hxx | 10 +- src/emucore/M6502.cxx | 5 +- src/emucore/M6502.hxx | 4 +- src/emucore/OSystem.hxx | 1 - src/emucore/Settings.hxx | 3 +- src/gui/AboutDialog.hxx | 6 +- src/gui/AudioDialog.cxx | 23 +++-- src/gui/CheckListWidget.hxx | 2 +- src/gui/ComboDialog.cxx | 4 +- src/gui/ComboDialog.hxx | 1 - src/gui/Dialog.cxx | 13 +-- src/gui/Dialog.hxx | 4 +- src/gui/EventMappingWidget.cxx | 3 +- src/gui/GameInfoDialog.cxx | 97 ++++++++++--------- src/gui/GlobalPropsDialog.cxx | 19 ++-- src/gui/GuiObject.hxx | 3 +- src/gui/InputDialog.cxx | 17 ++-- src/gui/InputTextDialog.hxx | 2 +- src/gui/LauncherDialog.cxx | 7 +- src/gui/LauncherDialog.hxx | 1 - src/gui/LauncherFilterDialog.cxx | 8 +- src/gui/LauncherFilterDialog.hxx | 1 - src/gui/ListWidget.hxx | 1 - src/gui/LoggerDialog.cxx | 7 +- src/gui/PopUpWidget.hxx | 2 - src/gui/RomInfoWidget.hxx | 1 - src/gui/SnapshotDialog.cxx | 24 ++--- src/gui/StringListWidget.cxx | 3 +- src/gui/TabWidget.hxx | 3 +- src/gui/UIDialog.cxx | 65 +++++++------ src/gui/VideoDialog.cxx | 27 +++--- src/gui/Widget.hxx | 1 - 105 files changed, 639 insertions(+), 741 deletions(-) delete mode 100644 src/common/StringList.hxx rename src/common/{Array.hxx => Vec.hxx} (55%) diff --git a/src/cheat/Cheat.hxx b/src/cheat/Cheat.hxx index 5a8377b53..c8f03bd52 100644 --- a/src/cheat/Cheat.hxx +++ b/src/cheat/Cheat.hxx @@ -22,7 +22,8 @@ class OSystem; -#include "StringList.hxx" +#include + #include "bspf.hxx" class Cheat @@ -30,13 +31,10 @@ class Cheat public: Cheat(OSystem& osystem, const string& name, const string& code) : myOSystem(osystem), - myName(name), + myName(name == "" ? code : regex_replace(name, regex(":|\""), "")), myCode(code), myEnabled(false) - { - if(name == "") myName = code; - myName = StringList::removePattern(myName, "\":"); - } + { } virtual ~Cheat() { } bool enabled() const { return myEnabled; } diff --git a/src/cheat/CheatCodeDialog.cxx b/src/cheat/CheatCodeDialog.cxx index a25cee204..c117f929c 100644 --- a/src/cheat/CheatCodeDialog.cxx +++ b/src/cheat/CheatCodeDialog.cxx @@ -29,7 +29,6 @@ #include "InputTextDialog.hxx" #include "OSystem.hxx" #include "Props.hxx" -#include "StringList.hxx" #include "Widget.hxx" #include "CheatCodeDialog.hxx" diff --git a/src/cheat/CheatManager.cxx b/src/cheat/CheatManager.cxx index b607d2094..b732ec4c9 100644 --- a/src/cheat/CheatManager.cxx +++ b/src/cheat/CheatManager.cxx @@ -27,6 +27,7 @@ #include "CheetahCheat.hxx" #include "BankRomCheat.hxx" #include "RamCheat.hxx" +#include "Vec.hxx" #include "CheatManager.hxx" @@ -59,7 +60,7 @@ Cheat* CheatManager::add(const string& name, const string& code, { if(myCheatList[i]->name() == name || myCheatList[i]->code() == code) { - myCheatList.removeAt(i); + Vec::removeAt(myCheatList, i); break; } } @@ -68,7 +69,7 @@ Cheat* CheatManager::add(const string& name, const string& code, if(idx == -1) myCheatList.push_back(cheat); else - myCheatList.insertAt(idx, cheat); + Vec::insertAt(myCheatList, idx, cheat); // And enable/disable it (the cheat knows how to enable or disable itself) if(enable) @@ -91,7 +92,7 @@ void CheatManager::remove(int idx) addPerFrame(c, false); // Then remove it from the cheatlist entirely - myCheatList.removeAt(idx); + Vec::removeAt(myCheatList, idx); c->disable(); delete c; } @@ -122,7 +123,7 @@ void CheatManager::addPerFrame(Cheat* cheat, bool enable) else { if(found) - myPerFrameList.removeAt(i); + Vec::removeAt(myPerFrameList, i); } } diff --git a/src/cheat/CheatManager.hxx b/src/cheat/CheatManager.hxx index 2c01e4125..fffddccae 100644 --- a/src/cheat/CheatManager.hxx +++ b/src/cheat/CheatManager.hxx @@ -26,9 +26,8 @@ class Cheat; class OSystem; #include "bspf.hxx" -#include "Array.hxx" -typedef Common::Array CheatList; +typedef vector CheatList; typedef map CheatCodeMap; /** diff --git a/src/common/FSNodeZIP.hxx b/src/common/FSNodeZIP.hxx index f3b255e23..93b1711eb 100644 --- a/src/common/FSNodeZIP.hxx +++ b/src/common/FSNodeZIP.hxx @@ -20,7 +20,6 @@ #ifndef FS_NODE_ZIP_HXX #define FS_NODE_ZIP_HXX -#include "StringList.hxx" #include "FSNode.hxx" /* diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx index 55cf8f994..ab35f68d0 100644 --- a/src/common/FrameBufferSDL2.cxx +++ b/src/common/FrameBufferSDL2.cxx @@ -78,7 +78,7 @@ FrameBufferSDL2::~FrameBufferSDL2() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FrameBufferSDL2::queryHardware(Common::Array& displays, +void FrameBufferSDL2::queryHardware(vector& displays, VariantList& renderers) { // First get the maximum windowed desktop resolution @@ -93,12 +93,12 @@ void FrameBufferSDL2::queryHardware(Common::Array& displays, // For now, supported render types are hardcoded; eventually, SDL may // provide a method to query this #if defined(BSPF_WINDOWS) - renderers.push_back("Direct3D", "direct3d"); + VList::push_back(renderers, "Direct3D", "direct3d"); #endif - renderers.push_back("OpenGL", "opengl"); - renderers.push_back("OpenGLES2", "opengles2"); - renderers.push_back("OpenGLES", "opengles"); - renderers.push_back("Software", "software"); + VList::push_back(renderers, "OpenGL", "opengl"); + VList::push_back(renderers, "OpenGLES2", "opengles2"); + VList::push_back(renderers, "OpenGLES", "opengles"); + VList::push_back(renderers, "Software", "software"); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/common/FrameBufferSDL2.hxx b/src/common/FrameBufferSDL2.hxx index b27289ecd..556ac106d 100644 --- a/src/common/FrameBufferSDL2.hxx +++ b/src/common/FrameBufferSDL2.hxx @@ -115,7 +115,7 @@ class FrameBufferSDL2 : public FrameBuffer This method is called to query and initialize the video hardware for desktop and fullscreen resolution information. */ - void queryHardware(Common::Array& displays, VariantList& renderers); + void queryHardware(vector& displays, VariantList& renderers); /** This method is called to query the video hardware for the index diff --git a/src/common/MouseControl.hxx b/src/common/MouseControl.hxx index c02b97e00..cd2a07036 100644 --- a/src/common/MouseControl.hxx +++ b/src/common/MouseControl.hxx @@ -24,7 +24,6 @@ class Console; class Properties; #include "bspf.hxx" -#include "Array.hxx" #include "Control.hxx" /** @@ -108,7 +107,7 @@ class MouseControl }; int myCurrentModeNum; - Common::Array myModeList; + vector myModeList; }; #endif diff --git a/src/common/StringList.hxx b/src/common/StringList.hxx deleted file mode 100644 index 62ebecd36..000000000 --- a/src/common/StringList.hxx +++ /dev/null @@ -1,49 +0,0 @@ -//============================================================================ -// -// 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-2014 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. -// -// $Id$ -//============================================================================ - -#ifndef STRING_LIST_HXX -#define STRING_LIST_HXX - -#include "Array.hxx" - -class StringList : public Common::Array -{ - public: - static string removePattern(const string& str, const string& pattern) - { - // This can probably be made more efficient ... - string tmp; - for(unsigned int i = 0; i < str.length(); ++i) - { - bool match = false; - for(unsigned int j = 0; j < pattern.length(); ++j) - { - if(str[i] == pattern[j]) - { - match = true; - break; - } - } - if(!match) tmp += str[i]; - } - return tmp; - } -}; - -#endif diff --git a/src/common/StringParser.hxx b/src/common/StringParser.hxx index beb3f6339..d56ad4cf9 100644 --- a/src/common/StringParser.hxx +++ b/src/common/StringParser.hxx @@ -20,7 +20,6 @@ #ifndef STRING_PARSER_HXX #define STRING_PARSER_HXX -#include "StringList.hxx" #include "bspf.hxx" /** diff --git a/src/common/Variant.hxx b/src/common/Variant.hxx index 38167e1f1..a2f96c2b2 100644 --- a/src/common/Variant.hxx +++ b/src/common/Variant.hxx @@ -20,7 +20,6 @@ #ifndef VARIANT_HXX #define VARIANT_HXX -#include "Array.hxx" #include "Rect.hxx" #include "bspf.hxx" @@ -76,19 +75,20 @@ class Variant }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -static const Variant EmptyVariant = Variant(); +static const Variant EmptyVariant; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -class VariantList : public Common::Array> -{ - public: - void push_back(const Variant& name, const Variant& tag = EmptyVariant) - { - emplace_back(name.toString(), tag); - } +typedef vector> VariantList; + +namespace VList { + inline void push_back(VariantList& list, const Variant& name, + const Variant& tag = EmptyVariant) + { + list.emplace_back(name.toString(), tag); + } }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -static const VariantList EmptyVarList = VariantList(); +static const VariantList EmptyVarList; #endif diff --git a/src/common/Array.hxx b/src/common/Vec.hxx similarity index 55% rename from src/common/Array.hxx rename to src/common/Vec.hxx index f0726955b..e4f74e9b4 100644 --- a/src/common/Array.hxx +++ b/src/common/Vec.hxx @@ -17,40 +17,31 @@ // $Id$ //============================================================================ -#ifndef ARRAY_HXX -#define ARRAY_HXX - -#include +#ifndef VECTOR_OPS_HXX +#define VECTOR_OPS_HXX #include "bspf.hxx" -namespace Common { +namespace Vec { template -class Array : public vector +void append(vector& dst, const vector& src) { - public: - void append(const Array& array) - { - this->insert(this->end(), array.begin(), array.end()); - } + dst.insert(dst.end(), src.begin(), src.end()); +} - void insertAt(uInt32 idx, const T& element) - { - this->insert(this->cbegin()+idx, element); - } +template +void insertAt(vector& dst, uInt32 idx, const T& element) +{ + dst.insert(dst.cbegin()+idx, element); +} - void removeAt(uInt32 idx) - { - this->erase(this->cbegin()+idx); - } -}; +template +void removeAt(vector& dst, uInt32 idx) +{ + dst.erase(dst.cbegin()+idx); +} -} // Namespace Common - -// Common array types -class IntArray : public Common::Array { }; -class BoolArray : public Common::Array { }; -class ByteArray : public Common::Array { }; +} // Namespace Vec #endif diff --git a/src/common/bspf.hxx b/src/common/bspf.hxx index a472828ab..8188c1199 100644 --- a/src/common/bspf.hxx +++ b/src/common/bspf.hxx @@ -72,8 +72,15 @@ #include #include #include +#include using namespace std; +// Common array types +typedef vector IntArray; +typedef vector BoolArray; +typedef vector ByteArray; +typedef vector StringList; + // Defines to help with path handling #if (defined(BSPF_UNIX) || defined(BSPF_MAC_OSX)) #define BSPF_PATH_SEPARATOR "/" diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index 92e1993c7..30ed1695f 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -20,7 +20,6 @@ #include #include "bspf.hxx" -#include "Array.hxx" #include "System.hxx" #include "FSNode.hxx" #include "DiStella.hxx" diff --git a/src/debugger/CartDebug.hxx b/src/debugger/CartDebug.hxx index f24cbe064..e8b59282a 100644 --- a/src/debugger/CartDebug.hxx +++ b/src/debugger/CartDebug.hxx @@ -28,7 +28,6 @@ class CartDebugWidget; #include #include "bspf.hxx" -#include "Array.hxx" #include "Base.hxx" #include "Cart.hxx" #include "DebuggerSystem.hxx" @@ -85,7 +84,7 @@ class CartDebug : public DebuggerSystem string bytes; bool hllabel; }; - typedef Common::Array DisassemblyList; + typedef vector DisassemblyList; struct Disassembly { DisassemblyList list; int fieldwidth; @@ -351,7 +350,7 @@ class CartDebug : public DebuggerSystem CartDebugWidget* myDebugWidget; // A complete record of relevant diassembly information for each bank - Common::Array myBankInfo; + vector myBankInfo; // Used for the disassembly display, and mapping from addresses // to corresponding lines of text in that display diff --git a/src/debugger/CpuDebug.cxx b/src/debugger/CpuDebug.cxx index 9f9e839ec..800683e35 100644 --- a/src/debugger/CpuDebug.cxx +++ b/src/debugger/CpuDebug.cxx @@ -19,7 +19,6 @@ #include -#include "Array.hxx" #include "M6502.hxx" #include "Debugger.hxx" #include "CartDebug.hxx" diff --git a/src/debugger/CpuDebug.hxx b/src/debugger/CpuDebug.hxx index 46e0eae6e..be4236c07 100644 --- a/src/debugger/CpuDebug.hxx +++ b/src/debugger/CpuDebug.hxx @@ -20,7 +20,6 @@ #ifndef CPU_DEBUG_HXX #define CPU_DEBUG_HXX -#include "Array.hxx" #include "M6502.hxx" #include "System.hxx" #include "DebuggerSystem.hxx" diff --git a/src/debugger/Debugger.hxx b/src/debugger/Debugger.hxx index d5dd4ec1c..9a230f25a 100644 --- a/src/debugger/Debugger.hxx +++ b/src/debugger/Debugger.hxx @@ -40,7 +40,6 @@ class ButtonWidget; #include -#include "Array.hxx" #include "Base.hxx" #include "DialogContainer.hxx" #include "DebuggerDialog.hxx" diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 95a763880..8afbdca07 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -36,6 +36,7 @@ #include "RomWidget.hxx" #include "ProgressDialog.hxx" #include "PackedBitArray.hxx" +#include "Vec.hxx" #include "Base.hxx" using namespace Common; @@ -886,7 +887,7 @@ void DebuggerParser::executeDelwatch() int which = args[0] - 1; if(which >= 0 && which < (int)watches.size()) { - watches.removeAt(which); + Vec::removeAt(watches, which); commandResult << "removed watch"; } else diff --git a/src/debugger/DebuggerParser.hxx b/src/debugger/DebuggerParser.hxx index c1cef5fcd..0bc0b5655 100644 --- a/src/debugger/DebuggerParser.hxx +++ b/src/debugger/DebuggerParser.hxx @@ -27,8 +27,6 @@ class FilesystemNode; struct Command; #include "bspf.hxx" -#include "Array.hxx" -#include "StringList.hxx" #include "FrameBuffer.hxx" #include "Settings.hxx" diff --git a/src/debugger/DiStella.hxx b/src/debugger/DiStella.hxx index eef02b8d0..f95f6f332 100644 --- a/src/debugger/DiStella.hxx +++ b/src/debugger/DiStella.hxx @@ -23,7 +23,6 @@ #include #include -#include "Array.hxx" #include "Base.hxx" #include "CartDebug.hxx" #include "bspf.hxx" diff --git a/src/debugger/RiotDebug.hxx b/src/debugger/RiotDebug.hxx index c5ee0dfc1..3121c15e9 100644 --- a/src/debugger/RiotDebug.hxx +++ b/src/debugger/RiotDebug.hxx @@ -23,7 +23,6 @@ class Debugger; class RiotDebug; -#include "Array.hxx" #include "M6532.hxx" #include "DebuggerSystem.hxx" diff --git a/src/debugger/TIADebug.hxx b/src/debugger/TIADebug.hxx index 4647c833e..5485be097 100644 --- a/src/debugger/TIADebug.hxx +++ b/src/debugger/TIADebug.hxx @@ -24,7 +24,6 @@ class Debugger; class TiaDebug; class TIA; -#include "Array.hxx" #include "DebuggerSystem.hxx" // pointer types for TIADebug instance methods diff --git a/src/debugger/gui/Cart0840Widget.cxx b/src/debugger/gui/Cart0840Widget.cxx index 4737030d0..170b7066f 100644 --- a/src/debugger/gui/Cart0840Widget.cxx +++ b/src/debugger/gui/Cart0840Widget.cxx @@ -48,8 +48,8 @@ Cartridge0840Widget::Cartridge0840Widget( ypos = addBaseInformation(size, "Fred X. Quimby", info.str()) + myLineHeight; VariantList items; - items.push_back("0 ($800)"); - items.push_back("1 ($840)"); + VList::push_back(items, "0 ($800)"); + VList::push_back(items, "1 ($840)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($800) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/Cart3EWidget.cxx b/src/debugger/gui/Cart3EWidget.cxx index cc925d0db..cc99df9a2 100644 --- a/src/debugger/gui/Cart3EWidget.cxx +++ b/src/debugger/gui/Cart3EWidget.cxx @@ -54,13 +54,13 @@ Cartridge3EWidget::Cartridge3EWidget( VariantList romitems; for(uInt32 i = 0; i < myNumRomBanks; ++i) - romitems.push_back(i); - romitems.push_back("Inactive", ""); + VList::push_back(romitems, i); + VList::push_back(romitems, "Inactive", ""); VariantList ramitems; for(uInt32 i = 0; i < myNumRamBanks; ++i) - ramitems.push_back(i); - ramitems.push_back("Inactive", ""); + VList::push_back(ramitems, i); + VList::push_back(ramitems, "Inactive", ""); ostringstream label; label << "Set bank ($" << Common::Base::HEX4 << start << " - $" diff --git a/src/debugger/gui/Cart3FWidget.cxx b/src/debugger/gui/Cart3FWidget.cxx index d837b4532..55e818a9e 100644 --- a/src/debugger/gui/Cart3FWidget.cxx +++ b/src/debugger/gui/Cart3FWidget.cxx @@ -46,7 +46,7 @@ Cartridge3FWidget::Cartridge3FWidget( VariantList items; for(uInt16 i = 0; i < cart.bankCount(); ++i) - items.push_back(Variant(i).toString() + " ($3F)"); + VList::push_back(items, Variant(i).toString() + " ($3F)"); ostringstream label; label << "Set bank ($" << Common::Base::HEX4 << start << " - $" << diff --git a/src/debugger/gui/Cart4A50Widget.cxx b/src/debugger/gui/Cart4A50Widget.cxx index c23a2baaf..d85d5b6cb 100644 --- a/src/debugger/gui/Cart4A50Widget.cxx +++ b/src/debugger/gui/Cart4A50Widget.cxx @@ -42,20 +42,20 @@ Cartridge4A50Widget::Cartridge4A50Widget( VariantList items16, items32, items128, items256; for(uInt32 i = 0; i < 16; ++i) - items16.push_back(i); - items16.push_back("Inactive", ""); + VList::push_back(items16, i); + VList::push_back(items16, "Inactive", ""); for(uInt32 i = 0; i < 32; ++i) - items32.push_back(i); - items32.push_back("Inactive", ""); + VList::push_back(items32, i); + VList::push_back(items32, "Inactive", ""); for(uInt32 i = 0; i < 128; ++i) - items128.push_back(i); - items128.push_back("Inactive", ""); + VList::push_back(items128, i); + VList::push_back(items128, "Inactive", ""); for(uInt32 i = 0; i < 256; ++i) - items256.push_back(i); - items256.push_back("Inactive", ""); + VList::push_back(items256, i); + VList::push_back(items256, "Inactive", ""); string lowerlabel = "Set lower 2K region ($F000 - $F7FF): "; string middlelabel = "Set middle 1.5K region ($F800 - $FDFF): "; diff --git a/src/debugger/gui/CartARWidget.cxx b/src/debugger/gui/CartARWidget.cxx index 5c25929ea..711193953 100644 --- a/src/debugger/gui/CartARWidget.cxx +++ b/src/debugger/gui/CartARWidget.cxx @@ -38,38 +38,38 @@ CartridgeARWidget::CartridgeARWidget( ypos = addBaseInformation(size, "Starpath", info) + myLineHeight; VariantList items; - items.push_back(" 0"); - items.push_back(" 1"); - items.push_back(" 2"); - items.push_back(" 3"); - items.push_back(" 4"); - items.push_back(" 5"); - items.push_back(" 6"); - items.push_back(" 7"); - items.push_back(" 8"); - items.push_back(" 9"); - items.push_back(" 10"); - items.push_back(" 11"); - items.push_back(" 12"); - items.push_back(" 13"); - items.push_back(" 14"); - items.push_back(" 15"); - items.push_back(" 16"); - items.push_back(" 17"); - items.push_back(" 18"); - items.push_back(" 19"); - items.push_back(" 20"); - items.push_back(" 21"); - items.push_back(" 22"); - items.push_back(" 23"); - items.push_back(" 24"); - items.push_back(" 25"); - items.push_back(" 26"); - items.push_back(" 27"); - items.push_back(" 28"); - items.push_back(" 29"); - items.push_back(" 30"); - items.push_back(" 31"); + VList::push_back(items, " 0"); + VList::push_back(items, " 1"); + VList::push_back(items, " 2"); + VList::push_back(items, " 3"); + VList::push_back(items, " 4"); + VList::push_back(items, " 5"); + VList::push_back(items, " 6"); + VList::push_back(items, " 7"); + VList::push_back(items, " 8"); + VList::push_back(items, " 9"); + VList::push_back(items, " 10"); + VList::push_back(items, " 11"); + VList::push_back(items, " 12"); + VList::push_back(items, " 13"); + VList::push_back(items, " 14"); + VList::push_back(items, " 15"); + VList::push_back(items, " 16"); + VList::push_back(items, " 17"); + VList::push_back(items, " 18"); + VList::push_back(items, " 19"); + VList::push_back(items, " 20"); + VList::push_back(items, " 21"); + VList::push_back(items, " 22"); + VList::push_back(items, " 23"); + VList::push_back(items, " 24"); + VList::push_back(items, " 25"); + VList::push_back(items, " 26"); + VList::push_back(items, " 27"); + VList::push_back(items, " 28"); + VList::push_back(items, " 29"); + VList::push_back(items, " 30"); + VList::push_back(items, " 31"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" XX "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartBFSCWidget.cxx b/src/debugger/gui/CartBFSCWidget.cxx index 347ba971a..96de5d5e9 100644 --- a/src/debugger/gui/CartBFSCWidget.cxx +++ b/src/debugger/gui/CartBFSCWidget.cxx @@ -49,70 +49,70 @@ CartridgeBFSCWidget::CartridgeBFSCWidget( ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - items.push_back(" 0 ($F80)"); - items.push_back(" 1 ($F81)"); - items.push_back(" 2 ($F82)"); - items.push_back(" 3 ($F83)"); - items.push_back(" 4 ($F84)"); - items.push_back(" 5 ($F85)"); - items.push_back(" 6 ($F86)"); - items.push_back(" 7 ($F87)"); - items.push_back(" 8 ($F88)"); - items.push_back(" 9 ($F89)"); - items.push_back("10 ($F8A)"); - items.push_back("11 ($F8B)"); - items.push_back("12 ($F8C)"); - items.push_back("13 ($F8D)"); - items.push_back("14 ($F8E)"); - items.push_back("15 ($F8F)"); - items.push_back("16 ($F90)"); - items.push_back("17 ($F91)"); - items.push_back("18 ($F92)"); - items.push_back("19 ($F93)"); - items.push_back("20 ($F94)"); - items.push_back("21 ($F95)"); - items.push_back("22 ($F96)"); - items.push_back("23 ($F97)"); - items.push_back("24 ($F98)"); - items.push_back("25 ($F99)"); - items.push_back("26 ($F9A)"); - items.push_back("27 ($F9B)"); - items.push_back("28 ($F9C)"); - items.push_back("29 ($F9D)"); - items.push_back("30 ($F9E)"); - items.push_back("31 ($F9F)"); - items.push_back("32 ($FA0)"); - items.push_back("33 ($FA1)"); - items.push_back("34 ($FA2)"); - items.push_back("35 ($FA3)"); - items.push_back("36 ($FA4)"); - items.push_back("37 ($FA5)"); - items.push_back("38 ($FA6)"); - items.push_back("39 ($FA7)"); - items.push_back("40 ($FA8)"); - items.push_back("41 ($FA9)"); - items.push_back("42 ($FAA)"); - items.push_back("43 ($FAB)"); - items.push_back("44 ($FAC)"); - items.push_back("45 ($FAD)"); - items.push_back("46 ($FAE)"); - items.push_back("47 ($FAF)"); - items.push_back("48 ($FB0)"); - items.push_back("49 ($FB1)"); - items.push_back("50 ($FB2)"); - items.push_back("51 ($FB3)"); - items.push_back("52 ($FB4)"); - items.push_back("53 ($FB5)"); - items.push_back("54 ($FB6)"); - items.push_back("55 ($FB7)"); - items.push_back("56 ($FB8)"); - items.push_back("57 ($FB9)"); - items.push_back("58 ($FBA)"); - items.push_back("59 ($FBB)"); - items.push_back("60 ($FBC)"); - items.push_back("61 ($FBD)"); - items.push_back("62 ($FBE)"); - items.push_back("63 ($FBF)"); + VList::push_back(items, " 0 ($F80)"); + VList::push_back(items, " 1 ($F81)"); + VList::push_back(items, " 2 ($F82)"); + VList::push_back(items, " 3 ($F83)"); + VList::push_back(items, " 4 ($F84)"); + VList::push_back(items, " 5 ($F85)"); + VList::push_back(items, " 6 ($F86)"); + VList::push_back(items, " 7 ($F87)"); + VList::push_back(items, " 8 ($F88)"); + VList::push_back(items, " 9 ($F89)"); + VList::push_back(items, "10 ($F8A)"); + VList::push_back(items, "11 ($F8B)"); + VList::push_back(items, "12 ($F8C)"); + VList::push_back(items, "13 ($F8D)"); + VList::push_back(items, "14 ($F8E)"); + VList::push_back(items, "15 ($F8F)"); + VList::push_back(items, "16 ($F90)"); + VList::push_back(items, "17 ($F91)"); + VList::push_back(items, "18 ($F92)"); + VList::push_back(items, "19 ($F93)"); + VList::push_back(items, "20 ($F94)"); + VList::push_back(items, "21 ($F95)"); + VList::push_back(items, "22 ($F96)"); + VList::push_back(items, "23 ($F97)"); + VList::push_back(items, "24 ($F98)"); + VList::push_back(items, "25 ($F99)"); + VList::push_back(items, "26 ($F9A)"); + VList::push_back(items, "27 ($F9B)"); + VList::push_back(items, "28 ($F9C)"); + VList::push_back(items, "29 ($F9D)"); + VList::push_back(items, "30 ($F9E)"); + VList::push_back(items, "31 ($F9F)"); + VList::push_back(items, "32 ($FA0)"); + VList::push_back(items, "33 ($FA1)"); + VList::push_back(items, "34 ($FA2)"); + VList::push_back(items, "35 ($FA3)"); + VList::push_back(items, "36 ($FA4)"); + VList::push_back(items, "37 ($FA5)"); + VList::push_back(items, "38 ($FA6)"); + VList::push_back(items, "39 ($FA7)"); + VList::push_back(items, "40 ($FA8)"); + VList::push_back(items, "41 ($FA9)"); + VList::push_back(items, "42 ($FAA)"); + VList::push_back(items, "43 ($FAB)"); + VList::push_back(items, "44 ($FAC)"); + VList::push_back(items, "45 ($FAD)"); + VList::push_back(items, "46 ($FAE)"); + VList::push_back(items, "47 ($FAF)"); + VList::push_back(items, "48 ($FB0)"); + VList::push_back(items, "49 ($FB1)"); + VList::push_back(items, "50 ($FB2)"); + VList::push_back(items, "51 ($FB3)"); + VList::push_back(items, "52 ($FB4)"); + VList::push_back(items, "53 ($FB5)"); + VList::push_back(items, "54 ($FB6)"); + VList::push_back(items, "55 ($FB7)"); + VList::push_back(items, "56 ($FB8)"); + VList::push_back(items, "57 ($FB9)"); + VList::push_back(items, "58 ($FBA)"); + VList::push_back(items, "59 ($FBB)"); + VList::push_back(items, "60 ($FBC)"); + VList::push_back(items, "61 ($FBD)"); + VList::push_back(items, "62 ($FBE)"); + VList::push_back(items, "63 ($FBF)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("63 ($FBF) "), diff --git a/src/debugger/gui/CartBFWidget.cxx b/src/debugger/gui/CartBFWidget.cxx index f092c9ae7..86f6bdc8b 100644 --- a/src/debugger/gui/CartBFWidget.cxx +++ b/src/debugger/gui/CartBFWidget.cxx @@ -47,70 +47,70 @@ CartridgeBFWidget::CartridgeBFWidget( ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - items.push_back(" 0 ($F80)"); - items.push_back(" 1 ($F81)"); - items.push_back(" 2 ($F82)"); - items.push_back(" 3 ($F83)"); - items.push_back(" 4 ($F84)"); - items.push_back(" 5 ($F85)"); - items.push_back(" 6 ($F86)"); - items.push_back(" 7 ($F87)"); - items.push_back(" 8 ($F88)"); - items.push_back(" 9 ($F89)"); - items.push_back("10 ($F8A)"); - items.push_back("11 ($F8B)"); - items.push_back("12 ($F8C)"); - items.push_back("13 ($F8D)"); - items.push_back("14 ($F8E)"); - items.push_back("15 ($F8F)"); - items.push_back("16 ($F90)"); - items.push_back("17 ($F91)"); - items.push_back("18 ($F92)"); - items.push_back("19 ($F93)"); - items.push_back("20 ($F94)"); - items.push_back("21 ($F95)"); - items.push_back("22 ($F96)"); - items.push_back("23 ($F97)"); - items.push_back("24 ($F98)"); - items.push_back("25 ($F99)"); - items.push_back("26 ($F9A)"); - items.push_back("27 ($F9B)"); - items.push_back("28 ($F9C)"); - items.push_back("29 ($F9D)"); - items.push_back("30 ($F9E)"); - items.push_back("31 ($F9F)"); - items.push_back("32 ($FA0)"); - items.push_back("33 ($FA1)"); - items.push_back("34 ($FA2)"); - items.push_back("35 ($FA3)"); - items.push_back("36 ($FA4)"); - items.push_back("37 ($FA5)"); - items.push_back("38 ($FA6)"); - items.push_back("39 ($FA7)"); - items.push_back("40 ($FA8)"); - items.push_back("41 ($FA9)"); - items.push_back("42 ($FAA)"); - items.push_back("43 ($FAB)"); - items.push_back("44 ($FAC)"); - items.push_back("45 ($FAD)"); - items.push_back("46 ($FAE)"); - items.push_back("47 ($FAF)"); - items.push_back("48 ($FB0)"); - items.push_back("49 ($FB1)"); - items.push_back("50 ($FB2)"); - items.push_back("51 ($FB3)"); - items.push_back("52 ($FB4)"); - items.push_back("53 ($FB5)"); - items.push_back("54 ($FB6)"); - items.push_back("55 ($FB7)"); - items.push_back("56 ($FB8)"); - items.push_back("57 ($FB9)"); - items.push_back("58 ($FBA)"); - items.push_back("59 ($FBB)"); - items.push_back("60 ($FBC)"); - items.push_back("61 ($FBD)"); - items.push_back("62 ($FBE)"); - items.push_back("63 ($FBF)"); + VList::push_back(items, " 0 ($F80)"); + VList::push_back(items, " 1 ($F81)"); + VList::push_back(items, " 2 ($F82)"); + VList::push_back(items, " 3 ($F83)"); + VList::push_back(items, " 4 ($F84)"); + VList::push_back(items, " 5 ($F85)"); + VList::push_back(items, " 6 ($F86)"); + VList::push_back(items, " 7 ($F87)"); + VList::push_back(items, " 8 ($F88)"); + VList::push_back(items, " 9 ($F89)"); + VList::push_back(items, "10 ($F8A)"); + VList::push_back(items, "11 ($F8B)"); + VList::push_back(items, "12 ($F8C)"); + VList::push_back(items, "13 ($F8D)"); + VList::push_back(items, "14 ($F8E)"); + VList::push_back(items, "15 ($F8F)"); + VList::push_back(items, "16 ($F90)"); + VList::push_back(items, "17 ($F91)"); + VList::push_back(items, "18 ($F92)"); + VList::push_back(items, "19 ($F93)"); + VList::push_back(items, "20 ($F94)"); + VList::push_back(items, "21 ($F95)"); + VList::push_back(items, "22 ($F96)"); + VList::push_back(items, "23 ($F97)"); + VList::push_back(items, "24 ($F98)"); + VList::push_back(items, "25 ($F99)"); + VList::push_back(items, "26 ($F9A)"); + VList::push_back(items, "27 ($F9B)"); + VList::push_back(items, "28 ($F9C)"); + VList::push_back(items, "29 ($F9D)"); + VList::push_back(items, "30 ($F9E)"); + VList::push_back(items, "31 ($F9F)"); + VList::push_back(items, "32 ($FA0)"); + VList::push_back(items, "33 ($FA1)"); + VList::push_back(items, "34 ($FA2)"); + VList::push_back(items, "35 ($FA3)"); + VList::push_back(items, "36 ($FA4)"); + VList::push_back(items, "37 ($FA5)"); + VList::push_back(items, "38 ($FA6)"); + VList::push_back(items, "39 ($FA7)"); + VList::push_back(items, "40 ($FA8)"); + VList::push_back(items, "41 ($FA9)"); + VList::push_back(items, "42 ($FAA)"); + VList::push_back(items, "43 ($FAB)"); + VList::push_back(items, "44 ($FAC)"); + VList::push_back(items, "45 ($FAD)"); + VList::push_back(items, "46 ($FAE)"); + VList::push_back(items, "47 ($FAF)"); + VList::push_back(items, "48 ($FB0)"); + VList::push_back(items, "49 ($FB1)"); + VList::push_back(items, "50 ($FB2)"); + VList::push_back(items, "51 ($FB3)"); + VList::push_back(items, "52 ($FB4)"); + VList::push_back(items, "53 ($FB5)"); + VList::push_back(items, "54 ($FB6)"); + VList::push_back(items, "55 ($FB7)"); + VList::push_back(items, "56 ($FB8)"); + VList::push_back(items, "57 ($FB9)"); + VList::push_back(items, "58 ($FBA)"); + VList::push_back(items, "59 ($FBB)"); + VList::push_back(items, "60 ($FBC)"); + VList::push_back(items, "61 ($FBD)"); + VList::push_back(items, "62 ($FBE)"); + VList::push_back(items, "63 ($FBF)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("64 ($FBF) "), diff --git a/src/debugger/gui/CartCMWidget.cxx b/src/debugger/gui/CartCMWidget.cxx index 95b318bf1..cc9e0306d 100644 --- a/src/debugger/gui/CartCMWidget.cxx +++ b/src/debugger/gui/CartCMWidget.cxx @@ -46,10 +46,10 @@ CartridgeCMWidget::CartridgeCMWidget( ypos = addBaseInformation(size, "CompuMate", info) + myLineHeight; VariantList items; - items.push_back(" 0 "); - items.push_back(" 1 "); - items.push_back(" 2 "); - items.push_back(" 3 "); + VList::push_back(items, " 0 "); + VList::push_back(items, " 1 "); + VList::push_back(items, " 2 "); + VList::push_back(items, " 3 "); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 0 "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartCTYWidget.cxx b/src/debugger/gui/CartCTYWidget.cxx index f515214df..76c36c053 100644 --- a/src/debugger/gui/CartCTYWidget.cxx +++ b/src/debugger/gui/CartCTYWidget.cxx @@ -40,13 +40,13 @@ CartridgeCTYWidget::CartridgeCTYWidget( ypos = addBaseInformation(size, "Chris D. Walton", info) + myLineHeight; VariantList items; - items.push_back("1 ($FF5)"); - items.push_back("2 ($FF6)"); - items.push_back("3 ($FF7)"); - items.push_back("4 ($FF8)"); - items.push_back("5 ($FF9)"); - items.push_back("6 ($FFA)"); - items.push_back("7 ($FFB)"); + VList::push_back(items, "1 ($FF5)"); + VList::push_back(items, "2 ($FF6)"); + VList::push_back(items, "3 ($FF7)"); + VList::push_back(items, "4 ($FF8)"); + VList::push_back(items, "5 ($FF9)"); + VList::push_back(items, "6 ($FFA)"); + VList::push_back(items, "7 ($FFB)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartDASHWidget.cxx b/src/debugger/gui/CartDASHWidget.cxx index 541326b47..7ea89a63b 100644 --- a/src/debugger/gui/CartDASHWidget.cxx +++ b/src/debugger/gui/CartDASHWidget.cxx @@ -50,11 +50,11 @@ CartridgeDASHWidget::CartridgeDASHWidget( VariantList bankno; for(uInt32 i = 0; i < myCart.ROM_BANK_COUNT; ++i) - bankno.push_back(i, i); + VList::push_back(bankno, i, i); VariantList banktype; - banktype.push_back("ROM", "ROM"); - banktype.push_back("RAM", "RAM"); + VList::push_back(banktype, "ROM", "ROM"); + VList::push_back(banktype, "RAM", "RAM"); for(uInt32 i = 0; i < 4; ++i) { diff --git a/src/debugger/gui/CartDFSCWidget.cxx b/src/debugger/gui/CartDFSCWidget.cxx index 3d3049170..2acb2ba30 100644 --- a/src/debugger/gui/CartDFSCWidget.cxx +++ b/src/debugger/gui/CartDFSCWidget.cxx @@ -49,38 +49,38 @@ CartridgeDFSCWidget::CartridgeDFSCWidget( ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - items.push_back(" 0 ($FC0)"); - items.push_back(" 1 ($FC1)"); - items.push_back(" 2 ($FC2)"); - items.push_back(" 3 ($FC3)"); - items.push_back(" 4 ($FC4)"); - items.push_back(" 5 ($FC5)"); - items.push_back(" 6 ($FC6)"); - items.push_back(" 7 ($FC7)"); - items.push_back(" 8 ($FC8)"); - items.push_back(" 9 ($FC9)"); - items.push_back("10 ($FCA)"); - items.push_back("11 ($FCB)"); - items.push_back("12 ($FCC)"); - items.push_back("13 ($FCD)"); - items.push_back("14 ($FCE)"); - items.push_back("15 ($FCF)"); - items.push_back("16 ($FD0)"); - items.push_back("17 ($FD1)"); - items.push_back("18 ($FD2)"); - items.push_back("19 ($FD3)"); - items.push_back("20 ($FD4)"); - items.push_back("21 ($FD5)"); - items.push_back("22 ($FD6)"); - items.push_back("23 ($FD7)"); - items.push_back("24 ($FD8)"); - items.push_back("25 ($FD9)"); - items.push_back("26 ($FDA)"); - items.push_back("27 ($FDB)"); - items.push_back("28 ($FDC)"); - items.push_back("29 ($FDD)"); - items.push_back("30 ($FDE)"); - items.push_back("31 ($FDF)"); + VList::push_back(items, " 0 ($FC0)"); + VList::push_back(items, " 1 ($FC1)"); + VList::push_back(items, " 2 ($FC2)"); + VList::push_back(items, " 3 ($FC3)"); + VList::push_back(items, " 4 ($FC4)"); + VList::push_back(items, " 5 ($FC5)"); + VList::push_back(items, " 6 ($FC6)"); + VList::push_back(items, " 7 ($FC7)"); + VList::push_back(items, " 8 ($FC8)"); + VList::push_back(items, " 9 ($FC9)"); + VList::push_back(items, "10 ($FCA)"); + VList::push_back(items, "11 ($FCB)"); + VList::push_back(items, "12 ($FCC)"); + VList::push_back(items, "13 ($FCD)"); + VList::push_back(items, "14 ($FCE)"); + VList::push_back(items, "15 ($FCF)"); + VList::push_back(items, "16 ($FD0)"); + VList::push_back(items, "17 ($FD1)"); + VList::push_back(items, "18 ($FD2)"); + VList::push_back(items, "19 ($FD3)"); + VList::push_back(items, "20 ($FD4)"); + VList::push_back(items, "21 ($FD5)"); + VList::push_back(items, "22 ($FD6)"); + VList::push_back(items, "23 ($FD7)"); + VList::push_back(items, "24 ($FD8)"); + VList::push_back(items, "25 ($FD9)"); + VList::push_back(items, "26 ($FDA)"); + VList::push_back(items, "27 ($FDB)"); + VList::push_back(items, "28 ($FDC)"); + VList::push_back(items, "29 ($FDD)"); + VList::push_back(items, "30 ($FDE)"); + VList::push_back(items, "31 ($FDF)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("31 ($FE0) "), diff --git a/src/debugger/gui/CartDFWidget.cxx b/src/debugger/gui/CartDFWidget.cxx index 360b7f12a..f9b44f42e 100644 --- a/src/debugger/gui/CartDFWidget.cxx +++ b/src/debugger/gui/CartDFWidget.cxx @@ -47,38 +47,38 @@ CartridgeDFWidget::CartridgeDFWidget( ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - items.push_back(" 0 ($FC0)"); - items.push_back(" 1 ($FC1)"); - items.push_back(" 2 ($FC2)"); - items.push_back(" 3 ($FC3)"); - items.push_back(" 4 ($FC4)"); - items.push_back(" 5 ($FC5)"); - items.push_back(" 6 ($FC6)"); - items.push_back(" 7 ($FC7)"); - items.push_back(" 8 ($FC8)"); - items.push_back(" 9 ($FC9)"); - items.push_back("10 ($FCA)"); - items.push_back("11 ($FCB)"); - items.push_back("12 ($FCC)"); - items.push_back("13 ($FCD)"); - items.push_back("14 ($FCE)"); - items.push_back("15 ($FCF)"); - items.push_back("16 ($FD0)"); - items.push_back("17 ($FD1)"); - items.push_back("18 ($FD2)"); - items.push_back("19 ($FD3)"); - items.push_back("20 ($FD4)"); - items.push_back("21 ($FD5)"); - items.push_back("22 ($FD6)"); - items.push_back("23 ($FD7)"); - items.push_back("24 ($FD8)"); - items.push_back("25 ($FD9)"); - items.push_back("26 ($FDA)"); - items.push_back("27 ($FDB)"); - items.push_back("28 ($FDC)"); - items.push_back("29 ($FDD)"); - items.push_back("30 ($FDE)"); - items.push_back("31 ($FDF)"); + VList::push_back(items, " 0 ($FC0)"); + VList::push_back(items, " 1 ($FC1)"); + VList::push_back(items, " 2 ($FC2)"); + VList::push_back(items, " 3 ($FC3)"); + VList::push_back(items, " 4 ($FC4)"); + VList::push_back(items, " 5 ($FC5)"); + VList::push_back(items, " 6 ($FC6)"); + VList::push_back(items, " 7 ($FC7)"); + VList::push_back(items, " 8 ($FC8)"); + VList::push_back(items, " 9 ($FC9)"); + VList::push_back(items, "10 ($FCA)"); + VList::push_back(items, "11 ($FCB)"); + VList::push_back(items, "12 ($FCC)"); + VList::push_back(items, "13 ($FCD)"); + VList::push_back(items, "14 ($FCE)"); + VList::push_back(items, "15 ($FCF)"); + VList::push_back(items, "16 ($FD0)"); + VList::push_back(items, "17 ($FD1)"); + VList::push_back(items, "18 ($FD2)"); + VList::push_back(items, "19 ($FD3)"); + VList::push_back(items, "20 ($FD4)"); + VList::push_back(items, "21 ($FD5)"); + VList::push_back(items, "22 ($FD6)"); + VList::push_back(items, "23 ($FD7)"); + VList::push_back(items, "24 ($FD8)"); + VList::push_back(items, "25 ($FD9)"); + VList::push_back(items, "26 ($FDA)"); + VList::push_back(items, "27 ($FDB)"); + VList::push_back(items, "28 ($FDC)"); + VList::push_back(items, "29 ($FDD)"); + VList::push_back(items, "30 ($FDE)"); + VList::push_back(items, "31 ($FDF)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("31 ($FDF) "), diff --git a/src/debugger/gui/CartDPCPlusWidget.cxx b/src/debugger/gui/CartDPCPlusWidget.cxx index bc5d8c454..310abaf15 100644 --- a/src/debugger/gui/CartDPCPlusWidget.cxx +++ b/src/debugger/gui/CartDPCPlusWidget.cxx @@ -55,12 +55,12 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( myLineHeight; VariantList items; - items.push_back("0 ($FF6)"); - items.push_back("1 ($FF7)"); - items.push_back("2 ($FF8)"); - items.push_back("3 ($FF9)"); - items.push_back("4 ($FFA)"); - items.push_back("5 ($FFB)"); + VList::push_back(items, "0 ($FF6)"); + VList::push_back(items, "1 ($FF7)"); + VList::push_back(items, "2 ($FF8)"); + VList::push_back(items, "3 ($FF9)"); + VList::push_back(items, "4 ($FFA)"); + VList::push_back(items, "5 ($FFB)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartDPCWidget.cxx b/src/debugger/gui/CartDPCWidget.cxx index a543b8fe7..6bf9b46c5 100644 --- a/src/debugger/gui/CartDPCWidget.cxx +++ b/src/debugger/gui/CartDPCWidget.cxx @@ -52,8 +52,8 @@ CartridgeDPCWidget::CartridgeDPCWidget( myLineHeight; VariantList items; - items.push_back("0 ($FF8)"); - items.push_back("1 ($FF9)"); + VList::push_back(items, "0 ($FF8)"); + VList::push_back(items, "1 ($FF9)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartE0Widget.cxx b/src/debugger/gui/CartE0Widget.cxx index 3797e0ed5..f1ce651b3 100644 --- a/src/debugger/gui/CartE0Widget.cxx +++ b/src/debugger/gui/CartE0Widget.cxx @@ -67,9 +67,9 @@ CartridgeE0Widget::CartridgeE0Widget( VariantList items0, items1, items2; for(int i = 0; i < 8; ++i) { - items0.push_back(seg0[i]); - items1.push_back(seg1[i]); - items2.push_back(seg2[i]); + VList::push_back(items0, seg0[i]); + VList::push_back(items1, seg1[i]); + VList::push_back(items2, seg2[i]); } const int lwidth = _font.getStringWidth("Set slice for segment X: "); diff --git a/src/debugger/gui/CartE7Widget.cxx b/src/debugger/gui/CartE7Widget.cxx index 66c8336fe..05588ff19 100644 --- a/src/debugger/gui/CartE7Widget.cxx +++ b/src/debugger/gui/CartE7Widget.cxx @@ -63,9 +63,9 @@ CartridgeE7Widget::CartridgeE7Widget( VariantList items0, items1; for(int i = 0; i < 8; ++i) - items0.push_back(spot_lower[i]); + VList::push_back(items0, spot_lower[i]); for(int i = 0; i < 4; ++i) - items1.push_back(spot_upper[i]); + VList::push_back(items1, spot_upper[i]); const int lwidth = _font.getStringWidth("Set slice for upper 256B: "), fwidth = _font.getStringWidth("3 - RAM ($FEB)"); diff --git a/src/debugger/gui/CartEFSCWidget.cxx b/src/debugger/gui/CartEFSCWidget.cxx index 14faef2f9..a1b0cb1b1 100644 --- a/src/debugger/gui/CartEFSCWidget.cxx +++ b/src/debugger/gui/CartEFSCWidget.cxx @@ -50,22 +50,22 @@ CartridgeEFSCWidget::CartridgeEFSCWidget( info.str()) + myLineHeight; VariantList items; - items.push_back(" 0 ($FE0)"); - items.push_back(" 1 ($FE1)"); - items.push_back(" 2 ($FE2)"); - items.push_back(" 3 ($FE3)"); - items.push_back(" 4 ($FE4)"); - items.push_back(" 5 ($FE5)"); - items.push_back(" 6 ($FE6)"); - items.push_back(" 7 ($FE7)"); - items.push_back(" 8 ($FE8)"); - items.push_back(" 9 ($FE9)"); - items.push_back("10 ($FEA)"); - items.push_back("11 ($FEB)"); - items.push_back("12 ($FEC)"); - items.push_back("13 ($FED)"); - items.push_back("14 ($FEE)"); - items.push_back("15 ($FEF)"); + VList::push_back(items, " 0 ($FE0)"); + VList::push_back(items, " 1 ($FE1)"); + VList::push_back(items, " 2 ($FE2)"); + VList::push_back(items, " 3 ($FE3)"); + VList::push_back(items, " 4 ($FE4)"); + VList::push_back(items, " 5 ($FE5)"); + VList::push_back(items, " 6 ($FE6)"); + VList::push_back(items, " 7 ($FE7)"); + VList::push_back(items, " 8 ($FE8)"); + VList::push_back(items, " 9 ($FE9)"); + VList::push_back(items, "10 ($FEA)"); + VList::push_back(items, "11 ($FEB)"); + VList::push_back(items, "12 ($FEC)"); + VList::push_back(items, "13 ($FED)"); + VList::push_back(items, "14 ($FEE)"); + VList::push_back(items, "15 ($FEF)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FE0) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartEFWidget.cxx b/src/debugger/gui/CartEFWidget.cxx index d07a9f24b..8a96e9f63 100644 --- a/src/debugger/gui/CartEFWidget.cxx +++ b/src/debugger/gui/CartEFWidget.cxx @@ -48,22 +48,22 @@ CartridgeEFWidget::CartridgeEFWidget( info.str()) + myLineHeight; VariantList items; - items.push_back(" 0 ($FE0)"); - items.push_back(" 1 ($FE1)"); - items.push_back(" 2 ($FE2)"); - items.push_back(" 3 ($FE3)"); - items.push_back(" 4 ($FE4)"); - items.push_back(" 5 ($FE5)"); - items.push_back(" 6 ($FE6)"); - items.push_back(" 7 ($FE7)"); - items.push_back(" 8 ($FE8)"); - items.push_back(" 9 ($FE9)"); - items.push_back("10 ($FEA)"); - items.push_back("11 ($FEB)"); - items.push_back("12 ($FEC)"); - items.push_back("13 ($FED)"); - items.push_back("14 ($FEE)"); - items.push_back("15 ($FEF)"); + VList::push_back(items, " 0 ($FE0)"); + VList::push_back(items, " 1 ($FE1)"); + VList::push_back(items, " 2 ($FE2)"); + VList::push_back(items, " 3 ($FE3)"); + VList::push_back(items, " 4 ($FE4)"); + VList::push_back(items, " 5 ($FE5)"); + VList::push_back(items, " 6 ($FE6)"); + VList::push_back(items, " 7 ($FE7)"); + VList::push_back(items, " 8 ($FE8)"); + VList::push_back(items, " 9 ($FE9)"); + VList::push_back(items, "10 ($FEA)"); + VList::push_back(items, "11 ($FEB)"); + VList::push_back(items, "12 ($FEC)"); + VList::push_back(items, "13 ($FED)"); + VList::push_back(items, "14 ($FEE)"); + VList::push_back(items, "15 ($FEF)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FE0) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartF0Widget.cxx b/src/debugger/gui/CartF0Widget.cxx index 5cd035835..33a995c24 100644 --- a/src/debugger/gui/CartF0Widget.cxx +++ b/src/debugger/gui/CartF0Widget.cxx @@ -49,22 +49,22 @@ CartridgeF0Widget::CartridgeF0Widget( info.str()) + myLineHeight; VariantList items; - items.push_back(" 0"); - items.push_back(" 1"); - items.push_back(" 2"); - items.push_back(" 3"); - items.push_back(" 4"); - items.push_back(" 5"); - items.push_back(" 6"); - items.push_back(" 7"); - items.push_back(" 8"); - items.push_back(" 9"); - items.push_back(" 10"); - items.push_back(" 11"); - items.push_back(" 12"); - items.push_back(" 13"); - items.push_back(" 14"); - items.push_back(" 15"); + VList::push_back(items, " 0"); + VList::push_back(items, " 1"); + VList::push_back(items, " 2"); + VList::push_back(items, " 3"); + VList::push_back(items, " 4"); + VList::push_back(items, " 5"); + VList::push_back(items, " 6"); + VList::push_back(items, " 7"); + VList::push_back(items, " 8"); + VList::push_back(items, " 9"); + VList::push_back(items, " 10"); + VList::push_back(items, " 11"); + VList::push_back(items, " 12"); + VList::push_back(items, " 13"); + VList::push_back(items, " 14"); + VList::push_back(items, " 15"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 15 "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartF4SCWidget.cxx b/src/debugger/gui/CartF4SCWidget.cxx index 5d4ee105b..e564a35d7 100644 --- a/src/debugger/gui/CartF4SCWidget.cxx +++ b/src/debugger/gui/CartF4SCWidget.cxx @@ -49,14 +49,14 @@ CartridgeF4SCWidget::CartridgeF4SCWidget( ypos = addBaseInformation(size, "Atari", info.str(), 15) + myLineHeight; VariantList items; - items.push_back("0 ($FF4)"); - items.push_back("1 ($FF5)"); - items.push_back("2 ($FF6)"); - items.push_back("3 ($FF7)"); - items.push_back("4 ($FF8)"); - items.push_back("5 ($FF9)"); - items.push_back("6 ($FFA)"); - items.push_back("7 ($FFB)"); + VList::push_back(items, "0 ($FF4)"); + VList::push_back(items, "1 ($FF5)"); + VList::push_back(items, "2 ($FF6)"); + VList::push_back(items, "3 ($FF7)"); + VList::push_back(items, "4 ($FF8)"); + VList::push_back(items, "5 ($FF9)"); + VList::push_back(items, "6 ($FFA)"); + VList::push_back(items, "7 ($FFB)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartF4Widget.cxx b/src/debugger/gui/CartF4Widget.cxx index 9ef005f0d..b7de34e08 100644 --- a/src/debugger/gui/CartF4Widget.cxx +++ b/src/debugger/gui/CartF4Widget.cxx @@ -47,14 +47,14 @@ CartridgeF4Widget::CartridgeF4Widget( ypos = addBaseInformation(size, "Atari", info.str(), 15) + myLineHeight; VariantList items; - items.push_back("0 ($FF4)"); - items.push_back("1 ($FF5)"); - items.push_back("2 ($FF6)"); - items.push_back("3 ($FF7)"); - items.push_back("4 ($FF8)"); - items.push_back("5 ($FF9)"); - items.push_back("6 ($FFA)"); - items.push_back("7 ($FFB)"); + VList::push_back(items, "0 ($FF4)"); + VList::push_back(items, "1 ($FF5)"); + VList::push_back(items, "2 ($FF6)"); + VList::push_back(items, "3 ($FF7)"); + VList::push_back(items, "4 ($FF8)"); + VList::push_back(items, "5 ($FF9)"); + VList::push_back(items, "6 ($FFA)"); + VList::push_back(items, "7 ($FFB)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartF6SCWidget.cxx b/src/debugger/gui/CartF6SCWidget.cxx index b70a1b028..3b028b59f 100644 --- a/src/debugger/gui/CartF6SCWidget.cxx +++ b/src/debugger/gui/CartF6SCWidget.cxx @@ -49,10 +49,10 @@ CartridgeF6SCWidget::CartridgeF6SCWidget( ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - items.push_back("0 ($FF6)"); - items.push_back("1 ($FF7)"); - items.push_back("2 ($FF8)"); - items.push_back("3 ($FF9)"); + VList::push_back(items, "0 ($FF6)"); + VList::push_back(items, "1 ($FF7)"); + VList::push_back(items, "2 ($FF8)"); + VList::push_back(items, "3 ($FF9)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartF6Widget.cxx b/src/debugger/gui/CartF6Widget.cxx index 12abcb45f..4d4e7af88 100644 --- a/src/debugger/gui/CartF6Widget.cxx +++ b/src/debugger/gui/CartF6Widget.cxx @@ -47,10 +47,10 @@ CartridgeF6Widget::CartridgeF6Widget( ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - items.push_back("0 ($FF6)"); - items.push_back("1 ($FF7)"); - items.push_back("2 ($FF8)"); - items.push_back("3 ($FF9)"); + VList::push_back(items, "0 ($FF6)"); + VList::push_back(items, "1 ($FF7)"); + VList::push_back(items, "2 ($FF8)"); + VList::push_back(items, "3 ($FF9)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartF8SCWidget.cxx b/src/debugger/gui/CartF8SCWidget.cxx index 658d5ee6e..ae8678d45 100644 --- a/src/debugger/gui/CartF8SCWidget.cxx +++ b/src/debugger/gui/CartF8SCWidget.cxx @@ -49,8 +49,8 @@ CartridgeF8SCWidget::CartridgeF8SCWidget( ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - items.push_back("0 ($FF8)"); - items.push_back("1 ($FF9)"); + VList::push_back(items, "0 ($FF8)"); + VList::push_back(items, "1 ($FF9)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartF8Widget.cxx b/src/debugger/gui/CartF8Widget.cxx index 416bed35f..bdb2fe3eb 100644 --- a/src/debugger/gui/CartF8Widget.cxx +++ b/src/debugger/gui/CartF8Widget.cxx @@ -47,8 +47,8 @@ CartridgeF8Widget::CartridgeF8Widget( ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - items.push_back("0 ($FF8)"); - items.push_back("1 ($FF9)"); + VList::push_back(items, "0 ($FF8)"); + VList::push_back(items, "1 ($FF9)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartFA2Widget.cxx b/src/debugger/gui/CartFA2Widget.cxx index 8dc7e8147..e8fc15e60 100644 --- a/src/debugger/gui/CartFA2Widget.cxx +++ b/src/debugger/gui/CartFA2Widget.cxx @@ -52,14 +52,14 @@ CartridgeFA2Widget::CartridgeFA2Widget( info.str(), 15) + myLineHeight; VariantList items; - items.push_back("0 ($FF5)"); - items.push_back("1 ($FF6)"); - items.push_back("2 ($FF7)"); - items.push_back("3 ($FF8)"); - items.push_back("4 ($FF9)"); - items.push_back("5 ($FFA)"); + VList::push_back(items, "0 ($FF5)"); + VList::push_back(items, "1 ($FF6)"); + VList::push_back(items, "2 ($FF7)"); + VList::push_back(items, "3 ($FF8)"); + VList::push_back(items, "4 ($FF9)"); + VList::push_back(items, "5 ($FFA)"); if(cart.bankCount() == 7) - items.push_back("6 ($FFB)"); + VList::push_back(items, "6 ($FFB)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), diff --git a/src/debugger/gui/CartFAWidget.cxx b/src/debugger/gui/CartFAWidget.cxx index f91987393..6414f0c19 100644 --- a/src/debugger/gui/CartFAWidget.cxx +++ b/src/debugger/gui/CartFAWidget.cxx @@ -49,9 +49,9 @@ CartridgeFAWidget::CartridgeFAWidget( ypos = addBaseInformation(size, "CBS", info.str()) + myLineHeight; VariantList items; - items.push_back("0 ($FF8)"); - items.push_back("1 ($FF9)"); - items.push_back("2 ($FFA)"); + VList::push_back(items, "0 ($FF8)"); + VList::push_back(items, "1 ($FF9)"); + VList::push_back(items, "2 ($FFA)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartMCWidget.cxx b/src/debugger/gui/CartMCWidget.cxx index fb704ee4c..c00676d7c 100644 --- a/src/debugger/gui/CartMCWidget.cxx +++ b/src/debugger/gui/CartMCWidget.cxx @@ -51,13 +51,13 @@ CartridgeMCWidget::CartridgeMCWidget( for(uInt32 i = 0x80; i <= 0xFF; ++i) { const string& b = Variant(i).toString(); - items.push_back(b + " (ROM)", b); + VList::push_back(items, b + " (ROM)", b); } // Add 64 512B 'RAM' blocks for(uInt32 i = 0x00; i <= 0x3F; ++i) { const string& b = Variant(i).toString(); - items.push_back(b + " (RAM)", b); + VList::push_back(items, b + " (RAM)", b); } const int lwidth = _font.getStringWidth("Set slice for segment X ($3X): "), diff --git a/src/debugger/gui/CartMDMWidget.cxx b/src/debugger/gui/CartMDMWidget.cxx index 5c9cbbd33..49a4873fa 100644 --- a/src/debugger/gui/CartMDMWidget.cxx +++ b/src/debugger/gui/CartMDMWidget.cxx @@ -45,7 +45,7 @@ CartridgeMDMWidget::CartridgeMDMWidget( { info.str(""); info << dec << (i & 0xFF) << " ($" << Common::Base::HEX4 << i << ")"; - items.push_back(info.str()); + VList::push_back(items, info.str()); } myBank = diff --git a/src/debugger/gui/CartSBWidget.cxx b/src/debugger/gui/CartSBWidget.cxx index 7538312a5..1d277993f 100644 --- a/src/debugger/gui/CartSBWidget.cxx +++ b/src/debugger/gui/CartSBWidget.cxx @@ -49,7 +49,7 @@ CartridgeSBWidget::CartridgeSBWidget( bank << dec << setw(2) << setfill(' ') << i << " ($" << Common::Base::HEX2 << spot << ")"; - items.push_back(bank.str()); + VList::push_back(items, bank.str()); bank.str(""); } diff --git a/src/debugger/gui/CartUAWidget.cxx b/src/debugger/gui/CartUAWidget.cxx index d4de71ac2..3ea35c6bc 100644 --- a/src/debugger/gui/CartUAWidget.cxx +++ b/src/debugger/gui/CartUAWidget.cxx @@ -48,8 +48,8 @@ CartridgeUAWidget::CartridgeUAWidget( ypos = addBaseInformation(size, "UA Limited", info.str()) + myLineHeight; VariantList items; - items.push_back("0 ($220)"); - items.push_back("1 ($240)"); + VList::push_back(items, "0 ($220)"); + VList::push_back(items, "1 ($240)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/CartX07Widget.cxx b/src/debugger/gui/CartX07Widget.cxx index 4a89b39d0..caf487d3e 100644 --- a/src/debugger/gui/CartX07Widget.cxx +++ b/src/debugger/gui/CartX07Widget.cxx @@ -50,22 +50,22 @@ CartridgeX07Widget::CartridgeX07Widget( info.str()) + myLineHeight; VariantList items; - items.push_back(" 0"); - items.push_back(" 1"); - items.push_back(" 2"); - items.push_back(" 3"); - items.push_back(" 4"); - items.push_back(" 5"); - items.push_back(" 6"); - items.push_back(" 7"); - items.push_back(" 8"); - items.push_back(" 9"); - items.push_back(" 10"); - items.push_back(" 11"); - items.push_back(" 12"); - items.push_back(" 13"); - items.push_back(" 14"); - items.push_back(" 15"); + VList::push_back(items, " 0"); + VList::push_back(items, " 1"); + VList::push_back(items, " 2"); + VList::push_back(items, " 3"); + VList::push_back(items, " 4"); + VList::push_back(items, " 5"); + VList::push_back(items, " 6"); + VList::push_back(items, " 7"); + VList::push_back(items, " 8"); + VList::push_back(items, " 9"); + VList::push_back(items, " 10"); + VList::push_back(items, " 11"); + VList::push_back(items, " 12"); + VList::push_back(items, " 13"); + VList::push_back(items, " 14"); + VList::push_back(items, " 15"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 15 "), myLineHeight, items, "Set bank: ", diff --git a/src/debugger/gui/DataGridWidget.hxx b/src/debugger/gui/DataGridWidget.hxx index 624148811..b9f316f8b 100644 --- a/src/debugger/gui/DataGridWidget.hxx +++ b/src/debugger/gui/DataGridWidget.hxx @@ -27,7 +27,6 @@ class ScrollBarWidget; #include "Command.hxx" #include "Debugger.hxx" #include "EditableWidget.hxx" -#include "Array.hxx" #include "Base.hxx" #include "Rect.hxx" diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index 9cad74e52..b0ef57a51 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -28,7 +28,6 @@ #include "Debugger.hxx" #include "DebuggerDialog.hxx" #include "DebuggerParser.hxx" -#include "StringList.hxx" #include "PromptWidget.hxx" #include "CartDebug.hxx" diff --git a/src/debugger/gui/RamWidget.hxx b/src/debugger/gui/RamWidget.hxx index cec87798c..f4b6efe6e 100644 --- a/src/debugger/gui/RamWidget.hxx +++ b/src/debugger/gui/RamWidget.hxx @@ -27,7 +27,6 @@ class DataGridOpsWidget; class EditTextWidget; class StaticTextWidget; -#include "Array.hxx" #include "Widget.hxx" #include "Command.hxx" diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index e6d90e290..1416375e4 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -176,8 +176,8 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, xpos = col; ypos += 2 * lineHeight; int col2_ypos = ypos; items.clear(); - items.push_back("B/easy", "b"); - items.push_back("A/hard", "a"); + VList::push_back(items, "B/easy", "b"); + VList::push_back(items, "A/hard", "a"); myP0Diff = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items, "P0 Diff: ", lwidth, kP0DiffChanged); myP0Diff->setTarget(this); @@ -191,8 +191,8 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, // TV Type ypos += myP1Diff->getHeight() + 5; items.clear(); - items.push_back("B&W", "bw"); - items.push_back("Color", "color"); + VList::push_back(items, "B&W", "bw"); + VList::push_back(items, "Color", "color"); myTVType = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items, "TV Type: ", lwidth, kTVTypeChanged); myTVType->setTarget(this); diff --git a/src/debugger/gui/RiotWidget.hxx b/src/debugger/gui/RiotWidget.hxx index 005b6d4e5..9126012f4 100644 --- a/src/debugger/gui/RiotWidget.hxx +++ b/src/debugger/gui/RiotWidget.hxx @@ -27,7 +27,6 @@ class PopUpWidget; class ToggleBitWidget; class ControllerWidget; -#include "Array.hxx" #include "Control.hxx" #include "Command.hxx" diff --git a/src/debugger/gui/RomListWidget.hxx b/src/debugger/gui/RomListWidget.hxx index 34e3306ea..22da53ed2 100644 --- a/src/debugger/gui/RomListWidget.hxx +++ b/src/debugger/gui/RomListWidget.hxx @@ -25,7 +25,6 @@ class ScrollBarWidget; class PackedBitArray; class CheckListWidget; -#include "Array.hxx" #include "Base.hxx" #include "CartDebug.hxx" #include "EditableWidget.hxx" @@ -108,7 +107,7 @@ class RomListWidget : public EditableWidget const CartDebug::Disassembly* myDisasm; const PackedBitArray* myBPState; - Common::Array myCheckList; + vector myCheckList; }; #endif diff --git a/src/debugger/gui/RomWidget.cxx b/src/debugger/gui/RomWidget.cxx index 36c4c791e..48cc49b5d 100644 --- a/src/debugger/gui/RomWidget.cxx +++ b/src/debugger/gui/RomWidget.cxx @@ -27,7 +27,6 @@ #include "DataGridWidget.hxx" #include "EditTextWidget.hxx" #include "PopUpWidget.hxx" -#include "StringList.hxx" #include "ContextMenu.hxx" #include "RomListWidget.hxx" #include "RomWidget.hxx" diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index 3a005df15..563b422df 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -45,11 +45,11 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font, { // Create context menu for commands VariantList l; - l.push_back("Fill to scanline", "scanline"); - l.push_back("Set breakpoint", "bp"); - l.push_back("Set zoom position", "zoom"); - l.push_back("Save snapshot", "snap"); - l.push_back("Toggle fixed debug colors (from beam pos)", "fixed"); + VList::push_back(l, "Fill to scanline", "scanline"); + VList::push_back(l, "Set breakpoint", "bp"); + VList::push_back(l, "Set zoom position", "zoom"); + VList::push_back(l, "Save snapshot", "snap"); + VList::push_back(l, "Toggle fixed debug colors (from beam pos)", "fixed"); myMenu = new ContextMenu(this, font, l); } diff --git a/src/debugger/gui/TiaZoomWidget.cxx b/src/debugger/gui/TiaZoomWidget.cxx index ec1814502..ca4b1b2b2 100644 --- a/src/debugger/gui/TiaZoomWidget.cxx +++ b/src/debugger/gui/TiaZoomWidget.cxx @@ -55,9 +55,9 @@ TiaZoomWidget::TiaZoomWidget(GuiObject* boss, const GUI::Font& font, // Create context menu for zoom levels VariantList l; - l.push_back("2x zoom", "2"); - l.push_back("4x zoom", "4"); - l.push_back("8x zoom", "8"); + VList::push_back(l, "2x zoom", "2"); + VList::push_back(l, "4x zoom", "4"); + VList::push_back(l, "8x zoom", "8"); myMenu = new ContextMenu(this, font, l); } diff --git a/src/debugger/gui/ToggleBitWidget.cxx b/src/debugger/gui/ToggleBitWidget.cxx index 6f1f1f4fe..62371a428 100644 --- a/src/debugger/gui/ToggleBitWidget.cxx +++ b/src/debugger/gui/ToggleBitWidget.cxx @@ -22,7 +22,6 @@ #include "Dialog.hxx" #include "Debugger.hxx" #include "FrameBuffer.hxx" -#include "StringList.hxx" #include "ToggleBitWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/ToggleBitWidget.hxx b/src/debugger/gui/ToggleBitWidget.hxx index 64b1d4d23..295a5d911 100644 --- a/src/debugger/gui/ToggleBitWidget.hxx +++ b/src/debugger/gui/ToggleBitWidget.hxx @@ -20,8 +20,6 @@ #ifndef TOGGLE_BIT_WIDGET_HXX #define TOGGLE_BIT_WIDGET_HXX -class StringList; - #include "ToggleWidget.hxx" /* ToggleBitWidget */ diff --git a/src/debugger/gui/ToggleWidget.hxx b/src/debugger/gui/ToggleWidget.hxx index 2fa6efec4..a1c41046d 100644 --- a/src/debugger/gui/ToggleWidget.hxx +++ b/src/debugger/gui/ToggleWidget.hxx @@ -22,7 +22,6 @@ #include "Widget.hxx" #include "Command.hxx" -#include "Array.hxx" /* ToggleWidget */ class ToggleWidget : public Widget, public CommandSender diff --git a/src/emucore/Cart.hxx b/src/emucore/Cart.hxx index 5e694fd7d..a406966e0 100644 --- a/src/emucore/Cart.hxx +++ b/src/emucore/Cart.hxx @@ -30,7 +30,6 @@ class CartRamWidget; class GuiObject; #include "bspf.hxx" -#include "Array.hxx" #include "Device.hxx" #include "Settings.hxx" #include "Font.hxx" diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 14c09a083..d62608209 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -1532,8 +1532,9 @@ inline bool EventHandler::eventIsAnalog(Event::Type event) const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void EventHandler::getActionList(EventMode mode, StringList& l) const +StringList EventHandler::getActionList(EventMode mode) const { + StringList l; switch(mode) { case kEmulationMode: @@ -1547,28 +1548,33 @@ void EventHandler::getActionList(EventMode mode, StringList& l) const default: break; } + return l; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void EventHandler::getComboList(EventMode, VariantList& l) const +VariantList EventHandler::getComboList(EventMode /**/) const { // For now, this only works in emulation mode - + VariantList l; ostringstream buf; - l.push_back("None", "-1"); + VList::push_back(l, "None", "-1"); for(uInt32 i = 0; i < kEmulActionListSize; ++i) + { if(EventHandler::ourEmulActionList[i].allow_combo) { buf << i; - l.push_back(EventHandler::ourEmulActionList[i].action, buf.str()); + VList::push_back(l, EventHandler::ourEmulActionList[i].action, buf.str()); buf.str(""); } + } + return l; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void EventHandler::getComboListForEvent(Event::Type event, StringList& l) const +StringList EventHandler::getComboListForEvent(Event::Type event) const { + StringList l; ostringstream buf; if(event >= Event::Combo1 && event <= Event::Combo16) { @@ -1591,6 +1597,7 @@ void EventHandler::getComboListForEvent(Event::Type event, StringList& l) const l.push_back("-1"); } } + return l; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1727,10 +1734,10 @@ void EventHandler::takeSnapshot(uInt32 number) ostringstream version; version << "Stella " << STELLA_VERSION << " (Build " << STELLA_BUILD << ") [" << BSPF_ARCH << "]"; - comments.push_back("Software", version.str()); - comments.push_back("ROM Name", myOSystem.console().properties().get(Cartridge_Name)); - comments.push_back("ROM MD5", myOSystem.console().properties().get(Cartridge_MD5)); - comments.push_back("TV Effects", myOSystem.frameBuffer().tiaSurface().effectsInfo()); + VList::push_back(comments, "Software", version.str()); + VList::push_back(comments, "ROM Name", myOSystem.console().properties().get(Cartridge_Name)); + VList::push_back(comments, "ROM MD5", myOSystem.console().properties().get(Cartridge_MD5)); + VList::push_back(comments, "TV Effects", myOSystem.frameBuffer().tiaSurface().effectsInfo()); // Now create a PNG snapshot if(myOSystem.settings().getBool("ss1x")) diff --git a/src/emucore/EventHandler.hxx b/src/emucore/EventHandler.hxx index 41f80501f..8ca1e0f75 100644 --- a/src/emucore/EventHandler.hxx +++ b/src/emucore/EventHandler.hxx @@ -27,12 +27,10 @@ class OSystem; class DialogContainer; class EventMappingWidget; class MouseControl; -class VariantList; -#include "Array.hxx" #include "Event.hxx" #include "StellaKeys.hxx" -#include "StringList.hxx" +#include "Variant.hxx" #include "bspf.hxx" enum MouseButton { @@ -210,11 +208,11 @@ class EventHandler bool frying() const { return myFryingFlag; } - void getActionList(EventMode mode, StringList& list) const; - void getComboList(EventMode mode, VariantList& map) const; + StringList getActionList(EventMode mode) const; + VariantList getComboList(EventMode mode) const; /** Used to access the list of events assigned to a specific combo event. */ - void getComboListForEvent(Event::Type event, StringList& list) const; + StringList getComboListForEvent(Event::Type event) const; void setComboListForEvent(Event::Type event, const StringList& events); Event::Type eventForKey(StellaKey key, EventMode mode) const @@ -462,7 +460,7 @@ class EventHandler map myDatabase; // Contains only joysticks that are currently available, indexed by id - Common::Array mySticks; + vector mySticks; void setStickDefaultMapping(int stick, Event::Type type, EventMode mode); void printDatabase() const; diff --git a/src/emucore/EventJoyHandler.cxx b/src/emucore/EventJoyHandler.cxx index c859e0c41..1363920a5 100644 --- a/src/emucore/EventJoyHandler.cxx +++ b/src/emucore/EventJoyHandler.cxx @@ -22,6 +22,7 @@ #include "OSystem.hxx" #include "Settings.hxx" +#include "Vec.hxx" #include "bspf.hxx" #include "EventHandler.hxx" @@ -325,7 +326,7 @@ int EventHandler::JoystickHandler::add(StellaJoystick* stick) } stick->type = StellaJoystick::JT_REGULAR; } - mySticks.insertAt(stick->ID, stick); + Vec::insertAt(mySticks, stick->ID, stick); // Map the stelladaptors we've found according to the specified ports if(specialAdaptor) diff --git a/src/emucore/FSNode.hxx b/src/emucore/FSNode.hxx index d5559e714..a74408210 100644 --- a/src/emucore/FSNode.hxx +++ b/src/emucore/FSNode.hxx @@ -48,7 +48,6 @@ */ #include "bspf.hxx" -#include "Array.hxx" class FilesystemNode; class AbstractFSNode; @@ -58,7 +57,7 @@ class AbstractFSNode; * This is subclass instead of just a typedef so that we can use forward * declarations of it in other places. */ -class FSList : public Common::Array { }; +class FSList : public vector { }; /** * This class acts as a wrapper around the AbstractFSNode class defined @@ -264,7 +263,7 @@ class FilesystemNode * the semantics. */ -typedef Common::Array AbstractFSList; +typedef vector AbstractFSList; class AbstractFSNode { diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index b6fd37165..b922f22cb 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -136,7 +136,7 @@ bool FrameBuffer::initialize() { ostringstream desc; desc << "Zoom " << zoom << "x"; - myTIAZoomLevels.push_back(desc.str(), zoom); + VList::push_back(myTIAZoomLevels, desc.str(), zoom); } // Set palette for GUI (upper area of array, doesn't change during execution) diff --git a/src/emucore/FrameBuffer.hxx b/src/emucore/FrameBuffer.hxx index 0ed3fb0bd..439b4994c 100644 --- a/src/emucore/FrameBuffer.hxx +++ b/src/emucore/FrameBuffer.hxx @@ -367,7 +367,7 @@ class FrameBuffer This method is called to query and initialize the video hardware for desktop and fullscreen resolution information. */ - virtual void queryHardware(Common::Array& mons, VariantList& ren) = 0; + virtual void queryHardware(vector& mons, VariantList& ren) = 0; virtual Int32 getCurrentDisplayIndex() = 0; @@ -494,14 +494,14 @@ class FrameBuffer friend ostream& operator<<(ostream& os, const VideoModeList& l) { - for(Common::Array::const_iterator i = l.myModeList.begin(); + for(vector::const_iterator i = l.myModeList.begin(); i != l.myModeList.end(); ++i) os << "-----\n" << *i << endl << "-----\n"; return os; } private: - Common::Array myModeList; + vector myModeList; int myIdx; }; @@ -527,7 +527,7 @@ class FrameBuffer // The resolution of the attached displays // The primary display is first in the array - Common::Array myDisplays; + vector myDisplays; // Supported renderers VariantList myRenderers; @@ -564,7 +564,7 @@ class FrameBuffer // The list of all available video modes for this framebuffer VideoModeList* myCurrentModeList; VideoModeList myWindowedModeList; - Common::Array myFullscreenModeLists; + vector myFullscreenModeLists; // Names of the TIA zoom levels that can be used for this framebuffer VariantList myTIAZoomLevels; diff --git a/src/emucore/M6502.cxx b/src/emucore/M6502.cxx index 926e31a66..e123846e2 100644 --- a/src/emucore/M6502.cxx +++ b/src/emucore/M6502.cxx @@ -43,6 +43,7 @@ #define DISASM_NONE 0 #endif #include "Settings.hxx" +#include "Vec.hxx" #include "M6502.hxx" @@ -444,8 +445,8 @@ void M6502::delCondBreak(uInt32 brk) if(brk < myBreakConds.size()) { delete myBreakConds[brk]; - myBreakConds.removeAt(brk); - myBreakCondNames.removeAt(brk); + Vec::removeAt(myBreakConds, brk); + Vec::removeAt(myBreakCondNames, brk); } } diff --git a/src/emucore/M6502.hxx b/src/emucore/M6502.hxx index 86b13e73d..4bb6ca283 100644 --- a/src/emucore/M6502.hxx +++ b/src/emucore/M6502.hxx @@ -29,11 +29,9 @@ class Settings; #include "bspf.hxx" #include "System.hxx" -#include "Array.hxx" -#include "StringList.hxx" #include "Serializable.hxx" -typedef Common::Array ExpressionList; +typedef vector ExpressionList; /** The 6502 is an 8-bit microprocessor that has a 64K addressing space. diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index a420fb654..76ee6d863 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -36,7 +36,6 @@ class Sound; class StateManager; class VideoDialog; -#include "Array.hxx" #include "FSNode.hxx" #include "FrameBuffer.hxx" #include "PNGLibrary.hxx" diff --git a/src/emucore/Settings.hxx b/src/emucore/Settings.hxx index dd3438162..67410fffd 100644 --- a/src/emucore/Settings.hxx +++ b/src/emucore/Settings.hxx @@ -22,7 +22,6 @@ class OSystem; -#include "Array.hxx" #include "Variant.hxx" #include "bspf.hxx" @@ -129,7 +128,7 @@ class Settings Variant value; Variant initialValue; }; - typedef Common::Array SettingsArray; + typedef vector SettingsArray; const SettingsArray& getInternalSettings() const { return myInternalSettings; } diff --git a/src/gui/AboutDialog.hxx b/src/gui/AboutDialog.hxx index fd94f32b4..a1ea81545 100644 --- a/src/gui/AboutDialog.hxx +++ b/src/gui/AboutDialog.hxx @@ -20,8 +20,6 @@ #ifndef ABOUT_DIALOG_HXX #define ABOUT_DIALOG_HXX -#include "Array.hxx" - class OSystem; class DialogContainer; class CommandSender; @@ -41,8 +39,8 @@ class AboutDialog : public Dialog ButtonWidget* myPrevButton; StaticTextWidget* myTitle; - Common::Array myDesc; - Common::Array myDescStr; + vector myDesc; + vector myDescStr; int myPage; int myNumPages; diff --git a/src/gui/AudioDialog.cxx b/src/gui/AudioDialog.cxx index b88cdcfee..bfabd075f 100644 --- a/src/gui/AudioDialog.cxx +++ b/src/gui/AudioDialog.cxx @@ -27,7 +27,6 @@ #include "Menu.hxx" #include "OSystem.hxx" #include "PopUpWidget.hxx" -#include "StringList.hxx" #include "Settings.hxx" #include "Sound.hxx" #include "Widget.hxx" @@ -71,12 +70,12 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent, // Fragment size items.clear(); - items.push_back("128 bytes", "128"); - items.push_back("256 bytes", "256"); - items.push_back("512 bytes", "512"); - items.push_back("1 KB", "1024"); - items.push_back("2 KB", "2048"); - items.push_back("4 KB", "4096"); + VList::push_back(items, "128 bytes", "128"); + VList::push_back(items, "256 bytes", "256"); + VList::push_back(items, "512 bytes", "512"); + VList::push_back(items, "1 KB", "1024"); + VList::push_back(items, "2 KB", "2048"); + VList::push_back(items, "4 KB", "4096"); myFragsizePopup = new PopUpWidget(this, font, xpos, ypos, pwidth + myVolumeLabel->getWidth() - 4, lineHeight, items, "Sample size (*): ", lwidth); @@ -85,11 +84,11 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent, // Output frequency items.clear(); - items.push_back("11025 Hz", "11025"); - items.push_back("22050 Hz", "22050"); - items.push_back("31400 Hz", "31400"); - items.push_back("44100 Hz", "44100"); - items.push_back("48000 Hz", "48000"); + VList::push_back(items, "11025 Hz", "11025"); + VList::push_back(items, "22050 Hz", "22050"); + VList::push_back(items, "31400 Hz", "31400"); + VList::push_back(items, "44100 Hz", "44100"); + VList::push_back(items, "48000 Hz", "48000"); myFreqPopup = new PopUpWidget(this, font, xpos, ypos, pwidth + myVolumeLabel->getWidth() - 4, lineHeight, items, "Frequency (*): ", lwidth); diff --git a/src/gui/CheckListWidget.hxx b/src/gui/CheckListWidget.hxx index 298185e1a..42844c630 100644 --- a/src/gui/CheckListWidget.hxx +++ b/src/gui/CheckListWidget.hxx @@ -24,7 +24,7 @@ class CheckboxWidget; #include "ListWidget.hxx" -typedef Common::Array CheckboxArray; +typedef vector CheckboxArray; /** CheckListWidget */ diff --git a/src/gui/ComboDialog.cxx b/src/gui/ComboDialog.cxx index e79958393..b901bc620 100644 --- a/src/gui/ComboDialog.cxx +++ b/src/gui/ComboDialog.cxx @@ -28,7 +28,6 @@ #include "OSystem.hxx" #include "EditTextWidget.hxx" #include "PopUpWidget.hxx" -#include "StringList.hxx" #include "Widget.hxx" #include "ComboDialog.hxx" @@ -111,8 +110,7 @@ void ComboDialog::show(Event::Type event, const string& name) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void ComboDialog::loadConfig() { - StringList events; - instance().eventHandler().getComboListForEvent(myComboEvent, events); + StringList events = instance().eventHandler().getComboListForEvent(myComboEvent); int size = BSPF_min((int)events.size(), 8); for(int i = 0; i < size; ++i) diff --git a/src/gui/ComboDialog.hxx b/src/gui/ComboDialog.hxx index 097605c1c..fdf656555 100644 --- a/src/gui/ComboDialog.hxx +++ b/src/gui/ComboDialog.hxx @@ -23,7 +23,6 @@ class PopUpWidget; class EditTextWidget; class StaticTextWidget; -class VariantList; class OSystem; #include "Dialog.hxx" diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 283999e64..e9a331e19 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -26,6 +26,7 @@ #include "Dialog.hxx" #include "Widget.hxx" #include "TabWidget.hxx" +#include "Vec.hxx" /* * TODO list @@ -150,7 +151,7 @@ void Dialog::addToFocusList(WidgetArray& list) for(uInt32 i = 0; i < list.size(); ++i) list[i]->setFlags(WIDGET_RETAIN_FOCUS); - _myFocus.list.append(list); + Vec::append(_myFocus.list, list); _focusList = _myFocus.list; if(list.size() > 0) @@ -176,14 +177,14 @@ void Dialog::addToFocusList(WidgetArray& list, TabWidget* w, int tabId) // Now insert in the correct place in that focus list uInt32 id = tabId; if(id < focus.size()) - focus[id].list.append(list); + Vec::append(focus[id].list, list); else { // Make sure the array is large enough while(focus.size() <= id) focus.push_back(Focus()); - focus[id].list.append(list); + Vec::append(focus[id].list, list); } if(list.size() > 0) @@ -245,13 +246,13 @@ void Dialog::buildCurrentFocusList(int tabID) _myTabList[id].appendFocusList(_focusList); // Add remaining items from main focus list - _focusList.append(_myFocus.list); + Vec::append(_focusList, _myFocus.list); // Add button group at end of current focus list // We do it this way for TabWidget, so that buttons are scanned // *after* the widgets in the current tab if(_buttonGroup.size() > 0) - _focusList.append(_buttonGroup); + Vec::append(_focusList, _buttonGroup); // Finally, the moment we've all been waiting for :) // Set the actual focus widget @@ -727,7 +728,7 @@ void Dialog::TabFocus::appendFocusList(WidgetArray& list) int active = widget->getActiveTab(); if(active >= 0 && active < (int)focus.size()) - list.append(focus[active].list); + Vec::append(list, focus[active].list); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/Dialog.hxx b/src/gui/Dialog.hxx index 4d6ef2cdc..8dc85664d 100644 --- a/src/gui/Dialog.hxx +++ b/src/gui/Dialog.hxx @@ -134,7 +134,7 @@ class Dialog : public GuiObject Focus(Widget* w = 0); virtual ~Focus(); }; - typedef Common::Array FocusList; + typedef vector FocusList; struct TabFocus { TabWidget* widget; @@ -148,7 +148,7 @@ class Dialog : public GuiObject void saveCurrentFocus(Widget* w); Widget* getNewFocus(); }; - typedef Common::Array TabFocusList; + typedef vector TabFocusList; Focus _myFocus; // focus for base dialog TabFocusList _myTabList; // focus for each tab (if any) diff --git a/src/gui/EventMappingWidget.cxx b/src/gui/EventMappingWidget.cxx index 424db04a2..b8e8d146a 100644 --- a/src/gui/EventMappingWidget.cxx +++ b/src/gui/EventMappingWidget.cxx @@ -94,8 +94,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font, myComboButton->setTarget(this); addFocusWidget(myComboButton); - VariantList combolist; - instance().eventHandler().getComboList(mode, combolist); + VariantList combolist = instance().eventHandler().getComboList(mode); myComboDialog = new ComboDialog(boss, font, combolist); } else diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index e19e850fa..0200513bc 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -27,7 +27,6 @@ #include "PopUpWidget.hxx" #include "Props.hxx" #include "PropsSet.hxx" -#include "StringList.hxx" #include "TabWidget.hxx" #include "Widget.hxx" @@ -116,8 +115,8 @@ GameInfoDialog::GameInfoDialog( "Sound:", kTextAlignLeft); pwidth = font.getStringWidth("Stereo"); items.clear(); - items.push_back("Mono", "MONO"); - items.push_back("Stereo", "STEREO"); + VList::push_back(items, "Mono", "MONO"); + VList::push_back(items, "Stereo", "STEREO"); mySound = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(mySound); @@ -128,7 +127,7 @@ GameInfoDialog::GameInfoDialog( pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)"); items.clear(); for(int i = 0; i < Cartridge::ourNumBSTypes; ++i) - items.push_back(Cartridge::ourBSList[i].desc, Cartridge::ourBSList[i].type); + VList::push_back(items, Cartridge::ourBSList[i].desc, Cartridge::ourBSList[i].type); myType = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myType); @@ -147,8 +146,8 @@ GameInfoDialog::GameInfoDialog( new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Left Difficulty:", kTextAlignLeft); items.clear(); - items.push_back("B", "B"); - items.push_back("A", "A"); + VList::push_back(items, "B", "B"); + VList::push_back(items, "A", "A"); myLeftDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myLeftDiff); @@ -165,8 +164,8 @@ GameInfoDialog::GameInfoDialog( new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "TV Type:", kTextAlignLeft); items.clear(); - items.push_back("Color", "COLOR"); - items.push_back("B & W", "BW"); + VList::push_back(items, "Color", "COLOR"); + VList::push_back(items, "B & W", "BW"); myTVType = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myTVType); @@ -185,23 +184,23 @@ GameInfoDialog::GameInfoDialog( new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "P0 Controller:", kTextAlignLeft); ctrls.clear(); - ctrls.push_back("Joystick", "JOYSTICK" ); - ctrls.push_back("Paddles", "PADDLES" ); - ctrls.push_back("Paddles_IAxis", "PADDLES_IAXIS"); - ctrls.push_back("Paddles_IDir", "PADDLES_IDIR" ); - ctrls.push_back("Paddles_IAxDr", "PADDLES_IAXDR"); - ctrls.push_back("BoosterGrip", "BOOSTERGRIP" ); - ctrls.push_back("Driving", "DRIVING" ); - ctrls.push_back("Keyboard", "KEYBOARD" ); - ctrls.push_back("CX-22 Trakball", "TRACKBALL22" ); - ctrls.push_back("CX-80 Mouse", "TRACKBALL80" ); - ctrls.push_back("AmigaMouse", "AMIGAMOUSE" ); - ctrls.push_back("AtariVox", "ATARIVOX" ); - ctrls.push_back("SaveKey", "SAVEKEY" ); - ctrls.push_back("Sega Genesis", "GENESIS" ); - ctrls.push_back("CompuMate", "COMPUMATE" ); -// ctrls.push_back("KidVid", "KIDVID" ); - ctrls.push_back("MindLink", "MINDLINK" ); + VList::push_back(ctrls, "Joystick", "JOYSTICK" ); + VList::push_back(ctrls, "Paddles", "PADDLES" ); + VList::push_back(ctrls, "Paddles_IAxis", "PADDLES_IAXIS"); + VList::push_back(ctrls, "Paddles_IDir", "PADDLES_IDIR" ); + VList::push_back(ctrls, "Paddles_IAxDr", "PADDLES_IAXDR"); + VList::push_back(ctrls, "BoosterGrip", "BOOSTERGRIP" ); + VList::push_back(ctrls, "Driving", "DRIVING" ); + VList::push_back(ctrls, "Keyboard", "KEYBOARD" ); + VList::push_back(ctrls, "CX-22 Trakball", "TRACKBALL22" ); + VList::push_back(ctrls, "CX-80 Mouse", "TRACKBALL80" ); + VList::push_back(ctrls, "AmigaMouse", "AMIGAMOUSE" ); + VList::push_back(ctrls, "AtariVox", "ATARIVOX" ); + VList::push_back(ctrls, "SaveKey", "SAVEKEY" ); + VList::push_back(ctrls, "Sega Genesis", "GENESIS" ); + VList::push_back(ctrls, "CompuMate", "COMPUMATE" ); +// VList::push_back(ctrls, "KidVid", "KIDVID" ); + VList::push_back(ctrls, "MindLink", "MINDLINK" ); myP0Controller = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, ctrls, "", 0, 0); wid.push_back(myP0Controller); @@ -212,8 +211,8 @@ GameInfoDialog::GameInfoDialog( xpos += font.getStringWidth("in "); pwidth = font.getStringWidth("right port"); ports.clear(); - ports.push_back("left port", "L"); - ports.push_back("right port", "R"); + VList::push_back(ports, "left port", "L"); + VList::push_back(ports, "right port", "R"); myLeftPort = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, ports, "", 0, kLeftCChanged); wid.push_back(myLeftPort); @@ -240,8 +239,8 @@ GameInfoDialog::GameInfoDialog( new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Swap Paddles:", kTextAlignLeft); items.clear(); - items.push_back("Yes", "YES"); - items.push_back("No", "NO"); + VList::push_back(items, "Yes", "YES"); + VList::push_back(items, "No", "NO"); mySwapPaddles = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(mySwapPaddles); @@ -250,8 +249,8 @@ GameInfoDialog::GameInfoDialog( lwidth = font.getStringWidth("Mouse axis mode: "); pwidth = font.getStringWidth("Specific axis"); items.clear(); - items.push_back("Automatic", "auto"); - items.push_back("Specific axis", "specific"); + VList::push_back(items, "Automatic", "auto"); + VList::push_back(items, "Specific axis", "specific"); myMouseControl = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "Mouse axis mode: ", lwidth, kMCtrlChanged); @@ -261,15 +260,15 @@ GameInfoDialog::GameInfoDialog( lwidth = font.getStringWidth("X-Axis is: "); pwidth = font.getStringWidth("MindLink 0"); items.clear(); - items.push_back("None", MouseControl::NoControl); - items.push_back("Paddle 0", MouseControl::Paddle0); - items.push_back("Paddle 1", MouseControl::Paddle1); - items.push_back("Paddle 2", MouseControl::Paddle2); - items.push_back("Paddle 3", MouseControl::Paddle3); - items.push_back("Driving 0", MouseControl::Driving0); - items.push_back("Driving 1", MouseControl::Driving1); - items.push_back("MindLink 0", MouseControl::MindLink0); - items.push_back("MindLink 1", MouseControl::MindLink1); + VList::push_back(items, "None", MouseControl::NoControl); + VList::push_back(items, "Paddle 0", MouseControl::Paddle0); + VList::push_back(items, "Paddle 1", MouseControl::Paddle1); + VList::push_back(items, "Paddle 2", MouseControl::Paddle2); + VList::push_back(items, "Paddle 3", MouseControl::Paddle3); + VList::push_back(items, "Driving 0", MouseControl::Driving0); + VList::push_back(items, "Driving 1", MouseControl::Driving1); + VList::push_back(items, "MindLink 0", MouseControl::MindLink0); + VList::push_back(items, "MindLink 1", MouseControl::MindLink1); xpos = 45; ypos += lineHeight + 4; myMouseX = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, @@ -295,13 +294,13 @@ GameInfoDialog::GameInfoDialog( new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Format:", kTextAlignLeft); items.clear(); - items.push_back("Auto-detect", "AUTO"); - items.push_back("NTSC", "NTSC"); - items.push_back("PAL", "PAL"); - items.push_back("SECAM", "SECAM"); - items.push_back("NTSC50", "NTSC50"); - items.push_back("PAL60", "PAL60"); - items.push_back("SECAM60", "SECAM60"); + VList::push_back(items, "Auto-detect", "AUTO"); + VList::push_back(items, "NTSC", "NTSC"); + VList::push_back(items, "PAL", "PAL"); + VList::push_back(items, "SECAM", "SECAM"); + VList::push_back(items, "NTSC50", "NTSC50"); + VList::push_back(items, "PAL60", "PAL60"); + VList::push_back(items, "SECAM60", "SECAM60"); myFormat = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myFormat); @@ -325,8 +324,8 @@ GameInfoDialog::GameInfoDialog( new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Use Phosphor:", kTextAlignLeft); items.clear(); - items.push_back("Yes", "YES"); - items.push_back("No", "NO"); + VList::push_back(items, "Yes", "YES"); + VList::push_back(items, "No", "NO"); myPhosphor = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, kPhosphorChanged); wid.push_back(myPhosphor); diff --git a/src/gui/GlobalPropsDialog.cxx b/src/gui/GlobalPropsDialog.cxx index c87f4893a..eb33554d8 100644 --- a/src/gui/GlobalPropsDialog.cxx +++ b/src/gui/GlobalPropsDialog.cxx @@ -25,7 +25,6 @@ #include "OSystem.hxx" #include "PopUpWidget.hxx" #include "Settings.hxx" -#include "StringList.hxx" #include "Widget.hxx" #include "LauncherDialog.hxx" @@ -59,7 +58,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) "Bankswitch type:", kTextAlignLeft); items.clear(); for(int i = 0; i < Cartridge::ourNumBSTypes; ++i) - items.push_back(Cartridge::ourBSList[i].desc, Cartridge::ourBSList[i].type); + VList::push_back(items, Cartridge::ourBSList[i].desc, Cartridge::ourBSList[i].type); myBSType = new PopUpWidget(this, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myBSType); @@ -70,9 +69,9 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, "Left Difficulty:", kTextAlignLeft); items.clear(); - items.push_back("Default", "DEFAULT"); - items.push_back("B", "B"); - items.push_back("A", "A"); + VList::push_back(items, "Default", "DEFAULT"); + VList::push_back(items, "B", "B"); + VList::push_back(items, "A", "A"); myLeftDiff = new PopUpWidget(this, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myLeftDiff); @@ -91,9 +90,9 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, "TV Type:", kTextAlignLeft); items.clear(); - items.push_back("Default", "DEFAULT"); - items.push_back("Color", "COLOR"); - items.push_back("B & W", "BW"); + VList::push_back(items, "Default", "DEFAULT"); + VList::push_back(items, "Color", "COLOR"); + VList::push_back(items, "B & W", "BW"); myTVType = new PopUpWidget(this, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myTVType); @@ -103,8 +102,8 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, "Startup Mode:", kTextAlignLeft); items.clear(); - items.push_back("Console", "false"); - items.push_back("Debugger", "true"); + VList::push_back(items, "Console", "false"); + VList::push_back(items, "Debugger", "true"); myDebug = new PopUpWidget(this, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myDebug); diff --git a/src/gui/GuiObject.hxx b/src/gui/GuiObject.hxx index 9a5d4b438..da69bd22d 100644 --- a/src/gui/GuiObject.hxx +++ b/src/gui/GuiObject.hxx @@ -29,9 +29,8 @@ class Widget; #include "Command.hxx" #include "OSystem.hxx" -#include "Array.hxx" -typedef Common::Array WidgetArray; +typedef vector WidgetArray; // The commands generated by various widgets enum { diff --git a/src/gui/InputDialog.cxx b/src/gui/InputDialog.cxx index d07576aab..6aa249d3a 100644 --- a/src/gui/InputDialog.cxx +++ b/src/gui/InputDialog.cxx @@ -19,12 +19,10 @@ #include "bspf.hxx" -#include "Array.hxx" #include "OSystem.hxx" #include "Joystick.hxx" #include "Paddles.hxx" #include "Settings.hxx" -#include "StringList.hxx" #include "EventMappingWidget.hxx" #include "EditTextWidget.hxx" #include "PopUpWidget.hxx" @@ -59,7 +57,7 @@ InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent, // 1) Event mapper for emulation actions tabID = myTab->addTab("Emul. Events"); - instance().eventHandler().getActionList(kEmulationMode, actions); + actions = instance().eventHandler().getActionList(kEmulationMode); myEmulEventMapper = new EventMappingWidget(myTab, font, 2, 2, myTab->getWidth(), myTab->getHeight() - ypos, @@ -69,8 +67,7 @@ InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent, // 2) Event mapper for UI actions tabID = myTab->addTab("UI Events"); - actions.clear(); - instance().eventHandler().getActionList(kMenuMode, actions); + actions = instance().eventHandler().getActionList(kMenuMode); myMenuEventMapper = new EventMappingWidget(myTab, font, 2, 2, myTab->getWidth(), myTab->getHeight() - ypos, @@ -119,8 +116,8 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) pwidth = font.getStringWidth("Analog devices"); items.clear(); - items.push_back("Left / Right", "lr"); - items.push_back("Right / Left", "rl"); + VList::push_back(items, "Left / Right", "lr"); + VList::push_back(items, "Right / Left", "rl"); mySAPort = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "Stelladaptor port order: ", lwidth); wid.push_back(mySAPort); @@ -128,9 +125,9 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) // Use mouse as controller ypos += lineHeight + 5; items.clear(); - items.push_back("Always", "always"); - items.push_back("Analog devices", "analog"); - items.push_back("Never", "never"); + VList::push_back(items, "Always", "always"); + VList::push_back(items, "Analog devices", "analog"); + VList::push_back(items, "Never", "never"); myMouseControl = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "Use mouse as a controller: ", lwidth); wid.push_back(myMouseControl); diff --git a/src/gui/InputTextDialog.hxx b/src/gui/InputTextDialog.hxx index 70d17e3a9..94d3828dd 100644 --- a/src/gui/InputTextDialog.hxx +++ b/src/gui/InputTextDialog.hxx @@ -59,7 +59,7 @@ class InputTextDialog : public Dialog, public CommandSender void handleCommand(CommandSender* sender, int cmd, int data, int id); private: - typedef Common::Array InputWidget; + typedef vector InputWidget; InputWidget myInput; StaticTextWidget* myTitle; diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 89f4a2bf3..faa023edf 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -38,7 +38,6 @@ #include "PropsSet.hxx" #include "RomInfoWidget.hxx" #include "Settings.hxx" -#include "StringList.hxx" #include "StringListWidget.hxx" #include "Widget.hxx" @@ -180,9 +179,9 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent, // Create context menu for ROM list options VariantList l; - l.push_back("Power-on options", "override"); - l.push_back("Filter listing", "filter"); - l.push_back("Reload listing", "reload"); + VList::push_back(l, "Power-on options", "override"); + VList::push_back(l, "Filter listing", "filter"); + VList::push_back(l, "Reload listing", "reload"); myMenu = new ContextMenu(this, osystem.frameBuffer().font(), l); // Create global props dialog, which is used to temporarily overrride diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx index dfa1ff40d..3e4297b6f 100644 --- a/src/gui/LauncherDialog.hxx +++ b/src/gui/LauncherDialog.hxx @@ -40,7 +40,6 @@ class StringListWidget; #include "Dialog.hxx" #include "FSNode.hxx" -#include "StringList.hxx" #include "Stack.hxx" #include "MessageBox.hxx" diff --git a/src/gui/LauncherFilterDialog.cxx b/src/gui/LauncherFilterDialog.cxx index e4f184ad0..53150faa1 100644 --- a/src/gui/LauncherFilterDialog.cxx +++ b/src/gui/LauncherFilterDialog.cxx @@ -27,7 +27,6 @@ #include "OSystem.hxx" #include "PopUpWidget.hxx" #include "Settings.hxx" -#include "StringList.hxx" #include "Widget.hxx" #include "LauncherDialog.hxx" @@ -53,10 +52,9 @@ LauncherFilterDialog::LauncherFilterDialog(GuiObject* boss, const GUI::Font& fon xpos = 10; ypos = 10; // Types of files to show - items.clear(); - items.push_back("All files", "allfiles"); - items.push_back("All roms", "allroms"); - items.push_back("ROMs ending with", "__EXTS"); + VList::push_back(items, "All files", "allfiles"); + VList::push_back(items, "All roms", "allroms"); + VList::push_back(items, "ROMs ending with", "__EXTS"); myFileType = new PopUpWidget(this, font, xpos, ypos, pwidth, lineHeight, items, "Show: ", lwidth, kFileTypeChanged); diff --git a/src/gui/LauncherFilterDialog.hxx b/src/gui/LauncherFilterDialog.hxx index 3c45fbc6c..e353e324d 100644 --- a/src/gui/LauncherFilterDialog.hxx +++ b/src/gui/LauncherFilterDialog.hxx @@ -25,7 +25,6 @@ class DialogContainer; class CheckboxWidget; class PopUpWidget; class OSystem; -class StringList; #include "Dialog.hxx" #include "FSNode.hxx" diff --git a/src/gui/ListWidget.hxx b/src/gui/ListWidget.hxx index 2e15ef8d1..8caadf012 100644 --- a/src/gui/ListWidget.hxx +++ b/src/gui/ListWidget.hxx @@ -21,7 +21,6 @@ #define LIST_WIDGET_HXX class GuiObject; -class StringList; #include "Widget.hxx" #include "Command.hxx" diff --git a/src/gui/LoggerDialog.cxx b/src/gui/LoggerDialog.cxx index 785aae533..c334028f6 100644 --- a/src/gui/LoggerDialog.cxx +++ b/src/gui/LoggerDialog.cxx @@ -64,10 +64,9 @@ LoggerDialog::LoggerDialog(OSystem& osystem, DialogContainer& parent, // Level of logging (how much info to print) xpos += 20; VariantList items; - items.clear(); - items.push_back("None", "0"); - items.push_back("Basic", "1"); - items.push_back("Verbose", "2"); + VList::push_back(items, "None", "0"); + VList::push_back(items, "Basic", "1"); + VList::push_back(items, "Verbose", "2"); myLogLevel = new PopUpWidget(this, font, xpos, ypos, font.getStringWidth("Verbose"), lineHeight, items, "Log level: ", diff --git a/src/gui/PopUpWidget.hxx b/src/gui/PopUpWidget.hxx index 5be522917..ef252f754 100644 --- a/src/gui/PopUpWidget.hxx +++ b/src/gui/PopUpWidget.hxx @@ -24,10 +24,8 @@ class GUIObject; #include "bspf.hxx" -#include "Array.hxx" #include "Command.hxx" #include "ContextMenu.hxx" -#include "StringList.hxx" #include "Widget.hxx" diff --git a/src/gui/RomInfoWidget.hxx b/src/gui/RomInfoWidget.hxx index 6b55af654..5e2c2488c 100644 --- a/src/gui/RomInfoWidget.hxx +++ b/src/gui/RomInfoWidget.hxx @@ -25,7 +25,6 @@ #include "Props.hxx" #include "Widget.hxx" #include "Command.hxx" -#include "StringList.hxx" #include "Rect.hxx" #include "bspf.hxx" diff --git a/src/gui/SnapshotDialog.cxx b/src/gui/SnapshotDialog.cxx index 743fb1a7f..e4dba7ac6 100644 --- a/src/gui/SnapshotDialog.cxx +++ b/src/gui/SnapshotDialog.cxx @@ -74,8 +74,8 @@ SnapshotDialog::SnapshotDialog( lwidth = font.getStringWidth("Continuous snapshot interval: "); fwidth = font.getStringWidth("internal database"); VariantList items; - items.push_back("actual ROM name", "rom"); - items.push_back("internal database", "int"); + VList::push_back(items, "actual ROM name", "rom"); + VList::push_back(items, "internal database", "int"); xpos = vBorder+10; ypos += buttonHeight + 8; mySnapName = new PopUpWidget(this, font, xpos, ypos, fwidth, lineHeight, items, @@ -84,16 +84,16 @@ SnapshotDialog::SnapshotDialog( // Snapshot interval (continuous mode) items.clear(); - items.push_back("1 second", "1"); - items.push_back("2 seconds", "2"); - items.push_back("3 seconds", "3"); - items.push_back("4 seconds", "4"); - items.push_back("5 seconds", "5"); - items.push_back("6 seconds", "6"); - items.push_back("7 seconds", "7"); - items.push_back("8 seconds", "8"); - items.push_back("9 seconds", "9"); - items.push_back("10 seconds", "10"); + VList::push_back(items, "1 second", "1"); + VList::push_back(items, "2 seconds", "2"); + VList::push_back(items, "3 seconds", "3"); + VList::push_back(items, "4 seconds", "4"); + VList::push_back(items, "5 seconds", "5"); + VList::push_back(items, "6 seconds", "6"); + VList::push_back(items, "7 seconds", "7"); + VList::push_back(items, "8 seconds", "8"); + VList::push_back(items, "9 seconds", "9"); + VList::push_back(items, "10 seconds", "10"); ypos += buttonHeight; mySnapInterval = new PopUpWidget(this, font, xpos, ypos, fwidth, lineHeight, items, diff --git a/src/gui/StringListWidget.cxx b/src/gui/StringListWidget.cxx index b0688f751..d76d8cdfa 100644 --- a/src/gui/StringListWidget.cxx +++ b/src/gui/StringListWidget.cxx @@ -17,11 +17,10 @@ // $Id$ //============================================================================ +#include "bspf.hxx" #include "ScrollBarWidget.hxx" #include "StringListWidget.hxx" -#include "bspf.hxx" - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - StringListWidget::StringListWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h, bool hilite) diff --git a/src/gui/TabWidget.hxx b/src/gui/TabWidget.hxx index 8e54e8de8..9b9d05fef 100644 --- a/src/gui/TabWidget.hxx +++ b/src/gui/TabWidget.hxx @@ -22,7 +22,6 @@ #include "bspf.hxx" -#include "Array.hxx" #include "Command.hxx" #include "Widget.hxx" @@ -76,7 +75,7 @@ class TabWidget : public Widget, public CommandSender Tab(const string& t = "", Widget* first = 0, Widget* parent = 0, bool e = true) : title(t), firstWidget(first), parentWidget(parent), enabled(e) { } }; - typedef Common::Array TabList; + typedef vector TabList; TabList _tabs; int _tabWidth; diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx index ff6b469e3..a15e8ba8e 100644 --- a/src/gui/UIDialog.cxx +++ b/src/gui/UIDialog.cxx @@ -27,7 +27,6 @@ #include "PopUpWidget.hxx" #include "ScrollBarWidget.hxx" #include "Settings.hxx" -#include "StringList.hxx" #include "TabWidget.hxx" #include "Widget.hxx" #ifdef DEBUGGER_SUPPORT @@ -102,9 +101,9 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // Launcher font pwidth = font.getStringWidth("2x (1000x760)"); items.clear(); - items.push_back("Small", "small"); - items.push_back("Medium", "medium"); - items.push_back("Large", "large"); + VList::push_back(items, "Small", "small"); + VList::push_back(items, "Medium", "medium"); + VList::push_back(items, "Large", "large"); myLauncherFontPopup = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, "Launcher Font: ", lwidth); @@ -113,9 +112,9 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // ROM launcher info/snapshot viewer items.clear(); - items.push_back("Off", "0"); - items.push_back("1x (640x480) ", "1"); - items.push_back("2x (1000x760)", "2"); + VList::push_back(items, "Off", "0"); + VList::push_back(items, "1x (640x480) ", "1"); + VList::push_back(items, "2x (1000x760)", "2"); myRomViewerPopup = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, "ROM Info viewer: ", lwidth); @@ -125,8 +124,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // Exit to Launcher pwidth = font.getStringWidth("If in use"); items.clear(); - items.push_back("If in use", "0"); - items.push_back("Always", "1"); + VList::push_back(items, "If in use", "0"); + VList::push_back(items, "Always", "1"); myLauncherExitPopup = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, "Exit to Launcher: ", lwidth); @@ -200,10 +199,10 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, pwidth = font.getStringWidth("Bold non-labels only"); xpos = vBorder; items.clear(); - items.push_back("All Normal font", "0"); - items.push_back("Bold labels only", "1"); - items.push_back("Bold non-labels only", "2"); - items.push_back("All Bold font", "3"); + VList::push_back(items, "All Normal font", "0"); + VList::push_back(items, "Bold labels only", "1"); + VList::push_back(items, "Bold non-labels only", "2"); + VList::push_back(items, "All Bold font", "3"); myDebuggerFontStyle = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, "Font Style: ", lwidth); @@ -243,8 +242,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // UI Palette ypos += 1; items.clear(); - items.push_back("Standard", "standard"); - items.push_back("Classic", "classic"); + VList::push_back(items, "Standard", "standard"); + VList::push_back(items, "Classic", "classic"); myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "Interface Palette (*): ", lwidth); wid.push_back(myPalettePopup); @@ -252,14 +251,14 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // Delay between quick-selecting characters in ListWidget items.clear(); - items.push_back("300 ms", "300"); - items.push_back("400 ms", "400"); - items.push_back("500 ms", "500"); - items.push_back("600 ms", "600"); - items.push_back("700 ms", "700"); - items.push_back("800 ms", "800"); - items.push_back("900 ms", "900"); - items.push_back("1 sec", "1000"); + VList::push_back(items, "300 ms", "300"); + VList::push_back(items, "400 ms", "400"); + VList::push_back(items, "500 ms", "500"); + VList::push_back(items, "600 ms", "600"); + VList::push_back(items, "700 ms", "700"); + VList::push_back(items, "800 ms", "800"); + VList::push_back(items, "900 ms", "900"); + VList::push_back(items, "1 sec", "1000"); myListDelayPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "List quick delay: ", lwidth); wid.push_back(myListDelayPopup); @@ -267,16 +266,16 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // Number of lines a mouse wheel will scroll items.clear(); - items.push_back("1 line", "1"); - items.push_back("2 lines", "2"); - items.push_back("3 lines", "3"); - items.push_back("4 lines", "4"); - items.push_back("5 lines", "5"); - items.push_back("6 lines", "6"); - items.push_back("7 lines", "7"); - items.push_back("8 lines", "8"); - items.push_back("9 lines", "9"); - items.push_back("10 lines", "10"); + VList::push_back(items, "1 line", "1"); + VList::push_back(items, "2 lines", "2"); + VList::push_back(items, "3 lines", "3"); + VList::push_back(items, "4 lines", "4"); + VList::push_back(items, "5 lines", "5"); + VList::push_back(items, "6 lines", "6"); + VList::push_back(items, "7 lines", "7"); + VList::push_back(items, "8 lines", "8"); + VList::push_back(items, "9 lines", "9"); + VList::push_back(items, "10 lines", "10"); myWheelLinesPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "Mouse wheel scroll: ", lwidth); wid.push_back(myWheelLinesPopup); diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index de84976f6..8f42e21bf 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -30,7 +30,6 @@ #include "Console.hxx" #include "TIA.hxx" #include "Settings.hxx" -#include "StringList.hxx" #include "Widget.hxx" #include "TabWidget.hxx" #include "NTSCFilter.hxx" @@ -83,9 +82,9 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, // TIA Palette items.clear(); - items.push_back("Standard", "standard"); - items.push_back("Z26", "z26"); - items.push_back("User", "user"); + VList::push_back(items, "Standard", "standard"); + VList::push_back(items, "Z26", "z26"); + VList::push_back(items, "User", "user"); myTIAPalette = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "TIA Palette: ", lwidth); wid.push_back(myTIAPalette); @@ -93,8 +92,8 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, // TIA interpolation items.clear(); - items.push_back("Linear", "linear"); - items.push_back("Nearest", "nearest"); + VList::push_back(items, "Linear", "linear"); + VList::push_back(items, "Nearest", "nearest"); myTIAInterpolate = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "TIA Inter: ", lwidth); wid.push_back(myTIAInterpolate); @@ -102,8 +101,8 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, // Timing to use between frames items.clear(); - items.push_back("Sleep", "sleep"); - items.push_back("Busy-wait", "busy"); + VList::push_back(items, "Sleep", "sleep"); + VList::push_back(items, "Busy-wait", "busy"); myFrameTiming = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "Timing (*): ", lwidth); wid.push_back(myFrameTiming); @@ -204,12 +203,12 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, // TV Mode items.clear(); - items.push_back("Disabled", NTSCFilter::PRESET_OFF); - items.push_back("Composite", NTSCFilter::PRESET_COMPOSITE); - items.push_back("S-Video", NTSCFilter::PRESET_SVIDEO); - items.push_back("RGB", NTSCFilter::PRESET_RGB); - items.push_back("Bad adjust", NTSCFilter::PRESET_BAD); - items.push_back("Custom", NTSCFilter::PRESET_CUSTOM); + VList::push_back(items, "Disabled", NTSCFilter::PRESET_OFF); + VList::push_back(items, "Composite", NTSCFilter::PRESET_COMPOSITE); + VList::push_back(items, "S-Video", NTSCFilter::PRESET_SVIDEO); + VList::push_back(items, "RGB", NTSCFilter::PRESET_RGB); + VList::push_back(items, "Bad adjust", NTSCFilter::PRESET_BAD); + VList::push_back(items, "Custom", NTSCFilter::PRESET_CUSTOM); lwidth = font.getStringWidth("TV Mode: "); pwidth = font.getStringWidth("Bad adjust"), myTVMode = diff --git a/src/gui/Widget.hxx b/src/gui/Widget.hxx index 7f3d5816c..c2263e04a 100644 --- a/src/gui/Widget.hxx +++ b/src/gui/Widget.hxx @@ -29,7 +29,6 @@ #include "bspf.hxx" -#include "Array.hxx" #include "Event.hxx" #include "Font.hxx" #include "FrameBuffer.hxx"