PrintControl Class Reference

This class encapsulates all the print settings for a document, and controls how the document pages are printed on the paper. More...

#include <printctl.h>

List of all members.

Public Member Functions

 PrintControl ()
 Default constructor.
 ~PrintControl ()
 Default deconstructor.
BOOL SetUp (Spread *pSpread, BOOL RedrawPrintBorders=TRUE)
 This function sets up the print control to print the given spread.
String_256 BuildPrintInfoStr ()
 This uses the print control's settings to build the string displayed in the print info field of a print dlg.
String_256 BuildPaperSizeStr ()
 This uses the printer settings to build the string displayed in the paper size field of a print options tab.
BOOL IsWholeSpread ()
void SetWholeSpread (BOOL State)
 Sets the WholeSpread state, altering dependants automatically (unless importing).
BOOL IsDoublePageSpread ()
void SetDoublePageSpread (BOOL State)
FIXED16 GetScale ()
void SetScale (FIXED16 NewScale)
 Sets the scale percentage, altering dependants automatically (unless importing) Dependants are: ScaledWidth ScaledHeight.
PrintOrient GetPrintOrient ()
void SetPrintOrient (PrintOrient NewOrient)
 Sets the print orientatio, altering dependants automatically (unless importing).
PrintFitType GetFitType ()
void SetFitType (PrintFitType NewFitType)
 Sets the fit type, altering dependants automatically (unless importing).
TypesetInfoGetTypesetInfo ()
INT32 GetTopMargin ()
void SetTopMargin (INT32 NewVal)
INT32 GetLeftMargin ()
void SetLeftMargin (INT32 NewVal)
INT32 GetWidth ()
void SetWidth (INT32 NewVal)
 Sets the page width, altering dependants automatically (unless importing) Dependants are: Scale ScaledHeight.
INT32 GetHeight ()
void SetHeight (INT32 NewVal)
 Sets the page height, altering dependants automatically (unless importing) Dependants are: Scale ScaledWidth.
INT32 GetRows ()
BOOL SetRows (INT32 NewVal)
 Adjust the printing variables to allow for typesetting marks to be positioned What happens here is that we adjust the X,Y translations so that we ensure a patch is moved into a position where we can get the crop marks between the patch and the papers edges.Sets the number of pages in each printed column, altering dependants automatically (unless importing) Dependants are: Scale ScaledWidth ScaledHeight Columns.
INT32 GetColumns ()
BOOL SetColumns (INT32 NewVal)
 Sets the number of pages in each printed column, altering dependants automatically (unless importing) Dependants are: Scale ScaledWidth ScaledHeight Rows.
INT32 GetGutter ()
BOOL SetGutter (INT32 NewVal)
 Sets the gutter measurement, altering dependants automatically (unless importing).
PrintLayers GetPrintLayers ()
void SetPrintLayers (PrintLayers NewVal)
PSLevel GetPSLevel ()
void SetPSLevel (PSLevel NewVal)
PrintMethodType GetPrintMethod ()
 Returns the app's print method. This is stored in the global var AppPrintMethod.
void SetPrintMethod (PrintMethodType NewVal)
 Sets the app's print method to be NewVal This is stored in the global var AppPrintMethod.
BitmapResMethod GetBitmapResMethod ()
void SetBitmapResMethod (BitmapResMethod BRM)
INT32 GetDotsPerInch ()
 If the bitmap res setting is manual then the value the user entered is returned. If the bitmap res setting is automatic, then base the DPI on the printer's DPI.
void SetDotsPerInch (INT32 NewVal)
 Ensures the NewVal is not < MINBITMAPDPI.
PrintFillQuality GetFillQuality ()
void SetFillQuality (PrintFillQuality Qual)
PrintTextOptions GetTextOptions ()
void SetTextOptions (PrintTextOptions pto)
BOOL IsCollated ()
void SetCollated (BOOL NewVal)
INT32 GetNumCopies ()
void SetNumCopies (INT32 NewVal)
BOOL GetPrintToFile ()
void SetPrintToFile (BOOL NewVal)
PrintRangeObj GetObjPrintRange ()
 Find out the object range the user wants to print to.
void SetObjPrintRange (PrintRangeObj NewVal)
PrintRangeDPS GetDPSPrintRange ()
void SetDPSPrintRange (PrintRangeDPS NewVal)
INT32 GetNumPrintablePages ()
 This tells you how many individual pages are printable, given the current settings.
PrintControloperator= (PrintControl &other)
 The assignment operator for PrintControl.
BOOL StartPrinting ()
 This informs the print info object that you are about to do some printing.
BOOL MorePaper ()
 Call this for each piece of paper to be printed to.
BOOL GetNextPaper ()
 Call this for each piece of paper to be printed to. NB: You must call StartPrinting() before calling this func as part of your print loop.
BOOL ReprintPaper ()
 This allows you to print on the same piece of paper again.
BOOL GetNextPatch (PrintPatchInfo *pPatchInfo)
 Each time this func returns TRUE, print the page using the data set up by this call.
BOOL EndPrinting ()
 This informs the print info object that you have finished printing.
BOOL StartPlatePrinting (PrintView *pPrintView, UINT32 *const errID)
 This function makes sure the plate printing loop is initialised for the next set of pages on a single sheet of paper to pass through the driver. It sets up an appropriate ColourPlate and ColourCOntextCMYK for the given PrintView.
BOOL MorePlates ()
 Call this to determin whether there are more plates to print during this separation.
BOOL SetNextPlate (PrintView *pPrintView)
 Call this to set up the view related data ready for the next plate rendering.
void EndPlatePrinting (PrintView *pPrintView)
 This function makes sure the plate printing loop is shut down correctly. We need to make sure that the last plate is detached from the colour context inside the print view, otherwise when the print view is destroyed the plate in the colour context in the print view will be destroyed. As our printer dialogue keeps this in its list, we need to make sure it only gets deleted once during that lists destruction.
void StartImport ()
 Tells the object that it's data is being imported.
void EndImport ()
 Tells the object that it's data is no longer being imported.
void RenderPrintBorder (RenderRegion *pRRegion)
 Renders the printable area on the spread according to the current print layout method.

Static Public Member Functions

static BOOL RedrawPrintableArea (DocView *pDocView)
 This func can be passed as a param to Document::ForceRedraw() and hence can control which views get redraw. This func ensures that only views that are showing print borders get redrawn.

Static Public Attributes

static PrintMethodType AppPrintMethod = PRINTMETHOD_NORMAL

Private Member Functions

BOOL CalcNumPaper ()
 This works out how many pieces of paper we will print to. NB: This can be different to the number of pieces of paper that comes out of the printer when the printer can do multiple copies and we are in a position to exploit this.
void SetScaleFactor (double ScaleFactor)
 Sets the scale percentage using the given scale factor This alters dependants automatically (unless importing) Dependants are: ScaledWidth ScaledHeight.
BOOL CalcPrintAreaVars (BOOL RedrawPrintBorders=TRUE)
 This function calcs member vars dependant on the total print area. The print area can be set up using SetUp().
BOOL CalcFit ()
 Recalcs the scale factor needed to fit the current page in the specified orientation, using the currently set fit type.
void CalcMultipleFit (INT32 NumRows, INT32 NumColumns, INT32 GutterVal, INT32 Wd, INT32 Ht, INT32 Extra)
 Recalcs the scale factor required for each page to fit the specified number of rows and columns, and gutter distance, to the paper.
INT32 GetCropAdjust () const
 Return the size of the extra area we need to take into account when fitting pages onto the printable paper. Currently the bleed size and crop area size is used.
double CalcPatchWidth (INT32 PaperWidth, INT32 NumColumns, INT32 GutterVal)
 The patch width = (width of the paper / num columns) - gutter.
double CalcPatchHeight (INT32 PaperHeight, INT32 NumRows, INT32 GutterVal)
 The patch Height = (Height of the paper / num rows) - gutter.
INT32 CalcMaxRows (INT32 GutterVal)
 Dynamically calcs the max num rows possible, given the current paper width and gutter setting.
INT32 CalcMaxColumns (INT32 GutterVal)
 Dynamically calcs the max num columns possible, given the current paper height and gutter setting.
INT32 CalcMaxGutter (INT32 NumRows, INT32 NumColumns)
 Dynamically calcs the max gutter value based on the given number of rows and columns, and the current paper size.
void RenderRect (RenderRegion *pRRegion, DocRect Rect, BOOL Fill)
 Renders the rect given.

Private Attributes

BOOL Printing
BOOL SelectionPresent
DocRect PatchClipRect
INT32 NumPrintablePages
INT32 NumPaper
INT32 PaperNumber
INT32 MaxPaperNumber
BOOL Reprint
INT32 NumPatches
INT32 PatchNumber
INT32 MaxPatchNumber
INT32 PatchRow
INT32 PatchColumn
MILLIPOINT SectionWidth
MILLIPOINT SectionHeight
BOOL PrintAreaSetUp
BOOL SetUpFailed
SpreadpSpread
DocRect TotalPrintArea
DocRect PrintableArea
INT32 PALeftMargin
INT32 PATopMargin
DocCoord Origin
INT32 PageWidth
INT32 PageHeight
INT32 PaperWidth
INT32 PaperHeight
INT32 OrigPageWidth
INT32 OrigPageHeight
BOOL DPS
MILLIPOINT Bleed
MILLIPOINT CropArea
BOOL WholeSpread
FIXED16 Scale
PrintOrient Orient
PrintFitType FitType
INT32 TopMargin
INT32 LeftMargin
INT32 ScaledWidth
INT32 ScaledHeight
INT32 CropTopMargin
INT32 CropLeftMargin
INT32 Rows
INT32 Columns
INT32 Gutter
TypesetInfo Typesetting
PrintLayers Layers
PSLevel PSLangLevel
BitmapResMethod BitmapResolutionMethod
INT32 DotsPerInch
PrintFillQuality FillQuality
PrintTextOptions TextOptions
BOOL Collated
INT32 NumCopies
BOOL PrintToFile
PrintRangeObj ObjPrintRange
PrintRangeDPS DPSPrintRange
BOOL UpdateDependants


Detailed Description

This class encapsulates all the print settings for a document, and controls how the document pages are printed on the paper.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/95
See also:
OptionsTabs; AppPrefsDlg; DocPrefsDlg;

Definition at line 309 of file printctl.h.


Constructor & Destructor Documentation

PrintControl::PrintControl  ) 
 

Default constructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 179 of file printctl.cpp.

00180 {
00181     PrintAreaSetUp = FALSE; // We haven't set the control up with a print area yet
00182     SetUpFailed    = FALSE; // We haven't called SetUp yet, so we haven't failed yet
00183     pSpread = NULL;
00184 
00185     TotalPrintArea  = DocRect(0,0,A4_WIDTH,A4_HEIGHT);
00186     PrintableArea   = TotalPrintArea;
00187     PALeftMargin    = 0;
00188     PATopMargin     = 0;
00189 
00190     Origin          = DocCoord(0,A4_HEIGHT);
00191 
00192     PageWidth   = A4_WIDTH;
00193     PageHeight  = A4_HEIGHT;
00194     PaperWidth  = A4_WIDTH;
00195     PaperHeight = A4_HEIGHT;
00196 
00197     DPS             = FALSE;
00198     Bleed           = 0;
00199     CropArea        = CROPAREA_SIZE+OUTSIDEBLEEDWIDTH;
00200     CropTopMargin   = 0;
00201     CropLeftMargin  = 0;
00202 
00203     // Print layout vars
00204     WholeSpread = FALSE;
00205 
00206     Scale   = FIXED16(100);
00207     Orient  = PRINTORIENTATION_UPRIGHT;
00208 
00209     FitType = PRINTFIT_BESTPAPER;
00210 
00211     TopMargin   = 0;
00212     LeftMargin  = 0;
00213     ScaledWidth = A4_WIDTH;
00214     ScaledHeight= A4_HEIGHT;
00215 
00216     Rows    = 1;
00217     Columns = 1;
00218     Gutter  = 0;
00219 
00220     // Print output vars
00221     Layers                  = PRINTLAYERS_VISIBLEFOREGROUND;
00222     // Job 10463: remove PS Level bits - default to Level 2
00223     PSLangLevel             = PSLEVEL_2;
00224 //  PrintMethod             = CurrentPrintMethod;
00225     BitmapResolutionMethod  = BITMAPRES_AUTO;
00226     DotsPerInch             = 150;
00227     FillQuality             = PRINTFILLQUALITY_MEDIUM;
00228     TextOptions             = PRINTTEXTOPTIONS_NORMAL;
00229 
00230     // General print vars
00231     Collated        = FALSE;
00232     NumCopies       = 1;
00233     PrintToFile     = FALSE;
00234     ObjPrintRange   = PRINTRANGEOBJ_ALL;
00235     DPSPrintRange   = PRINTRANGEDPS_BOTH;
00236 
00237     // Misc
00238     UpdateDependants = TRUE;
00239 
00240     // Print layout var initialisation
00241     Printing = FALSE;
00242 };

