This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
editor.h
65 lines (60 loc) · 2.07 KB
/
editor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#ifndef H_EDITOR
#define H_EDITOR
class editor : public CDialogImpl<editor>, public instanceTrackerV2<editor>
{
vst* m_vst;
AEffect* m_effect;
dsp_preset_edit_callback & m_callback;
dsp_preset_impl m_initial;
bool m_edited;
bool m_prests_loaded;
CUpDownCtrl* m_updown;
CListBox* m_presets;
string8 m_dir;
HANDLE m_quithandle;
HHOOK m_hook;
DWORD m_threadid;
LRESULT on_timer(UINT, WPARAM wParam, LPARAM, BOOL&);
void on_command(UINT nID, CPoint lParam);
void on_key_down(UINT, UINT, UINT);
LRESULT deltapos(int wParam, LPNMHDR lParam, BOOL &bHandled);
LRESULT open_folder(int wParam, LPNMHDR lParam, BOOL &bHandled);
LRESULT outinfo(int wParam, LPNMHDR lParam, BOOL &bHandled);
BOOL on_init_dialog(CWindow, LPARAM);
void on_viewpresets(UINT, int, ATL::CWindow);
void on_bypass(UINT, int, ATL::CWindow);
void on_add(UINT, int, ATL::CWindow);
void on_delete(UINT, int, ATL::CWindow);
void on_listdblclick(UINT, int, ATL::CWindow);
BOOL on_close();
void on_destroy();
void save_config();
void update_lim_display(int val);
void load_presets();
static DWORD __stdcall watch_dir(void* p_arg);
static LRESULT __stdcall hook_proc(int p_ncode, WPARAM p_wp, LPARAM p_lp);
public:
enum { IDD = IDD_DSP };
editor(const dsp_preset&, const entry&, dsp_preset_edit_callback&, vst*);
~editor(void);
void resize_editor(int w, int h);
void preset_edited() { m_edited = true; }
BEGIN_MSG_MAP(editor)
MSG_WM_DESTROY(on_destroy)
MSG_WM_KEYDOWN(on_key_down)
MSG_WM_INITDIALOG(on_init_dialog)
MSG_WM_CLOSE(on_close)
MESSAGE_HANDLER(WM_TIMER, on_timer)
NOTIFY_HANDLER(IDC_OUTNSPIN, UDN_DELTAPOS, deltapos);
NOTIFY_HANDLER(IDC_OPENFOLDER, NM_CLICK, open_folder);
NOTIFY_HANDLER(IDC_OUTINFO, NM_CLICK, outinfo);
MSG_WM_SYSCOMMAND(on_command)
COMMAND_HANDLER_EX(IDC_VIEWPRESETS, BN_CLICKED, on_viewpresets)
COMMAND_HANDLER_EX(IDC_BTNADDPRESET, BN_CLICKED, on_add)
COMMAND_HANDLER_EX(IDC_BTNDELPRESETS2, BN_CLICKED, on_delete)
COMMAND_HANDLER_EX(IDC_BYPASS, BN_CLICKED, on_bypass)
COMMAND_HANDLER_EX(IDC_PRESETLIST, LBN_DBLCLK, on_listdblclick)
END_MSG_MAP()
};
#endif