]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/measure.h
Adapt event handlers to library changes
[r2c2.git] / source / designer / measure.h
index 69442d823984fdcbfe7ee3e21e9ce91a1043cd62..84b1c832ea21a646052b05c432e07cdeb0c3da5f 100644 (file)
@@ -2,10 +2,11 @@
 #define MEASURE_H_
 
 #include <sigc++/sigc++.h>
+#include <msp/gl/renderable.h>
 
 class Designer;
 
-class Measure
+class Measure: public Msp::GL::Renderable
 {
 private:
        enum State
@@ -28,6 +29,7 @@ private:
        float perp_dist;
        float adiff;
        State state;
+       Msp::GL::Mesh mesh;
 
 public:
        Measure(Designer &);
@@ -35,10 +37,11 @@ public:
        float get_perpendicular_distance() const { return perp_dist; }
        float get_angle_difference() const { return adiff; }
        void start();
-       void button_press(int, int, float, float, unsigned);
-       void pointer_motion(int, int, float, float);
-       void render();
+       void button_press(float, float, unsigned);
+       void pointer_motion(float, float);
+       virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
 private:
+       void update_mesh();
        void snap_to_tracks(R2C2::Vector &, float &);
 };