PrintControl::~PrintControl  ) 
 

Default deconstructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
PrintControl()PrintControl()

Definition at line 259 of file printctl.cpp.

00260 {
00261     // Does nowt as yet
00262 }


Member Function Documentation

String_256 PrintControl::BuildPaperSizeStr  ) 
 

This uses the printer settings to build the string displayed in the paper size field of a print options tab.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Returns the paper size string

Errors: -

See also:
-

Definition at line 415 of file printctl.cpp.

00416 {
00417     String_256 Str = TEXT("");
00418     String_256 TempStr = TEXT("");
00419 
00420     // If no print area set up, then assume we have no printer connected
00421     if (!PrintAreaSetUp)
00422         return Str;
00423 
00424     DimScale* pDimScale = NULL;
00425     if (pSpread != NULL)
00426         pDimScale = DimScale::GetPtrDimScale(pSpread);
00427 
00428     if (pDimScale != NULL)
00429     {
00430         BOOL ActiveState = pDimScale->IsActive();
00431         pDimScale->SetActiveState(FALSE);
00432 
00433         pDimScale->ConvertToUnits(PaperWidth,&TempStr);
00434         Str += TempStr;
00435 
00436         Str += String_32(_R(IDS_NUM_BY_NUM));
00437 
00438         pDimScale->ConvertToUnits(PaperHeight,&TempStr);
00439         Str += TempStr;
00440 //  WEBSTER-ranbirr-13/11/96
00441 #ifndef WEBSTER
00442         INT32 PrScale;
00443         if (CCPrintDialog::GetScale(&PrScale))
00444         {
00445             if (PrScale != 100)
00446             {
00447                 Str += String_256(_R(IDS_PRINT_PRINTERSCALING));
00448 
00449                 TCHAR s[100];
00450                 String_32 jcf(_R(IDS_PERCENT_FORMAT));
00451                 camSprintf(s, jcf, (INT32) PrScale);
00452                 Str += s;
00453             }
00454         }
00455 #endif //webster
00456         pDimScale->SetActiveState(ActiveState);
00457     }
00458 
00459     return Str;
00460 }

String_256 PrintControl::BuildPrintInfoStr  ) 
 

This uses the print control's settings to build the string displayed in the print info field of a print dlg.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Returns the print info string

Errors: -

See also:
-

Definition at line 280 of file printctl.cpp.

00281 {
00282     String_256 Str;
00283 
00284     switch (FitType)
00285     {
00286         case PRINTFIT_BEST:     Str = String_256(_R(IDS_PRINT_BESTFIT));    break;
00287         case PRINTFIT_CUSTOM:   Str = String_256(_R(IDS_PRINT_CUSTOMFIT));  break;
00288         case PRINTFIT_MULTIPLE: Str = String_256(_R(IDS_PRINT_MULTIPLEFIT));break;
00289         case PRINTFIT_BESTPAPER:Str = String_256(_R(IDS_PRINT_BESTFITPAPER));   break;
00290         default: ERROR3_PF(("Unknown fit type (%d)",FitType)); break;
00291     }
00292 
00293     TCHAR* format = _T("%.2lf%%");
00294     double fScale = Scale.MakeDouble();
00295     INT32 n = INT32((fScale*100)+0.5);
00296 
00297     if (n % 100 == 0)
00298         format = _T("%.0lf%%");
00299     else if (n % 10 == 0)
00300         format = _T("%.1lf%%");
00301 
00302     TCHAR s[100];
00303     camSprintf(s,format,fScale);
00304     Str += s;
00305 
00306     switch (Orient)
00307     {
00308         case PRINTORIENTATION_UPRIGHT:  Str += String_256(_R(IDS_PRINT_UPRIGHT));   break;
00309         case PRINTORIENTATION_SIDEWAYS: Str += String_256(_R(IDS_PRINT_SIDEWAYS));  break;
00310         default: ERROR3_PF(("Unknown orientation (%d)",Orient)); break;
00311     }
00312 
00313     // If no print area set up, then assume we have no printer connected
00314     if (!PrintAreaSetUp)
00315     {
00316         Str += String_256(_R(IDS_PRINT_NOPRINTER));
00317         return Str;
00318     }
00319 
00320     // Work out how many pages will get completely printed
00321     UINT32 NumPages = 1;
00322     UINT32 IDSPlural   = _R(IDS_PRINT_PAGES);
00323     UINT32 IDSSingular = _R(IDS_PRINT_PAGE);
00324 
00325     switch (FitType)
00326     {
00327         case PRINTFIT_BEST:
00328         case PRINTFIT_BESTPAPER:
00329             NumPages = 1;
00330             break;
00331 
00332         case PRINTFIT_MULTIPLE:
00333             NumPages = 0;
00334             if (StartPrinting())
00335             {
00336                 GetNextPaper();
00337 
00338                 PrintPatchInfo PatchInfo;
00339                 while (GetNextPatch(&PatchInfo))
00340                 {
00341                     DocRect Rect = PatchInfo.GetClipRect(FALSE,FALSE);
00342                     double ScaleFactor = PatchInfo.Scale.MakeDouble() / 100;
00343 
00344                     INT32 w = Rect.Width();
00345                     INT32 h = Rect.Height();
00346 
00347                     if (PatchInfo.Rotate)
00348                     {   INT32 t = w;    w = h;  h = t;  }
00349 
00350                     Rect.lo.x = PatchInfo.XTrans;
00351                     Rect.lo.y = PatchInfo.YTrans;
00352 
00353                     Rect.hi.x = Rect.lo.x + (INT32((double(w) * ScaleFactor)+0.5));
00354                     Rect.hi.y = Rect.lo.y + (INT32((double(h) * ScaleFactor)+0.5));
00355 
00356                     if (PrintableArea.ContainsRect(Rect))
00357                         NumPages++;
00358                 }
00359 
00360                 EndPrinting();
00361             }
00362             IDSPlural   = _R(IDS_PRINT_TILES);
00363             IDSSingular = _R(IDS_PRINT_TILE);
00364             break;
00365 
00366         case PRINTFIT_CUSTOM:
00367             {
00368                 DocRect Rect(0,PaperHeight-ScaledHeight,ScaledWidth,PaperHeight);
00369                 
00370                 INT32 CropAdj = GetCropAdjust();
00371                 INT32 TransX = LeftMargin + CropAdj;
00372                 INT32 TransY = TopMargin + CropAdj;
00373                 
00374                 Rect.Translate(TransX,-TransY);
00375                 if (PrintableArea.ContainsRect(Rect))
00376                     NumPages = 1;
00377                 else
00378                     NumPages = 0;
00379             }
00380             break;
00381     }
00382 
00383     if (NumPages >= 1)
00384     {
00385         camSprintf(s, TEXT("%ld") ,NumPages);
00386         Str += s;
00387 
00388         if (NumPages == 1)
00389             Str += String_256(IDSSingular);
00390         else
00391             Str += String_256(IDSPlural);
00392     }
00393     else
00394         Str += String_256(_R(IDS_PRINT_NOPAGESFIT));
00395 
00396     return Str;
00397 }

BOOL PrintControl::CalcFit  )  [private]
 

Recalcs the scale factor needed to fit the current page in the specified orientation, using the currently set fit type.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
- [INPUTS]
Returns:
TRUE if a recalc took place, FALSE if nothing has been recalced
This will only do anything when UpdateDependants is TRUE

See also:
CalcMultipleFit()

Definition at line 1126 of file printctl.cpp.

01127 {
01128     static BOOL IgnoreCall = FALSE;
01129 
01130     if (!UpdateDependants)
01131         return FALSE;
01132 
01133     if (IgnoreCall)     // Stop re-entrant calls to this function
01134         return TRUE;
01135 
01136     IgnoreCall = TRUE;
01137 
01138     // Set these value to absolutely ziltch
01139     CropTopMargin=0;
01140     CropLeftMargin=0;
01141 
01142     switch (FitType)
01143     {
01144         case PRINTFIT_MULTIPLE:
01145             {
01146                 INT32 PAWidth  = PaperWidth;
01147                 INT32 PAHeight = PaperHeight;
01148 
01149                 INT32 CropAdjust = GetCropAdjust();
01150 
01151                 PAWidth -= (CropAdjust<<1);
01152                 PAHeight -= (CropAdjust<<1);
01153 
01154                 CalcMultipleFit(Rows,Columns,Gutter,PAWidth,PAHeight,0);
01155                 
01156                 // these settings just show to the user whats happening in the dialogue
01157                 // they do not get used explicitly to position the pages.
01158                 if ((Rows==1) && (Columns==1))
01159                 {
01160                     LeftMargin = (PaperWidth -ScaledWidth) /2;
01161                     TopMargin  = (PaperHeight-ScaledHeight)/2;
01162                 }
01163             }
01164             break;
01165 
01166         case PRINTFIT_BEST:
01167             {
01168                 INT32 PAWidth  = PrintableArea.Width();
01169                 INT32 PAHeight = PrintableArea.Height();
01170 
01171                 INT32 CropAdjust = GetCropAdjust();
01172 
01173                 PAWidth -= (CropAdjust<<1);
01174                 PAHeight -= (CropAdjust<<1);
01175 
01176                 BOOL PAOrient   = ((double(PAWidth)         / double(PAHeight))       <= 1.0);
01177                 BOOL PageOrient = ((double(OrigPageWidth)   / double(OrigPageHeight ))<= 1.0);
01178 
01179                 PrintOrient NewOrient;
01180 
01181                 if (PAOrient == PageOrient)
01182                     NewOrient = PRINTORIENTATION_UPRIGHT;
01183                 else
01184                     NewOrient = PRINTORIENTATION_SIDEWAYS;
01185 
01186                 if (NewOrient != Orient)
01187                     SetPrintOrient(NewOrient);
01188 
01189                 CalcMultipleFit(1,1,0,PAWidth,PAHeight,0);
01190 
01191                 PAWidth += (CropAdjust<<1);
01192                 PAHeight += (CropAdjust<<1);
01193 
01194                 LeftMargin = PALeftMargin+((PAWidth -ScaledWidth) /2);
01195                 TopMargin  = PATopMargin +((PAHeight-ScaledHeight)/2);
01196             }
01197             break;
01198 
01199         case PRINTFIT_CUSTOM:
01200             {
01201                 INT32 CropAdjust = GetCropAdjust();
01202                 CropLeftMargin = CropAdjust;
01203                 CropTopMargin = CropAdjust;
01204                 SetScale(Scale);
01205             }
01206             break;
01207 
01208         case PRINTFIT_BESTPAPER:
01209             // Best fit the document paper size onto the printed page
01210             // without scaling, distortion or clipping
01211             {
01212                 INT32 PAWidth  = PaperWidth;
01213                 INT32 PAHeight = PaperHeight;
01214 
01215                 INT32 CropAdjust = GetCropAdjust();
01216 
01217                 PAWidth -= (CropAdjust<<1);
01218                 PAHeight -= (CropAdjust<<1);
01219 
01220                 // Compute aspect of document and aspect of printed page
01221                 // TRUE means rect is portrait orientation, taller than it is wide...
01222                 BOOL PAOrient   = (double(PAWidth)          <= double(PAHeight));
01223                 BOOL PageOrient = (double(OrigPageWidth)    <= double(OrigPageHeight));
01224 
01225                 PrintOrient NewOrient;
01226 
01227                 if (PAOrient == PageOrient)
01228                     NewOrient = PRINTORIENTATION_UPRIGHT;
01229                 else
01230                     NewOrient = PRINTORIENTATION_SIDEWAYS;
01231 
01232                 if (NewOrient != Orient)
01233                     SetPrintOrient(NewOrient);
01234 
01235                 CropLeftMargin = CropAdjust;
01236                 CropTopMargin = CropAdjust;
01237                 SetScale(100.0);
01238 
01239 //              PAWidth += (CropAdjust<<1);
01240 //              PAHeight += (CropAdjust<<1);
01241 
01242                 // Centre document page within printed page
01243                 LeftMargin = (PAWidth - ScaledWidth) / 2;
01244                 TopMargin = (PAHeight - ScaledHeight) / 2;
01245             }
01246             break;
01247 
01248         default:
01249             ERROR3_PF(("Unknown fit type (%d)",FitType));
01250             IgnoreCall = FALSE;
01251             return FALSE;
01252     }
01253 
01254     IgnoreCall = FALSE;
01255 
01256     return TRUE;
01257 }

