1// Aseprite
2// Copyright (C) 2019-2020 Igara Studio S.A.
3// Copyright (C) 2001-2015 David Capello
4//
5// This program is distributed under the terms of
6// the End-User License Agreement for Aseprite.
7
8#ifndef APP_CMD_SET_TAG_RANGE_H_INCLUDED
9#define APP_CMD_SET_TAG_RANGE_H_INCLUDED
10#pragma once
11
12#include "app/cmd.h"
13#include "app/cmd/with_tag.h"
14#include "doc/frame.h"
15
16namespace app {
17namespace cmd {
18 using namespace doc;
19
20 class SetTagRange : public Cmd
21 , public WithTag {
22 public:
23 SetTagRange(Tag* tag, frame_t from, frame_t to);
24
25 protected:
26 void onExecute() override;
27 void onUndo() override;
28 void onFireNotifications() override;
29 size_t onMemSize() const override {
30 return sizeof(*this);
31 }
32
33 private:
34 frame_t m_oldFrom, m_oldTo;
35 frame_t m_newFrom, m_newTo;
36 };
37
38} // namespace cmd
39} // namespace app
40
41#endif
42