1// Aseprite
2// Copyright (C) 2001-2016 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_MOVE_LAYER_H_INCLUDED
8#define APP_CMD_MOVE_LAYER_H_INCLUDED
9#pragma once
10
11#include "app/cmd.h"
12#include "app/cmd/with_layer.h"
13
14namespace app {
15namespace cmd {
16 using namespace doc;
17
18 class MoveLayer : public Cmd {
19 public:
20 MoveLayer(Layer* layer,
21 Layer* newParent,
22 Layer* afterThis);
23
24 protected:
25 void onExecute() override;
26 void onUndo() override;
27 void onFireNotifications() override;
28 size_t onMemSize() const override {
29 return sizeof(*this);
30 }
31
32 private:
33 WithLayer m_layer;
34 WithLayer m_oldParent, m_oldAfterThis;
35 WithLayer m_newParent, m_newAfterThis;
36 };
37
38} // namespace cmd
39} // namespace app
40
41#endif
42