The Spool Library: 4 Print Control Instance Data

Up: GEOS SDK TechDocs | Up | Down | Prev: 3 How Jobs Get Printed | Next: 5 Print Control Messages

The PrintControl is a powerful and adaptable subclass of GenControl and contains many instance fields to fit the needs of different types of applications. Each field is described in greater detail later in this section; all are shown in Print Control Instance Data and Features .

Code Display 14-2 Print Control Instance Data and Features

		/* The following bitfield contains the PrintControl's attributes */
	@instance PrintControlAttrs 		PCI_attrs = 
				(PCA_COPY_CONTROLS | PCA_PAGE_CONTROLS |
				 PCA_QUALITY_CONTROLS | PCA_USES_DIALOG_BOX |
				 PCA_GRAPHICS_MODE | PCA_TEXT_MODE );
		/* Possible PCI_attrs flags (may be combined using | and &):
		 * PCA_MARK_APP_BUSY, 				PCA_VERIFY_PRINT,
		 * PCA_SHOW_PROGRESS, 				PCA_PROGRESS_PERCENT, 
		 * PCA_PROGRESS_PAGE, 				PCA_FORCE_ROTATION 
		 * PCA_COPY_CONTROLS,				PCA_PAGE_CONTROLS,
		 * PCA_QUALITY_CONTROLS, 				PCA_USES_DIALOG_BOX,
		 * PCA_GRAPHICS_MODE,				PCA_TEXT_MODE 
		 * PCA_DEFAULT_QUALITY						*/
		/* The fields below are the complete and requested page ranges */
	@instance word 		PCI_startPage = 1;
	@instance word 		PCI_endPage = 1;
	@instance word 		PCI_startUserPage = 0;
	@instance word 		PCI_endUserPage = 0x7fff;
		/* The following field contains the default printer number */
	@instance word 		PCI_defPrinter = -1;
		/* The following fields deal with document dimensions */
	@instance PageSizeReport 		PCI_docSizeInfo = 0;
		/* Pointers to objects receiving vital messages */
	@instance optr 		PCI_output;
	@instance optr 		PCI_docNameOutput;
		/* The PrintControl's features determine whether to use standard
		 * print and fax triggers to bring up the Print Dialog box. */
  	typedef ByteFlags PrintControlFeatures;
	/* The following flags may be combined with | and &:
		 PRINTCF_PRINT_TRIGGER,
		 PRINTCF_FAX_TRIGGER */
	/* To provide a non-standard print trigger, use the GenControl vardata
	 * field ATTR_GEN_CONTROL_APP_UI. */
	typedef ByteFlags PrintControlToolboxFeatures;
	/* The following flags may be combined with | and &:
		PRINTCTF_PRINT_TRIGGER 
		PRINTCTF_FAX_TRIGGER */
	/* To include application-specific UI in the print dialog box. */
	@vardata optr ATTR_PRINT_CONTROL_APP_UI;
	/* This piece of temporary vardata is internal: */
	@vardata TempPrintCtrlInstance  TEMP_PRINT_CONTROL_INSTANCE;
	/* Its structures are defined as follows:
	typedef struct {
	 optr 			TPCI_currentSummons; ( currently active summons )
	 optr 			TPCI_progressBox; ( OD of progress dialog box */
	 ChunkHandle 			TPCI_jobParHandle; ( handle to JobParamters )
	 word 			TPCI_fileHandle; ( file handle (if printing) )
	 word 			TPCI_gstringHandle; ( gstring handle if printing )
	 word 			TPCI_printBlockHan; ( the printer block handle )
	 PrintControlAttrs 			TPCI_attrs;
	 PrintStatusFlags 			TPCI_status;
	 byte 			 TPCI_holdUpCompletionCount;
	}  TempPrintCtrlInstance;
	typedef ByteFlags  PrintStatusFlags;
	#define  PSF_FAX_AVAILABLE 0x80 ( set if a fax driver is available )
	#define PSF_ABORT 0x08 ( user wants to abort printing )
	#define PSF_RECEIVED_COMPLETED 0x04 ( MSG_..._PRINTING_COMPLETED received )
	#define PSF_RECEIVED_NAME 0x02 ( MSG_PC_SET_DOC_NAME received )
	#define PSF_VERIFIED 0x01 ( PSG_PC_VERIFY_? received ) */
	@vardata TempPrintCompletionEventData  TEMP_PRINT_COMPLETION_EVENT;
	/* The TempPrintCompletionEventData structure is defined:
		typedef struct {
		 MemHandle 		 TPCED_event;
		 MessageFlags 		TPCED_messageFlags;
		}  TempPrintCompletionEventData; 

Up: GEOS SDK TechDocs | Up | Down | Prev: 3 How Jobs Get Printed | Next: 5 Print Control Messages