This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
neofx-zoomedit/ToolGrab.h

64 lines
1.3 KiB
C
Raw Normal View History

2008-01-13 16:41:01 +00:00
#ifndef TOOLGRAB_H_
#define TOOLGRAB_H_
#include "Tool.h"
#include "EditManager.h"
#include "SidebarView.h"
class ToolGrab : public Tool, private EventHandler {
2008-01-13 16:41:01 +00:00
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 bool hoverFilter(const LevelObject &object) const {
return object.canMove();
}
2008-01-13 16:41:01 +00:00
virtual EventHandler* getEventHandler() {
return this;
}
2008-02-15 22:44:03 +00:00
virtual bool buttonPress(unsigned int button, const Vertex *v);
virtual bool buttonRelease(unsigned int button, const Vertex *v);
virtual bool motion(const Vertex *v);
2008-01-13 16:41:01 +00:00
virtual Sidebar* getSidebar() {
return &sidebar;
}
};
#endif /*TOOLGRAB_H_*/