1 // Aseprite
2 // Copyright (C) 2017  David Capello
3 //
4 // This program is distributed under the terms of
5 // the End-User License Agreement for Aseprite.
6 
7 #ifndef APP_COMMANDS_MOVE_THING_H_INCLUDED
8 #define APP_COMMANDS_MOVE_THING_H_INCLUDED
9 #pragma once
10 
11 #include "gfx/point.h"
12 
13 #include <string>
14 
15 namespace app {
16 
17   class Context;
18   class Params;
19 
20   struct MoveThing {
21     enum Direction {
22       Left, Up, Right, Down
23     };
24 
25     enum Units {
26       Pixel,
27       TileWidth,
28       TileHeight,
29       ZoomedPixel,
30       ZoomedTileWidth,
31       ZoomedTileHeight,
32       ViewportWidth,
33       ViewportHeight
34     };
35 
36     Direction direction;
37     Units units;
38     int quantity;
39 
40     void onLoadParams(const Params& params);
41     std::string getFriendlyString() const;
42     gfx::Point getDelta(Context* context) const;
43   };
44 
45 } // namespace app
46 
47 #endif
48