From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- .../openmpt-trunk/mptrack/MIDIMappingDialog.h | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 Src/external_dependencies/openmpt-trunk/mptrack/MIDIMappingDialog.h (limited to 'Src/external_dependencies/openmpt-trunk/mptrack/MIDIMappingDialog.h') diff --git a/Src/external_dependencies/openmpt-trunk/mptrack/MIDIMappingDialog.h b/Src/external_dependencies/openmpt-trunk/mptrack/MIDIMappingDialog.h new file mode 100644 index 00000000..d7a74934 --- /dev/null +++ b/Src/external_dependencies/openmpt-trunk/mptrack/MIDIMappingDialog.h @@ -0,0 +1,85 @@ +/* + * MIDIMappingDialog.h + * ------------------- + * Purpose: Implementation of OpenMPT's MIDI mapping dialog, for mapping incoming MIDI messages to plugin parameters. + * Notes : (currently none) + * Authors: OpenMPT Devs + * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. + */ + + +#pragma once + +#include "openmpt/all/BuildSettings.hpp" + +#ifndef NO_PLUGINS + +#include "MIDIMapping.h" +#include "CListCtrl.h" + + +OPENMPT_NAMESPACE_BEGIN + +class CSoundFile; +class CMIDIMapper; + +class CMIDIMappingDialog : public CDialog +{ +public: + CMIDIMappingDirective m_Setting; + +protected: + CSoundFile &m_sndFile; + CMIDIMapper &m_rMIDIMapper; + HWND oldMIDIRecondWnd; + + // Dialog Data + CComboBox m_ControllerCBox; + CComboBox m_PluginCBox; + CComboBox m_PlugParamCBox; + CComboBox m_ChannelCBox; + CComboBox m_EventCBox; + CListCtrlEx m_List; + CSpinButtonCtrl m_SpinMoveMapping; + + uint8 m_lastCC = uint8_max; + +public: + CMIDIMappingDialog(CWnd *pParent, CSoundFile &rSndfile); + ~CMIDIMappingDialog(); + +protected: + void UpdateDialog(int selItem = -1); + void UpdateEvent(); + void UpdateParameters(); + int InsertItem(const CMIDIMappingDirective &m, int insertAt); + void SelectItem(int i); + + void SetModified(); + + BOOL OnInitDialog() override; + void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support + + DECLARE_MESSAGE_MAP() + + afx_msg void OnSelectionChanged(NMHDR *pNMHDR = nullptr, LRESULT *pResult = nullptr); + afx_msg BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult); + + afx_msg void OnBnClickedCheckactive(); + afx_msg void OnBnClickedCheckCapture(); + afx_msg void OnCbnSelchangeComboController(); + afx_msg void OnCbnSelchangeComboChannel(); + afx_msg void OnCbnSelchangeComboPlugin(); + afx_msg void OnCbnSelchangeComboParam(); + afx_msg void OnCbnSelchangeComboEvent(); + afx_msg void OnBnClickedButtonAdd(); + afx_msg void OnBnClickedButtonReplace(); + afx_msg void OnBnClickedButtonRemove(); + afx_msg LRESULT OnMidiMsg(WPARAM, LPARAM); + afx_msg void OnDeltaposSpinmovemapping(NMHDR *pNMHDR, LRESULT *pResult); + afx_msg void OnBnClickedCheckPatRecord(); +}; + +OPENMPT_NAMESPACE_END + +#endif // NO_PLUGINS -- cgit