]> git.tdb.fi Git - r2c2.git/blob - source/designer/extendtool.h
Fix some bugs in tools
[r2c2.git] / source / designer / extendtool.h
1 #ifndef EXTENDTOOL_H_
2 #define EXTENDTOOL_H_
3
4 #include <set>
5 #include <vector>
6 #include "libr2c2/object.h"
7 #include "libr2c2/trackiter.h"
8 #include "tool.h"
9
10 class ExtendTool: public Tool
11 {
12 private:
13         std::vector<R2C2::TrackIter> unlinked_endpoints;
14         std::vector<R2C2::Track *> extend_tracks;
15         bool accepted;
16
17 public:
18         ExtendTool(Designer &, Msp::Input::Mouse &, const std::set<R2C2::Object *> &);
19         virtual ~ExtendTool();
20
21         void connect();
22
23         virtual void button_press(unsigned);
24         virtual void axis_motion(unsigned, float, float);
25
26 private:
27         std::vector<R2C2::Track *> create_straight(const R2C2::Vector &, const R2C2::Angle &, float, float);
28
29 public:
30         virtual void update_selection(Selection &) const;
31 };
32
33 #endif