InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISyncMasterPageData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Yeming Liu
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 // Comments: Data interface for storing a map between style name(key) and doc name(value).
24 //
25 //========================================================================================
26 
27 #ifndef __ISYNCMASTERPAGEDATA__
28 #define __ISYNCMASTERPAGEDATA__
29 
30 // ----- Interface files
31 
32 #include "IPMStream.h"
33 #include "IPMUnknown.h"
34 
35 // ----- Include files
36 
37 #include "KeyValuePair.h"
38 #include "K2Vector.h"
39 
40 // ----- ID files
41 
42 #include "MasterPageID.h"
43 
47 {
48  public:
49  typedef object_type data_type;
50 
52 
54  const UID& pageUID, // UID of page
55  const UID& pageItemUID):// UID of page items on master spread
56  fPageUID(pageUID),
57  fPageItemUID(pageItemUID) {}
58 
59  bool16 operator==(const MasterPageItemInfo& other) const
60  {
61  //return ((fPageUID == other.fPageUID) && (fPageItemUID == other.fPageItemUID));
62  return (fPageItemUID == other.fPageItemUID);
63  }
64 
65  void KeyReadWrite(IPMStream *s)
66  {
67  s->XferInt32((int32&)fPageUID);
68  s->XferInt32((int32&)fPageItemUID);
69  }
70 
71  void ValueReadWrite(IPMStream *s)
72  {
73  s->XferReference(fPageUID);
74  s->XferReference(fPageItemUID);
75  }
76 
77  UID fPageUID;
78  UID fPageItemUID;
79 };
80 
83 
88 {
89  public:
90  enum { kDefaultIID = IID_ISYNCMASTERPAGEDATA };
91 
92  enum SyncMasterPageOptions { kReplace = 1, kRename } ;
93 
98  virtual void SetSyncMasterSpreadPageItemMap(const SyncMasterSpreadPageItemMap& newMap) = 0;
99 
104 
109  virtual void SetSyncMasterSpreadPageMap(const SyncMasterSpreadPageMap& newMap) = 0;
110 
115 
119  virtual const ISyncMasterPageData::SyncMasterPageOptions& GetSyncMasterPagePageItemOptionSetting() = 0;
120 
124  virtual void SetSyncMasterPagePageItemOptionSetting(const ISyncMasterPageData::SyncMasterPageOptions& pageItemOption) = 0;
125 };
126 
127 #endif // __ISYNCMASTERPAGEDATA__