1
0

PatternGotoDialog.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * PatternGotoDialog.h
  3. * -------------------
  4. * Purpose: Implementation of pattern "go to" dialog.
  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. OPENMPT_NAMESPACE_BEGIN
  12. class CSoundFile;
  13. // CPatternGotoDialog dialog
  14. class CPatternGotoDialog : public CDialog
  15. {
  16. CSoundFile &m_SndFile;
  17. CSpinButtonCtrl m_SpinRow, m_SpinChannel, m_SpinPattern, m_SpinOrder;
  18. public:
  19. ROWINDEX m_nRow;
  20. CHANNELINDEX m_nChannel;
  21. PATTERNINDEX m_nPattern;
  22. ORDERINDEX m_nOrder, m_nActiveOrder;
  23. public:
  24. CPatternGotoDialog(CWnd *pParent, ROWINDEX row, CHANNELINDEX chan, PATTERNINDEX pat, ORDERINDEX ord, CSoundFile &sndFile);
  25. BOOL OnInitDialog() override;
  26. protected:
  27. bool m_controlLock = true;
  28. inline bool ControlsLocked() const { return m_controlLock; }
  29. inline void LockControls() { m_controlLock = true; }
  30. inline void UnlockControls() { m_controlLock = false; }
  31. void UpdateNumRows();
  32. void UpdateTime();
  33. void DoDataExchange(CDataExchange* pDX) override;
  34. void OnOK() override;
  35. afx_msg void OnPatternChanged();
  36. afx_msg void OnOrderChanged();
  37. afx_msg void OnRowChanged();
  38. afx_msg void OnTimeChanged();
  39. DECLARE_MESSAGE_MAP()
  40. };
  41. OPENMPT_NAMESPACE_END