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.

61 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. RECT *prc,
  22. SPrintControl prtcon);
  23. virtual BOOL IsMain() const { return FALSE; }
  24. inline RECT GetPrintView( void ) { return _rcPrintView; }
  25. inline void SetPrintView( const RECT & rc ) { _rcPrintView = rc; }
  26. inline RECT GetPrintPage(void) { return _rcPrintPage;}
  27. inline void SetPrintPage(const RECT &rc) {_rcPrintPage = rc;}
  28. // Format range support
  29. LONG FormatRange(LONG cpFirst, LONG cpMost, BOOL fWidowOrphanControl);
  30. // Natural size calculation
  31. virtual HRESULT GetNaturalSize(
  32. HDC hdcDraw,
  33. HDC hicTarget,
  34. DWORD dwMode,
  35. LONG *pwidth,
  36. LONG *pheight);
  37. virtual BOOL IsPrinter() const;
  38. void SetPrintDimensions(RECT *prc);
  39. protected:
  40. RECT _rcPrintView; // for supporting client driven printer banding.
  41. RECT _rcPrintPage; // the entire page size
  42. SPrintControl _prtcon; // Control print behavior
  43. LONG _cpForNumber; // cp of cached number.
  44. WORD _wNumber; // Cached value of paragraph number
  45. };
  46. #endif