summaryrefslogtreecommitdiffstats
path: root/Project/Shunt.h
blob: 2d74984852d5a8abf5a766746a89f1744ccf4e93 (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
#ifndef SHUNT_H
#define SHUNT_H

#include "Element.h"

class Shunt : public Element
{
public:
	Shunt();
	~Shunt();
	
    virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
    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();

   protected:
    void UpdateSwitchesPosition();
    bool m_inserted = false;
    std::vector<wxPoint2DDouble> m_pointList;
    std::vector<wxPoint2DDouble> m_movePts;

};

#endif // SHUNT_H