| 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 ROM_AUDIT_DIALOG_HXX | 
|---|
| 19 | #define ROM_AUDIT_DIALOG_HXX | 
|---|
| 20 |  | 
|---|
| 21 | class OSystem; | 
|---|
| 22 | class GuiObject; | 
|---|
| 23 | class DialogContainer; | 
|---|
| 24 | class EditTextWidget; | 
|---|
| 25 | class StaticTextWidget; | 
|---|
| 26 | class BrowserDialog; | 
|---|
| 27 | namespace GUI { | 
|---|
| 28 | class MessageBox; | 
|---|
| 29 | } | 
|---|
| 30 |  | 
|---|
| 31 | #include "Dialog.hxx" | 
|---|
| 32 | #include "Command.hxx" | 
|---|
| 33 | #include "FSNode.hxx" | 
|---|
| 34 |  | 
|---|
| 35 | class RomAuditDialog : public Dialog | 
|---|
| 36 | { | 
|---|
| 37 | public: | 
|---|
| 38 | RomAuditDialog(OSystem& osystem, DialogContainer& parent, | 
|---|
| 39 | const GUI::Font& font, int max_w, int max_h); | 
|---|
| 40 | virtual ~RomAuditDialog(); | 
|---|
| 41 |  | 
|---|
| 42 | private: | 
|---|
| 43 | void loadConfig() override; | 
|---|
| 44 | void auditRoms(); | 
|---|
| 45 | void createBrowser(const string& title); | 
|---|
| 46 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; | 
|---|
| 47 |  | 
|---|
| 48 | private: | 
|---|
| 49 | enum { | 
|---|
| 50 | kChooseAuditDirCmd = 'RAsl', // audit dir select | 
|---|
| 51 | kAuditDirChosenCmd = 'RAch', // audit dir changed | 
|---|
| 52 | kConfirmAuditCmd   = 'RAcf'  // confirm rom audit | 
|---|
| 53 | }; | 
|---|
| 54 |  | 
|---|
| 55 | // Select a new ROM audit path | 
|---|
| 56 | unique_ptr<BrowserDialog> myBrowser; | 
|---|
| 57 | const GUI::Font& myFont; | 
|---|
| 58 |  | 
|---|
| 59 | // ROM audit path | 
|---|
| 60 | EditTextWidget* myRomPath; | 
|---|
| 61 |  | 
|---|
| 62 | // Show the results of the ROM audit | 
|---|
| 63 | EditTextWidget* myResults1; | 
|---|
| 64 | EditTextWidget* myResults2; | 
|---|
| 65 |  | 
|---|
| 66 | // Show a message about the dangers of using this function | 
|---|
| 67 | unique_ptr<GUI::MessageBox> myConfirmMsg; | 
|---|
| 68 |  | 
|---|
| 69 | // Maximum width and height for this dialog | 
|---|
| 70 | int myMaxWidth, myMaxHeight; | 
|---|
| 71 |  | 
|---|
| 72 | private: | 
|---|
| 73 | // Following constructors and assignment operators not supported | 
|---|
| 74 | RomAuditDialog() = delete; | 
|---|
| 75 | RomAuditDialog(const RomAuditDialog&) = delete; | 
|---|
| 76 | RomAuditDialog(RomAuditDialog&&) = delete; | 
|---|
| 77 | RomAuditDialog& operator=(const RomAuditDialog&) = delete; | 
|---|
| 78 | RomAuditDialog& operator=(RomAuditDialog&&) = delete; | 
|---|
| 79 | }; | 
|---|
| 80 |  | 
|---|
| 81 | #endif | 
|---|
| 82 |  | 
|---|