INT32 PrintControl::CalcMaxColumns INT32  GutterVal  )  [private]
 

Dynamically calcs the max num columns possible, given the current paper height and gutter setting.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
GutterVal = the gutter value to use [INPUTS]
Returns:
Max num columns for the current paper height and gutter setting
This is based on the min scale factor allowed
See also:
-

Definition at line 995 of file printctl.cpp.

00996 {
00997     INT32 MaxColumns = 0;
00998     double MinScaleFactor = double(MinPrintScale)/100;
00999     double PatchWidth,ScaleFactor;
01000 
01001     do
01002     {
01003         MaxColumns += 1;
01004         PatchWidth = CalcPatchWidth(PaperWidth,MaxColumns,GutterVal);
01005         ScaleFactor = PatchWidth / PageWidth;
01006     } while (ScaleFactor >= MinScaleFactor);
01007 
01008     if (MaxColumns > 1)
01009         MaxColumns -= 1;
01010 
01011     return MaxColumns;
01012 }

INT32 PrintControl::CalcMaxGutter INT32  NumRows,
INT32  NumColumns
[private]
 

Dynamically calcs the max gutter value based on the given number of rows and columns, and the current paper size.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
NumRows = num rows to base calc on [INPUTS] NumColumns = num columns to base calc on
Returns:
Max gutter value
See also:
-

Definition at line 1029 of file printctl.cpp.

01030 {
01031     double MinScaleFactor = double(MinPrintScale)/100;
01032 
01033     double PatchWidth  = CalcPatchWidth(PaperWidth,NumColumns,0);
01034     double PatchHeight = CalcPatchHeight(PaperHeight,NumRows,0);
01035 
01036     INT32 MaxGutterWidth  = INT32((PatchWidth  - (double(PageWidth) *MinScaleFactor))+0.5);
01037     INT32 MaxGutterHeight = INT32((PatchHeight - (double(PageHeight)*MinScaleFactor))+0.5);
01038 
01039     if (MaxGutterWidth < MaxGutterHeight)
01040         return MaxGutterWidth;
01041     else
01042         return MaxGutterHeight;
01043 }

INT32 PrintControl::CalcMaxRows INT32  GutterVal  )  [private]
 

Dynamically calcs the max num rows possible, given the current paper width and gutter setting.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
GutterVal = the gutter value to use [INPUTS]
Returns:
Max num rows for the current paper width and gutter setting
This is based on the min scale factor allowed
See also:
-

Definition at line 960 of file printctl.cpp.

00961 {
00962     INT32 MaxRows = 0;
00963     double MinScaleFactor = double(MinPrintScale)/100;
00964     double PatchHeight,ScaleFactor;
00965 
00966     do
00967     {
00968         MaxRows += 1;
00969         PatchHeight = CalcPatchHeight(PaperHeight,MaxRows,GutterVal);
00970         ScaleFactor = PatchHeight / PageHeight;
00971     } while (ScaleFactor >= MinScaleFactor);
00972 
00973     if (MaxRows > 1)
00974         MaxRows -= 1;
00975 
00976     return MaxRows;
00977 }

void PrintControl::CalcMultipleFit INT32  NumRows,
INT32  NumColumns,
INT32  GutterVal,
INT32  Wd,
INT32  Ht,
INT32  Extra
[private]
 

Recalcs the scale factor required for each page to fit the specified number of rows and columns, and gutter distance, to the paper.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
NumRows = num rows to fit on paper [INPUTS] NumColumns = num columns to fit on paper GutterVal = gutter distance between each page Wd = Width of paper Ht = Height of paper Extra = An adjustment made to the page size (usually 0)
Returns:
-
Dependants are: Scale ScaledWidth ScaledHeight

See also:
StartImport() & EndImport()

Definition at line 1070 of file printctl.cpp.

01071 {
01072     // Calc the width and height of each patch on the page, taking into account the given gutter value
01073     double PatchWidth  = CalcPatchWidth(Wd,NumColumns,GutterVal);
01074     double PatchHeight = CalcPatchHeight(Ht,NumRows,GutterVal);
01075 
01076     // Work out the scale factor required to get the width of the page into this patch
01077     double ScaleFactor = PatchWidth / double(PageWidth+Extra);
01078 
01079     // Calc the new width and height of each page by applying the scale factor
01080     double NewWidth = PageWidth  * ScaleFactor;
01081     double NewHeight= PageHeight * ScaleFactor;
01082 
01083     // If the scale factor made using the page width and patch width means that the page does NOT entirely
01084     // fit into a multiple-fit patch, then use the scale factor generated using the patch height and page height
01085     //
01086     // (NB: We add 1.0 to these values so that the '>' comparisons don't fail due to insignificant floating point errors).
01087     //
01088     if ((NewWidth > (PatchWidth+1.0)) || (NewHeight > (PatchHeight+1.0)))
01089         ScaleFactor = PatchHeight / double(PageHeight+Extra);
01090     
01091     #ifdef _DEBUG
01092     {
01093         // In theory, when the scale factor is applied to the page width and height, the page will fit
01094         // entirely into a patch.  However, we still better check this is true when in debug builds
01095 
01096         NewWidth = PageWidth  * ScaleFactor;
01097         NewHeight= PageHeight * ScaleFactor;
01098 
01099         if ((NewWidth > (PatchWidth+1.0)) || (NewHeight > (PatchHeight+1.0)))
01100         {
01101             ERROR3("Multiple fit scale factor does not fit page into patch");
01102         }
01103     }
01104     #endif
01105     
01106     SetScaleFactor(ScaleFactor);        // Use SetScaleFactor() to recalc ScaledWidth and ScaledHeight
01107 }

BOOL PrintControl::CalcNumPaper  )  [private]
 

This works out how many pieces of paper we will print to. NB: This can be different to the number of pieces of paper that comes out of the printer when the printer can do multiple copies and we are in a position to exploit this.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/4/95
Parameters:
- [INPUTS]
NumPaper = The number of pieces of paper we will print to [OUTPUTS]
Returns:
TRUE if it was able to cal num paper to print to, FALSE otherwise
It takes into account DPS, whole spread & left or right-only settings. It also takes into account the collated flag & the ability of the printer to do multiple copies.

The number of pieces of paper that the printer will produce at the end of the print job = number of printable pages * num copies

If the output is colla

See also:
GetDotsPerInch()

Definition at line 1753 of file printctl.cpp.

01754 {
01755     BOOL CanMultiCopy=TRUE;
01756 //  WEBSTER-ranbirr-13/11/96
01757 #ifndef WEBSTER 
01758     // Can the printer do multiple copies?
01759     if (!CCPrintDialog::CanMultiCopy(&CanMultiCopy))
01760         return FALSE;
01761 #endif //webster
01762     INT32 NumActualPiecesOfPaper = NumPrintablePages * NumCopies;   // Num pieces of paper that will come out of printer
01763 
01764     // NumPaper will be the number of pieces of paper we will print to
01765     // Default to the number printable of pages
01766     NumPaper = NumPrintablePages;
01767 
01768     if (NumPrintablePages == 1)
01769     {
01770         // If the printer can't cope with multiple copies, we'll have to do them all
01771         if (!CanMultiCopy)
01772             NumPaper = NumActualPiecesOfPaper;
01773     }
01774     else
01775     {
01776         // If the printer can't cope with multiple copies OR we need to collate the output
01777         // we'll have to do them all
01778         if (Collated || !CanMultiCopy)
01779             NumPaper = NumActualPiecesOfPaper;
01780     }   
01781 
01782     return TRUE;
01783 }

double PrintControl::CalcPatchHeight INT32  Ht,
INT32  NumRows,
INT32  GutterVal
[private]
 

The patch Height = (Height of the paper / num rows) - gutter.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
Ht = Height of paper [INPUTS] NumRows = number of rows across the paper Gutter = gutter distance between each page
Returns:
The Height of each patch for multiple fit printing
See also:
-

Definition at line 939 of file printctl.cpp.

00940 {
00941     return ((double(Ht) / double(NumRows)) - double(GutterVal));
00942 }

double PrintControl::CalcPatchWidth INT32  Wd,
INT32  NumColumns,
INT32  GutterVal
[private]
 

The patch width = (width of the paper / num columns) - gutter.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
Wd = Width of paper [INPUTS] NumColumns = number of columns down the paper Gutter = gutter distance between each page
Returns:
The width of each patch for multiple fit printing
See also:
-

Definition at line 919 of file printctl.cpp.

00920 {
00921     return ((double(Wd) / double(NumColumns)) - double(GutterVal));
00922 }

BOOL PrintControl::CalcPrintAreaVars BOOL  RedrawPrintBorders = TRUE  )  [private]
 

This function calcs member vars dependant on the total print area. The print area can be set up using SetUp().

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
RedrawPrintBorders - True if want a force redraw of associated docs (Defaults to TRUE) [INPUTS]
- [OUTPUTS]
Returns:
TRUE if able to recalc
Dependants are: PageWidth PageHeight Origin PrintableArea

It takes into account orientation, and whether its a double page spread (DPS). If it's a DPS, it also takes the WholeSpread setting into account

NOTE: This func also finds out the width and height of the printer's paper using CCPrintDialog::GetPaperSize(), and calcs the paper's area too

Returns:
Errors: -
See also:
SetUp()

Definition at line 619 of file printctl.cpp.

00620 {
00621     // Calc the print area origin
00622     Origin.x = TotalPrintArea.lo.x;
00623     Origin.y = TotalPrintArea.hi.y;
00624 
00625     //-------------------------
00626     // Find out the dimensions of the printer's paper (in MILLIPOINTS)
00627     wxSize PaperSize;
00628 //  WEBSTER-ranbirr-13/11/96
00629 #ifndef WEBSTER
00630     if (!CCPrintDialog::GetPaperSize(&PaperSize, RedrawPrintBorders))
00631         return FALSE;
00632 #endif //webster
00633     PaperWidth  = PaperSize.GetWidth();
00634     PaperHeight = PaperSize.GetHeight();
00635 
00636     // ------------------------
00637     // Get the printable area on the paper (defined relative to a origin at the bottom left of paper)
00638     // and the top & left margins of the printable area
00639 //  WEBSTER-ranbirr-13/11/96
00640 #ifndef WEBSTER
00641     if (!CCPrintDialog::GetPrintableArea(&PrintableArea))
00642         return FALSE;
00643     if (!CCPrintDialog::GetPrintMargins(&PALeftMargin,&PATopMargin))
00644         return FALSE;
00645 #endif //webster
00646     //-------------------------
00647     // Calc the width and height of the print area
00648     PageWidth  = TotalPrintArea.hi.x - TotalPrintArea.lo.x;
00649     PageHeight = TotalPrintArea.hi.y - TotalPrintArea.lo.y;
00650 
00651     // If double page spread AND printing single pages, half the width for each page printed
00652     if (DPS && !WholeSpread) 
00653         (PageWidth) /= 2;
00654 
00655     // Save the orig values in case PageWidth & PageHeight need to be swapped due to sideways orientation
00656     OrigPageWidth  = PageWidth;
00657     OrigPageHeight = PageHeight;
00658 
00659     // If printing sideways, the width and height of the printed page should be swapped
00660     if (Orient == PRINTORIENTATION_SIDEWAYS)
00661         Swap(PageWidth,PageHeight);
00662 
00663     return TRUE;
00664 }

void PrintControl::EndImport  ) 
 

Tells the object that it's data is no longer being imported.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
- [INPUTS]
See also:
StartImport()

Definition at line 705 of file printctl.cpp.

00706 {
00707     UpdateDependants = TRUE;
00708 }

void PrintControl::EndPlatePrinting PrintView pPrintView  ) 
 

