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_SET_CEL_POSITION_H_INCLUDED
8#define APP_CMD_SET_CEL_POSITION_H_INCLUDED
9#pragma once
10
11#include "app/cmd.h"
12#include "app/cmd/with_cel.h"
13
14namespace app {
15namespace cmd {
16 using namespace doc;
17
18 class SetCelPosition : public Cmd
19 , public WithCel {
20 public:
21 SetCelPosition(Cel* cel, int x, int y);
22
23 protected:
24 void onExecute() override;
25 void onUndo() override;
26 void onFireNotifications() override;
27 size_t onMemSize() const override {
28 return sizeof(*this);
29 }
30
31 private:
32 int m_oldX, m_oldY;
33 int m_newX, m_newY;
34 };
35
36} // namespace cmd
37} // namespace app
38
39#endif
40