diff options
author | neoraider <devnull@localhost> | 2008-02-08 22:21:01 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-02-08 22:21:01 +0100 |
commit | acb1721e94a49a4941bb11dfc2f832c3848aa204 (patch) | |
tree | 6398053a11b46242974ae171d700418bd42c92b8 /ToolRotate.h | |
parent | a39525ca36e2c002332f914907f74061533c2b04 (diff) | |
download | zoomedit-acb1721e94a49a4941bb11dfc2f832c3848aa204.tar zoomedit-acb1721e94a49a4941bb11dfc2f832c3848aa204.zip |
zoomedit: Implemented Rotate tool; added simple gates.
Diffstat (limited to 'ToolRotate.h')
-rw-r--r-- | ToolRotate.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/ToolRotate.h b/ToolRotate.h new file mode 100644 index 0000000..419eb6a --- /dev/null +++ b/ToolRotate.h @@ -0,0 +1,56 @@ +#ifndef TOOLROTATE_H_ +#define TOOLROTATE_H_ + +#include "Tool.h" +#include "SidebarView.h" + +class ToolRotate : public Tool, EventHandler { + private: + GtkWidget *image; + + EditManager *editManager; + + SidebarView sidebar; + + bool pressed; + float angle; + + // prevent shallow copy + ToolRotate(const ToolRotate &t); + const ToolRotate& operator=(const ToolRotate &t); + public: + ToolRotate(EditManager *editManager); + virtual ~ToolRotate(); + + virtual void activate(); + + virtual const char *getType() const { + return "ToolRotate"; + } + + virtual const char *getName() const { + return "Rotate"; + } + + 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 /*TOOLROTATE_H_*/ |