InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPreflightObjectModelService.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Matt Phillips
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 // This service provides the DOM and mapping to real (or derived) InDesign elements.
24 //
25 // TBD: Split this up into separate services for mapping vs hierarchy? Seems like
26 // overkill since in most cases the two will be tightly bound
27 //
28 //========================================================================================
29 
30 
31 #include "IPMUnknown.h"
32 #include "PackageAndPreflightID.h"
33 
34 #include "IPreflightObject.h"
35 
36 class IDocument;
38 
61 {
62 public:
63  enum { kDefaultIID = IID_IPREFLIGHTOBJECTMODELSERVICE };
64 
65 public:
66  //-----------------------
67  // MAPPING
68 
75 
86  virtual bool IsValidObject(const PreflightObjectID& objID) const = 0;
87 
96  virtual IPreflightObject* QueryObject(const PreflightObjectID& objID) const = 0;
97 
107  virtual WideString GetClassScriptingString(PreflightObjectClassID classID) const = 0;
108 
109  //-----------------------
110  // HIERARCHY
111 
119 
135 
151 
152  //-----------------------
153  // EXPANSION
154 
162 
174 
184  virtual void Expand(IPreflightExpansionHelper& helper) const = 0;
185 
186  //-----------------------
187  // NOTIFICATION (to update caches etc)
188 
194  virtual void OnCloseDocument(IDocument* iDoc) = 0;
195 
203  virtual void OnInvalidateObject(const PreflightObjectID& objID) = 0;
204 
205  //-----------------------
206  // UTILITY
207 
213  virtual PMString GetObjectDescription(const PreflightObjectID& objID) const = 0;
214 
221  virtual PMString GetObjectSortValue(const PreflightObjectID& objID) const = 0;
222 
228  virtual bool CanBeSelected(const PreflightObjectID& objID) const = 0;
229 
235  virtual bool SelectObject(const PreflightObjectID& objID) const = 0;
236 
244  virtual PMString GetPage(const PreflightObjectID& objID) const = 0;
245 
251  virtual PMString GetSubpartName(ClassID subpartID) const = 0;
252 };
253