From 3a246308dcd76f70a1b6c3e6b08f0d597b255dba Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 30 Jul 2016 00:29:03 -0300 Subject: Adding the basics graphics elements The base is done, bus under contruction --- Project/Bus.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Project/Bus.h (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h new file mode 100644 index 0000000..5a63bec --- /dev/null +++ b/Project/Bus.h @@ -0,0 +1,18 @@ +#ifndef BUS_H +#define BUS_H + +#include "Element.h" + +class Bus : public Element +{ + public: + Bus(wxPoint2DDouble position); + ~Bus(); + virtual bool Contains(wxPoint2DDouble position) const; + virtual void Draw(wxPoint2DDouble translation, double scale) const; + virtual wxCursor GetBestPickboxCursor() const; + virtual void MovePickbox(wxPoint2DDouble position, int pickboxID); + virtual int PickboxContains(wxPoint2DDouble position) const; +}; + +#endif // BUS_H -- cgit From 78aac544e1e77f5405260797cee4b94d7a0dfe32 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Tue, 2 Aug 2016 17:34:42 -0300 Subject: Bus controllers under implementation Events handler removed --- Project/Bus.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h index 5a63bec..80bb206 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -10,6 +10,7 @@ class Bus : public Element ~Bus(); virtual bool Contains(wxPoint2DDouble position) const; virtual void Draw(wxPoint2DDouble translation, double scale) const; + virtual void Rotate(); virtual wxCursor GetBestPickboxCursor() const; virtual void MovePickbox(wxPoint2DDouble position, int pickboxID); virtual int PickboxContains(wxPoint2DDouble position) const; -- cgit From 0b720e578e0e91262e04651ce81cd2e7f6828967 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Wed, 3 Aug 2016 00:15:54 -0300 Subject: More controllers add to bus Next step: move elements --- Project/Bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h index 80bb206..6725fd7 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -12,8 +12,8 @@ class Bus : public Element virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual void Rotate(); virtual wxCursor GetBestPickboxCursor() const; - virtual void MovePickbox(wxPoint2DDouble position, int pickboxID); - virtual int PickboxContains(wxPoint2DDouble position) const; + virtual void MovePickbox(wxPoint2DDouble position); + virtual bool PickboxContains(wxPoint2DDouble position); }; #endif // BUS_H -- cgit From 46c9d3fe586fb5c8ac75384b62a79971f96a5b88 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Wed, 3 Aug 2016 17:43:25 -0300 Subject: Bus implemented, selection not working Selection to move fail --- Project/Bus.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h index 6725fd7..095a72d 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -6,11 +6,12 @@ class Bus : public Element { public: + Bus(); Bus(wxPoint2DDouble position); ~Bus(); virtual bool Contains(wxPoint2DDouble position) const; virtual void Draw(wxPoint2DDouble translation, double scale) const; - virtual void Rotate(); + virtual void Rotate(); virtual wxCursor GetBestPickboxCursor() const; virtual void MovePickbox(wxPoint2DDouble position); virtual bool PickboxContains(wxPoint2DDouble position); -- cgit From 139b076149594e6cf508aea269b061aa8b428d9c Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sun, 7 Aug 2016 21:36:40 -0300 Subject: Some minor fixes --- Project/Bus.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h index 095a72d..ccfc9d3 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -10,6 +10,7 @@ class Bus : public Element Bus(wxPoint2DDouble position); ~Bus(); virtual bool Contains(wxPoint2DDouble position) const; + virtual bool Intersects(wxRect2DDouble rect) const; virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual void Rotate(); virtual wxCursor GetBestPickboxCursor() const; -- cgit From b5324f48c855b0c82ccf6da7d5a008fe5cf1c17e Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Mon, 8 Aug 2016 17:01:53 -0300 Subject: Start Power Line implementation gogogogo --- Project/Bus.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h index ccfc9d3..ac271b7 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -9,8 +9,9 @@ class Bus : public Element Bus(); Bus(wxPoint2DDouble position); ~Bus(); + virtual void Insert(Element* parent, wxPoint2DDouble position = wxPoint2DDouble(0.0, 0.0)) { SetPosition(position); }; virtual bool Contains(wxPoint2DDouble position) const; - virtual bool Intersects(wxRect2DDouble rect) const; + virtual bool Intersects(wxRect2DDouble rect) const; virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual void Rotate(); virtual wxCursor GetBestPickboxCursor() const; -- cgit From 0a85e05fa7aa0e2b950c2c3bcec5d45f25b1c0e2 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Tue, 9 Aug 2016 17:45:09 -0300 Subject: Line under implementation --- Project/Bus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h index ac271b7..0c9d374 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -9,7 +9,7 @@ class Bus : public Element Bus(); Bus(wxPoint2DDouble position); ~Bus(); - virtual void Insert(Element* parent, wxPoint2DDouble position = wxPoint2DDouble(0.0, 0.0)) { SetPosition(position); }; + virtual bool AddParent(Element* parent, wxPoint2DDouble position) {return true;} virtual bool Contains(wxPoint2DDouble position) const; virtual bool Intersects(wxRect2DDouble rect) const; virtual void Draw(wxPoint2DDouble translation, double scale) const; -- cgit From 05525745c0b0d189484da3c45f95356d7558e2cf Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 18 Aug 2016 19:10:04 -0300 Subject: Line improvements, context menu implemented Line still under construction, contex menu base implemented --- Project/Bus.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Project/Bus.h') diff --git a/Project/Bus.h b/Project/Bus.h index 0c9d374..a7fa122 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -9,7 +9,7 @@ class Bus : public Element Bus(); Bus(wxPoint2DDouble position); ~Bus(); - virtual bool AddParent(Element* parent, wxPoint2DDouble position) {return true;} + virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return true; } virtual bool Contains(wxPoint2DDouble position) const; virtual bool Intersects(wxRect2DDouble rect) const; virtual void Draw(wxPoint2DDouble translation, double scale) const; @@ -17,6 +17,7 @@ class Bus : public Element virtual wxCursor GetBestPickboxCursor() const; virtual void MovePickbox(wxPoint2DDouble position); virtual bool PickboxContains(wxPoint2DDouble position); + virtual bool GetContextMenu(wxMenu& menu); }; #endif // BUS_H -- cgit