"Fossies" - the Fresh Open Source Software Archive

Member "stella-6.0.2/src/debugger/gui/CartDASHWidget.hxx" (11 Oct 2019, 2735 Bytes) of package /linux/privat/stella-6.0.2-src.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "CartDASHWidget.hxx" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 6.0.1_vs_6.0.2.

    1 //============================================================================
    2 //
    3 //   SSSS    tt          lll  lll
    4 //  SS  SS   tt           ll   ll
    5 //  SS     tttttt  eeee   ll   ll   aaaa
    6 //   SSSS    tt   ee  ee  ll   ll      aa
    7 //      SS   tt   eeeeee  ll   ll   aaaaa  --  "An Atari 2600 VCS Emulator"
    8 //  SS  SS   tt   ee      ll   ll  aa  aa
    9 //   SSSS     ttt  eeeee llll llll  aaaaa
   10 //
   11 // Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
   12 // and the Stella Team
   13 //
   14 // See the file "License.txt" for information on usage and redistribution of
   15 // this file, and for a DISCLAIMER OF ALL WARRANTIES.
   16 //============================================================================
   17 
   18 #ifndef CARTRIDGEDASH_WIDGET_HXX
   19 #define CARTRIDGEDASH_WIDGET_HXX
   20 
   21 class CartridgeDASH;
   22 class ButtonWidget;
   23 class EditTextWidget;
   24 class PopUpWidget;
   25 
   26 #include "CartDebugWidget.hxx"
   27 
   28 class CartridgeDASHWidget : public CartDebugWidget
   29 {
   30   public:
   31     CartridgeDASHWidget(GuiObject* boss, const GUI::Font& lfont,
   32                         const GUI::Font& nfont,
   33                         int x, int y, int w, int h,
   34                         CartridgeDASH& cart);
   35     virtual ~CartridgeDASHWidget() = default;
   36 
   37   private:
   38     void updateUIState();
   39 
   40   private:
   41     CartridgeDASH& myCart;
   42 
   43     PopUpWidget* myBankNumber[4];
   44     PopUpWidget* myBankType[4];
   45     ButtonWidget* myBankCommit[4];
   46     EditTextWidget* myBankState[8];
   47 
   48     struct CartState {
   49       ByteArray internalram;
   50     };
   51     CartState myOldState;
   52 
   53     enum BankID {
   54       kBank0Changed = 'b0CH',
   55       kBank1Changed = 'b1CH',
   56       kBank2Changed = 'b2CH',
   57       kBank3Changed = 'b3CH'
   58     };
   59     static const BankID bankEnum[4];
   60 
   61   private:
   62     void saveOldState() override;
   63     void loadConfig() override;
   64     void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
   65 
   66     string bankState() override;
   67 
   68     // start of functions for Cartridge RAM tab
   69     uInt32 internalRamSize() override;
   70     uInt32 internalRamRPort(int start) override;
   71     string internalRamDescription() override;
   72     const ByteArray& internalRamOld(int start, int count) override;
   73     const ByteArray& internalRamCurrent(int start, int count) override;
   74     void internalRamSetValue(int addr, uInt8 value) override;
   75     uInt8 internalRamGetValue(int addr) override;
   76     // end of functions for Cartridge RAM tab
   77 
   78     // Following constructors and assignment operators not supported
   79     CartridgeDASHWidget() = delete;
   80     CartridgeDASHWidget(const CartridgeDASHWidget&) = delete;
   81     CartridgeDASHWidget(CartridgeDASHWidget&&) = delete;
   82     CartridgeDASHWidget& operator=(const CartridgeDASHWidget&) = delete;
   83     CartridgeDASHWidget& operator=(CartridgeDASHWidget&&) = delete;
   84 };
   85 
   86 #endif