summaryrefslogtreecommitdiffstats
path: root/Project/Sum.h
diff options
context:
space:
mode:
Diffstat (limited to 'Project/Sum.h')
-rw-r--r--Project/Sum.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/Project/Sum.h b/Project/Sum.h
new file mode 100644
index 0000000..a99067e
--- /dev/null
+++ b/Project/Sum.h
@@ -0,0 +1,32 @@
+#ifndef SUM_H
+#define SUM_H
+
+#include "ControlElement.h"
+
+class SumForm;
+
+class Sum : public ControlElement
+{
+public:
+ enum Signal { SIGNAL_POSITIVE = 0, SIGNAL_NEGATIVE };
+ Sum(int id);
+ ~Sum();
+
+ virtual void Draw(wxPoint2DDouble translation, double scale) const;
+ virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
+ virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
+ virtual bool ShowForm(wxWindow* parent, Element* element);
+ virtual void Rotate(bool clockwise = true);
+
+ virtual std::vector<Signal> GetSignalList() const { return m_signalList; }
+ virtual void SetSignalList(std::vector<Signal> signalList) { m_signalList = signalList; }
+
+ virtual void UpdatePoints();
+ void AddInNode();
+ void RemoveInNode();
+
+protected:
+ std::vector<Signal> m_signalList;
+};
+
+#endif // SUM_H