diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-08-18 19:10:04 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-08-18 19:10:04 -0300 |
commit | 05525745c0b0d189484da3c45f95356d7558e2cf (patch) | |
tree | e05100d4711e4050985e3d550bf9053a3c22942f /Project/Line.h | |
parent | e58cec073cbd982246898c733ae21b9f2b92b2b7 (diff) | |
download | PSP.git-05525745c0b0d189484da3c45f95356d7558e2cf.tar.gz PSP.git-05525745c0b0d189484da3c45f95356d7558e2cf.tar.xz PSP.git-05525745c0b0d189484da3c45f95356d7558e2cf.zip |
Line improvements, context menu implemented
Line still under construction, contex menu base implemented
Diffstat (limited to 'Project/Line.h')
-rw-r--r-- | Project/Line.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Project/Line.h b/Project/Line.h index 6717783..08a2b36 100644 --- a/Project/Line.h +++ b/Project/Line.h @@ -13,18 +13,24 @@ class Line : public Element virtual bool Contains(wxPoint2DDouble position) const; virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual void Move(wxPoint2DDouble position) {} + virtual void StartMove(wxPoint2DDouble position); virtual void MoveNode(Element* parent, wxPoint2DDouble position); virtual wxCursor GetBestPickboxCursor() const; virtual bool AddParent(Element* parent, wxPoint2DDouble position); virtual bool Intersects(wxRect2DDouble rect) const; virtual void MovePickbox(wxPoint2DDouble position); virtual bool PickboxContains(wxPoint2DDouble position); - virtual void Rotate(); + virtual void Rotate() {} + virtual void RotateNode(Element* parent); virtual void AddPoint(wxPoint2DDouble point); + virtual bool GetContextMenu(wxMenu& menu); - protected: +protected: + void UpdateSwitchesPosition(); + double PointToLineDistance(wxPoint2DDouble point) const; std::vector<wxPoint2DDouble> m_pointList; bool m_inserted = false; + std::vector<wxPoint2DDouble> m_movePts; }; #endif // LINE_H |