ml_rating.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef NULLOSFT_MEDIALIBRARY_RATING_HEADER
  2. #define NULLOSFT_MEDIALIBRARY_RATING_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <windows.h>
  7. #include "./ml_imagelist.h"
  8. /// Rating_Draw Styles
  9. #define RDS_SHOWEMPTY_I 0x00000001 // Draw elements that not set.
  10. #define RDS_OPAQUE_I 0x00000002 // Fill rest of the rectangle with rgbBk.
  11. #define RDS_HOT_I 0x00000004 // Draw elements as "hot".
  12. #define RDS_LEFT_I 0x00000000 // Aligns elements to the left.
  13. #define RDS_TOP_I 0x00000000 // Justifies elements to the top of the rectangle.
  14. #define RDS_RIGHT_I 0x00000010 // Aligns elements to the right.
  15. #define RDS_BOTTOM_I 0x00000020 // Justifies elements to the bottom of the rectangle.
  16. #define RDS_HCENTER_I 0x00000040 // Centers elements horizontally in the rectangle.
  17. #define RDS_VCENTER_I 0x00000080 // Centers elements horizontally in the rectangle.
  18. #define RDS_INACTIVE_HOT_I 0x00000100 // Draw elements as "hot" when inactive
  19. #define RDS_NORMAL_I (RDS_SHOWEMPTY_I | RDS_OPAQUE_I | RDS_LEFT | RDS_TOP)
  20. // Rating_HitTest hitFlags
  21. #define RHT_NOWHERE_I 0x0001
  22. #define RHT_ONVALUE_I 0x0002
  23. #define RHT_ONVALUEABOVE_I 0x0004
  24. #define RHT_ONVALUEBELOW_I 0x0008
  25. #define RHT_TOLEFT_I 0x0100
  26. #define RHT_TORIGHT_I 0x0200
  27. // Draws Rating based on RATINGDRAWPARAMS
  28. BOOL MLRatingI_Draw(HDC hdc, INT maxValue, INT value, INT trackingVal, HMLIMGLST hmlil, INT index, RECT *prc, UINT fStyle);
  29. // HIWORD - hitFlags LOWORD - index if any
  30. LONG MLRatingI_HitTest(POINT pt, INT maxValue, HMLIMGLST hmlil, RECT *prc, UINT fStyle);
  31. BOOL MLRatingI_CalcMinRect(INT maxValue, HMLIMGLST hmlil, RECT *prc);
  32. #endif //NULLOSFT_MEDIALIBRARY_RATING_HEADER