This function makes sure the plate printing loop is shut down correctly. We need to make sure that the last plate is detached from the colour context inside the print view, otherwise when the print view is destroyed the plate in the colour context in the print view will be destroyed. As our printer dialogue keeps this in its list, we need to make sure it only gets deleted once during that lists destruction.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/6/96
Parameters:
- [INPUTS]
Returns:
-

Definition at line 2319 of file printctl.cpp.

02320 {
02321     // If there's no view, drawing will be rather tricky
02322     if (pPrintView == NULL)
02323     {
02324         ERROR3("Sanity check, The view is NULL during StartPlatePrinting!");
02325         return;
02326     }
02327     
02328     pPrintView->SetColourContext(COLOURMODEL_CMYK, NULL);
02329 }

BOOL PrintControl::EndPrinting  ) 
 

This informs the print info object that you have finished printing.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/95
Parameters:
- [INPUTS]
Returns:
TRUE if all OK, FALSE otherwise
See also:
StartPrinting();

Definition at line 1879 of file printctl.cpp.

01880 {
01881     ERROR2IF(!Printing,FALSE,"Not printing - have you called StartPrinting()?");
01882     Printing = FALSE;
01883     return TRUE;
01884 }

BitmapResMethod PrintControl::GetBitmapResMethod  )  [inline]
 

Definition at line 366 of file printctl.h.

00366 { return BitmapResolutionMethod; }

INT32 PrintControl::GetColumns  )  [inline]
 

Definition at line 354 of file printctl.h.

00354 { return Columns; }

INT32 PrintControl::GetCropAdjust  )  const [private]
 

Return the size of the extra area we need to take into account when fitting pages onto the printable paper. Currently the bleed size and crop area size is used.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/12/96
Parameters:
- [INPUTS]
Returns:
An INT32, the width of the crop area

Definition at line 1273 of file printctl.cpp.

01274 {
01275     INT32 CropAdjust = 0;
01276     
01277     PrintMarksMan *pMarksMan = GetApplication()->GetMarksManager();
01278     if (pMarksMan && Typesetting.OutputPrintersMarks())
01279         CropAdjust = CropArea+Bleed;
01280 
01281     return CropAdjust;
01282 }

INT32 PrintControl::GetDotsPerInch  ) 
 

If the bitmap res setting is manual then the value the user entered is returned. If the bitmap res setting is automatic, then base the DPI on the printer's DPI.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/4/95
Parameters:
- [INPUTS]
Returns:
DPI value used to render bitmaps
Bitmap res = Half printer res

if (Bitmap res > MAXAUTOBITMAPDPI) Bitmap res = MAXAUTOBITMAPDPI;

if (Bitmap res < MINBITMAPDPI) Bitmap res = MINBITMAPDPI;

See also:
SetDotsPerInch();

Definition at line 1572 of file printctl.cpp.

01573 {
01574     // MRH 11/9/00 - Tidied up code to make it more readable
01575     // Basically the code checks to see if the auto flag is set.
01576     // If NOT set then the DotsPerInch variable is left with the value in the manual edit box.
01577     // If it is set then it gets the current printer resolution and divides it by 2!
01578     if (BitmapResolutionMethod == BITMAPRES_AUTO)
01579     {
01580         // Choose the DPI automatically
01581         // This is based on the printer resolution
01582         // Set up the local variable to the max auto dpi!
01583         INT32 PrinterDPI = MAXAUTOBITMAPDPI;
01584 
01585         // Get the printer resolution (if this fails, choose the maximum setting)
01586         if (!CCPrintDialog::GetResolution(&PrinterDPI))
01587             PrinterDPI = MAXAUTOBITMAPDPI; // Failing could change the variable so reset it!
01588 
01589         // Make the DPI half the printer res
01590         DotsPerInch = PrinterDPI >> 1;
01591 
01592         // If this DPI value > MAXAUTOBITMAPDPI, then probably printing to a typesetter, in which case cap it as 
01593         // there's no point in printing at any higher DPI
01594         if (DotsPerInch > MAXAUTOBITMAPDPI)
01595             DotsPerInch = MAXAUTOBITMAPDPI;
01596 
01597         // Make sure that it doesn't dip below the min.
01598         // If it does, choose the printer DPI, so that we ensure good quality for low DPI settings
01599         if (DotsPerInch < MINBITMAPDPI)
01600             DotsPerInch = PrinterDPI;
01601     }
01602 
01603     // return the new value!
01604     return DotsPerInch;
01605 }

PrintRangeDPS PrintControl::GetDPSPrintRange  )  [inline]
 

Definition at line 388 of file printctl.h.

00388 { return DPSPrintRange; }

PrintFillQuality PrintControl::GetFillQuality  )  [inline]
 

Definition at line 370 of file printctl.h.

00370 { return FillQuality; }

PrintFitType PrintControl::GetFitType  )  [inline]
 

Definition at line 337 of file printctl.h.

00337 { return FitType; }

INT32 PrintControl::GetGutter  )  [inline]
 

Definition at line 356 of file printctl.h.

00356 { return Gutter; }

INT32 PrintControl::GetHeight void   )  [inline]
 

Definition at line 349 of file printctl.h.

00349 { return ScaledHeight;}

INT32 PrintControl::GetLeftMargin  )  [inline]
 

Definition at line 345 of file printctl.h.

00345 { return LeftMargin; }

BOOL PrintControl::GetNextPaper  ) 
 

Call this for each piece of paper to be printed to. NB: You must call StartPrinting() before calling this func as part of your print loop.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/95
Parameters:
- [INPUTS]
Returns:
TRUE if you should print on another piece of paper FALSE if the print job should end
If ReprintPaper() is called after GetNextPaper(), then the next time you call GetNextPaper() you will actually be printing the previous piece of paper e.g while (GetNextPaper()) // Infinite loop ReprintPaper();

See also:
StartPrinting(),EndPrinting(), ReprintPaper()

Definition at line 1913 of file printctl.cpp.

01914 {
01915     ERROR2IF(!Printing,FALSE,"Not printing - have you called StartPrinting()?");
01916 
01917     // Do we need to reprint the same piece of paper?
01918     if (Reprint)
01919     {
01920         // Only re-jig the counters if we have called GetNextPaper() at least once
01921         if (NumPaper < MaxPaperNumber)
01922         {
01923             NumPaper++;
01924             PaperNumber--;
01925         }
01926         // Reprinting, so set flag to FALSE
01927         Reprint = FALSE;
01928     }
01929 
01930     if (NumPaper > 0)
01931     {
01932         NumPaper--;
01933         PaperNumber++;
01934 
01935         // Calc the number of patches we'll have to print on this next piece of paper
01936         if (FitType == PRINTFIT_MULTIPLE)
01937         {
01938             NumPatches  = Rows*Columns;
01939 
01940             // PatchRow & PatchColumn form a coordinate specifying which patch to print next
01941             PatchRow    = 0;
01942             PatchColumn = 0;
01943 
01944             // Section width and height define the size of the areas of the page patches will fit into.
01945             // Effectively these are the patch sizes ignoring the gutter value.
01946             // Each patch is centred within a section of the page.
01947             INT32 CropAdjust = GetCropAdjust();
01948             INT32 PAWidth    = PaperWidth - (CropAdjust<<1);
01949             INT32 PAHeight   = PaperHeight - (CropAdjust<<1);
01950             SectionWidth    = INT32(CalcPatchWidth(PAWidth, Columns,0));
01951             SectionHeight   = INT32(CalcPatchHeight(PAHeight,Rows,   0));
01952         }
01953         else
01954             NumPatches = 1;
01955 
01956         // PatchNumber is the number of the current patch being printed to.
01957         // MaxPatchNumber is the total number of patches printed on this piece of paper
01958         PatchNumber    = 0;         // incremented at the start of GetNextPatch()
01959         MaxPatchNumber = NumPatches;
01960 
01961         // Calc the object clip rect used to define which objects within the total printable area should
01962         // be printed on this piece of paper
01963         //
01964         // Default to the total printable area
01965         PatchClipRect = TotalPrintArea;
01966 
01967         if (NumPrintablePages > 1)
01968         {
01969             // The number of printable pages > 1 (i.e. we have a double page spread, we are printing
01970             // both left & right pages, and printing individual pages)
01971             
01972             INT32 m;
01973             
01974             if (Collated)
01975             {
01976                 // If collated output, then oscillate the clip rect
01977                 // between the left and right page, controlled by the current paper number
01978                 m = (PaperNumber-1) % NumPrintablePages;
01979             }
01980             else
01981             {
01982                 // Otherwise, print 'n' left pages followed by 'n' right pages
01983                 m = (PaperNumber-1) / (MaxPaperNumber / NumPrintablePages);
01984             }
01985 
01986             PatchClipRect.lo.x += (OrigPageWidth*m);
01987             PatchClipRect.hi.x  = PatchClipRect.lo.x + OrigPageWidth;
01988         }
01989         else
01990         {
01991             if (DPS && !WholeSpread && (DPSPrintRange != PRINTRANGEDPS_BOTH))
01992             {
01993                 // Here we have a DPS, we are printing individual pages, but we are either
01994                 // printing left-only or right-only pages
01995                 //
01996                 // So if right only, add the page width to the lo.x coord to move the area to the right hand side.
01997                 // In either case, the patch clip rect hi.x will be lo.x+OrigPageWidth.
01998 
01999                 if (DPSPrintRange == PRINTRANGEDPS_RIGHTPAGES)
02000                     PatchClipRect.lo.x += OrigPageWidth;
02001 
02002                 PatchClipRect.hi.x = PatchClipRect.lo.x + OrigPageWidth;
02003             }
02004         }                   
02005 
02006         // take into account the bleed margin
02007 /*
02008         PatchClipRect.Inflate(Bleed);
02009         if (Orient == PRINTORIENTATION_SIDEWAYS)
02010             PatchClipRect.Translate(-Bleed,Bleed);
02011         else
02012             PatchClipRect.Translate(Bleed,Bleed);
02013 */
02014         return TRUE;
02015     }
02016 
02017     return FALSE;
02018 }

BOOL PrintControl::GetNextPatch PrintPatchInfo pPatchInfo  ) 
 

Each time this func returns TRUE, print the page using the data set up by this call.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/95
Parameters:
pPatchInfo = ptr to object to store patch info in [INPUTS]
- [OUTPUTS]
Returns:
TRUE if you should print another page on the paper FALSE if the piece of paper printed to is finished.
If this call returns TRUE, the the given PrintPatchInfo has been set up with all the data needed to print the given patch.

NB: You must call GetNextPaper() before calling this func as part of your print loop

See also:
StartPrinting(), GetNextPaper(), EndPrinting()

Definition at line 2089 of file printctl.cpp.

