#ifndef EXTENDTOOL_H_
#define EXTENDTOOL_H_
+#include <map>
#include <set>
#include <vector>
#include "libr2c2/object.h"
class ExtendTool: public Tool
{
private:
+ std::map<float, const R2C2::TrackType *> types_by_length;
+ unsigned max_preference;
std::vector<R2C2::TrackIter> unlinked_endpoints;
std::vector<R2C2::Track *> extend_tracks;
- bool accepted;
public:
- ExtendTool(Designer &, Msp::Input::Mouse &, const std::set<R2C2::Object *> &);
+ ExtendTool(Designer &, Msp::Input::Keyboard &, Msp::Input::Mouse &, const std::set<R2C2::Object *> &);
virtual ~ExtendTool();
void connect();
- virtual void button_press(unsigned);
- virtual void axis_motion(unsigned, float, float);
-
private:
+ virtual void pointer_motion();
+ virtual void finish();
+
std::vector<R2C2::Track *> create_straight(const R2C2::Vector &, const R2C2::Angle &, float, float);
public: