ScaleEnvPointsDlg.h 884 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * ScaleEnvPointsDlg.h
  3. * -------------------
  4. * Purpose: Dialog for scaling instrument envelope points on x and y axis.
  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 "CDecimalSupport.h"
  12. OPENMPT_NAMESPACE_BEGIN
  13. struct InstrumentEnvelope;
  14. class CScaleEnvPointsDlg : public CDialog
  15. {
  16. protected:
  17. CNumberEdit m_EditX, m_EditY, m_EditOffset;
  18. InstrumentEnvelope &m_Env;
  19. static double m_factorX, m_factorY, m_offsetY;
  20. int m_nCenter;
  21. public:
  22. CScaleEnvPointsDlg(CWnd* pParent, InstrumentEnvelope &env, int nCenter)
  23. : CDialog(IDD_SCALE_ENV_POINTS, pParent)
  24. , m_Env(env)
  25. , m_nCenter(nCenter)
  26. { }
  27. void Apply();
  28. protected:
  29. void OnOK() override;
  30. BOOL OnInitDialog() override;
  31. };
  32. OPENMPT_NAMESPACE_END