summaryrefslogtreecommitdiffstats
path: root/Project/ControlEditorBase.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2017-01-24 18:25:17 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2017-01-24 18:25:17 -0200
commitbdb0625280d827ba7333b6fc9d6c6534e0720100 (patch)
tree6511dd5568556115db2affce10696efb7ff62c8f /Project/ControlEditorBase.cpp
parent56b93d40596cc6e39930faad0f6fdf347275ee49 (diff)
downloadPSP.git-bdb0625280d827ba7333b6fc9d6c6534e0720100.tar.gz
PSP.git-bdb0625280d827ba7333b6fc9d6c6534e0720100.tar.xz
PSP.git-bdb0625280d827ba7333b6fc9d6c6534e0720100.zip
Control editor implementation start
Diffstat (limited to 'Project/ControlEditorBase.cpp')
-rw-r--r--Project/ControlEditorBase.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Project/ControlEditorBase.cpp b/Project/ControlEditorBase.cpp
index 440069e..bc0a1aa 100644
--- a/Project/ControlEditorBase.cpp
+++ b/Project/ControlEditorBase.cpp
@@ -96,10 +96,27 @@ ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxSt
wxPersistenceManager::Get().Restore(this);
}
#endif
+ // Connect events
+ m_glCanvas->Connect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);
+ m_glCanvas->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditorBase::OnLeftClickDown), NULL, this);
+ m_glCanvas->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(ControlEditorBase::OnLeftClickUp), NULL, this);
+ m_glCanvas->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ControlEditorBase::OnDoubleClick), NULL, this);
+ m_glCanvas->Connect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(ControlEditorBase::OnMiddleDown), NULL, this);
+ m_glCanvas->Connect(wxEVT_MIDDLE_UP, wxMouseEventHandler(ControlEditorBase::OnMiddleUp), NULL, this);
+ m_glCanvas->Connect(wxEVT_MOTION, wxMouseEventHandler(ControlEditorBase::OnMouseMotion), NULL, this);
+
}
ControlEditorBase::~ControlEditorBase()
{
+ m_glCanvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditorBase::OnLeftClickDown), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(ControlEditorBase::OnLeftClickUp), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ControlEditorBase::OnDoubleClick), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(ControlEditorBase::OnMiddleDown), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_MIDDLE_UP, wxMouseEventHandler(ControlEditorBase::OnMiddleUp), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_MOTION, wxMouseEventHandler(ControlEditorBase::OnMouseMotion), NULL, this);
+
m_auimgr->UnInit();
delete m_auimgr;