UpdateToolTip.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * UpdateToolTip.h
  3. * ---------------
  4. * Purpose: Implementation of the update tooltip in the main toolbar.
  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 UpdateToolTip : public CToolTipCtrl
  13. {
  14. public:
  15. enum class PopAction
  16. {
  17. Undetermined,
  18. CloseButton,
  19. ClickLink,
  20. ClickBubble,
  21. };
  22. protected:
  23. CString m_infoURL;
  24. PopAction m_popAction = PopAction::Undetermined;
  25. public:
  26. bool ShowUpdate(CWnd &parent, const CString &newVersion, const CString &infoURL, const CRect rectClient, const CPoint ptScreen, const int buttonID);
  27. protected:
  28. void SetResult(PopAction action);
  29. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  30. afx_msg void OnPop(NMHDR *pNMHDR, LRESULT *pResult);
  31. afx_msg void OnShow(NMHDR *pNMHDR, LRESULT *pResult);
  32. afx_msg void OnLinkClick(NMHDR *pNMHDR, LRESULT *pResult);
  33. DECLARE_MESSAGE_MAP()
  34. };
  35. OPENMPT_NAMESPACE_END