1
0

ExternalSamples.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * ExternalSamples.h
  3. * -----------------
  4. * Purpose: Dialogs for locating missing external samples and handling modified samples
  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 "ResizableDialog.h"
  12. #include "CListCtrl.h"
  13. OPENMPT_NAMESPACE_BEGIN
  14. class CModDoc;
  15. class CSoundFile;
  16. class MissingExternalSamplesDlg : public ResizableDialog
  17. {
  18. protected:
  19. CModDoc &m_modDoc;
  20. CSoundFile &m_sndFile;
  21. CListCtrlEx m_List;
  22. bool m_isScanning = false;
  23. public:
  24. MissingExternalSamplesDlg(CModDoc &modDoc, CWnd *parent);
  25. protected:
  26. void GenerateList();
  27. bool SetSample(SAMPLEINDEX smp, const mpt::PathString &fileName);
  28. void DoDataExchange(CDataExchange *pDX) override;
  29. BOOL OnInitDialog() override;
  30. afx_msg void OnSetPath(NMHDR *, LRESULT *);
  31. afx_msg void OnScanFolder();
  32. DECLARE_MESSAGE_MAP()
  33. };
  34. class ModifiedExternalSamplesDlg : public ResizableDialog
  35. {
  36. protected:
  37. CModDoc &m_modDoc;
  38. CSoundFile &m_sndFile;
  39. CListCtrlEx m_List;
  40. public:
  41. ModifiedExternalSamplesDlg(CModDoc &modDoc, CWnd *parent);
  42. protected:
  43. void GenerateList();
  44. void Execute(bool doSave);
  45. void DoDataExchange(CDataExchange *pDX) override;
  46. BOOL OnInitDialog() override;
  47. void OnOK() override { Execute(false); }
  48. afx_msg void OnSaveSelected() { Execute(true); }
  49. afx_msg void OnCheckAll();
  50. afx_msg void OnSelectionChanged(NMHDR *pNMHDR, LRESULT *pResult);
  51. DECLARE_MESSAGE_MAP()
  52. };
  53. OPENMPT_NAMESPACE_END