2015-02-12 23:16:25 +08:00
|
|
|
// Aseprite
|
2018-03-16 07:34:01 +08:00
|
|
|
// Copyright (C) 2001-2018 David Capello
|
2015-02-12 23:16:25 +08:00
|
|
|
//
|
2016-08-27 04:02:58 +08:00
|
|
|
// This program is distributed under the terms of
|
|
|
|
// the End-User License Agreement for Aseprite.
|
2014-03-30 03:58:35 +08:00
|
|
|
|
|
|
|
#ifndef APP_COMMANDS_CMD_SAVE_FILE_H_INCLUDED
|
|
|
|
#define APP_COMMANDS_CMD_SAVE_FILE_H_INCLUDED
|
2014-03-30 06:40:17 +08:00
|
|
|
#pragma once
|
2014-03-30 03:58:35 +08:00
|
|
|
|
|
|
|
#include "app/commands/command.h"
|
2016-09-17 12:01:28 +08:00
|
|
|
#include "doc/selected_frames.h"
|
2014-03-30 03:58:35 +08:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace app {
|
2016-06-01 03:53:30 +08:00
|
|
|
class Document;
|
2014-03-30 03:58:35 +08:00
|
|
|
|
|
|
|
class SaveFileBaseCommand : public Command {
|
|
|
|
public:
|
2017-12-01 10:41:45 +08:00
|
|
|
SaveFileBaseCommand(const char* id, CommandFlags flags);
|
2014-03-30 03:58:35 +08:00
|
|
|
|
|
|
|
protected:
|
2015-03-12 02:40:22 +08:00
|
|
|
void onLoadParams(const Params& params) override;
|
2014-08-15 10:07:47 +08:00
|
|
|
bool onEnabled(Context* context) override;
|
2014-03-30 03:58:35 +08:00
|
|
|
|
2018-03-16 07:34:01 +08:00
|
|
|
std::string saveAsDialog(
|
|
|
|
Context* context,
|
|
|
|
const std::string& dlgTitle,
|
|
|
|
const std::string& filename,
|
|
|
|
const bool markAsSaved,
|
|
|
|
const bool saveInBackground = true,
|
|
|
|
const std::string& forbiddenFilename = std::string());
|
|
|
|
void saveDocumentInBackground(
|
|
|
|
const Context* context,
|
|
|
|
app::Document* document,
|
|
|
|
const std::string& filename,
|
2018-03-16 19:59:34 +08:00
|
|
|
const bool markAsSaved);
|
2014-03-30 03:58:35 +08:00
|
|
|
|
|
|
|
std::string m_filename;
|
2015-01-26 09:36:32 +08:00
|
|
|
std::string m_filenameFormat;
|
2016-06-02 01:49:24 +08:00
|
|
|
std::string m_frameTag;
|
2018-03-16 19:59:34 +08:00
|
|
|
std::string m_aniDir;
|
2017-04-12 05:45:51 +08:00
|
|
|
std::string m_slice;
|
2016-09-17 12:01:28 +08:00
|
|
|
doc::SelectedFrames m_selFrames;
|
|
|
|
bool m_adjustFramesByFrameTag;
|
2014-03-30 03:58:35 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace app
|
|
|
|
|
|
|
|
#endif
|