InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextVariableSuite Class Referenceabstract

#include <ITextVariableSuite.h>

Inheritance diagram for ITextVariableSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTVARIABLE_ISUITE }
 

Public Member Functions

virtual bool16 CanInsertTextVariable (void) const =0
 
virtual bool16 CanManageTextVariables (void) const =0
 
virtual ErrorCode ManageVariables ()=0
 
virtual ErrorCode GetVariableTypeInfo (ClassID variableClassID, VariableTypeInfo *typeInfo) const =0
 
virtual ErrorCode AddVariable (const AddVariableInfo &newInfo) const =0
 
virtual ErrorCode RemoveVariable (const WideString &varName) const =0
 
virtual ErrorCode InsertVariable (const WideString &varName, UIDRef *newVarInstance) const =0
 
virtual ErrorCode ChangeVariable (const WideString &varName, const ChangeVariableInfo &chgInfo) const =0
 
virtual ErrorCode FindLocationsUsed (const WideString *varName, const ModelRange *searchRange, bool16 hiddenStories, K2Vector< ModelRange > &results) const =0
 
virtual ErrorCode ChangeVariableInstance (IOwnedItem *ownedItem, const ChangeVariableInstanceInfo &chgInfo) const =0
 
virtual ErrorCode LoadVariables (const IDFile &sourceFile, const std::map< PMString, bool32 > &importMap, const std::map< PMString, bool32 > &clashMap, const std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy > &resolveMap, const StyleClashResolutionTypes::GlobalClashResolutionStrategy &gcrStrategy)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

ITextVariableSuite

Note
See IFootnoteSettings for descriptions of most of these methods as this is a mirror interface to that.

Member Function Documentation

virtual ErrorCode ITextVariableSuite::AddVariable (const AddVariableInfonewInfo) const
pure virtual
Add a variable to the global variable table.

Parameters
newInfoThe description of the new variable
virtual bool16 ITextVariableSuite::CanInsertTextVariable (void ) const
pure virtual

Can a variable be inserted? (i.e. does the current selection make sense for it)

virtual bool16 ITextVariableSuite::CanManageTextVariables (void ) const
pure virtual

Can the options be set? (i.e. does the current selection make sense for opening the dialog)

virtual ErrorCode ITextVariableSuite::ChangeVariable (const WideStringvarName,
const ChangeVariableInfo & chgInfo 
) const
pure virtual
Change one or more properties of a variable.

Parameters
chgInfoThe desired changes
virtual ErrorCode ITextVariableSuite::ChangeVariableInstance (IOwnedItemownedItem,
const ChangeVariableInstanceInfo & chgInfo 
) const
pure virtual
Change one or more properties of a variable.

Parameters
chgInfoThe desired changes
virtual ErrorCode ITextVariableSuite::FindLocationsUsed (const WideStringvarName,
const ModelRangesearchRange,
bool16 hiddenStories,
K2Vector< ModelRange > & results 
) const
pure virtual
Find one or more variables in a document or story.

Parameters
varNameMatch all variables with this name. If nil, matches all variables.
searchRangeMatch all variables within this range (required).
resultsAny variables found matching the given parameters.
virtual ErrorCode ITextVariableSuite::GetVariableTypeInfo (ClassID variableClassID,
VariableTypeInfo * typeInfo 
) const
pure virtual

Return basic information on the given variable.

virtual ErrorCode ITextVariableSuite::InsertVariable (const WideStringvarName,
UIDRefnewVarInstance 
) const
pure virtual
Insert a variable into the text.

Parameters
varNameThe name of the variable to insert.
formatterClassIDThe format for the desired variable
newVarInstanceOUT if non-nil, will point to the UIDRef of the newly inserted variable
virtual ErrorCode ITextVariableSuite::LoadVariables (const IDFilesourceFile,
const std::map< PMString, bool32 > & importMap,
const std::map< PMString, bool32 > & clashMap,
const std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy > & resolveMap,
const StyleClashResolutionTypes::GlobalClashResolutionStrategygcrStrategy 
)
pure virtual

Load variable from the given source file according to the other parameters.

Parameters
sourceFileThe file to load from
importMapImport styles.
clashMapStyles that are conflict with existing styles.
resolveMapResult styles after resolving the conflicts.
gcrStrategyThe Global clash resolution strategy.
virtual ErrorCode ITextVariableSuite::ManageVariables ()
pure virtual

Manage text variables.

virtual ErrorCode ITextVariableSuite::RemoveVariable (const WideStringvarName) const
pure virtual
Remove a variable from the global variable table.

Parameters
varNameThe name of the variable to remove.
Note
this only removes the variable from the table, any references to the variable in the text will remain (and result in an unreferenced variable).