02090 {
02091     ERROR2IF(!Printing,FALSE,"Not printing - have you called StartPrinting()?");
02092     ERROR2IF(pPatchInfo == NULL,FALSE,"Given NULL pPatchInfo param");
02093 
02094     if (NumPatches > 0)
02095     {
02096         NumPatches--;
02097         PatchNumber++;
02098 
02099         pPatchInfo->pSpread         = pSpread;
02100         pPatchInfo->Scale           = Scale;
02101         pPatchInfo->ClipRect        = PatchClipRect;
02102         pPatchInfo->Rotate          = (Orient == PRINTORIENTATION_SIDEWAYS);
02103         pPatchInfo->SelectedOnly    = ((ObjPrintRange == PRINTRANGEOBJ_SELECTED) && SelectionPresent);
02104         pPatchInfo->VisibleLayers   = (Layers == PRINTLAYERS_VISIBLEFOREGROUND);
02105         pPatchInfo->XTrans          = 0;
02106         pPatchInfo->YTrans          = 0;
02107         pPatchInfo->PaperWidth      = PaperWidth;
02108         pPatchInfo->PaperHeight     = PaperHeight;
02109         pPatchInfo->ScaledWidth     = ScaledWidth;
02110         pPatchInfo->ScaledHeight    = ScaledHeight;
02111         pPatchInfo->Bleed           = Bleed;
02112         pPatchInfo->CropArea        = CropArea;
02113         pPatchInfo->PaperNumber     = PaperNumber;
02114         pPatchInfo->MaxPaperNumber  = MaxPaperNumber;
02115         pPatchInfo->PatchNumber     = PatchNumber;
02116         pPatchInfo->MaxPatchNumber  = MaxPatchNumber;
02117         pPatchInfo->PALeftMargin    = PALeftMargin;
02118         pPatchInfo->PATopMargin     = PATopMargin;
02119 
02120         // set emulsion up/down for print rendering
02121         TypesetInfo* tpInfo = GetTypesetInfo();
02122         pPatchInfo->EmulsionDown = ( (tpInfo != NULL) && tpInfo->PrintEmulsionDown() );
02123 
02124         switch (FitType)
02125         {
02126             case PRINTFIT_BEST:
02127                 // Move it to the right by LeftMargin, and down by TopMargin
02128                 pPatchInfo->XTrans = LeftMargin;
02129                 pPatchInfo->YTrans = (PaperHeight-ScaledHeight)-TopMargin;
02130                 break;
02131 
02132             case PRINTFIT_BESTPAPER:
02133                 // Move it to the right by LeftMargin, and down by TopMargin
02134                 pPatchInfo->XTrans = LeftMargin;
02135                 pPatchInfo->YTrans = (PaperHeight-ScaledHeight)-TopMargin;
02136                 pPatchInfo->XTrans += CropLeftMargin;
02137                 pPatchInfo->YTrans -= CropTopMargin;
02138                 break;
02139 
02140             case PRINTFIT_CUSTOM:
02141             {
02142                 // Move it to the right by LeftMargin, and down by TopMargin
02143                 pPatchInfo->XTrans = LeftMargin;
02144                 pPatchInfo->YTrans = (PaperHeight-ScaledHeight)-TopMargin;
02145                 pPatchInfo->XTrans += CropLeftMargin;
02146                 pPatchInfo->YTrans -= CropTopMargin;
02147             }
02148             break;
02149 
02150             case PRINTFIT_MULTIPLE:
02151             {
02152                 // Translate to the bottom left of the current patch
02153                 INT32 CropAdjust = GetCropAdjust();
02154                 
02155                 pPatchInfo->XTrans = CropAdjust + (SectionWidth  * PatchColumn) + ((SectionWidth  - ScaledWidth)/2);
02156                 pPatchInfo->YTrans = CropAdjust + (SectionHeight * PatchRow)    + ((SectionHeight - ScaledHeight)/2);
02157 
02158                 PatchColumn += 1;
02159                 if (PatchColumn >= Columns)
02160                 {
02161                     PatchColumn = 0;
02162                     PatchRow += 1;
02163                 }
02164             }
02165             break;
02166 
02167             default:
02168                 ERROR3_PF(("Unknown fit type : %d",FitType));
02169                 break;
02170         }
02171 
02172         return TRUE;
02173     }
02174 
02175     return FALSE;
02176 }

INT32 PrintControl::GetNumCopies  )  [inline]
 

Definition at line 382 of file printctl.h.

00382 { return NumCopies; }

INT32 PrintControl::GetNumPrintablePages  ) 
 

This tells you how many individual pages are printable, given the current settings.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/4/95
Parameters:
- [INPUTS]
Returns:
Number of printable pages (1 or 2)
1 is returned: If it's not a DPS If it's a DPS, but we're printing the whole spread as one page If it's a DPS, we're printing individual pages, but the print range is either Left or Right-only

2 is returned: It's a DPS AND individual pages AND printing both pages

See also:
-

Definition at line 735 of file printctl.cpp.

00736 {
00737     if (DPS && !WholeSpread && (DPSPrintRange == PRINTRANGEDPS_BOTH))
00738         return 2;
00739     else
00740         return 1;
00741 }

PrintRangeObj PrintControl::GetObjPrintRange  ) 
 

Find out the object range the user wants to print to.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/7/96
Parameters:
- [INPUTS]
Returns:
PRINTRANGEOBJ_ALL or PRINTRANGEOBJ_SELECTED
This function has been modified (today 22/7/96) so that it reacts to the current selection. This is to fix bug 4857, which meant if you selected "print selected objects" then deselected all the objects, it would still print the selected objects, resulting in a blank page.

What's worse, the UI in the print dlg would grey out, so you couldn't switch it off.

This routine will mean that "print all" is on if the internal var is PRINTRANGEOBJ_ALL OR there are no selected objects.

See also:
GetPrintMethod()

Definition at line 1712 of file printctl.cpp.

01713 {
01714     // Find the selection
01715     SelRange* pSelRange = GetApplication()->FindSelection();
01716 
01717     if (pSelRange->FindFirst() != NULL)
01718         return ObjPrintRange;       // There are selected objects, so return the setting the user has made.
01719     else
01720         return PRINTRANGEOBJ_ALL;   // There's no selected objects, so always print all objects.
01721 }

PrintLayers PrintControl::GetPrintLayers  )  [inline]
 

Definition at line 360 of file printctl.h.

00360 { return Layers; }

PrintMethodType PrintControl::GetPrintMethod  ) 
 

Returns the app's print method. This is stored in the global var AppPrintMethod.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/7/95
Parameters:
- [INPUTS]
Returns:
The app's current print method
See also:
SetPrintMethod()

Definition at line 1663 of file printctl.cpp.

01664 {
01665     return AppPrintMethod;
01666 }

PrintOrient PrintControl::GetPrintOrient  )  [inline]
 

Definition at line 334 of file printctl.h.

00334 { return Orient; }

BOOL PrintControl::GetPrintToFile  )  [inline]
 

Definition at line 384 of file printctl.h.

00384 { return PrintToFile; }

PSLevel PrintControl::GetPSLevel  )  [inline]
 

Definition at line 362 of file printctl.h.

00362 { return PSLangLevel; }

INT32 PrintControl::GetRows  )  [inline]
 

Definition at line 352 of file printctl.h.

00352 { return Rows; }

FIXED16 PrintControl::GetScale  )  [inline]
 

Definition at line 331 of file printctl.h.

00331 { return Scale; }

PrintTextOptions PrintControl::GetTextOptions  )  [inline]
 

Definition at line 372 of file printctl.h.

00372 { return TextOptions; }

INT32 PrintControl::GetTopMargin  )  [inline]
 

Definition at line 343 of file printctl.h.

00343 { return TopMargin; }

TypesetInfo* PrintControl::GetTypesetInfo  )  [inline]
 

Definition at line 340 of file printctl.h.

00340 { return &Typesetting; }

INT32 PrintControl::GetWidth void   )  [inline]
 

Definition at line 347 of file printctl.h.

00347 { return ScaledWidth; }

BOOL PrintControl::IsCollated  )  [inline]
 

Definition at line 380 of file printctl.h.

00380 { return Collated; }

BOOL PrintControl::IsDoublePageSpread  )  [inline]
 

Definition at line 328 of file printctl.h.

00328 { return DPS; }

BOOL PrintControl::IsWholeSpread  )  [inline]
 

Definition at line 325 of file printctl.h.

00325 { return WholeSpread; }

BOOL PrintControl::MorePaper  ) 
 

Call this for each piece of paper to be printed to.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/6/96
Parameters:
- [INPUTS]
Returns:
TRUE if there is more paper to come FALSE if there's no more paper.

Definition at line 2035 of file printctl.cpp.

02036 {
02037     if (Reprint && NumPaper < MaxPaperNumber)
02038         return TRUE;
02039 
02040     return (NumPaper > 0);
02041 }

BOOL PrintControl::MorePlates  ) 
 

Call this to determin whether there are more plates to print during this separation.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/6/96
Parameters:
- [INPUTS]
Returns:
TRUE if there is more plates to come FALSE if there's no more plates.

Definition at line 2347 of file printctl.cpp.

02348 {
02349     return (Typesetting.NumPrintPlatesRemaining() > 0);
02350 }

PrintControl & PrintControl::operator= PrintControl other  ) 
 

The assignment operator for PrintControl.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/95
Parameters:
the object to copy [INPUTS]
- [OUTPUTS]
Returns:
ref to copy of other

Errors: -

See also:
-

Definition at line 477 of file printctl.cpp.

00478 {
00479     PrintAreaSetUp  = other.PrintAreaSetUp;
00480     SetUpFailed     = other.SetUpFailed;
00481     pSpread         = other.pSpread;
00482 
00483     TotalPrintArea  = other.TotalPrintArea;
00484     PrintableArea   = other.PrintableArea;
00485     PALeftMargin    = other.PALeftMargin;
00486     PATopMargin     = other.PATopMargin;
00487 
00488     Origin          = other.Origin;
00489     PaperWidth      = other.PaperWidth;
00490     PaperHeight     = other.PaperHeight;
00491     PageWidth       = other.PageWidth;
00492     PageHeight      = other.PageHeight; 
00493     OrigPageWidth   = other.OrigPageWidth;
00494     OrigPageHeight  = other.OrigPageHeight;
00495 
00496     // Print layout vars
00497     WholeSpread     = other.WholeSpread;
00498     DPS             = other.DPS;
00499     Bleed           = other.Bleed;
00500 
00501     CropArea        = other.CropArea;
00502     CropTopMargin   = other.CropTopMargin;
00503     CropLeftMargin  = other.CropLeftMargin;
00504 
00505     Scale   = other.Scale;
00506     Orient  = other.Orient;
00507 
00508     FitType = other.FitType;
00509 
00510     TopMargin   = other.TopMargin;
00511     LeftMargin  = other.LeftMargin;
00512     ScaledWidth = other.ScaledWidth;
00513     ScaledHeight= other.ScaledHeight;
00514 
00515     Rows    = other.Rows;
00516     Columns = other.Columns;
00517     Gutter  = other.Gutter;
00518 
00519     // Print output vars
00520     Layers                  = other.Layers;
00521     PSLangLevel             = other.PSLangLevel;
00522 //  PrintMethod             = other.PrintMethod;
00523     BitmapResolutionMethod  = other.BitmapResolutionMethod;
00524     DotsPerInch             = other.DotsPerInch;
00525     FillQuality             = other.FillQuality;
00526     TextOptions             = other.TextOptions;
00527 
00528     // General print vars
00529     Collated        = other.Collated;
00530     NumCopies       = other.NumCopies;
00531     PrintToFile     = other.PrintToFile;
00532     ObjPrintRange   = other.ObjPrintRange;
00533     DPSPrintRange   = other.DPSPrintRange;
00534 
00535     // The TypesetInfo
00536     Typesetting = other.Typesetting;
00537 
00538     // Finally, make sure we have calculated all of the print settings like scaling properly
00539     if (pSpread != NULL)
00540         SetUp(pSpread);
00541 
00542     return *this;
00543 };

BOOL PrintControl::RedrawPrintableArea DocView pDocView  )  [static]
 

This func can be passed as a param to Document::ForceRedraw() and hence can control which views get redraw. This func ensures that only views that are showing print borders get redrawn.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/5/95
Parameters:
pDocView - ptr to DocView to redraw [INPUTS]
- [OUTPUTS]
Returns:
-
See also:
StartPrinting(), GetNextPaper(), EndPrinting()

Definition at line 2617 of file printctl.cpp.

02618 {
02619     if (pDocView->GetShowPrintBorders())
02620         return(TRUE);
02621     
02622     ColourPlateType PlateType = COLOURPLATE_NONE;
02623     if (pDocView->GetColourPlate() && !pDocView->GetColourPlate()->IsDisabled())
02624         PlateType = pDocView->GetColourPlate()->GetType();
02625         
02626     return(PlateType != COLOURPLATE_NONE && PlateType != COLOURPLATE_COMPOSITE);
02627 }

void PrintControl::RenderPrintBorder RenderRegion pRRegion  ) 
 

Renders the printable area on the spread according to the current print layout method.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/95
Parameters:
pRRegion = ptr to a render region [INPUTS]
- [OUTPUTS]
Returns:
-
See also:
StartPrinting(), GetNextPaper(), EndPrinting() Note: As we are being given a render region that may be in the background redraw list, forcing a redraw of documents is very bad as this **MAY** delete the render region we hae been given. This used to happen if setup hadn't been called before when routine was entered for the first time.

Definition at line 2450 of file printctl.cpp.

