| 1 | // Aseprite |
| 2 | // Copyright (C) 2020-2021 Igara Studio S.A. |
| 3 | // Copyright (C) 2016-2018 David Capello |
| 4 | // |
| 5 | // This program is distributed under the terms of |
| 6 | // the End-User License Agreement for Aseprite. |
| 7 | |
| 8 | #ifndef APP_COMMANDS_CMD_OPEN_FILE_H_INCLUDED |
| 9 | #define APP_COMMANDS_CMD_OPEN_FILE_H_INCLUDED |
| 10 | #pragma once |
| 11 | |
| 12 | #include "app/commands/command.h" |
| 13 | #include "app/pref/preferences.h" |
| 14 | #include "base/paths.h" |
| 15 | |
| 16 | #include <string> |
| 17 | |
| 18 | namespace app { |
| 19 | |
| 20 | class OpenFileCommand : public Command { |
| 21 | public: |
| 22 | OpenFileCommand(); |
| 23 | |
| 24 | const base::paths& usedFiles() const { |
| 25 | return m_usedFiles; |
| 26 | } |
| 27 | |
| 28 | gen::SequenceDecision seqDecision() const { |
| 29 | return m_seqDecision; |
| 30 | } |
| 31 | |
| 32 | protected: |
| 33 | void onLoadParams(const Params& params) override; |
| 34 | void onExecute(Context* context) override; |
| 35 | |
| 36 | private: |
| 37 | std::string m_filename; |
| 38 | std::string m_folder; |
| 39 | bool m_repeatCheckbox; |
| 40 | bool m_oneFrame; |
| 41 | base::paths m_usedFiles; |
| 42 | gen::SequenceDecision m_seqDecision; |
| 43 | }; |
| 44 | |
| 45 | } // namespace app |
| 46 | |
| 47 | #endif |
| 48 | |