MIDIMappingDialog.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * MIDIMappingDialog.h
  3. * -------------------
  4. * Purpose: Implementation of OpenMPT's MIDI mapping dialog, for mapping incoming MIDI messages to plugin parameters.
  5. * Notes : (currently none)
  6. * Authors: OpenMPT Devs
  7. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  8. */
  9. #pragma once
  10. #include "openmpt/all/BuildSettings.hpp"
  11. #ifndef NO_PLUGINS
  12. #include "MIDIMapping.h"
  13. #include "CListCtrl.h"
  14. OPENMPT_NAMESPACE_BEGIN
  15. class CSoundFile;
  16. class CMIDIMapper;
  17. class CMIDIMappingDialog : public CDialog
  18. {
  19. public:
  20. CMIDIMappingDirective m_Setting;
  21. protected:
  22. CSoundFile &m_sndFile;
  23. CMIDIMapper &m_rMIDIMapper;
  24. HWND oldMIDIRecondWnd;
  25. // Dialog Data
  26. CComboBox m_ControllerCBox;
  27. CComboBox m_PluginCBox;
  28. CComboBox m_PlugParamCBox;
  29. CComboBox m_ChannelCBox;
  30. CComboBox m_EventCBox;
  31. CListCtrlEx m_List;
  32. CSpinButtonCtrl m_SpinMoveMapping;
  33. uint8 m_lastCC = uint8_max;
  34. public:
  35. CMIDIMappingDialog(CWnd *pParent, CSoundFile &rSndfile);
  36. ~CMIDIMappingDialog();
  37. protected:
  38. void UpdateDialog(int selItem = -1);
  39. void UpdateEvent();
  40. void UpdateParameters();
  41. int InsertItem(const CMIDIMappingDirective &m, int insertAt);
  42. void SelectItem(int i);
  43. void SetModified();
  44. BOOL OnInitDialog() override;
  45. void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support
  46. DECLARE_MESSAGE_MAP()
  47. afx_msg void OnSelectionChanged(NMHDR *pNMHDR = nullptr, LRESULT *pResult = nullptr);
  48. afx_msg BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult);
  49. afx_msg void OnBnClickedCheckactive();
  50. afx_msg void OnBnClickedCheckCapture();
  51. afx_msg void OnCbnSelchangeComboController();
  52. afx_msg void OnCbnSelchangeComboChannel();
  53. afx_msg void OnCbnSelchangeComboPlugin();
  54. afx_msg void OnCbnSelchangeComboParam();
  55. afx_msg void OnCbnSelchangeComboEvent();
  56. afx_msg void OnBnClickedButtonAdd();
  57. afx_msg void OnBnClickedButtonReplace();
  58. afx_msg void OnBnClickedButtonRemove();
  59. afx_msg LRESULT OnMidiMsg(WPARAM, LPARAM);
  60. afx_msg void OnDeltaposSpinmovemapping(NMHDR *pNMHDR, LRESULT *pResult);
  61. afx_msg void OnBnClickedCheckPatRecord();
  62. };
  63. OPENMPT_NAMESPACE_END
  64. #endif // NO_PLUGINS