| 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 SNAPSHOT_DIALOG_HXX |
| 19 | #define SNAPSHOT_DIALOG_HXX |
| 20 | |
| 21 | class OSystem; |
| 22 | class GuiObject; |
| 23 | class DialogContainer; |
| 24 | class CheckboxWidget; |
| 25 | class EditTextWidget; |
| 26 | class SliderWidget; |
| 27 | class StaticTextWidget; |
| 28 | class BrowserDialog; |
| 29 | |
| 30 | #include "Dialog.hxx" |
| 31 | #include "Command.hxx" |
| 32 | |
| 33 | class SnapshotDialog : public Dialog |
| 34 | { |
| 35 | public: |
| 36 | SnapshotDialog(OSystem& osystem, DialogContainer& parent, |
| 37 | const GUI::Font& font, int max_w, int max_h); |
| 38 | virtual ~SnapshotDialog(); |
| 39 | |
| 40 | private: |
| 41 | void loadConfig() override; |
| 42 | void saveConfig() override; |
| 43 | void setDefaults() override; |
| 44 | |
| 45 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; |
| 46 | void createBrowser(const string& title); |
| 47 | |
| 48 | private: |
| 49 | enum { |
| 50 | kChooseSnapSaveDirCmd = 'LOss', // snapshot dir (save files) |
| 51 | kSnapSaveDirChosenCmd = 'snsc', // snap chosen (save files) |
| 52 | kSnapshotInterval = 'SnIn' // snap chosen (load files) |
| 53 | }; |
| 54 | |
| 55 | const GUI::Font& myFont; |
| 56 | |
| 57 | // Config paths |
| 58 | EditTextWidget* mySnapSavePath; |
| 59 | |
| 60 | CheckboxWidget* mySnapName; |
| 61 | SliderWidget* mySnapInterval; |
| 62 | |
| 63 | CheckboxWidget* mySnapSingle; |
| 64 | CheckboxWidget* mySnap1x; |
| 65 | |
| 66 | unique_ptr<BrowserDialog> myBrowser; |
| 67 | |
| 68 | private: |
| 69 | // Following constructors and assignment operators not supported |
| 70 | SnapshotDialog() = delete; |
| 71 | SnapshotDialog(const SnapshotDialog&) = delete; |
| 72 | SnapshotDialog(SnapshotDialog&&) = delete; |
| 73 | SnapshotDialog& operator=(const SnapshotDialog&) = delete; |
| 74 | SnapshotDialog& operator=(SnapshotDialog&&) = delete; |
| 75 | }; |
| 76 | |
| 77 | #endif |
| 78 | |