2016-06-09 21:33:26 +00:00
|
|
|
#ifndef __AMUSE_VSTEDITOR_HPP__
|
|
|
|
#define __AMUSE_VSTEDITOR_HPP__
|
|
|
|
|
2016-06-11 00:47:02 +00:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
|
|
|
#include <commctrl.h>
|
|
|
|
|
|
|
|
#include "aeffeditor.h"
|
2016-06-09 21:33:26 +00:00
|
|
|
|
|
|
|
namespace amuse
|
|
|
|
{
|
|
|
|
class VSTBackend;
|
|
|
|
|
|
|
|
/** Editor UI class */
|
|
|
|
class VSTEditor : public AEffEditor
|
|
|
|
{
|
2016-06-14 08:04:37 +00:00
|
|
|
friend class VSTBackend;
|
2016-06-12 04:52:40 +00:00
|
|
|
friend class AudioGroupFilePresenter;
|
2016-06-13 05:47:07 +00:00
|
|
|
friend struct AudioGroupCollection;
|
2016-06-12 04:52:40 +00:00
|
|
|
|
2016-06-09 21:33:26 +00:00
|
|
|
VSTBackend& m_backend;
|
2016-06-11 06:40:23 +00:00
|
|
|
ERect m_windowRect = {0, 0, 420, 600};
|
2016-06-11 00:47:02 +00:00
|
|
|
|
2016-06-14 08:04:37 +00:00
|
|
|
HWND m_rootView = 0;
|
|
|
|
HWND m_collectionTree = 0;
|
|
|
|
HWND m_collectionAdd = 0;
|
|
|
|
HWND m_collectionRemove = 0;
|
|
|
|
HWND m_groupListView = 0;
|
|
|
|
HWND m_pageListView = 0;
|
2016-06-11 00:47:02 +00:00
|
|
|
|
2016-06-14 01:54:24 +00:00
|
|
|
int m_selCollectionIdx = -1;
|
|
|
|
int m_selFileIdx = -1;
|
|
|
|
int m_selGroupIdx = -1;
|
|
|
|
int m_selPageIdx = -1;
|
2016-06-16 22:18:17 +00:00
|
|
|
int m_lastLParam = -1;
|
2016-06-14 01:54:24 +00:00
|
|
|
|
|
|
|
HTREEITEM m_deferredCollectionSel = 0;
|
|
|
|
|
2016-07-14 04:54:46 +00:00
|
|
|
static LRESULT CALLBACK WindowProc(_In_ HWND hwnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam);
|
|
|
|
static LRESULT CALLBACK ColHeaderWindowProc(_In_ HWND hwnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam);
|
2016-06-14 01:54:24 +00:00
|
|
|
|
|
|
|
void _reselectColumns();
|
2016-07-14 04:54:46 +00:00
|
|
|
|
2016-06-09 21:33:26 +00:00
|
|
|
public:
|
|
|
|
VSTEditor(VSTBackend& backend);
|
|
|
|
|
|
|
|
bool getRect(ERect** rect);
|
|
|
|
bool open(void* ptr);
|
2016-06-11 00:47:02 +00:00
|
|
|
void close();
|
|
|
|
void update();
|
|
|
|
|
2016-06-12 04:52:40 +00:00
|
|
|
void addAction();
|
|
|
|
void removeAction();
|
|
|
|
|
2016-06-14 01:54:24 +00:00
|
|
|
void selectCollection(LPARAM idx);
|
2016-06-11 00:47:02 +00:00
|
|
|
void selectGroup(int idx);
|
2016-06-14 08:04:37 +00:00
|
|
|
void selectPage(int idx);
|
2016-06-16 22:18:17 +00:00
|
|
|
void reselectPage();
|
2016-06-14 01:54:24 +00:00
|
|
|
void selectNormalPage(int idx);
|
|
|
|
void selectDrumPage(int idx);
|
2016-06-09 21:33:26 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __AMUSE_VSTEDITOR_HPP__
|