home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / PrintInfo.h < prev    next >
Text File  |  1991-11-14  |  4KB  |  138 lines

  1. /*
  2.     PrintInfo.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <objc/Object.h>
  8. #import "graphics.h"
  9. #import <dpsclient/dpsclient.h>
  10. #import "NXPrinter.h"
  11.  
  12. /* Page Order */
  13.  
  14. #define NX_DESCENDINGORDER    (-1)    /* descending order of pages */
  15. #define NX_SPECIALORDER        0    /* special order. tells the spooler
  16.                      * to not rearrange pages */
  17. #define NX_ASCENDINGORDER    1    /* ascending order of pages */
  18. #define NX_UNKNOWNORDER        2    /* no page order written out */
  19.  
  20. /* Page Orientation */
  21.  
  22. #define NX_LANDSCAPE        1    /* long side horizontal */
  23. #define NX_PORTRAIT        0    /* long side vertical */
  24.  
  25. /* Pagination Modes */
  26.  
  27. #define NX_AUTOPAGINATION    0    /* auto pagination */
  28. #define NX_FITPAGINATION    1    /* force image to fit on one page */
  29. #define NX_CLIPPAGINATION    2    /* let image be clipped by page */
  30.  
  31. typedef struct _PrivatePrintInfo *NXPrivatePrintInfo;
  32.  
  33. @interface PrintInfo : Object
  34. {
  35.     char               *paperType;
  36.     NXRect              paperRect;
  37.     NXUE7d             leftPageMargin;
  38.     NXCoord             rightPageMargin;
  39.     NXCoord             topPageMargin;
  40.     NXCoord             bottomPageMargin;
  41.     float               scalingFactor;
  42.     char                pageOrder;
  43.     struct _pInfoFlags {
  44.     unsigned int        orientation:1;
  45.     unsigned int        horizCentered:1;
  46.     unsigned int        vertCentered:1;
  47.     unsigned int        _RESERVEDA:2;
  48.     unsigned int        manualFeed:1;    /* Obsolete */
  49.     unsigned int        allPages:1;
  50.     unsigned int        _RESERVEDC:1;
  51.     unsigned int        horizPagination:2;
  52.     unsigned int        vertPagination:2;
  53.     unsigned int        printerIsOld:1;
  54.     unsigned int        reversePageOrder:1;
  55.     unsigned int        _RESERVEDB:2;
  56.     }                   pInfoFlags;
  57.     int                 firstPage;
  58.     int                 lastPage;
  59.     int                 currentPage;
  60.     int                 copies;
  61.     char               *outputFile;
  62.     DPSContext          context;
  63.     NXPrivatePrintInfo  _privateData;
  64.     char               *printerName;
  65.     char               *printerType;
  66.     char               *printerHost;
  67.     int                 resolution;        /* Obsolete */
  68.     short               pagesPerSheet;
  69.     unsigned short      _reservedPrintInfo1;
  70.     NXPrinter        *printerObject;
  71.     id            jobFeaturesTable;
  72.     const char        *paperFeed;
  73.     unsigned int        _reservedPrintInfo5;
  74. }
  75.  
  76. + (NXPrinter *)getDefaultPrinter;
  77. + setDefaultPrinter:(NXPrinter *)pr;
  78.  
  79. - init;
  80. - free;
  81. - setPaperType:(const char *)type andAdjust:(BOOL)flag;
  82. - (const char *)paperType;
  83. - setPaperRect:(const NXRect *)aRect andAdjust:(BOOL)flag;
  84. - (const NXRect *)paperRect;
  85. - setMarginLeft:(NXCoord)leftMargin right:(NXCoord)rightMargin top:(NXCoord)topMargin bottom:(NXCoord)bottomMargin;
  86. - getMarginLeft:(NXCoord *)leftMargin right:(NXCoord *)rightMargin top:(NXCoord *)topMargin bottom:(NXCoord *)bottomMargin;
  87. - setScalingFactor:(float)aFloat;
  88. - (float)scalingFactor;
  89. - setOrientation:(char)mode andAdjust:(BOOL)flag;
  90. - (char)orientation;
  91. - setHorizCentered:(BOOL)flag;
  92. - (BOOL)isHorizCentered;
  93. - setVertCentered:(BOOL)flag;
  94. - (BOOL)isVertCentered;
  95. - setHorizPagination:(int)mode;
  96. - (int)horizPagination;
  97. - setVertPagination:(int)mode;
  98. - (int)vertPagination;
  99. - setOutputFile:(const char *)aString;
  100. - (const char *)outputFile;
  101. - setPageOrder:(char)mode;
  102. - (char)pageOrder;
  103. - setAllPages:(BOOUE8ag;
  104. - (BOOL)isAllPages;
  105. - setFirstPage:(int)anInt;
  106. - (int)firstPage;
  107. - setLastPage:(int)anInt;
  108. - (int)lastPage;
  109. - (int)currentPage;
  110. - setCopies:(int)anInt;
  111. - (int)copies;
  112. - setContext:(DPSContext)aContext;
  113. - (DPSContext)context;
  114. - setPagesPerSheet:(short)aShort;
  115. - (short)pagesPerSheet;
  116. - setReversePageOrder:(BOOL)flag;
  117. - (BOOL)reversePageOrder;
  118. - setPrinter:(NXPrinter *)pr;
  119. - (NXPrinter *)printer;
  120. - setPaperFeed:(const char *)str;
  121. - (const char *)paperFeed;
  122. - initializeJobDefaults;
  123. - setJobFeature:(const char *)feature toValue:(const char *)string;
  124. - (const char *)valueForJobFeature:(const char *)feature;
  125. - removeJobFeature:(const char *)feature;
  126. - (const char **)jobFeatures;
  127. - write:(NXTypedStream *)stream;
  128. - read:(NXTypedStream *)stream;
  129.  
  130. /* 
  131.  * The following new... methods are now obsolete.  They remain in this  
  132.  * interface file for backward compatibility only.  Use Object's alloc method  
  133.  * and the init... methods defined in this class instead.
  134.  */
  135. + new;
  136.  
  137. @end
  138.