DekGenius.com
[ Team LiB ] Previous Section Next Section

NSPrintInfo Mac OS X 10.0

This class encapsulates the information related to a print job, such as margin sizes, paper orientation, pagination type, and how the view contents should be positioned on the printed output (centered vertically, horizontally, no centering, etc.). Each application has a shared print info object that is used by default for all print jobs. This object is obtained using the class method sharedPrintInfo.

figs/cocn_1571.gif

@interface NSPrintInfo : NSObject <NSCoding, NSCopying>
 // Initializers
   - (id)initWithDictionary:(NSDictionary *)attributes;
 // Accessor Methods
   - (void)setUpPrintOperationDefaultValues;
   - (void)setHorizontallyCentered:(BOOL)flag;
   - (void)setPaperName:(NSString *)name;
   - (NSString *)paperName;
   - (void)setPaperSize:(NSSize)size;
   - (NSSize)paperSize;
   - (void)setOrientation:(NSPrintingOrientation)orientation;
   - (NSPrintingOrientation)orientation;
   - (void)setPrinter:(NSPrinter *)printer;
   - (NSPrinter *)printer;
   - (void)setJobDisposition:(NSString *)disposition;
   - (NSString *)jobDisposition;
   - (void)setHorizontalPagination:(NSPrintingPaginationMode)mode;
   - (NSPrintingPaginationMode)horizontalPagination;
   - (void)setRightMargin:(float)margin;
   - (float)rightMargin;
   - (void)setTopMargin:(float)margin;
   - (float)topMargin;
   - (void)setLeftMargin:(float)margin;
   - (float)leftMargin;
   - (void)setVerticallyCentered:(BOOL)flag;
   - (void)setVerticalPagination:(NSPrintingPaginationMode)mode;
   - (NSPrintingPaginationMode)verticalPagination;
   - (void)setBottomMargin:(float)margin;
   - (float)bottomMargin;
 // Class Methods
   + (NSPrinter *)defaultPrinter;
   + (void)setDefaultPrinter:(NSPrinter *)printer;
   + (void)setSharedPrintInfo:(NSPrintInfo *)printInfo;
   + (NSPrintInfo *)sharedPrintInfo;
   + (NSSize)sizeForPaperName:(NSString *)name;
 // Instance Methods
   - (NSMutableDictionary *)dictionary;
   - (NSRect)imageablePageBounds;
   - (BOOL)isHorizontallyCentered;
   - (BOOL)isVerticallyCentered;
 // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;
 // Methods Implementing NSCopying
   - (id)copyWithZone:(NSZone *)zone;

    [ Team LiB ] Previous Section Next Section