InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IINXInfo.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Steve Pellegrin
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 __IINXInfo_h__
25 #define __IINXInfo_h__
26 
27 // Adobe Patent or Adobe Patent Pending Invention Included Within this File
28 // Adobe patent application tracking B234, entitled Method and apparatus for formatting portion of content, inventors: Craig Rainwater, Steve Pellegrin, Robin Briggs
29 
30 // ----- Interfaces -----
31 
32 #include "IDOMElement.h"
33 //#include "IINXImportPolicy.h"
34 #include "IScript.h"
35 #include "IPMUnknown.h"
36 
37 // ----- Includes -----
38 
39 #include "DOMAttributeValue.h"
40 #include "ScriptInfo.h"
41 
42 // ----- ID.h files -----
43 
44 #include "INXCoreID.h"
45 
46 // ----- Forward -----
47 
48 class WideString;
49 
50 #define kInvalidMetadataID ((IINXInfo::MetadataID)kInvalidScriptID)
51 
58 class IINXInfo : public IPMUnknown
59 {
60 public:
61  enum { kDefaultIID = IID_IINXINFO };
62 
63  enum INXNameStyle
64  {
65  kINXNameAsFormat, // decide by INX format style
66  kINXNameLong, // always get verbose name
67  kINXNameShort // always get short name (INX traditional)
68  };
69 
71  typedef ScriptID MetadataID;
72 
73 public:
77  virtual void Reset() = 0;
78 
79  // Metadata
87  virtual bool16 GetElementMetadata(IDOMElement::DOMElementID elemID, MetadataID keyID, MetadataValueList &values) const = 0;
88 
89  // Metadata
97  virtual bool16 GetElementMetadata_ElementOnly(IDOMElement::DOMElementID elemID, MetadataID keyID, DOMAttributeValue &value) const = 0;
98 
107  virtual bool16 GetAttributeMetadata(IDOMElement::DOMElementID elemID, IDOMElement::DOMAttributeID attrID, MetadataID keyID, MetadataValueList &values) const = 0;
108 
109  // Name <--> ID
115  virtual WideString GetElementName(IDOMElement::DOMElementID elemID, INXNameStyle style = kINXNameAsFormat) const = 0;
116 
122  virtual WideString GetElementName(const ScriptInfo::ObjectScriptElement* pElem) const = 0;
123 
128  virtual IDOMElement::DOMElementID GetElementID(const WideString &name) const = 0;
129 
135  virtual const ObjectScriptElement * GetElementID(const WideString &name, IDOMElement::DOMElementID &elemID) const = 0;
136 
143 
149  virtual IDOMElement::DOMAttributeID GetPropertyID(IDOMElement::DOMElementID elemID, const WideString &propName) const = 0;
150 
157  virtual IDOMElement::DOMAttributeID GetPropertyID(const ScriptInfo::ObjectScriptElement* pElem, const WideString &propName) const = 0;
158 
165  virtual const PropertyScriptElement * GetPropertyID(const ScriptInfo::ObjectScriptElement* pElem, const WideString &propName, IDOMElement::DOMAttributeID &attrID) const = 0;
166 
171  virtual WideString GetEnumValueName(ScriptID eValueID) const = 0;
172 
177  virtual ScriptID GetEnumValueID(const WideString &name) const = 0;
178 
179  // Element info
186  virtual bool16 IsExcludedChild(const ObjectScriptElement* parentInfo, const ObjectScriptElement* childInfo) const = 0;
187 
193  virtual bool16 DoesElementInheritFrom(IDOMElement::DOMElementID elemType, IDOMElement::DOMElementID ancestorType) const = 0;
194 
199  virtual bool16 IsPreferenceObject(IDOMElement *element) const = 0;
200 
202  virtual const EngineContext &GetRequestContext() const = 0;
203 
205  virtual bool16 IsINXContextActive() const = 0;
206 
207  // return kTrue if INX export session in progress
208  virtual bool16 IsINXExportSession() const = 0;
209 
210  // return kTrue if INX import session in progress
211  virtual bool16 IsINXImportSession() const = 0;
212 };
213 
214 #endif // __IINXInfo_h__