(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSPrintOperation 

Inherits From:	NSObject

Conforms To:	NSCoding
NSObject

Declared In:	appkit/NSPrintOperation.h

Creating and Initializing an NSPrintOperation Object

+ (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
insideRect:(NSRect)rect	Returns a new NSPrintOperation object that controls the
toData:(NSMutableData *)data		generation of EPS code from the area specified by rect in aView, using the parameters in the shared NSPrintInfo object.  The code is written to data.
+ (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
insideRect:(NSRect)rect	Returns a new NSPrintOperation object that controls the
toData:(NSMutableData *)data		generation of EPS code from the area specified by rect
printInfo:(NSPrintInfo *)aPrintInfo		in aView, using the parameters in aPrintInfo.  The code is written to data.
+ (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
insideRect:(NSRect)rect	Returns a new NSPrintOperation object that controls the
toPath:(NSString *)path		generation of EPS code from the area specified by rect
printInfo:(NSPrintInfo *)aPrintInfo		in aView, using the parameters in aPrintInfo.  The code is written to path.
+ (NSPrintOperation *)printOperationWithView:(NSView *)aView
	Returns a new NSPrintOperation object that controls the printing of aView, using the parameters in the shared NSPrintInfo object. 
+ (NSPrintOperation *)printOperationWithView:(NSView *)aView
printInfo:(NSPrintInfo *)aPrintInfo	Returns a new NSPrintOperation object that controls the printing of aView, using the parameters in aPrintInfo.
- (id)initEPSOperationWithView:(NSView *)aView	Initializes a newly allocated NSPrintOperation object to 
insideRect:(NSRect)rect		control the generation of EPS code from the area 
toData:(NSMutableData *)data		specified by rect in aView, using the parameters in 
printInfo:(NSPrintInfo *)aPrintInfo		aPrintInfo.  The code is written to data.
- (id)initWithView:(NSView *)aView	Initializes a newly allocated NSPrintOperation object to
printInfo:(NSPrintInfo *)aPrintInfo		control the printing of aView, using the parameters in aPrintInfo.

Setting the Print Operation

+ (NSPrintOperation *)currentOperation	Returns the NSPrintOperation that represents the current operation or nil if there is no such operation.
+ (void)setCurrentOperation:(NSPrintOperation *)operation
	Sets the NSPrintOperation that represents the current operation.

Determining the Type of Operation

- (BOOL)isEPSOperation	Returns YES if the receiver controls an EPS operation and NO if the receiver controls a printing operation.

Controlling the User Interface

- (NSPrintPanel *)printPanel	Returns the NSPrintPanel object that's used when the operation is run.
- (BOOL)showPanels	Returns YES to indicate that the Print panel appear when the operation is run.
- (void)setPrintPanel:(NSPrintPanel *)panel	Sets the NSPrintPanel object that's used when the operation is run.
- (void)setShowPanels:(BOOL)flag	Sets whether the Print panel appears when the operation is run.

Managing the DPS Context

- (NSDPSContext *)createContext	Used by the NSPrintOperation object to create the DPS context for output generation, using the current PrintInfo settings.
- (NSDPSContext *)context	Returns the DPS context used for the receiver's operation.
- (void)destroyContext	Used by the NSPrintOperation object to destroy the DPS context at the end of the operation.

Page Information

- (int)currentPage	Returns the page number of the page being printed.
- (NSPrintingPageOrder)pageOrder	Returns the order in which pages will be printed.
- (void)setPageOrder:(NSPrintingPageOrder)order	Sets the order in which pages will be printed.

Running a Print Operation

- (void)cleanUpOperation	Invoked at end of an operation's run to set the current operation to nil.
- (BOOL)deliverResult	Delivers the results generated by runOperation to the intended destination:  the print spooler, preview application, etc.  Returns YES upon successful delivery and NO otherwise.
- (BOOL)runOperation	Causes the operation (EPS code generation or printing) to take place.  Returns YES upon successful completion and NO otherwise.

Getting the NSPrintInfo Object

- (NSPrintInfo *)printInfo	Returns the receiver's NSPrintInfo object.
- (void)setPrintInfo:(NSPrintInfo *)aPrintInfo	Sets the receiver's NSPrintInfo object to aPrintInfo.