]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/tool.h
Also check if the clock is stopped
[r2c2.git] / source / designer / tool.h
index 137ac5c326e26fd767fd14decc604a26a0eeae65..48780ec48208045798f9c8201336eb336612a1a3 100644 (file)
@@ -4,6 +4,7 @@
 #include <string>
 #include <sigc++/signal.h>
 #include <sigc++/trackable.h>
+#include <msp/input/keyboard.h>
 #include <msp/input/mouse.h>
 #include "libr2c2/geometry.h"
 
@@ -20,11 +21,13 @@ protected:
        Designer &designer;
        R2C2::Vector pointer;
        R2C2::Vector ground_pointer;
+       bool shift_held;
+       bool ctrl_held;
        std::string status;
        bool done;
        bool accepted;
 
-       Tool(Designer &, Msp::Input::Mouse &);
+       Tool(Designer &, Msp::Input::Keyboard &, Msp::Input::Mouse &);
 public:
        virtual ~Tool() { }
 
@@ -36,7 +39,10 @@ public:
        bool is_done() const { return done; }
 
 protected:
+       virtual void key_press(unsigned);
+       virtual void key_release(unsigned);
        virtual void button_press(unsigned);
+       virtual void button_release(unsigned) { }
        virtual void axis_motion(unsigned, float, float);
        virtual void pointer_motion() { }
        virtual void finish() { }