]> git.tdb.fi Git - r2c2.git/blob - source/designer/movetool.h
548315e06444bd86df3edafd1ab7e175eb8960f6
[r2c2.git] / source / designer / movetool.h
1 #ifndef MOVETOOL_H_
2 #define MOVETOOL_H_
3
4 #include "manipulator.h"
5
6 class MoveTool: public Manipulator
7 {
8 private:
9         struct Boundary
10         {
11                 MObject *object;
12                 unsigned index;
13
14                 Boundary(MObject *, unsigned);
15
16                 R2C2::Object *operator->() const { return object->object; }
17         };
18
19         std::list<Boundary> boundaries;
20         std::set<R2C2::Object *> snap_targets;
21         R2C2::Vector origin;
22
23 public:
24         MoveTool(Designer &, Msp::Input::Keyboard &, Msp::Input::Mouse &, const std::set<R2C2::Object *> &);
25
26         virtual void pointer_motion();
27 };
28
29 #endif