InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
INXMetadataDefs.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Gang Xiao
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 __INXMETADATADEFS__
25 #define __INXMETADATADEFS__
26 
27 #include "ScriptingDefs.h"
28 #include "FormScriptingDefs.h"
29 
30 #include "GenericID.h"
31 #include "SplineID.h"
32 
33 //
34 // Please make sure any ids you add are unique !!!
35 //
36 
37 enum INXMetadataKeys
38 {
39  // This key tells the INX Core that two elements are considered
40  // to be the same object if their values for the specified property
41  // are equal. The associated metadata value is the PropID to compare.
42  // If several properties must match, use multiple key-value pairs.
43  // Example:
44  // m_INXMatchProperty, Int32Value(p_Name)
45  m_INXMatchProperty = 'iMPr',
46 
47  // This key tells the INX Core that two elements are considered
48  // to be the same object if their values for all properties are equal
49  // and their child elements compare as equal.
50  // The associated metadata value is unused at this time.
51  // Example:
52  // m_INXMatchPropertiesAndChildren, NoValue
53  m_INXMatchPropertiesAndChildren = 'iMPC',
54 
55  // This key tells the INX core to use any available object when trying
56  // to match the "same" object. For example, when searching for a Spread,
57  // any available Spread will do.
58  // There is no metadata value for this key.
59  // Example:
60  // m_INXMatchAvailable, NoValue
61  m_INXMatchAvailable = 'iMAv',
62 
63  // This key is used to exclude child objects of a particular type.
64  // Subclasses of the specified type are also excluded. The type to
65  // exclude is specified as the metadata value. So, if you exclude children
66  // of type "page item", you eliminate *all* types of page items. To be more
67  // descriminating, list specific page item types instead of the base class.
68  // Example:
69  // m_INXExcludeChild, Int32Value(c_Text)
70  m_INXExcludeChild = 'iExC',
71 
72  // This key is used to refine the effect of m_INXExcludeChild and should
73  // appear after it. It is used to "put back" child types that were excluded.
74  // This is useful if you want to exclude all subclasses of some base class
75  // except for a few specific subclasses.
76  // Example:
77  // m_INXExcludeChild, Int32Value(c_Text)
78  // m_INXIncludeChild, Int32Value(c_TextStyleRange)
79  m_INXIncludeChild = 'iInC',
80 
81  // During INX export, we sometimes want to suppress all child objects that are
82  // "Story children". This key is used to tell the INX Core to treat the specified
83  // class as if it was a Story.
84  // There is no metadata value for this key.
85  // Example:
86  // m_INXTreatAsStoryChild, NoValue
87  m_INXTreatAsStoryChild = 'iTaS',
88 
89  // During INX export, we sometimes want to suppress all child objects that are
90  // "Story children". This key is used to tell the INX Core to treat the specified
91  // class as if it was a Story.
92  // There is no metadata value for this key.
93  // Example:
94  // m_INXTreatAsStoryChild, EnumValue(e_RelinkRequiredLink)
95  m_INXTreatAsLink = 'iTaL',
96 
97  // During INX import, we sometimes need to create a specialized subclass of ImportInfo
98  // to handle the processing of elements with special needs. Because of nature of C++,
99  // we cannot simply provide a class name as a metadata value. Instead, we specify a "token"
100  // that represents the class (see the INXMetadataImportClass enum, below). This token is
101  // passed via IINXImportPolicy to the client, and an object of the appropriate type
102  // is returned.
103  // Example:
104  // m_INXImportClass, EnumValue(e_TextContainerImportClass)
105  m_INXImportClass = 'iICl',
106  // m_INXExpandedImportClass, EnumValue(e_TextContainerImportClass)
107  m_INXExpandedImportClass = 'iIEC',
108 
109  // Certain types of objects and properties cannot use the "defaults cache" when
110  // initializing property values during INX import. This marker can be placed on
111  // either an object (rendering the entire object type un-cachable), or on an
112  // individual property.
113  // Example:
114  // m_NoDefaultsCache, NoValue
115  m_NoDefaultsCache = 'iNDC',
116 
117  // When properties are cached, we compare values upon import in the debug build
118  // in order to make sure that caching is working as expected. Some properties
119  // generate a false negative to this test.
120  // Example:
121  // m_INXIgnoreDefaultValueCheck, NoValue
122  m_INXIgnoreDefaultValueCheck = 'iDVC',
123 
124  // During INX export, we sometimes need to specify special handling for
125  // certain properties. The common case is p_Contents.
126  // See INXMetadataDataTreatment for details.
127  // Example:
128  // m_INXDataTreatment, EnumValue(e_DataTreatmentCDATA)
129  m_INXDataTreatment = 'iDTr',
130 
131  // During snippet import, this metadata is to tell core whether to set the attributes.
132  // The associated metadata value is the enum of INXMetadataSnippetAttributeImportState.
133  // Example:
134  // m_INXSnippetAttrImportState, Int32Value(e_IgnoreElementAttributes)
135  m_INXSnippetAttrImportState = 'iAIS',
136 
137  // In INX output, children of some object script element need to be arranged into
138  // certain order. Order reflects data dependency and is important for correct import.
139  // This metadata is put the parent which need to re-order its children. Its value is
140  // another metadata ID which is used to retrieve child order value. The order value
141  // is put on child object script element.
142  // Example:
143  // m_INXOrderChild, Int32Value(c_Document),
144  m_INXOrderChild = 'inOC',
145 
146  // The following metadataID define specific child order for that parent
147  // Example:
148  // m_INXDocumentOrder, RealValue(kLanguageObjectScriptElementPosition),
149  m_INXDocumentOrder = c_Document,
150  m_INXPageItemOrder = c_PageItem,
151  m_INXGraphicLineOrder = c_GraphicLine,
152  m_INXRectangleOrder = c_Rectangle,
153  m_INXOvalOrder = c_Oval,
154  m_INXTextFrameOrder = c_TextFrame,
155  m_INXPolygonOrder = c_Polygon,
156  m_INXStoryOrder = c_Story,
157  m_INXSpreadOrder = c_Spread,
158  m_INXButtonOrder = c_PushButton,
159  m_INXMSOStateOrder = c_Group,
160 
161  // Certain types of objects used as base object only.
162  // These objects don't appear in an INX file.
163  // One such object is c_XMLItem.
164  // Example:
165  // m_INXBaseObjectOnly, NoValue
166  m_INXBaseObjectOnly = 'iBOj',
167 
168  // This key can only be put on object script element. It tells the INX
169  // core not to write kSelfAttributeID for this object to INX file. When
170  // GetAttributes is called on DOM element, attribute list will not have
171  // self ID if it has this metadata. Self ID still can be accessed by calling
172  // GetAttribute with kSelfAttributeID as parameter.
173  // There is no metadata value for this key.
174  // Example:
175  // m_INXDontOutputSelfID, NoValue
176  m_INXDontOutputSelfID = 'iDOS',
177 
178  // Some INX classes can be children of mulitple types of parents. We want to be able
179  // to control the outputting of these classes based on the class of the parent. So
180  // instead of having just 2 metadata directives (m_INXPackageSubFile_Type & m_INXPackageSubFile_Instance)
181  // we will instead follow the paradigm of INX ordering, and if, and only if, any of a parents
182  // children need to use perExport or perInstance metadata, the parent will define the keys that
183  // the child needs to use. This will alow a child to have multipe metadata directives based on their
184  // parent node.
185  // Parent's key for perExport sub-file type (value is the key for the child's path value)
186  m_INXPackageSubFile_PerExport = 'sfPE',
187  // Parent's key for perInstance sub-file type (value is the key for the child's path value)
188  m_INXPackageSubFile_PerInstance = 'sfPI',
189 
190  // Keys for Document children
191  m_INXPackageSubFile_DocumentChild_PerExport = 'sDcE',
192  m_INXPackageSubFile_DocumentChild_PerInstance = 'sDcI',
193 
194  // In INX export, text child objects need to be arranged into correctly nested elements.
195  // Child ranks reflects which objects have the higher priority when deciding how to handle
196  // objects that have overlapping ranges.
197  // Lower ranked objects are broken around overlapping higher ranked objects -
198  // This metadata is put on the object.
199  // Lowest value = 0 (meaning object can be arbitrarily broken to fit around any other object)
200  // Example would be <Content> objects
201  // Highest value = kMaxInt32 - 1 (meaning object will only be broken around XML Elements)
202  // XML elements are assumed to never be broken.
203  // Example:
204  // m_INXStoryChildRank, Int32Value(1000),
205  m_INXTextChildRank = 'iSCR',
206 
207 
208  // End of list.
209  enLastINXMetadataKey
210 };
211 
212 enum INXMetadataImportClass
213 {
214  e_DefaultContainerImportClass = 'DeCo',
215  e_GenericContainerImportClass = 'GnCo',
216  e_TextContainerImportClass = 'TxCo',
217  e_TextStyleRangeImportClass = 'TxSR',
218  e_CharacterObjectImportClass = 'ChOb',
219  e_BinaryObjectImportClass = 'BiOb',
220  e_LinkedBinaryObjectImportClass = 'LnBi',
221  e_TextRangeObjectImportClass = 'TxRg',
222  e_XMLElementObjectImportClass = 'XmOb',
223  e_ChangeObjectImportClass = 'ChIc',
224  e_RootStyleGroupImportClass = 'Rsgc',
225 
226  // End of list.
227  enLastINXMetadataImportClass
228 };
229 
230 enum INXMetadataDataTreatment
231 {
232  // Wrap this property's value in CDATA.
233  e_DataTreatmentCDATA = 'dtCD',
234  // Preprocess this value, replacing text markers with PIs.
235  e_DataTreatmentText = 'dtTx',
236 
237  // End of list.
238  enLastINXMetadataDataTreatment
239 };
240 
241 enum INXMetadataLinkType
242 {
243  e_NoRelinkRequiredLink = 'NRRL',
244  e_RelinkRequiredLink = 'RRLn',
245 
246  // End of list.
247  enLastINXMetadataLinkType
248 };
249 
250 enum INXMetadataSnippetAttributeImportState
251 {
252  e_IgnoreElementAttributes = 'saIA',
253  e_IgnoreElementAndChildAttributes = 'saIC',
254  e_SetElementAndChildAttributes = 'saSC',
255  e_SetElementAttributes = 'saS ',
256 
257  // End of list.
258  enLastINXMetadataSnippetAttributeImportState
259 };
260 
261 
262 #endif //#ifndef __INXMETADATADEFS__
263