Leaked source code of windows server 2003
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.

64 lines
2.3 KiB

  1. //---------------------------------------------------------------------------
  2. // TextDraw.h - implements the drawing API for text
  3. //---------------------------------------------------------------------------
  4. #pragma once
  5. //---------------------------------------------------------------------------
  6. #include "wrapper.h"
  7. //---------------------------------------------------------------------------
  8. class CRenderObj; // forward
  9. //---------------------------------------------------------------------------
  10. // Note: draw objects like CBorderFill cannot have virtual methods
  11. // since they reside in the shared memory map file.
  12. //---------------------------------------------------------------------------
  13. class CTextDraw
  14. {
  15. public:
  16. //---- methods ----
  17. HRESULT PackProperties(CRenderObj *pRender, int iPartId, int iStateId);
  18. static BOOL KeyProperty(int iPropId);
  19. void DumpProperties(CSimpleFile *pFile, BYTE *pbThemeData, BOOL fFullInfo);
  20. HRESULT DrawText(CRenderObj *pRender, HDC hdc, int iPartId, int iStateId, LPCWSTR _pszText,
  21. DWORD dwCharCount, DWORD dwTextFlags, const RECT *pRect, const DTTOPTS *pOptions);
  22. HRESULT DrawEdge(CRenderObj *pRender, HDC hdc, int iPartId, int iStateId, const RECT *pDestRect,
  23. UINT uEdge, UINT uFlags, OUT RECT *pContentRect);
  24. HRESULT GetTextExtent(CRenderObj *pRender, HDC hdc, int iPartId, int iStateId, LPCWSTR _pszText,
  25. int iCharCount, DWORD dwTextFlags, const RECT *pBoundingRect, RECT *pExtentRect);
  26. HRESULT GetTextMetrics(CRenderObj *pRender, HDC hdc, int iPartId, int iStateId, TEXTMETRIC* ptm);
  27. public:
  28. //---- data ----
  29. //---- text ----
  30. COLORREF _crText;
  31. //---- edge ----
  32. COLORREF _crEdgeLight;
  33. COLORREF _crEdgeHighlight;
  34. COLORREF _crEdgeShadow;
  35. COLORREF _crEdgeDkShadow;
  36. COLORREF _crEdgeFill;
  37. //---- shadow ----
  38. POINT _ptShadowOffset;
  39. COLORREF _crShadow;
  40. TEXTSHADOWTYPE _eShadowType;
  41. //---- border ----
  42. int _iBorderSize;
  43. COLORREF _crBorder;
  44. //---- font ----
  45. LOGFONT _lfFont;
  46. BOOL _fHaveFont;
  47. //---- id ----
  48. int _iSourcePartId;
  49. int _iSourceStateId;
  50. };
  51. //---------------------------------------------------------------------------