tuningRatioMapWnd.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * tuningRatioMapWnd.h
  3. * -------------------
  4. * Purpose: Alternative sample tuning configuration dialog - ratio map edit control.
  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/tuning.h"
  12. OPENMPT_NAMESPACE_BEGIN
  13. class CTuningDialog;
  14. using NOTEINDEXTYPE = Tuning::NOTEINDEXTYPE;
  15. //Copied from CNoteMapWnd.
  16. class CTuningRatioMapWnd: public CStatic
  17. {
  18. friend class CTuningDialog;
  19. protected:
  20. const CTuning* m_pTuning = nullptr;
  21. CTuningDialog* m_pParent = nullptr;
  22. int m_cxFont = 0, m_cyFont = 0;
  23. NOTEINDEXTYPE m_nNote = NOTE_MIDDLEC;
  24. NOTEINDEXTYPE m_nNoteCentre = NOTE_MIDDLEC;
  25. public:
  26. void Init(CTuningDialog* const pParent, CTuning* const tuning);
  27. NOTEINDEXTYPE GetShownCentre() const;
  28. protected:
  29. afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
  30. afx_msg void OnLButtonDown(UINT, CPoint);
  31. afx_msg void OnLButtonUp(UINT, CPoint);
  32. afx_msg void OnSetFocus(CWnd *pOldWnd);
  33. afx_msg void OnKillFocus(CWnd *pNewWnd);
  34. afx_msg void OnPaint();
  35. DECLARE_MESSAGE_MAP()
  36. };
  37. OPENMPT_NAMESPACE_END