| 1 | // Aseprite | 
|---|
| 2 | // Copyright (C) 2018-2019  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_CLI_PREVIEW_CLI_DELEGATE_H_INCLUDED | 
|---|
| 9 | #define APP_CLI_PREVIEW_CLI_DELEGATE_H_INCLUDED | 
|---|
| 10 | #pragma once | 
|---|
| 11 |  | 
|---|
| 12 | #include "app/cli/cli_delegate.h" | 
|---|
| 13 |  | 
|---|
| 14 | #include <string> | 
|---|
| 15 |  | 
|---|
| 16 | namespace doc { | 
|---|
| 17 | class LayerGroup; | 
|---|
| 18 | } | 
|---|
| 19 |  | 
|---|
| 20 | namespace app { | 
|---|
| 21 |  | 
|---|
| 22 | class PreviewCliDelegate : public CliDelegate { | 
|---|
| 23 | public: | 
|---|
| 24 | void showHelp(const AppOptions& programOptions) override; | 
|---|
| 25 | void showVersion() override; | 
|---|
| 26 | void uiMode() override; | 
|---|
| 27 | void shellMode() override; | 
|---|
| 28 | void batchMode() override; | 
|---|
| 29 | void beforeOpenFile(const CliOpenFile& cof) override; | 
|---|
| 30 | void afterOpenFile(const CliOpenFile& cof) override; | 
|---|
| 31 | void saveFile(Context* ctx, const CliOpenFile& cof) override; | 
|---|
| 32 | void loadPalette(Context* ctx, | 
|---|
| 33 | const CliOpenFile& cof, | 
|---|
| 34 | const std::string& filename) override; | 
|---|
| 35 | void exportFiles(Context* ctx, DocExporter& exporter) override; | 
|---|
| 36 | #ifdef ENABLE_SCRIPTING | 
|---|
| 37 | int execScript(const std::string& filename, | 
|---|
| 38 | const Params& params) override; | 
|---|
| 39 | #endif // ENABLE_SCRIPTING | 
|---|
| 40 |  | 
|---|
| 41 | private: | 
|---|
| 42 | void showLayersFilter(const CliOpenFile& cof); | 
|---|
| 43 | void showLayerVisibility(const doc::LayerGroup* group, | 
|---|
| 44 | const std::string& indent); | 
|---|
| 45 | }; | 
|---|
| 46 |  | 
|---|
| 47 | } // namespace app | 
|---|
| 48 |  | 
|---|
| 49 | #endif | 
|---|
| 50 |  | 
|---|