InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IInCopyDocUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: chris parrish
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 // Functions to aid in InCopy Document file actions
24 //
25 //========================================================================================
26 
27 #ifndef __IInCopyDocUtils__
28 #define __IInCopyDocUtils__
29 
30 #include "InCopyWorkflowID.h"
31 #include "IDocFileHandler.h"
32 #include "IOpenFileCmdData.h"
33 
34 class IDataLink;
35 class IDocument;
36 class SysFileList;
37 class UIDList;
38 class ITextModel;
39 class INewDocCmdData;
41 
48 {
49 public:
50  enum {kDefaultIID = IID_IINCOPYDOCUTILS};
51 
52  //----- File Actions
60  virtual void DoSave(const UIDRef& textModel, UIFlags uiFlags = kFullUI) = 0;
61 
67  virtual void DoSaveAll(const UIDRef& doc, UIFlags uiFlags = kFullUI) = 0;
68 
78  virtual void DoSaveAs(const UIDRef& doc, bool16 copy = kFalse, const IDFile *destFile = nil, UIFlags uiFlags = kFullUI, bool8 asStationary = kFalse, FileTypeInfoID fileTypeID = kInvalidFileTypeInfoID) = 0;
79 
90  virtual UIDRef DoOpen(const IDFile& filesToOpen, IOpenFileCmdData::OpenFlags flags, bool16 showWindow = kTrue, IDocument::UndoSupport undoSupport = IDocument::kFullUndoSupport, UIFlags = kFullUI) = 0;
91 
98  virtual UIDRef DoNew(bool16 openWin = kTrue, IDocument::UndoSupport undoSupport = IDocument::kFullUndoSupport) = 0;
99 
105  virtual void DoRevert(const UIDRef& doc, UIFlags uiFlags = kFullUI) = 0;
106 
112  virtual void DoUpdateDesign(const UIDRef& docRef, UIFlags uiFlags = kFullUI) = 0;
113 
118  virtual void DoNewWindow(const UIDRef& doc) = 0;
119 
128  virtual void DoClose(const UIDRef& doc, UIFlags uiFlags, bool16 allowCancel, IDocFileHandler::CloseCmdMode cmdMode) = 0;
129 
134  virtual IDocFileHandler* QueryDocFileHandler() = 0;
135 
141  virtual bool16 ShouldDoSaveAs(IDocument* doc) = 0;
142 
148  virtual bool16 CanDoSave(const UIDRef& doc) = 0;
149 
155  virtual bool16 CanDoSaveAll(const UIDRef& doc) = 0;
156 
162  virtual bool16 CanDoRevert(const UIDRef& doc) = 0;
163 
169  virtual bool16 CanDoUpdateDesign(const UIDRef& doc) = 0;
170 
176  virtual bool16 IsReadOnly(IDocument* iDoc) = 0;
177 
186  virtual void ExportAllLinkedStories(IDocument* doc, const FileTypeInfoID& fileTypeID, UIFlags uiFlags = kFullUI) = 0;
187 
195  virtual void ExportStoryAndCreateLink(const UIDRef& story, const IDFile& file, const FileTypeInfoID& fileTypeID) = 0;
196 
204  virtual ErrorCode ExportLinkedStory(const UIDRef& story, const FileTypeInfoID& fileTypeID) = 0;
205 
212  virtual void ImportAllLinkedStories(IDocument* doc, const FileTypeInfoID& fileTypeID, IInCopyImportOptions* options) = 0;
213 
224  virtual ErrorCode ImportStoryAndCreateLink(const UIDRef& story, IPMStream* stream, IInCopyImportOptions* options, const FileTypeInfoID& fileTypeID, bool16 createLink = kTrue, UIDRef *importedItem = nil) = 0;
225 
233  virtual ErrorCode ImportLinkedStory(const UIDRef& story, const FileTypeInfoID& fileTypeID, IInCopyImportOptions* options = nil) = 0;
234 
240  virtual UIDRef GetFirstUserStory(IDocument* doc) = 0;
241 
249  virtual void GetLinkedStories(IDocument* doc, UIDList* stories, UIDList* links, IDataBase* db = nil) = 0;
250 
256  virtual UIDRef CreateDefaultTextFrame(IDocument* doc) = 0;
257 
263  virtual UIDRef CreateDefaultGraphicFrame(IDocument* doc) = 0;
264 
272  virtual IDocFileHandler::CloseOptions
273  CheckOnClose(const UIDRef& doc, UIFlags uiFlags, bool8 allowCancel) = 0;
274 
280  virtual bool16 CheckOnRevertStory(const UIDRef& storyRef) = 0;
281 
290  virtual bool16 IsFileAlreadyOpen(const IDFile& file, UIDRef* doc, UIDRef* foundStory = nil) = 0;
291 
299  virtual void GetCopyDefaultName(const UIDRef& doc, IDFile *name, bool16& useSystemDefaultDir) = 0;
300 
307  virtual bool16 GetOpenFileType(const IDFile& sysFile, SysOSType &type) = 0;
308 
315  virtual bool16 GetStreamFileType(IPMStream* stream, SysOSType &type) = 0;
316 
323  virtual void SetInCopyUserFile(IDocument *doc, const IDFile &newFile) = 0;
324 
331  virtual void LockNonInCopyStories(const UIDRef& doc) = 0;
332 
333 };
334 
335 #endif //__IInCopyDocUtils__