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 COMMAND_DIALOG_HXX |
19 | #define COMMAND_DIALOG_HXX |
20 | |
21 | class Properties; |
22 | class CommandSender; |
23 | class DialogContainer; |
24 | class OSystem; |
25 | |
26 | #include "Dialog.hxx" |
27 | |
28 | class CommandDialog : public Dialog |
29 | { |
30 | public: |
31 | CommandDialog(OSystem& osystem, DialogContainer& parent); |
32 | virtual ~CommandDialog() = default; |
33 | |
34 | protected: |
35 | void loadConfig() override; |
36 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; |
37 | void updateSlot(int slot); |
38 | void updateTVFormat(); |
39 | void updatePalette(); |
40 | void processCancel() override; |
41 | |
42 | // column 0 |
43 | ButtonWidget* myColorButton; |
44 | ButtonWidget* myLeftDiffButton; |
45 | ButtonWidget* myRightDiffButton; |
46 | // column 1 |
47 | ButtonWidget* mySaveStateButton; |
48 | ButtonWidget* myStateSlotButton; |
49 | ButtonWidget* myLoadStateButton; |
50 | ButtonWidget* myTimeMachineButton; |
51 | // column 2 |
52 | ButtonWidget* myTVFormatButton; |
53 | ButtonWidget* myPaletteButton; |
54 | ButtonWidget* myPhosphorButton; |
55 | ButtonWidget* mySoundButton; |
56 | |
57 | enum { |
58 | kSelectCmd = 'Csel', |
59 | kResetCmd = 'Cres', |
60 | kColorCmd = 'Ccol', |
61 | kLeftDiffCmd = 'Cldf', |
62 | kRightDiffCmd = 'Crdf', |
63 | kSaveStateCmd = 'Csst', |
64 | kStateSlotCmd = 'Ccst', |
65 | kLoadStateCmd = 'Clst', |
66 | kSnapshotCmd = 'Csnp', |
67 | kTimeMachineCmd = 'Ctim', |
68 | kFormatCmd = 'Cfmt', |
69 | kPaletteCmd = 'Cpal', |
70 | kPhosphorCmd = 'Cpho', |
71 | kSoundCmd = 'Csnd', |
72 | kReloadRomCmd = 'Crom', |
73 | kExitCmd = 'Clex' |
74 | }; |
75 | |
76 | private: |
77 | // Following constructors and assignment operators not supported |
78 | CommandDialog() = delete; |
79 | CommandDialog(const CommandDialog&) = delete; |
80 | CommandDialog(CommandDialog&&) = delete; |
81 | CommandDialog& operator=(const CommandDialog&) = delete; |
82 | CommandDialog& operator=(CommandDialog&&) = delete; |
83 | }; |
84 | |
85 | #endif |
86 | |