"Fossies" - the Fresh Open Source Software Archive

Member "stella-6.0.2/src/debugger/gui/AudioWidget.hxx" (11 Oct 2019, 2033 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 "AudioWidget.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 AUDIO_WIDGET_HXX
   19 #define AUDIO_WIDGET_HXX
   20 
   21 class GuiObject;
   22 class DataGridWidget;
   23 
   24 #include "Widget.hxx"
   25 #include "Command.hxx"
   26 
   27 class AudioWidget : public Widget, public CommandSender
   28 {
   29   public:
   30     AudioWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
   31                 int x, int y, int w, int h);
   32     virtual ~AudioWidget() = default;
   33 
   34   private:
   35     // ID's for the various widgets
   36     // We need ID's, since there are more than one of several types of widgets
   37     enum {
   38       kAUDFID,
   39       kAUDCID,
   40       kAUDVID
   41     };
   42 
   43     DataGridWidget* myAudF;
   44     DataGridWidget* myAudC;
   45     DataGridWidget* myAudV;
   46     StaticTextWidget* myAudEffV;
   47 
   48     // Audio channels
   49     enum
   50     {
   51       kAud0Addr,
   52       kAud1Addr
   53     };
   54 
   55   private:
   56     void changeFrequencyRegs();
   57     void changeControlRegs();
   58     void changeVolumeRegs();
   59     void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
   60     void loadConfig() override;
   61 
   62     void handleVolume();
   63     uInt32 getEffectiveVolume();
   64 
   65     // Following constructors and assignment operators not supported
   66     AudioWidget() = delete;
   67     AudioWidget(const AudioWidget&) = delete;
   68     AudioWidget(AudioWidget&&) = delete;
   69     AudioWidget& operator=(const AudioWidget&) = delete;
   70     AudioWidget& operator=(AudioWidget&&) = delete;
   71 };
   72 
   73 #endif