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.

62 lines
1.4 KiB

  1. /*
  2. * _DISPPRT.H
  3. *
  4. * Purpose:
  5. * CDisplayPrinter class. Multi-line display for printing.
  6. *
  7. * Authors:
  8. * Original RichEdit code: David R. Fulmer
  9. * Christian Fortini
  10. * Jon Matousek
  11. */
  12. #ifndef _DISPPRT_H
  13. #define _DISPPRT_H
  14. #include "_dispml.h"
  15. class CDisplayPrinter : public CDisplayML
  16. {
  17. public:
  18. CDisplayPrinter (
  19. CTxtEdit* ped,
  20. HDC hdc,
  21. LONG x,
  22. LONG y,
  23. SPrintControl prtcon);
  24. virtual BOOL IsMain() const { return FALSE; }
  25. inline RECT GetPrintView( void ) { return rcPrintView; }
  26. inline void SetPrintView( const RECT & rc ) { rcPrintView = rc; }
  27. inline RECT GetPrintPage(void) { return _rcPrintPage;}
  28. inline void SetPrintPage(const RECT &rc) {_rcPrintPage = rc;}
  29. // Format range support
  30. LONG FormatRange(LONG cpFirst, LONG cpMost, BOOL fWidowOrphanControl);
  31. // Natural size calculation
  32. virtual HRESULT GetNaturalSize(
  33. HDC hdcDraw,
  34. HDC hicTarget,
  35. DWORD dwMode,
  36. LONG *pwidth,
  37. LONG *pheight);
  38. virtual BOOL IsPrinter() const;
  39. void SetPrintDimensions(RECT *prc);
  40. protected:
  41. RECT rcPrintView; // for supporting client driven printer banding.
  42. RECT _rcPrintPage; // the entire page size
  43. SPrintControl _prtcon; // Control print behavior
  44. LONG _cpForNumber; // cp of cached number.
  45. WORD _wNumber; // Cached value of paragraph number
  46. };
  47. #endif