amuse/VST/VSTEditor.hpp

60 lines
1.3 KiB
C++
Raw Permalink Normal View History

2018-10-06 20:40:25 -07:00
#pragma once
2016-06-09 14:33:26 -07:00
2016-06-10 17:47:02 -07:00
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <commctrl.h>
#include "aeffeditor.h"
2016-06-09 14:33:26 -07:00
2018-12-07 21:20:09 -08:00
namespace amuse {
2016-06-09 14:33:26 -07:00
class VSTBackend;
/** Editor UI class */
2018-12-07 21:20:09 -08:00
class VSTEditor : public AEffEditor {
friend class VSTBackend;
friend class AudioGroupFilePresenter;
friend struct AudioGroupCollection;
2018-12-07 21:20:09 -08:00
VSTBackend& m_backend;
ERect m_windowRect = {0, 0, 420, 600};
2016-06-10 17:47:02 -07:00
2018-12-07 21:20:09 -08: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-10 17:47:02 -07:00
2018-12-07 21:20:09 -08:00
int m_selCollectionIdx = -1;
int m_selFileIdx = -1;
int m_selGroupIdx = -1;
int m_selPageIdx = -1;
int m_lastLParam = -1;
2018-12-07 21:20:09 -08:00
HTREEITEM m_deferredCollectionSel = 0;
2018-12-07 21:20:09 -08: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);
2018-12-07 21:20:09 -08:00
void _reselectColumns();
2016-07-13 21:54:46 -07:00
2016-06-09 14:33:26 -07:00
public:
2018-12-07 21:20:09 -08:00
VSTEditor(VSTBackend& backend);
bool getRect(ERect** rect);
bool open(void* ptr);
void close();
void update();
void addAction();
void removeAction();
void selectCollection(LPARAM idx);
void selectGroup(int idx);
void selectPage(int idx);
void reselectPage();
void selectNormalPage(int idx);
void selectDrumPage(int idx);
2016-06-09 14:33:26 -07:00
};
2018-12-07 21:20:09 -08:00
} // namespace amuse