1// Aseprite
2// Copyright (C) 2001-2015 David Capello
3//
4// This program is distributed under the terms of
5// the End-User License Agreement for Aseprite.
6
7#ifndef APP_CMD_COPY_FRAME_H_INCLUDED
8#define APP_CMD_COPY_FRAME_H_INCLUDED
9#pragma once
10
11#include "app/cmd_sequence.h"
12#include "app/cmd/with_sprite.h"
13#include "doc/frame.h"
14
15namespace app {
16namespace cmd {
17 using namespace doc;
18
19 class CopyFrame : public CmdSequence
20 , public WithSprite {
21 public:
22 CopyFrame(Sprite* sprite, frame_t fromFrame, frame_t newFrame);
23
24 protected:
25 void onExecute() override;
26 size_t onMemSize() const override {
27 return sizeof(*this) +
28 CmdSequence::onMemSize() - sizeof(CmdSequence);
29 }
30
31 private:
32 frame_t m_fromFrame;
33 frame_t m_newFrame;
34 };
35
36} // namespace cmd
37} // namespace app
38
39#endif
40