InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMasterSpreadUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Brendan O'Shea
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 
24 #ifndef __IMasterSpreadUtils__
25 #define __IMasterSpreadUtils__
26 
27 #include "MasterPageID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 
31 #include "ICommand.h"
32 #include "UIDList.h"
33 #include "IShape.h"
34 #include "PMMatrix.h"
35 
37 class IMasterSpreadList;
38 class IDocument;
39 class ICallback;
40 class IMasterPage;
41 
42 
52 {
53 public:
54  enum { kDefaultIID = IID_IMASTERSPREADUTILS };
55 
57  virtual bool16 _IsFrontViewAMaster() = 0;
58 
65  virtual void BuildMasterSpreadList(IStringListControlData *stringData, UIDList *masterUIDs, bool16 bIncludeNone, UID excludeUID) = 0;
66 
74  virtual bool16 IsAnAncestorOf(IMasterSpreadList *masterList, UID masterA, UID masterB) = 0;
75 
81  virtual void GetAncestorsOf(IMasterSpreadList *masterSpreadList, UID masterUID, UIDList *ancestors) = 0;
82 
94  virtual void TopoSortMasterSpread(IMasterSpreadList *masterSpreadList, UIDList* sortedList) = 0;
95 
101  virtual bool16 IsMasterAppliedToPage(UID masterUID, IPMUnknown* page) const = 0;
102 
107  virtual UIDList GetUnusedMasterUIDs(IDocument *doc) = 0;
108 
115  virtual int32 CountPagesWithMaster(UIDList *masterUIDs, int32 *mastersWithMaster = nil, UIDList *pageUIDs = nil) = 0;
116 
117 
133  virtual bool16 OverrideMasterPageItem(const UIDRef masterItem,
134  const UIDRef pageToOverrideOn,
136  UIDRef *overriddenItem = nil) = 0;
137 
144  virtual bool16 IsMasterItemOverriddenOnPage(const UIDRef masterItem, const UIDRef startPageUIDRef) = 0;
145 
152  virtual ICommand *CreateOverrideMasterPageItemsCmd( const UIDList& spreadsOrPages, ICallback* masterItemCollector = nil, int32 drwMgrFlags = IShape::kSkipChildren + IShape::kSkipHiddenAndLockedLayers ) const = 0;
153 
154 
168  virtual void AppendMasterPageItems(IDataBase * db, UID theSpread,
169  const UIDList & onThesePages,
170  const PMRectCollection & pageBounds,
171  UIDList & masterItems,
172  UIDList & pages,
173  PMMatrixCollection & offsets,
174  ICallback* masterItemCollector = nil,
175  int32 drwMgrFlags = IShape::kSkipChildren + IShape::kSkipHiddenAndLockedLayers) const = 0;
176 
177 
178  virtual PMMatrix CalculateMasterSpreadToDrawingSpreadMatrix( const IMasterPage* drawingPage, UIDRef masterPage = kInvalidUIDRef /*if already known*/) const = 0;
179 
180 };
181 
182 
183 #endif // __IMasterSpreadUtils__