02451 {
02452     if (SetUpFailed)
02453         return;
02454 
02455     BOOL DrawBorders = FALSE;
02456 
02457     switch (FitType)
02458     {
02459         // Always try and show print borders for these fit types
02460         case PRINTFIT_BEST:
02461         case PRINTFIT_BESTPAPER:
02462         case PRINTFIT_CUSTOM:
02463             DrawBorders = TRUE;
02464             break;
02465 
02466         // Only try and show print borders for multiple fit when doing 1 row by 1 column
02467         case PRINTFIT_MULTIPLE:
02468             DrawBorders = ((Rows == 1) && (Columns == 1));
02469             break;
02470 
02471         default: 
02472             ERROR3_PF(("Unknown fit type (%d)",FitType)); 
02473             break;
02474     }
02475 
02476     // If we can draw borders for this fit type, ensure that the relevent info is available to do so
02477     if (DrawBorders)
02478     {
02479         // Neville 29/8/97
02480         // As we are being passed a render region and so might be in the background redraw
02481         // loop, we must not force a redraw of the doc if we haven't called set up before.
02482         // If we do then this render region may be deleted and we wont get told about it.
02483         // This is bad! e.g. Load document with print borders set and have a font replacement
02484         // message go off.
02485         if (!PrintAreaSetUp)
02486             DrawBorders = SetUp(Document::GetSelectedSpread(), FALSE);
02487         else
02488             DrawBorders = SetUp(pSpread, FALSE);
02489     }
02490 
02491     // If the fit type is right, and we have all the info, draw the borders
02492     if (DrawBorders)
02493     {
02494         double ScaleFactor  = 100.0 / Scale.MakeDouble();
02495 
02496         INT32 ScaledPaperWidth  = INT32(double(PaperWidth) *ScaleFactor);
02497         INT32 ScaledPaperHeight = INT32(double(PaperHeight)*ScaleFactor);
02498         INT32 ScaledPAWidth     = INT32(double(PrintableArea.Width()) *ScaleFactor);
02499         INT32 ScaledPAHeight    = INT32(double(PrintableArea.Height())*ScaleFactor);
02500         INT32 ScaledPALeftMargin = INT32(double(PALeftMargin)*ScaleFactor);
02501         INT32 ScaledPATopMargin     = INT32(double(PATopMargin) *ScaleFactor);
02502         INT32 ScaledLeftMargin  = INT32(double(LeftMargin)  *ScaleFactor)+CropLeftMargin;
02503         INT32 ScaledTopMargin   = INT32(double(TopMargin)   *ScaleFactor)+CropTopMargin;
02504 
02505         INT32 StartPageNum = 0;                     // We're starting from page 0 (the left page) by default
02506         INT32 NumPages = GetNumPrintablePages();    // Find out how many we need to print
02507 
02508         // If we're only printing the right page, then start from page 1 (the right page)
02509         // and increment the number of pages by 1 (i.e. the loop terminating value)
02510         // This will make sure that the print borders get drawn over the right page
02511         if ((NumPages == 1) && (DPSPrintRange == PRINTRANGEDPS_RIGHTPAGES))
02512         {
02513             StartPageNum = 1;
02514             NumPages++;
02515         }
02516 
02517         for (INT32 PageNum = StartPageNum;PageNum < NumPages;PageNum++)
02518         {
02519             StockColour PaperCol  = COLOUR_YELLOW;
02520             StockColour PrAreaCol = COLOUR_RED;
02521 
02522             if (PageNum > 0)
02523             {
02524                 PaperCol  = COLOUR_GREEN;
02525                 PrAreaCol = COLOUR_BLUE;
02526             }
02527 
02528             // PagePrintArea defines the portion of the spread that is printable (this
02529             // is either the whole spread, or a single page when printing DPS & individual pages)
02530             DocRect PagePrintArea = TotalPrintArea;
02531             PagePrintArea.lo.x += OrigPageWidth*PageNum;
02532             PagePrintArea.hi.x = PagePrintArea.lo.x + OrigPageWidth;
02533             PagePrintArea.hi.y = PagePrintArea.lo.y + OrigPageHeight;
02534 
02535             // PrbleArea will define the printable area in relation to the current spread
02536             DocRect PrbleArea = PagePrintArea;
02537 
02538             // PaperArea represents the total area of the paper in the printer
02539             DocRect PaperArea;
02540 
02541             // If printing sideways, the width and height of the printable area should be swapped
02542             if (Orient == PRINTORIENTATION_SIDEWAYS)
02543             {
02544                 PrbleArea.hi.x = PrbleArea.lo.x+ScaledPAHeight;
02545                 PrbleArea.hi.y = PrbleArea.lo.y+ScaledPAWidth;
02546                 PrbleArea.Translate(ScaledPATopMargin,ScaledPALeftMargin);
02547                 PrbleArea.Translate(-ScaledTopMargin,-ScaledLeftMargin);
02548 
02549                 PaperArea = PrbleArea;
02550                 PaperArea.Translate(-ScaledPATopMargin,-ScaledPALeftMargin);
02551                 PaperArea.hi.x = PaperArea.lo.x + ScaledPaperHeight;
02552                 PaperArea.hi.y = PaperArea.lo.y + ScaledPaperWidth;
02553             }
02554             else
02555             {
02556                 PrbleArea.hi.x = PrbleArea.lo.x+ScaledPAWidth;
02557                 PrbleArea.lo.y = PrbleArea.hi.y-ScaledPAHeight;
02558                 PrbleArea.Translate(ScaledPALeftMargin,-ScaledPATopMargin);
02559                 PrbleArea.Translate(-ScaledLeftMargin,ScaledTopMargin);
02560 
02561                 PaperArea = PrbleArea;
02562                 PaperArea.Translate(-ScaledPALeftMargin,ScaledPATopMargin);
02563                 PaperArea.hi.x = PaperArea.lo.x + ScaledPaperWidth;
02564                 PaperArea.lo.y = PaperArea.hi.y - ScaledPaperHeight;
02565             }
02566 
02567             // We need to draw four grey slabs that show the areas on the page that will
02568             // not be printed
02569 
02570             pRRegion->SetLineColour(COLOUR_NONE);
02571             pRRegion->SetFillColour(COLOUR_MIDGREY);
02572 
02573             DocRect Slab = PagePrintArea;
02574             Slab.hi.x = PrbleArea.lo.x;
02575             RenderRect(pRRegion,Slab,TRUE);
02576 
02577             Slab = PagePrintArea;
02578             Slab.lo.x = PrbleArea.hi.x;
02579             RenderRect(pRRegion,Slab,TRUE);
02580 
02581             Slab = PagePrintArea;
02582             Slab.hi.y = PrbleArea.lo.y;
02583             RenderRect(pRRegion,Slab,TRUE);
02584 
02585             Slab = PagePrintArea;
02586             Slab.lo.y = PrbleArea.hi.y;
02587             RenderRect(pRRegion,Slab,TRUE);
02588 
02589             pRRegion->SetFillColour(COLOUR_BLACK);
02590             RenderRect(pRRegion,PagePrintArea,FALSE);
02591 
02592             pRRegion->SetFillColour(PrAreaCol);
02593             RenderRect(pRRegion,PrbleArea,FALSE);
02594 
02595             pRRegion->SetFillColour(PaperCol);
02596             RenderRect(pRRegion,PaperArea,FALSE);
02597         }
02598     }
02599 }

void PrintControl::RenderRect RenderRegion pRRegion,
DocRect  Rect,
BOOL  Fill
[private]
 

Renders the rect given.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/95
Parameters:
pRRegion = ptr to a render region [INPUTS] Rect = rect to redraw Fill = TRUE if filled, FALSE if empty
- [OUTPUTS]
Returns:
-
See also:
RenderPrintBorders()

Definition at line 2421 of file printctl.cpp.

02422 {
02423     if (Rect.IsValid() && !Rect.IsEmpty())
02424     {
02425         if (Fill)
02426             pRRegion->DrawRect(&Rect);
02427         else
02428             pRRegion->DrawPixelRect(&Rect);
02429     }
02430 }

BOOL PrintControl::ReprintPaper  ) 
 

This allows you to print on the same piece of paper again.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/95
Parameters:
- [INPUTS]
Returns:
TRUE if all OK, FALSE otherwise
If you call this func after a call to GetNextPaper(), then the next time you call GetNextPaper() you will actually be starting the print on the same piece of paper.

See also:
GetNextPaper()

Definition at line 2062 of file printctl.cpp.

02063 {
02064     Reprint = TRUE;
02065     return TRUE;
02066 }

void PrintControl::SetBitmapResMethod BitmapResMethod  BRM  )  [inline]
 

Definition at line 367 of file printctl.h.

00367 { BitmapResolutionMethod = BRM; }

void PrintControl::SetCollated BOOL  NewVal  )  [inline]
 

Definition at line 381 of file printctl.h.

00381 { Collated = NewVal; }

BOOL PrintControl::SetColumns INT32  NewVal  ) 
 

Sets the number of pages in each printed column, altering dependants automatically (unless importing) Dependants are: Scale ScaledWidth ScaledHeight Rows.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
NewVal = new number of coloumns of printed pages [INPUTS]
Returns:
TRUE if new row num == NewVal, FALSE if it's had to be altered because NewVal is out of range
If not updating dependants, this will always return TRUE

See also:
StartImport() & EndImport()

Definition at line 1416 of file printctl.cpp.

01417 {
01418     Columns = NewVal;
01419 
01420     if (UpdateDependants)
01421     {
01422         INT32 Max = CalcMaxColumns(0);
01423 
01424         if (Columns < 1)   Columns = 1;
01425         if (Columns > Max) Columns = Max;
01426 
01427         INT32 MaxGutter = CalcMaxGutter(Rows,Columns);
01428         if (Gutter > MaxGutter)
01429             Gutter = MaxGutter;
01430 
01431         CalcFit();
01432     }
01433 
01434     return (Columns == NewVal);
01435 }

void PrintControl::SetDotsPerInch INT32  NewVal  ) 
 

Ensures the NewVal is not < MINBITMAPDPI.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/4/95
Parameters:
NewVal = DPI value [INPUTS]
Returns:
-
If NewVal < MINBITMAP, the DPI is set to the printer's DPI

See also:
GetDotsPerInch()

Definition at line 1624 of file printctl.cpp.

01625 { 
01626     DotsPerInch = NewVal;
01627 
01628     if (DotsPerInch > MAXBITMAPDPI)
01629         DotsPerInch = MAXBITMAPDPI;
01630 
01631     if (DotsPerInch < MINBITMAPDPI)
01632         DotsPerInch = MINBITMAPDPI;
01633 
01634 /*
01635     if (DotsPerInch < MINBITMAPDPI)
01636     {
01637         INT32 PrinterDPI;
01638 
01639         // Get the printer resolution (if this fails, choose the minimum setting)
01640         if (!CCPrintDialog::GetResolution(&PrinterDPI))
01641             PrinterDPI = MINBITMAPDPI;
01642 
01643         DotsPerInch = PrinterDPI;
01644     }
01645 */
01646 }

void PrintControl::SetDoublePageSpread BOOL  State  )  [inline]
 

Definition at line 329 of file printctl.h.

00329 { DPS = State; }

void PrintControl::SetDPSPrintRange PrintRangeDPS  NewVal  )  [inline]
 

Definition at line 389 of file printctl.h.

00389 { DPSPrintRange = NewVal; }

void PrintControl::SetFillQuality PrintFillQuality  Qual  )  [inline]
 

Definition at line 371 of file printctl.h.

00371 { FillQuality = Qual; }

void PrintControl::SetFitType PrintFitType  NewFitType  ) 
 

Sets the fit type, altering dependants automatically (unless importing).

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
NewFitType = page fit type [INPUTS]
Dependants are: ScaledWidth ScaledHeight Scale
See also:
StartImport() & EndImport()

Definition at line 1541 of file printctl.cpp.

01542 {
01543     FitType = NewFitType;
01544 
01545     if (UpdateDependants)
01546         CalcFit();
01547 }

BOOL PrintControl::SetGutter INT32  NewVal  ) 
 

Sets the gutter measurement, altering dependants automatically (unless importing).

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
NewVal = new gutter measurement between each page [INPUTS]
Returns:
TRUE if new row num == NewVal, FALSE if it's had to be altered because NewVal is out of range
The gutter is the distance between each page when doing multiple fit printing. Half the gutter width is used as a margin for each page next to the edge of the paper

Dependants are: Scale ScaledWidth ScaledHeight Rows Colunmns

If not updating dependants, this will always return TRUE

See also:
StartImport() & EndImport()

Definition at line 1463 of file printctl.cpp.

