aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vst/src/EditorThread.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-02-23 00:09:18 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-02-23 00:09:18 +0000
commitabcb79a75c9d5784f41260d25fdd0029641cb968 (patch)
tree3233eee9223dfc226b5d843ba134690c95fc1766 /externals/grill/vst/src/EditorThread.cpp
parent90009cca00b50cc88e0ef0a26728e19418cbd12f (diff)
""
svn path=/trunk/; revision=423
Diffstat (limited to 'externals/grill/vst/src/EditorThread.cpp')
-rw-r--r--externals/grill/vst/src/EditorThread.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/externals/grill/vst/src/EditorThread.cpp b/externals/grill/vst/src/EditorThread.cpp
new file mode 100644
index 00000000..1761542c
--- /dev/null
+++ b/externals/grill/vst/src/EditorThread.cpp
@@ -0,0 +1,61 @@
+// EditorThread.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "vst.h"
+#include "EditorThread.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CEditorThread
+
+IMPLEMENT_DYNCREATE(CEditorThread, CWinThread)
+
+CEditorThread::CEditorThread(): pop(NULL) {}
+
+CEditorThread::~CEditorThread() {}
+
+
+BOOL CEditorThread::InitInstance()
+{
+ SetThreadPriority(THREAD_PRIORITY_LOWEST);
+
+ m_pMainWnd = pop = new CPopupWindow;
+ pop->SetPlugin( plug); // window class, size etc. is set here!
+ return TRUE;
+}
+
+int CEditorThread::ExitInstance()
+{
+ // TODO: perform any per-thread cleanup here
+ return CWinThread::ExitInstance();
+}
+
+BEGIN_MESSAGE_MAP(CEditorThread, CWinThread)
+ //{{AFX_MSG_MAP(CEditorThread)
+ // NOTE - the ClassWizard will add and remove mapping macros here.
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CEditorThread message handlers
+
+void CEditorThread::SetPlugin(VSTPlugin *p)
+{
+ plug = p;
+}
+
+void CEditorThread::Close()
+{
+ if(pop) pop->SendMessage(WM_CLOSE);
+}
+
+void CEditorThread::Show(bool show)
+{
+ if(pop) pop->ShowWindow(show);
+} \ No newline at end of file