Up

NSPrintOperation

Authors

Scott Christley( scottc@net-community.com )
Fred Kiefer( FredKiefer@gmx.de )
Adam Fedor( fedor@gnu.org )
Controls generation of EPS, PDF or PS print jobs.

Copyright: (C) 1996 Free Software Foundation, Inc.


Contents -

  1. Class Description

Class Description

NSPrintOperation controls printing of an NSView. When invoked normally it will (optionally) display a standard print panel (NSPrintPanel), and based on the information entered by the user here as well as information about page layout (see NSPageLayout) tells the NSView to print it's contents. NSPrintOperation works with the NSView to paginate the output into appropriately sized and oriented pages and finally delivers the result to the appropriate place, whether it be a printer, and PostScript file, or another output.

NSPrintOperation : NSObject

Declared in:
AppKit/NSPrintOperation.h
Standards:

Method summary

EPSOperationWithView:insideRect:toData:

+ (NSPrintOperation*) EPSOperationWithView: (NSView*)aView insideRect: (NSRect)rect toData: (NSMutableData*)data;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


EPSOperationWithView:insideRect:toData:printInfo:

+ (NSPrintOperation*) EPSOperationWithView: (NSView*)aView insideRect: (NSRect)rect toData: (NSMutableData*)data printInfo: (NSPrintInfo*)aPrintInfo;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


EPSOperationWithView:insideRect:toPath:printInfo:

+ (NSPrintOperation*) EPSOperationWithView: (NSView*)aView insideRect: (NSRect)rect toPath: (NSString*)path printInfo: (NSPrintInfo*)aPrintInfo;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


PDFOperationWithView:insideRect:toData:

+ (NSPrintOperation*) PDFOperationWithView: (NSView*)aView insideRect: (NSRect)rect toData: (NSMutableData*)data;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


PDFOperationWithView:insideRect:toData:printInfo:

+ (NSPrintOperation*) PDFOperationWithView: (NSView*)aView insideRect: (NSRect)rect toData: (NSMutableData*)data printInfo: (NSPrintInfo*)aPrintInfo;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


PDFOperationWithView:insideRect:toPath:printInfo:

+ (NSPrintOperation*) PDFOperationWithView: (NSView*)aView insideRect: (NSRect)rect toPath: (NSString*)path printInfo: (NSPrintInfo*)aPrintInfo;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


currentOperation

+ (NSPrintOperation*) currentOperation;
Standards: GNUstep, MacOS-X, OpenStep

Returns the NSPrintOperation object that is currently performing a print operation (if any).


printOperationWithView:

+ (NSPrintOperation*) printOperationWithView: (NSView*)aView;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


printOperationWithView:printInfo:

+ (NSPrintOperation*) printOperationWithView: (NSView*)aView printInfo: (NSPrintInfo*)aPrintInfo;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


setCurrentOperation:

+ (void) setCurrentOperation: (NSPrintOperation*)operation;
Standards: GNUstep, MacOS-X, OpenStep

Set the current NSPrintOperation to the supplied operation object. As this is currently implemented, if a NSPrintOperation is currently running, that operation is lost (along with any associated context), so be careful to call this only when there is no current operation.


accessoryView

- (NSView*) accessoryView;
Standards: NotOpenStep, GNUstep, MacOS-X

Returns the accessory view used by the NSPrintPanel associated with the receiver.


cleanUpOperation

- (void) cleanUpOperation;
Standards: GNUstep, MacOS-X, OpenStep

Called by the print operation and it has finished running a printing operation.


context

- (NSGraphicsContext*) context;
Standards: GNUstep, MacOS-X, OpenStep

Returns the graphic contexts used by the print operation.


createContext

- (NSGraphicsContext*) createContext;
Standards: GNUstep, MacOS-X, OpenStep

This method is used by the print operation to create a special graphics context for use while running the print operation.


currentPage

- (int) currentPage;
Standards: GNUstep, MacOS-X, OpenStep

Returns the page currently being printing. Returns 0 if no page is currently being printed


deliverResult

- (BOOL) deliverResult;
Standards: GNUstep, MacOS-X, OpenStep

Called by the print operation to deliver the results of the printing operation. This might include sending the output to a printer, a file or a previewing program. Returns YES if the output was delivered sucessfully.


destroyContext

- (void) destroyContext;
Standards: GNUstep, MacOS-X, OpenStep

This method is used by the print operation to destroy the special graphic context used while running the print operation.


initEPSOperationWithView:insideRect:toData:printInfo:

- (id) initEPSOperationWithView: (NSView*)aView insideRect: (NSRect)rect toData: (NSMutableData*)data printInfo: (NSPrintInfo*)aPrintInfo;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


initWithView:printInfo:

- (id) initWithView: (NSView*)aView printInfo: (NSPrintInfo*)aPrintInfo;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


isCopyingOperation

- (BOOL) isCopyingOperation;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


isEPSOperation

- (BOOL) isEPSOperation;
Standards: GNUstep, MacOS-X, OpenStep

Returns YES if the receiver is performing an operation whose output is EPS format.


pageOrder

- (NSPrintingPageOrder) pageOrder;
Standards: GNUstep, MacOS-X, OpenStep

Returns the page order of printing.


printInfo

- (NSPrintInfo*) printInfo;
Standards: GNUstep, MacOS-X, OpenStep

Returns the NSPrintInfo object associated with the receiver.


printPanel

- (NSPrintPanel*) printPanel;
Standards: GNUstep, MacOS-X, OpenStep

Returns the NSPrintPanel associated with the receiver.


runOperation

- (BOOL) runOperation;
Standards: GNUstep, MacOS-X, OpenStep

Call this message to run the print operation on a view. This includes (optionally) displaying a print panel and working with the NSView to paginate and draw the contents of the view.


runOperationModalForWindow:delegate:didRunSelector:contextInfo:

- (void) runOperationModalForWindow: (NSWindow*)docWindow delegate: (id)delegate didRunSelector: (SEL)didRunSelector contextInfo: (void*)contextInfo;
Standards: NotOpenStep, GNUstep, MacOS-X

Run a print operation modally with respect to a window.


setAccessoryView:

- (void) setAccessoryView: (NSView*)aView;
Standards: NotOpenStep, GNUstep, MacOS-X

Set the accessory view used by the NSPrintPanel associated with the receiver.


setPageOrder:

- (void) setPageOrder: (NSPrintingPageOrder)order;
Standards: GNUstep, MacOS-X, OpenStep

Set the page order used when printing.


setPrintInfo:

- (void) setPrintInfo: (NSPrintInfo*)aPrintInfo;
Standards: GNUstep, MacOS-X, OpenStep

Set the NSPrintInfo object associated with the receiver.


setPrintPanel:

- (void) setPrintPanel: (NSPrintPanel*)panel;
Standards: GNUstep, MacOS-X, OpenStep

Sets the NSPrintPanel used by the receiver obtaining and displaying printing information from/to the user.


setShowPanels:

- (void) setShowPanels: (BOOL)flag;
Standards: GNUstep, MacOS-X, OpenStep

Use this to set whether a print panel is displayed during a printing operation. If set to NO, then the receiver uses information that was previously set and does not display any status information about the progress of the printing operation.


showPanels

- (BOOL) showPanels;
Standards: GNUstep, MacOS-X, OpenStep

Returns YES if the reciever display an NSPrintPanel and other information when running a print operation.


view

- (NSView*) view;
Standards: GNUstep, MacOS-X, OpenStep

Return the view that is the being printed.



Up