toolbarRating.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef NULLSOFT_WINAMP_OMBROWSER_TOOLBAR_RATING_HEADER
  2. #define NULLSOFT_WINAMP_OMBROWSER_TOOLBAR_RATING_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./toolbarItem.h"
  7. class ifc_skinnedrating;
  8. class ToolbarRating : public ToolbarItem
  9. {
  10. protected:
  11. ToolbarRating(LPCSTR pszName, UINT nStyle, LPCWSTR pszText, LPCWSTR pszDescription);
  12. ~ToolbarRating();
  13. public:
  14. static ToolbarItem* CALLBACK CreateInstance(ToolbarItem::Template *itemTemplate);
  15. public:
  16. BOOL AdjustRect(HWND hToolbar, RECT *proposedRect);
  17. BOOL Paint(HWND hToolbar, HDC hdc, const RECT *paintRect, UINT state);
  18. void MouseMove(HWND hToolbar, UINT mouseFlags, POINT pt);
  19. void MouseLeave(HWND hToolbar);
  20. void LButtonDown(HWND hToolbar, UINT mouseFlags, POINT pt);
  21. void LButtonUp(HWND hToolbar, UINT mouseFlags, POINT pt);
  22. void Click(HWND hToolbar, UINT mouseFlags, POINT pt);
  23. void UpdateSkin(HWND hToolbar);
  24. BOOL PtInItem(POINT pt);
  25. INT GetTip(LPTSTR pszBuffer, INT cchBufferMax);
  26. BOOL FillMenuInfo(HWND hToolbar, MENUITEMINFO *pmii, LPWSTR pszBuffer, INT cchBufferMax);
  27. BOOL SetValueInt(HWND hToolbar, INT value);
  28. void SetFocus(HWND hToolbar, ToolbarItem *focusItem, BOOL fSet);
  29. BOOL KeyDown(HWND hToolbar, INT vKey, UINT flags);
  30. BOOL KeyUp(HWND hToolbar, INT vKey, UINT flags);
  31. protected:
  32. void SendRating(HWND hToolbar, INT ratingValue);
  33. protected:
  34. BYTE rating;
  35. BYTE highlighted;
  36. BYTE focused;
  37. RECT ratingRect;
  38. RECT textRect;
  39. INT baseLine;
  40. ifc_skinnedrating *skinnedRating;
  41. };
  42. #endif //NULLSOFT_WINAMP_OMBROWSER_TOOLBAR_RATING_HEADER