OPLInstrDlg.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * OPLInstrDlg.h
  3. * -------------
  4. * Purpose: Editor for OPL-based synth instruments
  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. #include "../soundlib/Snd_defs.h"
  12. OPENMPT_NAMESPACE_BEGIN
  13. class CSoundFile;
  14. class OPLInstrDlg : public CDialog
  15. {
  16. CButton m_additive, m_sustain[2], m_scaleEnv[2], m_vibrato[2], m_tremolo[2];
  17. CSliderCtrl m_feedback, m_attackRate[2], m_decayRate[2], m_sustainLevel[2], m_releaseRate[2], m_volume[2], m_levelScaling[2], m_freqMultiplier[2];
  18. CComboBox m_waveform[2];
  19. CSize m_windowSize;
  20. CWnd &m_parent;
  21. const CSoundFile &m_sndFile;
  22. OPLPatch *m_patch;
  23. public:
  24. OPLInstrDlg(CWnd &parent, const CSoundFile &sndFile);
  25. ~OPLInstrDlg();
  26. void SetPatch(OPLPatch &patch);
  27. CSize GetMinimumSize() const { return m_windowSize; }
  28. protected:
  29. void ParamsChanged();
  30. void DoDataExchange(CDataExchange *pDX) override;
  31. BOOL OnInitDialog() override;
  32. BOOL PreTranslateMessage(MSG *pMsg) override;
  33. void OnOK() override { }
  34. void OnCancel() override { }
  35. void OnHScroll(UINT, UINT, CScrollBar *) { ParamsChanged(); }
  36. LRESULT OnDragonDropping(WPARAM wParam, LPARAM lParam);
  37. BOOL OnToolTip(UINT id, NMHDR *pNMHDR, LRESULT *pResult);
  38. DECLARE_MESSAGE_MAP()
  39. };
  40. OPENMPT_NAMESPACE_END