01464 {
01465     Gutter = NewVal;
01466 
01467     if (UpdateDependants)
01468     {
01469         INT32 Max = CalcMaxGutter(1,1);
01470 
01471         if (Gutter < 0)     Gutter = 0;
01472         if (Gutter > Max)   Gutter = Max;
01473 
01474         INT32 MaxRows = CalcMaxRows(Gutter);
01475         if (Rows > MaxRows)
01476             Rows = MaxRows;
01477 
01478         INT32 MaxColumns = CalcMaxColumns(Gutter);
01479         if (Columns > MaxColumns)
01480             Columns = MaxColumns;
01481 
01482         CalcFit();
01483     }
01484 
01485     return (Gutter == NewVal);
01486 }

void PrintControl::SetHeight INT32  NewVal  ) 
 

Sets the page height, altering dependants automatically (unless importing) Dependants are: Scale ScaledWidth.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
NewVal = new height for the print area [INPUTS]
See also:
StartImport() & EndImport()

Definition at line 889 of file printctl.cpp.

00890 {
00891     if (UpdateDependants)
00892     {
00893         double ScaleFactor = double(NewVal)/double(PageHeight);
00894         SetScaleFactor(ScaleFactor);        // Use SetScaleFactor() to recalc ScaledWidth and ScaledHeight
00895     }
00896     else
00897         ScaledHeight = NewVal;
00898 }

void PrintControl::SetLeftMargin INT32  NewVal  )  [inline]
 

Definition at line 346 of file printctl.h.

00346 { LeftMargin = NewVal; }

BOOL PrintControl::SetNextPlate PrintView pPrintView  ) 
 

Call this to set up the view related data ready for the next plate rendering.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/6/96
Parameters:
pPrintView = a pointer to the print view class. [INPUTS]
Returns:
-

Definition at line 2365 of file printctl.cpp.

02366 {
02367     // If there's no view, drawing will be rather tricky
02368     if (pPrintView == NULL)
02369     {
02370         ERROR3("Sanity check, The view is NULL during SetNextPlate!");
02371         return FALSE;
02372     }
02373 
02374     // If we are not separating then do nothing but make sure
02375     // we force MorePlates() to terminate properly the next time
02376     // around.
02377     if (!Typesetting.AreSeparating())
02378     {
02379         Typesetting.SetNextCompositePlate();
02380         return TRUE;
02381     }
02382 
02383     // Find the next printing plate. We need to call this to decrement
02384     // the plate printing count and other such unsightlyness so that MorePlates
02385     // executes correctly. 
02386     ColourPlate *pPrintPlate = Typesetting.GetNextPrintPlate();
02387     if (pPrintPlate==NULL)
02388     {
02389         // There are no more plates left to print. MorePlates() has 
02390         // failed in its duty and should be shot.
02391         return FALSE;
02392     }
02393 
02394     // We now need to set this plate in the print view in order
02395     // to describe the separation correctly, this should be pretty easy
02396     // if we can get a hold of the print view of course.
02397     pPrintView->SetColourPlate(pPrintPlate);
02398 
02399     return TRUE;
02400 }

void PrintControl::SetNumCopies INT32  NewVal  )  [inline]
 

Definition at line 383 of file printctl.h.

00383 { NumCopies = NewVal; }

void PrintControl::SetObjPrintRange PrintRangeObj  NewVal  )  [inline]
 

Definition at line 387 of file printctl.h.

00387 { ObjPrintRange = NewVal; }

void PrintControl::SetPrintLayers PrintLayers  NewVal  )  [inline]
 

Definition at line 361 of file printctl.h.

00361 { Layers = NewVal; }

void PrintControl::SetPrintMethod PrintMethodType  NewVal  ) 
 

Sets the app's print method to be NewVal This is stored in the global var AppPrintMethod.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/7/95
Parameters:
NewVal = new print method [INPUTS]
Returns:
-
See also:
GetPrintMethod()

Definition at line 1683 of file printctl.cpp.

01684 {
01685     AppPrintMethod = NewVal;
01686 }

void PrintControl::SetPrintOrient PrintOrient  NewOrient  ) 
 

Sets the print orientatio, altering dependants automatically (unless importing).

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
NewOrient = new orientation [INPUTS]
Dependants are: ScaledWidth ScaledHeight PageWidth PageHeight Scale

and possibly: Rows Columns

See also:
StartImport() & EndImport()

Definition at line 823 of file printctl.cpp.

00824 {
00825     if (Orient != NewOrient)
00826     {
00827         Orient = NewOrient;
00828 
00829         if (UpdateDependants)
00830         {
00831             CalcPrintAreaVars();    // Update the page width and height (these get swapped)
00832             SetRows(Rows);          // Use SetRows() to recalc max rows and scale factor
00833             SetColumns(Columns);    // Use SetColumns() to recalc max columns and scale factor
00834 
00835             // This is a bodge fix.  Sometimes the gutter value can become -ve. In this case,
00836             // reset the multiple fit vars
00837             if (Gutter < 0)
00838             {
00839                 SetRows(1);         // Use SetRows() to recalc max rows and scale factor
00840                 SetColumns(1);      // Use SetColumns() to recalc max columns and scale factor
00841                 SetGutter(0);       
00842             }
00843         }
00844     }
00845 }

void PrintControl::SetPrintToFile BOOL  NewVal  )  [inline]
 

Definition at line 385 of file printctl.h.

00385 { PrintToFile = NewVal; }

void PrintControl::SetPSLevel PSLevel  NewVal  )  [inline]
 

Definition at line 363 of file printctl.h.

00363 { PSLangLevel = NewVal; }

BOOL PrintControl::SetRows INT32  NewVal  ) 
 

Adjust the printing variables to allow for typesetting marks to be positioned What happens here is that we adjust the X,Y translations so that we ensure a patch is moved into a position where we can get the crop marks between the patch and the papers edges.Sets the number of pages in each printed column, altering dependants automatically (unless importing) Dependants are: Scale ScaledWidth ScaledHeight Columns.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
NewVal = new number of coloumns of printed pages [INPUTS]
Returns:
TRUE if new row num == NewVal, FALSE if it's had to be altered because NewVal is out of range
If not updating dependants, this will always return TRUE

See also:
StartImport() & EndImport()

Definition at line 1374 of file printctl.cpp.

01375 {
01376     Rows = NewVal;
01377 
01378     if (UpdateDependants)
01379     {
01380         INT32 Max = CalcMaxRows(0);
01381 
01382         if (Rows < 1)   Rows = 1;
01383         if (Rows > Max) Rows = Max;
01384 
01385         INT32 MaxGutter = CalcMaxGutter(Rows,Columns);
01386         if (Gutter > MaxGutter)
01387             Gutter = MaxGutter;
01388 
01389         CalcFit();
01390     }
01391 
01392     return (Rows == NewVal);
01393 }

void PrintControl::SetScale FIXED16  NewScale  ) 
 

Sets the scale percentage, altering dependants automatically (unless importing) Dependants are: ScaledWidth ScaledHeight.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
NewScale = new scale factor [INPUTS]
See also:
StartImport() & EndImport()

Definition at line 781 of file printctl.cpp.

00782 {
00783     Scale = NewScale;
00784     FIXED16 Min = FIXED16(MinPrintScale);
00785     FIXED16 Max = FIXED16(MaxPrintScale);
00786 
00787     if (Scale < Min) Scale = Min;
00788     if (Scale > Max) Scale = Max;
00789 
00790     if (UpdateDependants)
00791     {
00792         double ScaleFactor = (Scale.MakeDouble())/100;
00793 
00794         ScaledWidth  = INT32((double(PageWidth) *ScaleFactor)+0.5);
00795         ScaledHeight = INT32((double(PageHeight)*ScaleFactor)+0.5);
00796     }
00797 }

void PrintControl::SetScaleFactor double  ScaleFactor  )  [private]
 

Sets the scale percentage using the given scale factor This alters dependants automatically (unless importing) Dependants are: ScaledWidth ScaledHeight.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
ScaleFactor = the scale factor [INPUTS]
See also:
StartImport() & EndImport()

Definition at line 761 of file printctl.cpp.

00762 {
00763     SetScale(FIXED16(100*ScaleFactor));
00764 }

void PrintControl::SetTextOptions PrintTextOptions  pto  )  [inline]
 

Definition at line 373 of file printctl.h.

00373 { TextOptions = pto; }

void PrintControl::SetTopMargin INT32  NewVal  )  [inline]
 

Definition at line 344 of file printctl.h.

00344 { TopMargin = NewVal; }

BOOL PrintControl::SetUp Spread pThisSpread,
BOOL  RedrawPrintBorders = TRUE
 

This function sets up the print control to print the given spread.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/4/95
Parameters:
pThisSpread = ptr to a spread to print [INPUTS] RedrawPrintBorders - True if want a force redraw of associated docs (Defaults to TRUE)
PrintAreaSetUp has same BOOL value as the return result [OUTPUTS]
Returns:
TRUE if able to set up print area OR already set up
The entire spread area is used as the source area to print. It can determine from the spread whether it is a double page spread (DPS) or not.

Once it gets the source area for printing from the spread, it calcs the fit for the spread using the current fit type. I.e. it works out the scale factor and scaled page width and height for each page printed, given the current settings.

Returns:
Errors: -
See also:
-

Definition at line 571 of file printctl.cpp.

00572 {
00573     ERROR2IF(pThisSpread == NULL,FALSE,"pThisSpread is NULL");
00574 
00575     pSpread = pThisSpread;
00576 
00577     // find out if it's a double page spread
00578     if (!pSpread->GetPageSize(NULL,NULL,NULL,&Bleed,&DPS,NULL))
00579         return FALSE;
00580 
00581     // Get a union of all the pages that represents the total printable area of the spread
00582     pSpread->GetPagesRect(&TotalPrintArea);
00583 
00584     PrintAreaSetUp = (CalcPrintAreaVars(RedrawPrintBorders) && CalcFit());
00585     SetUpFailed    = !PrintAreaSetUp;
00586 
00587     return PrintAreaSetUp;
00588 }   

void PrintControl::SetWholeSpread BOOL  State  ) 
 

Sets the WholeSpread state, altering dependants automatically (unless importing).

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/95
Parameters:
State = new WholeSpread flag state [INPUTS]
Dependants are: Scale ScaledWidth ScaledHeight PageWidth PageHeight Rows Columns
See also:
StartImport() & EndImport()

Definition at line 1509 of file printctl.cpp.

01510 {
01511     if (WholeSpread != State)
01512     {
01513         WholeSpread = State;
01514 
01515         if (UpdateDependants)
01516         {
01517             CalcPrintAreaVars();    // Update the page width & height (the page width either doubles or halves)
01518             SetRows(Rows);          // Use SetRows() to recalc max rows and scale factor
01519             SetColumns(Columns);    // Use SetColumns() to recalc max columns and scale factor
01520         }
01521     }
01522 }

void PrintControl::SetWidth INT32  NewVal  ) 
 

Sets the page width, altering dependants automatically (unless importing) Dependants are: Scale ScaledHeight.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
NewVal = new width for the print area [INPUTS]
See also:
StartImport() & EndImport()

Definition at line 862 of file printctl.cpp.

00863 {
00864     if (UpdateDependants)
00865     {
00866         double ScaleFactor = double(NewVal)/double(PageWidth);
00867         SetScaleFactor(ScaleFactor);        // Use SetScaleFactor() to recalc ScaledWidth and ScaledHeight
00868     }
00869     else
00870         ScaledWidth = NewVal;
00871 }

void PrintControl::StartImport  ) 
 

Tells the object that it's data is being imported.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
- [INPUTS]
In this state, calling the Set functions just sets the aspect of the object, rather than recalculation dependant aspects of the object.

e.g. calling SetScale() will recalc the width & height of the printed page unless you call StartImport() first

You can call this func any time, not just for importing, if you need to alter mmembers independently.

See also:
EndImport()

Definition at line 688 of file printctl.cpp.

00689 {
00690     UpdateDependants = FALSE;
00691 }

BOOL PrintControl::StartPlatePrinting PrintView pPrintView,
UINT32 *const   pErrNo
 

This function makes sure the plate printing loop is initialised for the next set of pages on a single sheet of paper to pass through the driver. It sets up an appropriate ColourPlate and ColourCOntextCMYK for the given PrintView.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/6/96
Parameters:
pPrintView - The View to which we are rendering [INPUTS]
errno - [OUTPUTS]
Returns:
-

Definition at line 2197 of file printctl.cpp.

