Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 9 - Printing Manager / Printing Manager Reference
Data Structures /


TPrint

You must supply a record of data type TPrint for a document before it can be printed. (See "Creating and Using a TPrint Record" beginning on page 9-14 for information about how to supply a TPrint record for a document.)

In addition to other fields, the TPrint record includes three fields (prInfo, prStl, and prJob) that are defined by the TPrInfo record (described on page 9-43), the TPrStl record (described on page 9-45), and the TPrJob record (described on page 9-44). The TPrint record and the records within it contain information such as that needed by your application for printing a document.

TYPE 
   TPPrint = ^TPrint;      {pointer to a TPrint record}
   THPrint = ^TPPrint;     {handle to a TPrint record}
   TPrint = 
   RECORD
      iPrVersion: Integer; {reserved}
      prInfo:     TPrInfo; {resolution of device & page rectangle}
      rPaper:     Rect;    {paper rectangle}
      prStl:      TPrStl;  {printer driver number & feed type}
      prInfoPT:   TPrInfo; {reserved}
      prXInfo:    TPrXInfo;{reserved}
      prJob:      TPrJob;  {printing information from the job }
                           { dialog box}
      printX:     ARRAY[1..19] OF Integer;
   END;
Field Description
iPrVersion
Reserved. To determine the version of the printer driver that initialized this TPrint record, use the PrDrvrVers function, which is described on page 9-76.
prInfo
The information needed for page composition, contained in a TPrInfo record. See page 9-43 for a description of this record.
rPaper
The paper rectangle. This rectangle encompasses the page rectangle, which is specified by the rPage field of the TPrInfo record.
prStl
The printer's device number and the feed type, contained in a TPrStl record. See page 9-45 for a description of this record.
prInfoPT
Reserved.
prXInfo
Reserved.
prJob
Information about this particular print job, contained in a TPrJob record. You use the PrJobDialog function to display the job dialog box. After the user closes the job dialog box, the PrJobDialog function updates the fields of the TPrJob record according to the user's choices. See page 9-44 for a description of this record.
printX
Reserved.
If you try to use a TPrint record that's invalid for the current version of the Printing Manager or for the current printer, the printer driver corrects the record by setting its fields to default values.

Your application should not directly change the user-supplied data in the TPrint record; your application should use the PrStlDialog function and the PrJobDialog function (described on page 9-58 and page 9-59, respectively) or the PrDlgMain function (described on page 9-60) to allow the user to specify printing options, which the printer driver then translates to the appropriate fields in the TPrint record. The only fields you may need to set directly are those containing optional information in the TPrJob record (for example, the pIdleProc field, which contains a pointer to an idle procedure). Attempting to set other values directly in the TPrint record can produce unexpected results.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996