InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAssignmentMgr.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Jon Pugh
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 _IAssignmentMgr_
25 #define _IAssignmentMgr_
26 
27 #include "AssignmentID.h"
28 
29 #include "IAssignment.h"
30 #include "IAssignedDocument.h"
31 
32 class IDocument;
33 class PMString;
34 class IINXImportPolicy;
35 
36 
43 class IAssignmentMgr : public IPMUnknown
44 {
45 public:
46  enum { kDefaultIID = IID_IASSIGNMENTMGR };
47 
49  typedef enum {
58  } FrameStatus;
59 
60 
65  virtual bool16 IsAssigned(const UIDRef& object) const = 0;
66 
67  // assignment data access
68 
75  virtual ErrorCode SaveAssignments(IDocument* document, UIFlags uiFlags = kFullUI, bool16 forceSave = kFalse) = 0;
76 
82  virtual ErrorCode SaveAssignment(IAssignment* assignment, UIFlags uiFlags = kFullUI) = 0;
83 
92  virtual ErrorCode OpenAssignmentWithProxy(const PMString& assignFile, InterfacePtr<IAssignment>& assignment, UIFlags uiFlags = kFullUI) = 0;
93 
100  virtual ErrorCode ImportAssignment(IPMStream* stream, IINXImportPolicy* policy = nil, UIFlags uiFlags = kFullUI) = 0;
101 
108  virtual ErrorCode ExportAssignment(const IAssignment* assignment, IPMStream* stream, UIFlags uiFlags = kFullUI) = 0;
109 
117  virtual IAssignment* CreateAssignmentCmd(IAssignedDocument* doc, const PMString& assignFile, bool16 saveAssignment=kFalse, UIDList* objects = nil) = 0;
118 
123  virtual IAssignedStory* CreateAssignedStory(const UIDRef& story) = 0;
124 
130  virtual IAssignment* QueryAssignment(IAssignedDocument* doc, const PMString& assignFile) const = 0;
131 
138  virtual bool16 IsTextStory(IAssignedDocument* docInfo, const PMString& assignPath, const PMString& storyPath) const = 0;
139 
144  virtual bool16 IsTextStory(const UIDRef& itemRef) const = 0;
145 
150  virtual IAssignedDocument* GetAssignedDocument(IDataBase* db) const = 0;
151 
156  virtual IAssignedDocument* GetAssignedDocument(const PMString& docPath) const = 0;
157 
163  virtual void QueryAssignmentAndAssignedStory(const UIDRef& storyref, InterfacePtr<IAssignment>& iAssignmentRef, InterfacePtr<IAssignedStory>& iAssignedStoryRef) const = 0;
164 
169  virtual void GetStoryListOnDoc(IAssignedDocument* docInfo, UIDList& storyList) const = 0;
170 
176  virtual void GetStoryListOnAssignment(IAssignment* assignment, UIDList& storyList) const = 0;
177 
185  virtual ErrorCode AddToAssignmentCmd(IAssignment* assignment, UIDList& objects, IAssignedStory* beforeStory = nil, bool16 notifyPanel = kTrue) = 0;
186 
190  virtual ErrorCode DirtySpreadCmd(UIDRef spreadRef) = 0;
191 
199  virtual ErrorCode AddToAssignmentCmd(IAssignedDocument* docInfo, const PMString& assignPath, UIDList& objects, bool16 notifyPanel = kTrue) = 0;
200 
205  virtual IAssignmentMgr::FrameStatus GetFrameStatus(const UIDRef& object) const = 0;
206 
211  virtual bool16 UpdateAssignmentOptions(IAssignment *assignment, const PMString& assignName, const PMString &file, const PMString& assignWriter, const IAssignment::AssignmentExportOptions exportOption,
212  const UID uiColor, const bool16 includeLinkFilesPackaging, UIFlags uiFlags = kFullUI) = 0;
213 
218  virtual void NotifyPanel(ClassID theChange = kAssignmentMgrChangedNotifyMsg) = 0;
219 
226  virtual ErrorCode PackageAssignment(IAssignment* assignment, const IDFile& packageFile, UIFlags uiFlags = kFullUI) = 0;
227 
232  virtual bool16 IsAssignmentPackaged(IAssignment* assignment) = 0;
233 
238  virtual bool16 IsAssignmentPackageUpToDate(IAssignment* assignment) = 0;
239 
249  virtual ErrorCode ReturnPackageAssignment(IAssignment* assignment, const IDFile& packageFile, UIFlags uiFlags = kFullUI, bool16 includeAdded = kTrue) = 0;
250 
257  virtual ErrorCode ExplodeInCopyPackageForOpen(const IDFile& packageFile, UIFlags uiFlags, IDFile& assignmentFileToOpen) = 0;
258 
263  virtual IDFile GetAssignmentFileToOpenFromPackage(const IDFile& packageFile) = 0;
264 
274  virtual ErrorCode ForwardPackageAssignment(IAssignment* assignment, const IDFile& packageFile, UIFlags uiFlags = kFullUI, bool16 includeAdded = kTrue) = 0;
275 
282  virtual ErrorCode ExplodeInDesignPackageForOpen(const IDFile& packageFile, const UIDRef& assignmentRef, UIFlags uiFlags) = 0;
283 
289  virtual ErrorCode ExplodeInDesignPackageToFolder(const IDFile& packageFile, const IDFile& targetFolder, UIFlags uiFlags) = 0;
290 };
291 
293 
294 #endif //_IAssignmentMgr_