From b817a3f0e398c7e938ed1a37ebdbfc5a03eb7471 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 1 Sep 2016 18:23:35 -0300 Subject: generator under implementation --- Project/Generator.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Project/Generator.h (limited to 'Project/Generator.h') diff --git a/Project/Generator.h b/Project/Generator.h new file mode 100644 index 0000000..a22c37e --- /dev/null +++ b/Project/Generator.h @@ -0,0 +1,33 @@ +#ifndef GENERATOR_H +#define GENERATOR_H + +#include "Element.h" + +class Generator : public Element +{ + public: + Generator(); + ~Generator(); + virtual bool AddParent(Element* parent, wxPoint2DDouble position); + virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); } + virtual void Draw(wxPoint2DDouble translation, double scale) const; + virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); } + virtual void Move(wxPoint2DDouble position); + virtual void MoveNode(Element* element, wxPoint2DDouble position); + virtual void StartMove(wxPoint2DDouble position); + virtual void RotateNode(Element* parent); + virtual void RemoveParent(Element* parent); + virtual bool NodeContains(wxPoint2DDouble position); + virtual bool SetNodeParent(Element* parent); + virtual void UpdateNodes(); + virtual bool GetContextMenu(wxMenu& menu); + virtual void Rotate(); + + private: + bool m_inserted = false; + std::vector m_pointList; + void UpdateSwitchesPosition(); + std::vector m_movePts; +}; + +#endif // GENERATOR_H -- cgit