X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Ftool.h;h=48780ec48208045798f9c8201336eb336612a1a3;hb=3907520897611cb1b5f2f938c60d3eaff34477a5;hp=137ac5c326e26fd767fd14decc604a26a0eeae65;hpb=0c0a16e5f0f41efddb6f3ff920e54a5a11e1841d;p=r2c2.git diff --git a/source/designer/tool.h b/source/designer/tool.h index 137ac5c..48780ec 100644 --- a/source/designer/tool.h +++ b/source/designer/tool.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #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() { }