diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2016-08-02 01:01:20 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2016-08-02 01:01:20 -0300 |
commit | 0ac91e091e52cae5745b14d62f77f905e559cf92 (patch) | |
tree | 918ebb487422cb5b34b0076fff3f976968bd6e9d /Project/Workspace.h | |
parent | 5e0be3d0a505781c31b3d23450fd92d4cc7b7ce7 (diff) | |
download | PSP.git-0ac91e091e52cae5745b14d62f77f905e559cf92.tar.gz PSP.git-0ac91e091e52cae5745b14d62f77f905e559cf92.tar.xz PSP.git-0ac91e091e52cae5745b14d62f77f905e559cf92.zip |
Cycle dependence fixed.
Next step: remove mouse handler
Diffstat (limited to 'Project/Workspace.h')
-rw-r--r-- | Project/Workspace.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Project/Workspace.h b/Project/Workspace.h index ca4245f..ef837fb 100644 --- a/Project/Workspace.h +++ b/Project/Workspace.h @@ -6,11 +6,14 @@ #include <wx/dcclient.h> #include <wx/msgdlg.h> +#include "WorkspaceBase.h" + class MouseEventsHandler; +class Element; +class Bus; -#include "WorkspaceBase.h" //#include "MouseEventsHandler.h" -#include "Bus.h" +//#include "Bus.h" class Camera; @@ -18,7 +21,7 @@ class Workspace : public WorkspaceBase { protected: virtual void OnMouseMotion(wxMouseEvent& event); - virtual void OnKeyDown(wxKeyEvent& event) = 0; + virtual void OnKeyDown(wxKeyEvent& event) { event.Skip(); }; virtual void OnLeftClickDown(wxMouseEvent& event); virtual void OnPaint(wxPaintEvent& event); @@ -33,18 +36,19 @@ class Workspace : public WorkspaceBase std::vector<Element*> m_elementList; public: + Workspace(); Workspace(wxWindow* parent, wxString name = wxEmptyString); ~Workspace(); MouseEventsHandler* m_mouseEventsHandler; - Camera* m_camera; + Camera* m_camera; // why public? wxString GetName() const { return m_name; } void SetName(wxString name) { m_name = name; } - void SetDragMode(bool dragMode) { this->m_dragMode = dragMode; } - void SetInsertMode(bool insertMode) { this->m_insertMode = insertMode; } + void SetDragMode(bool dragMode = true) { this->m_dragMode = dragMode; } + void SetInsertMode(bool insertMode = true) { this->m_insertMode = insertMode; } bool IsDragMode() const { return m_dragMode; } - const std::vector<Element*>& GetElementList() const { return m_elementList; } + std::vector<Element*> GetElementList() { return m_elementList; } bool IsInsertMode() const { return m_insertMode; } void Redraw() { this->Refresh(); } }; |