Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.8 KiB

  1. //---------------------------------------------------------------------------
  2. // BorderFill.h - implements the drawing API for bgtype = BorderFill
  3. //---------------------------------------------------------------------------
  4. #pragma once
  5. //---------------------------------------------------------------------------
  6. #include "DrawBase.h"
  7. //---------------------------------------------------------------------------
  8. class CRenderObj; // forward
  9. class CSimpleFile; // forward
  10. //---------------------------------------------------------------------------
  11. // Note: draw objects like CBorderFill cannot have virtual methods
  12. // since they reside in the shared memory map file.
  13. //---------------------------------------------------------------------------
  14. class CBorderFill : public CDrawBase
  15. {
  16. public:
  17. //---- loader methods ----
  18. HRESULT PackProperties(CRenderObj *pRender, BOOL fNoDraw, int iPartId, int iStateId);
  19. static BOOL KeyProperty(int iPropId);
  20. void DumpProperties(CSimpleFile *pFile, BYTE *pbThemeData, BOOL fFullInfo);
  21. //---- drawing/measuring methods ----
  22. HRESULT DrawBackground(CRenderObj *pRender, HDC hdcOrig, const RECT *pRect,
  23. OPTIONAL const DTBGOPTS *pOptions);
  24. HRESULT GetBackgroundRegion(CRenderObj *pRender, OPTIONAL HDC hdc, const RECT *pRect,
  25. HRGN *pRegion);
  26. BOOL IsBackgroundPartiallyTransparent();
  27. HRESULT HitTestBackground(CRenderObj *pRender, OPTIONAL HDC hdc,
  28. DWORD dwHTFlags, const RECT *pRect, HRGN hrgn, POINT ptTest, OUT WORD *pwHitCode);
  29. HRESULT GetBackgroundContentRect(CRenderObj *pRender, OPTIONAL HDC hdc,
  30. const RECT *pBoundingRect, RECT *pContentRect);
  31. HRESULT GetBackgroundExtent(CRenderObj *pRender, OPTIONAL HDC hdc,
  32. const RECT *pContentRect, RECT *pExtentRect);
  33. HRESULT GetPartSize(HDC hdc, THEMESIZE eSize, SIZE *psz);
  34. //---- helper methods ----
  35. void GetContentMargins(CRenderObj *pRender, OPTIONAL HDC hdc, MARGINS *pMargins);
  36. HRESULT DrawComplexBackground(CRenderObj *pRender, HDC hdcOrig,
  37. const RECT *pRect, BOOL fGettingRegion, BOOL fBorder, BOOL fContent,
  38. OPTIONAL const RECT *pClipRect);
  39. public:
  40. //---- general ----
  41. BOOL _fNoDraw; // this is used for bgtype=none
  42. //---- border ----
  43. BORDERTYPE _eBorderType;
  44. COLORREF _crBorder;
  45. int _iBorderSize;
  46. int _iRoundCornerWidth;
  47. int _iRoundCornerHeight;
  48. //---- fill ----
  49. FILLTYPE _eFillType;
  50. COLORREF _crFill;
  51. int _iDibOffset;
  52. //---- margins ----
  53. MARGINS _ContentMargins;
  54. //---- gradients ----
  55. int _iGradientPartCount;
  56. COLORREF _crGradientColors[5];
  57. int _iGradientRatios[5];
  58. //---- id ----
  59. int _iSourcePartId;
  60. int _iSourceStateId;
  61. };
  62. //---------------------------------------------------------------------------