diff options
Diffstat (limited to 'ToolGrab.h')
-rw-r--r-- | ToolGrab.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/ToolGrab.h b/ToolGrab.h new file mode 100644 index 0000000..ec9f110 --- /dev/null +++ b/ToolGrab.h @@ -0,0 +1,59 @@ +#ifndef TOOLGRAB_H_ +#define TOOLGRAB_H_ + +#include "Tool.h" +#include "EditManager.h" +#include "SidebarView.h" + + +class ToolGrab : public Tool, public EventHandler { + private: + GtkWidget *image; + + EditManager *editManager; + + SidebarView sidebar; + + bool pressed; + Vertex grabbedVertex; + + // prevent shallow copy + ToolGrab(const ToolGrab &t); + const ToolGrab& operator=(const ToolGrab &t); + + public: + ToolGrab(EditManager *editManager); + virtual ~ToolGrab(); + + virtual void activate(); + + virtual const char *getType() const { + return "ToolGrab"; + } + + virtual const char *getName() const { + return "Grab"; + } + + virtual bool isSensitive() { + return TRUE; + } + + virtual GtkWidget *getImage() { + return image; + } + + virtual EventHandler* getEventHandler() { + return this; + } + + virtual bool buttonPress(unsigned int button); + virtual bool buttonRelease(unsigned int button); + virtual bool motion(); + + virtual Sidebar* getSidebar() { + return &sidebar; + } +}; + +#endif /*TOOLGRAB_H_*/ |