InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextVariableFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: David Stephens
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 __ITextVariableFacade__
25 #define __ITextVariableFacade__
26 
27 #include "IPMUnknown.h"
28 #include <map>
29 #include "StyleClashResolutionTypes.h"
30 
31 class ITextVariableTable;
32 class ITextModel;
33 class IOwnedItem;
34 class VariableTypeInfo;
35 class AddVariableInfo;
36 class ChangeVariableInfo;
37 class ChangeVariableInstanceInfo;
38 //class StoryRange;
39 class UIDRef;
40 class ModelRange;
41 class ITextVariable;
42 
51 {
52 public:
53  enum { kDefaultIID = IID_ITEXTVARIABLEFACADE };
54 
55  virtual ErrorCode GetVariableTypeInfo(ITextVariableTable* varTable, ClassID variableClassID, VariableTypeInfo* typeInfo) const = 0;
56 
57  virtual ErrorCode GetNumVariables(ITextVariableTable* varTable, int32* n) const = 0;
58 
59  virtual ErrorCode QueryNthVariable(ITextVariableTable* varTable, int32 n, ITextVariable *&var) const = 0;
60 
61  virtual ErrorCode AddVariable(ITextVariableTable* varTable, const AddVariableInfo& newInfo) const = 0;
62 
63  virtual ErrorCode RemoveVariable(ITextVariableTable* varTable, const WideString& varName) const = 0;
64 
65  virtual ErrorCode InsertVariable(ITextVariableTable* varTable, const WideString& varName, const ModelRange& insertAt, UIDRef* newVarInstance, bool16 isINXContext=kFalse) const = 0;
66 
67  virtual ErrorCode ChangeVariable(ITextVariableTable* varTable, const WideString& varName, const ChangeVariableInfo& chgInfo) const = 0;
68 
69  virtual ErrorCode FindLocationsUsed(ITextVariableTable* varTable, const WideString* varName, const ModelRange* searchRange, bool16 hiddenStories, K2Vector<ModelRange>& results) const = 0;
70 
71  virtual ErrorCode ChangeVariableInstance(IOwnedItem* ownedItem, const ChangeVariableInstanceInfo& chgInfo) const = 0;
72 
73  virtual ErrorCode LoadVariables(ITextVariableTable* varTable, const IDFile& sourceFile,
74  const std::map<PMString, bool32>& importMap,
75  const std::map<PMString, bool32>& clashMap,
76  const std::map<PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy>& resolveMap,
78  //Required for loading variables from a cloud doc
79  virtual ErrorCode LoadVariables(ITextVariableTable* varTable, const std::string & assetRef,
80  const std::map<PMString, bool32>& importMap,
81  const std::map<PMString, bool32>& clashMap,
82  const std::map<PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy>& resolveMap,
84 };
85 
86 #endif // __IFootnoteFacade__