home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / LHiResPrintout / LHiResPrintout.h < prev   
Encoding:
C/C++ Source or Header  |  1997-06-30  |  1.5 KB  |  48 lines  |  [TEXT/CWIE]

  1. /********************************************************************************\
  2.  LHiResPrintout - A subclass of LPrintout that prints at the printer's resolution
  3.  Dan Crevier - 6/19/97 <mailto:Dan.Crevier@pobox.com>
  4.  
  5.  Use an LHiResPrinter instaed of LPrintout, and then call SetMaxResolution to
  6.  print at the printer's maximum resolution.
  7.  
  8.  You can use GetResolution to get the printer's resolution in DPI
  9.  
  10.  You will probably need to move and resize the contained views to reflect the
  11.  resolution change. One way to do this is with my LProportionalSizer class,
  12.  released separately to the PP archives
  13.  
  14.  Note: text will not be automatically be resized. I've included an LHiResCaption
  15.  class for captions that will resize the text when enclosed in a LHiResPrintout
  16.  
  17.  This code is based on something Greg Payne did for TCL
  18.  Thanks to John C. Daub for lots of useful suggestions
  19.  
  20. \********************************************************************************/
  21.  
  22. #ifndef _H_LHiResPrintout
  23. #define _H_LHiResPrintout
  24. #pragma once
  25.  
  26. #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__)
  27.     #pragma import on
  28. #endif
  29.  
  30. #include <LPrintout.h>
  31.  
  32. class    LHiResPrintout : public LPrintout {
  33. public:
  34.     enum { class_ID = 'HRpo' };
  35.     static LHiResPrintout*    CreatePrintout(ResIDT inPrintoutID);
  36.     
  37.                         LHiResPrintout();
  38.                         LHiResPrintout(THPrint inPrintRecordH);
  39.                         LHiResPrintout(LStream *inStream);
  40.     
  41.     Int16                GetResolution(void) { return mDPI; };
  42.     void                SetMaxResolution(void);
  43.     
  44. protected:
  45.     Int16                mDPI;
  46. };
  47.  
  48. #endif