summaryrefslogtreecommitdiffstats
path: root/Project/Limiter.h
diff options
context:
space:
mode:
Diffstat (limited to 'Project/Limiter.h')
-rw-r--r--Project/Limiter.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Project/Limiter.h b/Project/Limiter.h
new file mode 100644
index 0000000..f79cd43
--- /dev/null
+++ b/Project/Limiter.h
@@ -0,0 +1,33 @@
+#ifndef LIMITER_H
+#define LIMITER_H
+
+#include "ControlElement.h"
+
+class LimiterForm;
+
+class Limiter : public ControlElement
+{
+public:
+ Limiter();
+ ~Limiter();
+
+ 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 void UpdatePoints();
+
+ double GetUpLimit() const { return m_upLimit; }
+ double GetLowLimit() const { return m_lowLimit; }
+
+ void SetUpLimit(double upLimit) { m_upLimit = upLimit; }
+ void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; }
+
+protected:
+ double m_upLimit = 5.0;
+ double m_lowLimit = -5.0;
+};
+
+#endif // LIMITER_H