![]() | InDesign SDK 20.5 |
#include <ICMSUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_ICMSUTILS } |
Public Member Functions | |
| virtual ICMSProfileList * | QueryCMSProfileList (IDocument *doc, uint32 cmsQueryFlags=0)=0 |
| virtual ICMSProfileList * | QueryCMSProfileList (const UIDRef &docRef, uint32 cmsQueryFlags=0)=0 |
| virtual ICMSManager * | QueryCMSManager (ClassID whichCMSMgr=kInvalidClass, uint32 cmsQueryFlags=0)=0 |
| virtual IColorPresetsSettings * | QueryColorPresetsSettings ()=0 |
| virtual bool16 | IsEmulating1xCMSOffState ()=0 |
| virtual ICMSSettings * | QueryCMSSettings (IDocument *doc, uint32 cmsQueryFlags=0)=0 |
| virtual ICMSSettings * | QueryCMSSettings (const UIDRef &docRef, uint32 cmsQueryFlags=0)=0 |
| virtual ICMSSettings * | QueryDefaultObjectSettings (IDocument *doc, uint32 cmsQueryFlags=0)=0 |
| virtual ICMSSettings * | QueryDefaultObjectSettings (const UIDRef &docRef, uint32 cmsQueryFlags=0)=0 |
| virtual bool16 | DoTurnCMSOnOrOff (bool16 turnItOn, const UIDList &itemlist, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | DoCMMChoice (const PMString &cmmChoice, IDocument *doc, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | DoDocUseProfileCmd (const PMString &profileName, IDocument *doc, ICMSProfile::profileCategory which, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass, bool16 installDefaultFlag=kFalse)=0 |
| virtual bool16 | DoItemUseExternalProfileCmd (const UIDRef &itemUIDRef, const PMString &profileName, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | DoItemUseEmbeddedProfileCmd (const UIDRef &itemUIDRef, void *pProfileData=nil, int32 dataSize=0, PMString *pName=nil, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | DoItemUseDocDefaultProfileCmd (const UIDRef &itemUIDRef, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | DoesProfileExist (const PMString &profileName, IDataBase *db, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | DoSetRenderingIntent (const UIDRef &itemRef, ICMSSettings::renderingIntent choice, uint32 cmdFlags=0)=0 |
| virtual bool16 | DoSetRenderingIntent (const UIDList &itemList, ICMSSettings::renderingIntent choice, uint32 cmdFlags=0)=0 |
| virtual bool16 | DoCopyCMSSettingsCmd (UIDRef srcItem, UIDRef dstItem, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | DoRemoveCMSSetup (UIDRef theItem, uint32 cmdFlags=0, ClassID cmsMgrID=kInvalidClass)=0 |
| virtual bool16 | ColorXFormChange (IDataBase *iDataBase, ICommand *cmdChangedBy, int32 changeFlags)=0 |
| virtual bool16 | DoColorPresetsSettingsSetCmd (bool16 emulate1xCMSOff, bool16 isCustom, const PMString &presetName, const PMString &presetPath, const PMString &description, ICMSProfile *workingRGB, const PMString &workingRGBName, ICMSProfile::profileCode workingRGBCode, ICMSProfile *workingCMYK, const PMString &workingCMYKName, ICMSProfile::profileCode workingCMYKCode, ICMSManager::CMSPolicy policyRGB, ICMSManager::CMSPolicy policyCMYK, bool16 mismatchAskOpening, bool16 mismatchAskPasting, bool16 missingAskOpening, uint32 engineCMS, uint32 engineCMM, ICMSSettings::renderingIntent intent, bool16 kpc, int32 nFlags=0)=0 |
| virtual ErrorCode | DoCMSSetProofingCmd (ICMSProofing *iCMSProofing, bool16 isProofingOn, ICMSProofing::ProofingType proofingType, ICMSProfile *iCMSProfile, bool32 paperWhite, bool32 inkBlack, bool32 preserveNumbers=kTrue)=0 |
| virtual ErrorCode | DoCMSSetProofingCmd (ICMSProofing *iCMSProofing, bool16 isProofingOn, ICMSProofing::ProofingType proofingType, PMString &name, bool32 paperWhite, bool32 inkBlack, bool32 preserveNumbers=kTrue)=0 |
| virtual ErrorCode | DoConvertToProfileCmd (IDocument *doc, ICMSProfile::profileCategory category, const PMString &name, uint32 engineCMS=0, uint32 engineCMM=0, ICMSSettings::renderingIntent intent=ICMSSettings::kImage, bool16 useKPC=kTrue)=0 |
| virtual ICMSSettings::renderingIntent | ResolveIntent (IDocument *iDoc, ICMSSettings::renderingIntent ri)=0 |
| virtual bool32 | BuildScriptableProfileArray (CMSAvailableProfileList *plistSource, ScriptListData &plistTarget)=0 |
| virtual bool32 | SetupImageFilter (UIDRef uidImage, CMSMgrProfileFilter &filter)=0 |
| virtual ICMSSettings::renderingIntent | ScriptIntentToCMSIntent (IDocument *pDoc, ScriptID nScriptIntent, ICMSSettings::renderingIntent nIntentType, ErrorCode &nError)=0 |
| virtual ScriptID | CMSIntentToScriptIntent (ICMSSettings::renderingIntent nCMSIntent)=0 |
| virtual int32 | AccessCMSProfileList (IScriptRequestData *data, IScript *script, ICMSProfile::profileCategory profileCategory, ScriptID propID)=0 |
| virtual int32 | AccessCMSProfile (IDocument *pDoc, IScriptRequestData *data, IScript *script, ICMSProfile::profileCategory nProfileType, ScriptID propID)=0 |
| virtual bool16 | CanFindProfile (const PMString &strName)=0 |
| virtual void | GetProfileProofingSupport (const PMString &strName, bool16 &bSupportsInkBlack, bool16 &bSupportsPaperWhite)=0 |
| virtual void | CopyColorProfiles (IDataBase *pSrc, IDataBase *pDst)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
CMS-related utility functions.
| pure virtual |
Given information about a scripting context, gets or sets the cms profile name for the specified profile type. nParamID is the constant for the script parameter which contains the name of the new profile to use if the operation is a set.
| pDoc | The document whose profiles are needed. |
| data | The data to fill in. |
| script | Not currently used. |
| nProfileType | The profile category you're interested in. |
| propID | Which scripting field to use. |
| pure virtual |
Given infomration about a scripting context, returns the set of cms profiles that satisfy the specified profile category to the scripting implementation.
| data | The scripting data to fill in. |
| script | Not currently used. |
| profileCategory | The category to use to populate the list of profiles. |
| propID | Which scripting field to use. |
| pure virtual |
Adds the names of the profiles in plistSource to the specified IScriptList.
| plistSource | Specifies the list of profiles to read from. |
| plistTarget | The list to populate. |
| pure virtual |
Returns true if a profile w/ the specified name can be located on the filesystem in one of the standard search paths.
| strName | The profile name for which to look. |
| pure virtual |
Opposite of ScriptIntentToCMSIntent.
| nCMSIntent | The intent you want to convert. |
| pure virtual |
Broadcast on the subject of the target database with IID_ICOLORXFORMCHANGE protocol, alerting the world of the change and updating pageitems and/or spreads as appropriate in open documents. The IID_ICOLORXFORMCHANGE interface is on the active context.
| iDataBase | IN the command's target database from which the change is broadcast. |
| cmdChangedBy | IN The command that's passed to the subject. |
| changeFlags | IN CXFORMFLAG_* options. |
Tell the destination document to use the source document's profiles.
| pSrc | The document from which to copy profiles. |
| pDst | The document to which to copy profiles. |
| pure virtual |
Selects a CMM to use.
| cmmChoicetOn | IN The name of the new CMM. |
| doc | IN Obsolete. Not used. |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Configures proofing parameters via a command. This version specifies a profile by interface.
| iCMSProofing | IN The interface to affect. |
| isProofingOn | IN Enables/disables proofing. |
| proofingType | IN Any of the default proofing states, or custom. |
| iCMSProfile | IN The custom proofing profile, if applicable. |
| paperWhite | IN Whether to simulate paper color. |
| inkBlack | IN Whether to simulate ink black. |
| preserveNumbers | IN Whether to preserve numbers for same-family untagged objects. |
| pure virtual |
Configures proofing parameters via a command. This version specifies a profile by name.
| iCMSProofing | IN The interface to affect. |
| isProofingOn | IN Enables/disables proofing. |
| proofingType | IN Any of the default proofing states, or custom. |
| name | IN The custom proofing profile, if applicable. |
| paperWhite | IN Whether to simulate paper color. |
| inkBlack | IN Whether to simulate ink black. |
| preserveNumbers | IN Whether to preserve numbers for same-family untagged objects. |
| pure virtual |
Sets the current color settings en masse.
| emulate1xCMSOff | True to use "CMS off" mode. |
| isCustom | Indicates that the settings are not based on a CSF but are custom. |
| presetName | For non-custom CSFs, the name of the preset. |
| presetPath | For non-custom CSFs, the location of the preset file. |
| description | The internal name of the preset. |
| workingRGB | The working RGB profile. |
| workingRGBName | The name of the working RGB profile. |
| workingRGBCode | The profile code of the working RGB profile. |
| workingCMYK | The working CMYK profile. |
| workingCMYKName | The name of the working CMYK profile. |
| workingCMYKCode | The profile code of the working CMYK profile. |
| policyRGB | The profile policy for RGB. |
| policyCMYK | The profile policy for CMYK. |
| mismatchAskOpening | Whether to display profile-mismatch dialogs when opening documents. |
| mismatchAskPasting | Whether to display profile-mismatch dialogs when pasting content. |
| missingAskOpening | Whether to display profile-missing dialogs when opening documents. |
| engineCMS | The index of the CMS to use. Should always be zero for now. |
| engineCMM | The index of the CMM to use. |
| intent | The default rendering intent. |
| kpc | The default black point compensation setting (on/off). |
| nFlags | IN kCMSCmd* (optional) |
| pure virtual |
Processes a convert to profile command that will convert all native swatches to a new profile.
| doc | IN The document to affect. |
| category | IN The profile category to convert (must be CMYK or RGB) |
| name | IN The name of the profile to use for the new destination (will be assigned to the document after conversion) |
| engineCMS | IN The index of the CMS (leave as default). |
| engineCMM | IN The index of the CMM. |
| intent | IN The RI to apply for the conversions. |
| useKPC | IN The BPC to apply for the conversions. |
| pure virtual |
Creates and executes a kCMSCopyCMSSetupCmdBoss with specified src and dst items. Handles the recreation of the settings on the item in the destination document. Src and destination documents can be same, or different. Used when copying page items from one document to another, or whatever you like.
| srcItem | IN The item from which the settings are copied |
| dstItem | IN The item to which the settings are copied |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Sets a document profile (CMYK or RGB) via a kCMSUseProfileCmd.
| profileName | The name of the profile to use. |
| doc | IN The document that should be affected. Must be non-nil to have any effect. |
| which | IN Which of the profiles to set. Only CMYK and RGB profiles have any effect. |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| installDefaultFlag | IN If true, ignore the name passed in and set the document to use the current working space. |
| pure virtual |
Indicates whether the specified profile is in use in the specified document.
| profileName | IN The name to look for. |
| db | IN The database of the document. |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Resets an image to use the document default profile.
| itemUIDRef | IN The image page item boss. |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Assigns an embedded (from the image itself) profile to an image via a command.
| itemUIDRef | IN The item to which to assign the profile. |
| pProfileData | e profile data; nil to pull from item. |
| dataSize | Size of data, or 0 to pull from item. |
| profileName | Name of embedded profile, if not providing data and the item hasn't yet been set up with emb data. In all other cases, nil is appropriate. |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Assigns an external (from disk) profile to an image via a command.
| itemUIDRef | IN The image page item boss. |
| profileName | The name of the profile to use. |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Creates and executes a kCMSRemoveCMSSetupCmdBoss with specified item. This removes the CMS setup from the item. Normally done prior to deletion.
| theItem | IN The item to reset |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Sets the RI for a page item or document (anything with an ICMSSettings interface) via a command.
| itemRef | IN The boss with an ICMSSettings interface you want to change. |
| choice | IN The new RI to assign. |
| cmdFlags | IN kCMSCmd* (optional) |
| pure virtual |
Sets the RI for a list of items (anything with an ICMSSettings interface) via a command.
| itemList | IN The list of items with ICMSSettings interfaces you want to change. |
| choice | IN The new RI to assign. |
| cmdFlags | IN kCMSCmd* (optional) |
| pure virtual |
Turns CMS on or off for a page item or document. This is deprecated; you can still turn cms on or off for a page item, but now that's interpreted as "use document default profile and rendering intent." The document on/off state is no longer honored at all.
| turnItOn | IN The new state. |
| itemList | IN The list of items to affect. Items must have the ICMSSettings interface. |
| cmdFlags | IN kCMSCmd* (optional) |
| cmsMgrID | IN Obsolete; leave at default. |
| pure virtual |
Returns whether the profile with the specified name supports ink black/paper white.
| strName | The name of the profile. |
| bSupportsInkBlack | Receives true if the profile supports ink black proofing; false otherwise. |
| bSupportsPaperWhite | Receives true if the profile supports paper white proofing; false otherwise. |
| pure virtual |
Returns kTrue if currently emulating the 1.x CMS off state, otherwise kFalse.
| pure virtual |
Returns the CMS manager. While in theory multiple CMS managers are permitted, in practice there is only one, which through ACE supports multiple CMMs.
| whichCMSMgr | IN The class to use (kInvalidClass invokes the standard manager). |
| cmsQueryFlags | IN Not currently used. |
| pure virtual |
Returns the CMSProfileList from the document.
| doc | IN The document. If nil, returns the default document's CMSProfileList. |
| cmsQueryFlags | IN kCMSQuery* flags (optional). |
| pure virtual |
Returns the CMSProfileList from the document.
| docRef | IN A reference to a document boss. |
| cmsQueryFlags | IN kCMSQuery* flags (optional). |
| pure virtual |
Returns the CMSSettings from the document. Note that CMSSettings on a document only contains the default vector rendering intent.
| doc | IN The document. If nil, returns the default document's settings. |
| cmsQueryFlags | IN kCMSQuery* flags (optional). |
| pure virtual |
Returns the CMSSettings from the document. Note that CMSSettings on a document only contains the default vector rendering intent.
| docRef | IN A reference to a document boss. |
| cmsQueryFlags | IN kCMSQuery* flags (optional). |
| pure virtual |
Returns the ColorPresetsSettings for the application.
| pure virtual |
Returns the default object settings from the document. This controls the default RI for newly placed content.
| doc | IN The document. If nil, returns the default document's settings. |
| cmsQueryFlags | IN kCMSQuery* flags (optional). |
| pure virtual |
Returns the default object settings from the document. This controls the default RI for newly placed content.
| docRef | IN A reference to a document boss. |
| cmsQueryFlags | IN kCMSQuery* flags (optional). |
| pure virtual |
Resolves any rendering intents which are pointers (e.g., UseCSFImageRI) down to a simple intent. Requires iDoc when any of the UseDoc* intents are used.
| iDoc | IN The document to use. Can be nil if the RI to resolve is not document-based. |
| ri | IN The RI to resolve. |
| pure virtual |
Converts from on of the script enumeration values (en_... in ScriptingDefs.h) to the intenral rendering intent
| pDoc | The document (required for indirect document referenced rendering intents). |
| nScriptIntent | The ID of the intent from the scripting world. |
| nIntentType | Used if nScriptIntent is en_UseColorSettings; indicates which of the default RIs to use. |
| nError | Receives the error code. |
| pure virtual |
Sets up a filter which is appropriate for retrieving the set of profiles that apply to the specified image.
| uidImage | The image for which you want to build a list of profiles. |
| filter | Receives the filter to use. |