Ctrl_com.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Ctrl_com.h
  3. * ----------
  4. * Purpose: Song comments tab, upper panel.
  5. * Notes : (currently none)
  6. * Authors: Olivier Lapicque
  7. * OpenMPT Devs
  8. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  9. */
  10. #pragma once
  11. #include "openmpt/all/BuildSettings.hpp"
  12. OPENMPT_NAMESPACE_BEGIN
  13. class CCtrlComments final : public CModControlDlg
  14. {
  15. protected:
  16. CEdit m_EditComments;
  17. int charWidth = 0;
  18. bool m_Reformatting = false;
  19. public:
  20. CCtrlComments(CModControlView &parent, CModDoc &document);
  21. //{{AFX_VIRTUAL(CCtrlComments)
  22. Setting<LONG> &GetSplitPosRef() override { return TrackerSettings::Instance().glCommentsWindowHeight; }
  23. BOOL OnInitDialog() override;
  24. void DoDataExchange(CDataExchange *pDX) override; // DDX/DDV support
  25. void RecalcLayout() override;
  26. void UpdateView(UpdateHint hint, CObject *pObj = nullptr) override;
  27. CRuntimeClass *GetAssociatedViewClass() override;
  28. void OnActivatePage(LPARAM) override;
  29. void OnDeactivatePage() override;
  30. BOOL PreTranslateMessage(MSG *pMsg) override;
  31. //}}AFX_VIRTUAL
  32. protected:
  33. //{{AFX_MSG(CCtrlComments)
  34. afx_msg void OnCommentsUpdated();
  35. afx_msg void OnCommentsChanged();
  36. //}}AFX_MSG
  37. DECLARE_MESSAGE_MAP()
  38. };
  39. OPENMPT_NAMESPACE_END