home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************************
- *
- *
- * MacZoop - "the framework for the rest of us"
- *
- *
- *
- * ZPrinter.h -- an object for doing printing
- *
- *
- *
- *
- *
- * © 1996, Graham Cox
- *
- *
- *
- *
- *************************************************************************************************/
-
- #pragma once
-
-
- #ifndef __ZPRINTER__
- #define __ZPRINTER__
-
- #include <printing.h>
-
- class ZWindow;
-
-
- class ZPrinter
- {
- protected:
- ZWindow* printWindow;
- THPrint macPrintH;
- TPPrPort printPort;
- Rect paperRect;
- short pH, pV, pageStart, pageEnd, pageNum;
- Boolean printInited;
-
- public:
- ZPrinter( ZWindow* aWindow = NULL );
- virtual ~ZPrinter();
-
-
- virtual void Print();
- virtual void Print( ZWindow* aWindow );
- virtual void PageSetUp();
-
- virtual void GetPaperRect( Rect* aRect );
-
- inline THPrint GetMacPrintRecord() { return macPrintH; };
- virtual void SetMacPrintRecord( THPrint pRec );
- virtual void SetDefault();
-
- protected:
-
- virtual void PrintLoop();
- virtual void SetUpDocTitle( ZWindow* aWindow );
-
- WindowPtr fakeWindow;
- };
-
-
- #define kBadWindowPrintRefErr 301
- #define kPrinterNotInitedErr 302
-
- #define kInitPrinterAlertID 134
-
- #endif