summaryrefslogtreecommitdiffstats
path: root/Project/Line.h
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-08-19 09:20:19 -0300
committerGitHub <noreply@github.com>2016-08-19 09:20:19 -0300
commitae95a3dbc230e2fc1e2e02e0ee920dc908f3ef2f (patch)
treee05100d4711e4050985e3d550bf9053a3c22942f /Project/Line.h
parentb23b552bac7a5c5a5e934ab3181180877bf93a72 (diff)
parent05525745c0b0d189484da3c45f95356d7558e2cf (diff)
downloadPSP.git-ae95a3dbc230e2fc1e2e02e0ee920dc908f3ef2f.tar.gz
PSP.git-ae95a3dbc230e2fc1e2e02e0ee920dc908f3ef2f.tar.xz
PSP.git-ae95a3dbc230e2fc1e2e02e0ee920dc908f3ef2f.zip
Merge pull request #1 from Thales1330/wip/svnprob
Wip/svnprob
Diffstat (limited to 'Project/Line.h')
-rw-r--r--Project/Line.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/Project/Line.h b/Project/Line.h
new file mode 100644
index 0000000..08a2b36
--- /dev/null
+++ b/Project/Line.h
@@ -0,0 +1,36 @@
+#ifndef LINE_H
+#define LINE_H
+
+#include <wx/msgdlg.h>
+
+#include "Element.h"
+
+class Line : public Element
+{
+ public:
+ Line();
+ ~Line();
+ 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 RotateNode(Element* parent);
+ virtual void AddPoint(wxPoint2DDouble point);
+ virtual bool GetContextMenu(wxMenu& menu);
+
+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