InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDigitalPublishingSetupProvider.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Systems Inc.
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // ADOBE CONFIDENTIAL
16 //
17 // Copyright 1997-2012 Adobe Systems Incorporated. All rights reserved.
18 //
19 // NOTICE: All information contained herein is, and remains
20 // the property of Adobe Systems Incorporated and its suppliers,
21 // if any. The intellectual and technical concepts contained
22 // herein are proprietary to Adobe Systems Incorporated and its
23 // suppliers and may be covered by U.S. and Foreign Patents,
24 // patents in process, and are protected by trade secret or copyright law.
25 // Dissemination of this information or reproduction of this material
26 // is strictly forbidden unless prior written permission is obtained
27 // from Adobe Systems Incorporated.
28 //
29 //========================================================================================
30 
31 
32 #include "DigitalPublishingID.h"
33 
34 #include "DigitalPublishingDictionary.h"
35 #include "MiniFolioOptions.h"
36 
37 class IDocument;
38 
60 {
61 public:
62  enum { kDefaultIID = IID_IDIGITALPUBLISHINGSETUPPROVIDER };
63 
73  {
74  public:
75  virtual ~OverlayCreator() {}
76 
84  virtual id_digpub::ObjectPtr CreateEmptyOverlayDictionary() const = 0;
85 
92  virtual ErrorCode CreateOverlay(id_digpub::ObjectPtr const &overlayParams) = 0;
93  };
94 
101  virtual ErrorCode BeginFolioCreation() = 0;
102 
109  virtual void EndFolioCreation(bool folioWasCreated) = 0;
110 
120  virtual ErrorCode BeginOverlayCollection() = 0;
121 
127  virtual void EndOverlayCollection() = 0;
128 
133  {
134  kPortraitOrientation,
135  kLandscapeOrientation,
136 
137  kInvalidOrientation = 0xffffffff
138  };
139 
151  virtual ErrorCode BeginContentStack(IDocument const *doc, Orientation orientation, const MiniFolioOptions& folioOptions) = 0;
152 
160  virtual ErrorCode EndContentStack(IDocument const *doc, Orientation orientation) = 0;
161 
179  virtual ErrorCode BeginPage(
180  IDocument const *doc,
181  UIDRef const &page,
182  uint32 index,
183  OverlayCreator *overlayCreator
184  ) = 0;
185 
203  virtual ErrorCode EndPage(
204  IDocument const *doc,
205  UIDRef const &page,
206  uint32 index,
207  OverlayCreator *overlayCreator
208  ) = 0;
209 
214  enum DrawPass
215  {
216  kScrubberDrawPass,
217  kAssetDrawPass,
218  kThumbnailDrawPass,
219 
220  // Note: This pass will occur outside the normal BeginPage/EndPage
221  // pair of notifications.
222  kTOCImageDrawPass,
223 
224  kOverlayCollectionPass,
225 
226  kPDFGenerationPass,
227 
228  kInvalidDrawPass = 0xffffffff
229  };
230 
249  virtual ErrorCode BeginDrawingPass(
250  IDocument const *doc,
251  UIDRef const &page,
252  DrawPass pass
253  ) = 0;
254 
273  virtual ErrorCode EndDrawingPass(
274  IDocument const *doc,
275  UIDRef const &page,
276  DrawPass pass
277  ) = 0;
278 
287  virtual bool GetShouldNotifyOnPageItemDraw(DrawPass pass) const = 0;
288 
293  {
294  kDrawBehaviorIncludeItem,
295  kDrawBehaviorOmitItem,
296  kDrawBehaviorAbortDrawing,
297 
298  kDrawBehaviorInvalidOption = 0xffffffff
299  };
300 
317  IPMUnknown const *thisThing,
318  DrawPass pass,
319  OverlayCreator *overlayCreator
320  ) = 0;
321 };
322 
324 {
325 public:
326  enum { kDefaultIID = IID_IDIGITALPUBLISHINGSETUPPROVIDER2 };
327 
343  IPMUnknown const *thisThing,
344  DrawPass pass,
345  OverlayCreator *overlayCreator,
346  IPMUnknown *contextData = nil
347  ) = 0;
348 };
349 
350 namespace digpub
351 {
352 
353 inline InterfacePtr<IDigitalPublishingSetupProvider> QueryIDigitalPublishingSetupProvider(IPMUnknown *boss)
354 {
356 
357  if (!provider)
358  {
360  }
361 
362  return provider;
363 }
364 
365 }