02198 {
02199     // Clear the ouput error first
02200     (*pErrNo)=0;
02201 
02202     // If there's no view, drawing will be rather tricky
02203     if (pPrintView == NULL)
02204     {
02205         ERROR3("Sanity check, The view is NULL during StartPlatePrinting!");
02206         return FALSE;
02207     }
02208 
02209     // Get hold of the resident colour management system
02210     ColourContext *pContext;
02211 
02212 PORTNOTE("cms", "Disabled XaraCMS");
02213 #ifndef EXCLUDE_FROM_XARALX
02214     XaraCMS* ptheCMS=GetApplication()->GetCMSManager();
02215     if (ptheCMS!=NULL)
02216     {
02217         // First try to set the printer context specified in the ini file read
02218         // when we started up
02219         String_256 PrintProfile;
02220         ptheCMS->GetPrinterProfile(&PrintProfile);
02221         pContext = new ColourContextCMYK(pPrintView, &PrintProfile);
02222     
02223         if (pContext==NULL)
02224         {
02225             // We need to error here and inform the user we
02226             // are out of memory
02227             ERROR3("Failed to create a CMYK colour context during print initialisation in SetNextPlate()");
02228             (*pErrNo) = _R(IDS_OUT_OF_MEMORY);
02229             return FALSE;
02230         }
02231         
02232         if (!(pContext->IsDeviceContext()))
02233         {
02234             // Eeek, we failed to build the physical device context
02235             // which means something rather nasty went on. We must now
02236             // warn the user. They can either continue with a logical
02237             // context or abort the proceedings.
02238 
02239             // TO DO: Make this a nice resourced string!
02240             // Hang about, we should attempt to use a printer.xcms down
02241             // the root directory of Camelot, lets see if we can find that
02242 
02243             delete pContext;
02244             pContext=NULL;
02245 
02246             ptheCMS->GetDefaultPrinterProfile(&PrintProfile);
02247             pContext = new ColourContextCMYK(pPrintView, &PrintProfile);
02248 
02249             // if we've failed again
02250             if (pContext==NULL)
02251             {
02252                 ERROR3("Failed to create a CMYK colour context during print initialisation in SetNextPlate()");
02253                 (*pErrNo) = _R(IDS_OUT_OF_MEMORY);
02254                 return FALSE;
02255             }
02256 
02257             // ok if we've still failed to locate even this we really are stuck and will have to use the context
02258             // in logical mode, but lets ask the user about this first.
02259             if (!(pContext->IsDeviceContext()))
02260             {
02261                 ErrorInfo Info;
02262                 Info.ErrorMsg = _R(IDT_OPTS_LOGICALCONTEXT);
02263                 Info.Button[0] = _R(IDS_CONTINUE);
02264                 Info.Button[1] = _R(IDS_CANCEL);
02265                 if (AskQuestion(&Info) == _R(IDS_CANCEL))
02266                 {
02267                     (*pErrNo) = _R(IDS_PRINT_USERTERM);
02268                     return FALSE;
02269                 }
02270             }
02271         }
02272     }
02273     else
02274 #endif
02275     {
02276         // Create a logical colour context. This isn't strictly necessary, as the view will default to
02277         // using the global default (logical) context anyway, but we might as well be safe
02278         pContext = new ColourContextCMYK(pPrintView);
02279         if (pContext==NULL)
02280         {
02281             // we've failed to create a new colour context for this document
02282             // We must abort the printing loop
02283             ERROR3("Failed to create a CMYK colour context during print initialisation in SetNextPlate()");
02284             (*pErrNo) = _R(IDS_OUT_OF_MEMORY);
02285             return FALSE;
02286         }
02287     }
02288 
02289     // Set the new context in the view. The view will delete it when it's done with it
02290     // NOTE that the view will attach its own ColourPlate to this context, so there is no need
02291     // (indeed, no point whatsoever) for us to try to set that up for it.
02292     pPrintView->SetColourContext(COLOURMODEL_CMYK, pContext);
02293 
02294     // Set up the plate printing system, we do this for composite and separated output
02295     Typesetting.InitPlatesForPrinting();
02296 
02297     return TRUE;
02298 }

BOOL PrintControl::StartPrinting  ) 
 

This informs the print info object that you are about to do some printing.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/4/95
Parameters:
- [INPUTS]
Returns:
TRUE if all OK, FALSE otherwise
This is purely to set up the print layout mechanism. It will work out how many pieces of paper will be printed to, and how many times the page will be printed on each piece of of paper (for multiple fit printing).

The mechanism works like this:

if (StartPrinting()) { while (GetNextPaper()) { while (GetNextPatch()) { Use access funcs to get hold of data set up by GetNextPath(), e.g. scale, translation, etc

if (SelectedOnly) print all selected objects that lie within the ClipRect area in the spread else print all objects that lie within the ClipRect area in the spread } }

EndPrinting() }

See also:
GetNextPaper(), GetNextPath(), EndPrinting()

Definition at line 1823 of file printctl.cpp.

01824 {
01825     ERROR2IF(Printing,FALSE,"Already printing - have you called EndPrinting()?");
01826     ERROR2IF(!PrintAreaSetUp,FALSE,"The print control hasn't been set up via SetUp()");
01827     ERROR2IF(pSpread == NULL,FALSE,"The print control pSpread is NULL");
01828 
01829     // Find out the number of printable pages
01830     NumPrintablePages = GetNumPrintablePages();             // This will be either 1 or 2
01831 
01832     // Init NumPaper member var with the number of pieces of paper we will print to.
01833     if (!CalcNumPaper())
01834         return FALSE;
01835 
01836     // PaperNumber is the number of the current piece of paper being printed to.
01837     // MaxPaperNumber is the total number of pieces of paper we will print to.
01838     PaperNumber     = 0;        // incremented at the start of GetNextPaper()
01839     MaxPaperNumber  = NumPaper;
01840     Reprint         = FALSE;    // Set to TRUE by ReprintPaper() to make GetNextPaper() to return 
01841                                 // the same paper again
01842 
01843     NumPatches = 0;
01844     Printing = TRUE;
01845 
01846     SelRange* pSelRange = GetApplication()->FindSelection();
01847     SelectionPresent    = (pSelRange->FindFirst() != NULL);
01848 
01849     // Now make sure that the list of printing plates is updated in case any spot colours
01850     // have been created or deleted recently...
01851     TypesetInfo* tpInfo = GetTypesetInfo();
01852     if (tpInfo != NULL && tpInfo->AreSeparating())
01853     {
01854         // Call CreatePlateList to ensure that the list of printing plates is set up
01855         // This will just update the list (if necessary) if it has been previously created,
01856         // to make sure that screening options and present plates are all hunky-dory.
01857         tpInfo->CreatePlateList();
01858     }
01859 
01860     return TRUE;
01861 }


Member Data Documentation

PrintMethodType PrintControl::AppPrintMethod = PRINTMETHOD_NORMAL [static]
 

Definition at line 377 of file printctl.h.

BitmapResMethod PrintControl::BitmapResolutionMethod [private]
 

Definition at line 507 of file printctl.h.

MILLIPOINT PrintControl::Bleed [private]
 

Definition at line 478 of file printctl.h.

BOOL PrintControl::Collated [private]
 

Definition at line 513 of file printctl.h.

INT32 PrintControl::Columns [private]
 

Definition at line 497 of file printctl.h.

MILLIPOINT PrintControl::CropArea [private]
 

Definition at line 479 of file printctl.h.

INT32 PrintControl::CropLeftMargin [private]
 

Definition at line 494 of file printctl.h.

INT32 PrintControl::CropTopMargin [private]
 

Definition at line 493 of file printctl.h.

INT32 PrintControl::DotsPerInch [private]
 

Definition at line 508 of file printctl.h.

BOOL PrintControl::DPS [private]
 

Definition at line 477 of file printctl.h.

PrintRangeDPS PrintControl::DPSPrintRange [private]
 

Definition at line 517 of file printctl.h.

PrintFillQuality PrintControl::FillQuality [private]
 

Definition at line 509 of file printctl.h.

PrintFitType PrintControl::FitType [private]
 

Definition at line 487 of file printctl.h.

INT32 PrintControl::Gutter [private]
 

Definition at line 498 of file printctl.h.

PrintLayers PrintControl::Layers [private]
 

Definition at line 504 of file printctl.h.

INT32 PrintControl::LeftMargin [private]
 

Definition at line 490 of file printctl.h.

INT32 PrintControl::MaxPaperNumber [private]
 

Definition at line 432 of file printctl.h.

INT32 PrintControl::MaxPatchNumber [private]
 

Definition at line 437 of file printctl.h.

INT32 PrintControl::NumCopies [private]
 

Definition at line 514 of file printctl.h.

INT32 PrintControl::NumPaper [private]
 

Definition at line 430 of file printctl.h.

INT32 PrintControl::NumPatches [private]
 

Definition at line 435 of file printctl.h.

INT32 PrintControl::NumPrintablePages [private]
 

Definition at line 428 of file printctl.h.

PrintRangeObj PrintControl::ObjPrintRange [private]
 

Definition at line 516 of file printctl.h.

PrintOrient PrintControl::Orient [private]
 

Definition at line 485 of file printctl.h.

DocCoord PrintControl::Origin [private]
 

Definition at line 467 of file printctl.h.

INT32 PrintControl::OrigPageHeight [private]
 

Definition at line 475 of file printctl.h.

INT32 PrintControl::OrigPageWidth [private]
 

Definition at line 474 of file printctl.h.

INT32 PrintControl::PageHeight [private]
 

Definition at line 470 of file printctl.h.

INT32 PrintControl::PageWidth [private]
 

Definition at line 469 of file printctl.h.

INT32 PrintControl::PALeftMargin [private]
 

Definition at line 464 of file printctl.h.

INT32 PrintControl::PaperHeight [private]
 

Definition at line 472 of file printctl.h.

INT32 PrintControl::PaperNumber [private]
 

Definition at line 431 of file printctl.h.

INT32 PrintControl::PaperWidth [private]
 

Definition at line 471 of file printctl.h.

DocRect PrintControl::PatchClipRect [private]
 

Definition at line 426 of file printctl.h.

INT32 PrintControl::PatchColumn [private]
 

Definition at line 441 of file printctl.h.

INT32 PrintControl::PatchNumber [private]
 

Definition at line 436 of file printctl.h.

INT32 PrintControl::PatchRow [private]
 

Definition at line 440 of file printctl.h.

INT32 PrintControl::PATopMargin [private]
 

Definition at line 465 of file printctl.h.

DocRect PrintControl::PrintableArea [private]
 

Definition at line 463 of file printctl.h.

BOOL PrintControl::PrintAreaSetUp [private]
 

Definition at line 449 of file printctl.h.

BOOL PrintControl::Printing [private]
 

Definition at line 424 of file printctl.h.

BOOL PrintControl::PrintToFile [private]
 

Definition at line 515 of file printctl.h.

PSLevel PrintControl::PSLangLevel [private]
 

Definition at line 505 of file printctl.h.

Spread* PrintControl::pSpread [private]
 

Definition at line 451 of file printctl.h.

BOOL PrintControl::Reprint [private]
 

Definition at line 433 of file printctl.h.

INT32 PrintControl::Rows [private]
 

Definition at line 496 of file printctl.h.

FIXED16 PrintControl::Scale [private]
 

Definition at line 484 of file printctl.h.

INT32 PrintControl::ScaledHeight [private]
 

Definition at line 492 of file printctl.h.

INT32 PrintControl::ScaledWidth [private]
 

Definition at line 491 of file printctl.h.

MILLIPOINT PrintControl::SectionHeight [private]
 

Definition at line 443 of file printctl.h.

MILLIPOINT PrintControl::SectionWidth [private]
 

Definition at line 442 of file printctl.h.

BOOL PrintControl::SelectionPresent [private]
 

Definition at line 425 of file printctl.h.

BOOL PrintControl::SetUpFailed [private]
 

Definition at line 450 of file printctl.h.

PrintTextOptions PrintControl::TextOptions [private]
 

Definition at line 510 of file printctl.h.

INT32 PrintControl::TopMargin [private]
 

Definition at line 489 of file printctl.h.

DocRect PrintControl::TotalPrintArea [private]
 

Definition at line 460 of file printctl.h.

TypesetInfo PrintControl::Typesetting [private]
 

Definition at line 501 of file printctl.h.

BOOL PrintControl::UpdateDependants [private]
 

Definition at line 520 of file printctl.h.

BOOL PrintControl::WholeSpread [private]
 

Definition at line 482 of file printctl.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:00 2007 for Camelot by  doxygen 1.4.4