]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/tool.h
Give tools access to the keyboard
[r2c2.git] / source / designer / tool.h
index 137ac5c326e26fd767fd14decc604a26a0eeae65..3119bc0327ce715dedf00f76bbcbc399e9b6213d 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,6 +39,8 @@ 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 axis_motion(unsigned, float, float);
        virtual void pointer_motion() { }