InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DocIterationProvider.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Chris Jones
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Purpose:
24 //
25 //========================================================================================
26 
27 #ifndef __CDocIterationProvider__
28 #define __CDocIterationProvider__
29 
30 #include "IDocIterationProvider.h"
31 #include "IExportValidationCmdData.h"
32 #include "HelperInterface.h"
33 
34 
36 {
37 public:
38  // Constructors and Destructors
40  virtual ~CDocIterationProvider();
41 
42  virtual void SetIterationData( IPMUnknown* pIterationData, IterationContext nContext );
43 
44 
45  virtual bool16 InterestedIn( IterationContext nContext );
46 
47  // returning true stops the iteration.
48  virtual bool16 StopIterating() const;
49 
50  // bookends for the iteration itself.
51  virtual void BeginIteration();
52  virtual void EndIteration();
53 
54  // bookends for each page or spread in the iteration.
55  virtual void BeginPageOrSpread(IDocument* pDoc,
56  const int32 nOutputPage,
57  const UIDRef refPageOrSpread, //ignored by base class CDocIterationProvider
58  const PMRect& rectBounds, //ignored by base class CDocIterationProvider
59  const PMMatrix& boundsToSpreadMatrix); //ignored by base class CDocIterationProvider
60  virtual void EndPageOrSpread();
61 
62  // process an item on the page.
63  virtual void VisitPageItem( const PMMatrix* pXForm,
64  IPMUnknown* pPageItem,
65  int32 nFlags);
66 
67  // allows the provider to do whatever it wants when the iteration completes.
68  virtual bool16 OnIterationCompleted();
69 
70  // allows the provider to do cleanup tasks.
71  virtual void Cleanup();
72 
73 protected:
74  // Utilities
75  virtual void Clear();
76 
77  bool16 ShowVerificationWarning( IExportValidationCmdData* pData,
78  int32 nTest);
79 
80  bool16 ShowVerificationError(IExportValidationCmdData* pData, int32 nTest);
81 
82  bool16 ShowVerificationWarningDontShowAgain( IExportValidationCmdData* pData,
83  int32 nTest,
84  int32 nWarningID);
85 
86 protected:
87  // Member Variables
88  IPMUnknown* fpIterationData;
89  IDocument* fpDocument;
90  IterationContext fnIterationContext;
91 
92  int32 fnCurrentPage;
93 // UIDRef frefCurrentPage; -- override BeginPageOrSpread if you need to remember this
94 // PMRect frectCurrentBounds; -- override BeginPageOrSpread if you need to remember this
95 // PMMatrix fcurrentBoundsMatrix; -- override BeginPageOrSpread if you need to remember this
96 
97 
98 };
99 
100 #endif
101 
102 // End, IPrintData.h.