summaryrefslogtreecommitdiffstats
path: root/Project/Limiter.h
blob: f79cd43785c52d03fbb8857bcedb90b2103aa43c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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