2003-07-31 23:52:10 +00:00
|
|
|
/** <title>NSPrintInfo</title>
|
|
|
|
|
|
|
|
<abstract>Stores information used in printing.</abstract>
|
|
|
|
|
2004-07-10 10:19:34 +00:00
|
|
|
Copyright (C) 1996,1997,2004 Free Software Foundation, Inc.
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
Author: Simon Frankau <sgf@frankau.demon.co.uk>
|
|
|
|
Date: July 1997
|
|
|
|
Author: Adam Fedor <fedor@gnu.org>
|
|
|
|
Date: Oct 2001
|
2004-07-10 10:19:34 +00:00
|
|
|
Modified for Printing Backend Support
|
|
|
|
Author: Chad Hardin <cehardin@mac.com>
|
|
|
|
Date: June 2004
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-10-29 21:16:17 +00:00
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2003-07-31 23:52:10 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
2006-11-06 13:58:37 +00:00
|
|
|
Boston, MA 02110-1301, USA.
|
2003-07-31 23:52:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GNUstep_H_NSPrintInfo
|
|
|
|
#define _GNUstep_H_NSPrintInfo
|
|
|
|
|
2010-03-28 21:36:19 +00:00
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
#import <Foundation/NSGeometry.h>
|
|
|
|
#import <AppKit/AppKitDefines.h>
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
@class NSString;
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
|
|
|
|
@class NSPrinter;
|
|
|
|
|
|
|
|
typedef enum _NSPrintingOrientation {
|
|
|
|
NSPortraitOrientation,
|
|
|
|
NSLandscapeOrientation
|
|
|
|
} NSPrintingOrientation;
|
|
|
|
|
2019-11-22 12:06:39 +00:00
|
|
|
typedef enum _NSPaperOrientation {
|
|
|
|
NSPaperOrientationPortrait,
|
|
|
|
NSPaperOrientationLandscape
|
|
|
|
} NSPaperOrientation;
|
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
typedef enum _NSPrintingPaginationMode {
|
|
|
|
NSAutoPagination,
|
|
|
|
NSFitPagination,
|
|
|
|
NSClipPagination
|
|
|
|
} NSPrintingPaginationMode;
|
|
|
|
|
|
|
|
@interface NSPrintInfo : NSObject <NSCoding, NSCopying>
|
|
|
|
{
|
|
|
|
NSMutableDictionary *_info;
|
|
|
|
}
|
|
|
|
|
2004-07-11 21:31:39 +00:00
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
//
|
|
|
|
// Creating and Initializing an NSPrintInfo Instance
|
|
|
|
//
|
|
|
|
- (id)initWithDictionary:(NSDictionary *)aDict;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Managing the Shared NSPrintInfo Object
|
|
|
|
//
|
|
|
|
+ (void)setSharedPrintInfo:(NSPrintInfo *)printInfo;
|
|
|
|
+ (NSPrintInfo *)sharedPrintInfo;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Managing the Printing Rectangle
|
|
|
|
//
|
|
|
|
+ (NSSize)sizeForPaperName:(NSString *)name;
|
2011-12-15 06:51:02 +00:00
|
|
|
- (CGFloat)bottomMargin;
|
|
|
|
- (CGFloat)leftMargin;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (NSPrintingOrientation)orientation;
|
|
|
|
- (NSString *)paperName;
|
|
|
|
- (NSSize)paperSize;
|
2011-12-15 06:51:02 +00:00
|
|
|
- (CGFloat)rightMargin;
|
|
|
|
- (void)setBottomMargin:(CGFloat)value;
|
|
|
|
- (void)setLeftMargin:(CGFloat)value;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void)setOrientation:(NSPrintingOrientation)mode;
|
|
|
|
- (void)setPaperName:(NSString *)name;
|
|
|
|
- (void)setPaperSize:(NSSize)size;
|
2011-12-15 06:51:02 +00:00
|
|
|
- (void)setRightMargin:(CGFloat)value;
|
|
|
|
- (void)setTopMargin:(CGFloat)value;
|
|
|
|
- (CGFloat)topMargin;
|
2007-07-18 09:39:50 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
|
|
|
- (NSRect)imageablePageBounds;
|
|
|
|
#endif
|
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
|
|
|
- (NSString *)localizedPaperName;
|
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Pagination
|
|
|
|
//
|
|
|
|
- (NSPrintingPaginationMode)horizontalPagination;
|
|
|
|
- (void)setHorizontalPagination:(NSPrintingPaginationMode)mode;
|
|
|
|
- (void)setVerticalPagination:(NSPrintingPaginationMode)mode;
|
|
|
|
- (NSPrintingPaginationMode)verticalPagination;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Positioning the Image on the Page
|
|
|
|
//
|
|
|
|
- (BOOL)isHorizontallyCentered;
|
|
|
|
- (BOOL)isVerticallyCentered;
|
|
|
|
- (void)setHorizontallyCentered:(BOOL)flag;
|
|
|
|
- (void)setVerticallyCentered:(BOOL)flag;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Specifying the Printer
|
|
|
|
//
|
|
|
|
+ (NSPrinter *)defaultPrinter;
|
|
|
|
+ (void)setDefaultPrinter:(NSPrinter *)printer;
|
|
|
|
- (NSPrinter *)printer;
|
|
|
|
- (void)setPrinter:(NSPrinter *)aPrinter;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Controlling Printing
|
|
|
|
//
|
|
|
|
- (NSString *)jobDisposition;
|
|
|
|
- (void)setJobDisposition:(NSString *)disposition;
|
|
|
|
- (void)setUpPrintOperationDefaultValues;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Accessing the NSPrintInfo Object's Dictionary
|
|
|
|
//
|
|
|
|
- (NSMutableDictionary *)dictionary;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2004-07-10 10:19:34 +00:00
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
//
|
|
|
|
// Printing Information Dictionary Keys
|
|
|
|
//
|
|
|
|
APPKIT_EXPORT NSString *NSPrintAllPages;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintBottomMargin;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintCopies;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxCoverSheetName;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxHighResolution;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxModem;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxReceiverNames;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxReceiverNumbers;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxReturnReceipt;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxSendTime;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxTrimPageEnds;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxUseCoverSheet;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFirstPage;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintHorizontalPagination;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintHorizontallyCentered;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintJobDisposition;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintJobFeatures;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintLastPage;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintLeftMargin;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintManualFeed;
|
2011-06-11 20:34:49 +00:00
|
|
|
APPKIT_EXPORT NSString *NSPrintMustCollate;
|
2003-07-31 23:52:10 +00:00
|
|
|
APPKIT_EXPORT NSString *NSPrintOrientation;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPackageException;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPagesPerSheet;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPaperFeed;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPaperName;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPaperSize;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPrinter;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintReversePageOrder;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintRightMargin;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintSavePath;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintScalingFactor;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintTopMargin;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintVerticalPagination;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintVerticallyCentered;
|
|
|
|
|
2011-06-11 20:34:49 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPagesAcross;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPagesDown;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintTime;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintDetailedErrorReporting;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxNumber;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPrinterName;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintHeaderAndFooter;
|
|
|
|
#endif
|
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
//
|
|
|
|
// Additional (GNUstep) keys
|
|
|
|
//
|
|
|
|
/** Set to <code>Rows</code> to print row by row, set to <code>Columns</code>
|
|
|
|
to print column by column */
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPageDirection;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Print Job Disposition Values
|
|
|
|
//
|
|
|
|
APPKIT_EXPORT NSString *NSPrintCancelJob;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintFaxJob;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintPreviewJob;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintSaveJob;
|
|
|
|
APPKIT_EXPORT NSString *NSPrintSpoolJob;
|
|
|
|
|
|
|
|
#endif // _GNUstep_H_NSPrintInfo
|