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

#include <ITagRegistry.h>

Inheritance diagram for ITagRegistry:
IPMUnknown

Public Types

enum  TagPriority { kIgnore, kDefault, kCritical }
 

Public Member Functions

For Internal Use Only
virtual void AddTag (ImplementationID newTag, TagPriority priority)=0
 
virtual TagPriority GetTag (ImplementationID tag)=0
 
virtual void AddClassTag (ClassID newTag, TagPriority priority)=0
 
virtual TagPriority GetClassTag (ClassID tag)=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

The tag registry keeps track of the priority of all the ImplementationIDs

and ClassIDs, for purposes of managing data related to missing plug-ins.

When a plug-in adds data to the document, the data belongs to a UID that has

a certain ClassID, or to an ImplementationID attached to some other plug-in's

UID. The object model needs a way to assess the priority level of the data,

so that it can warn the user appropriately when opening up documents that

contain data from missing plug-ins.



To set the priority of your plug-in's data, you add an IgnoreTags resource or

a CriticalTags resource to your plug-in's class.fr file. For example, to set 

implementations to the ignore priority, you would add a resource like this:

<pre>

resource IgnoreTags (1) { kImplementationIDSpace, { kFooImpl, kBarImpl, } };


    If your plug-in also has persistent classes, you may find that this is not 

    enough, and you are still getting the missing plug-ins alert when you open

    a document without your plug-in. In this case, add an ignore resource for the

    classes of the UIDs your plug-in adds:
resource IgnoreTags (2)

{

    kClassIDSpace,

    {

        kFooBoss,

        kBarBoss,

    }

};

    

To mark data as critical, you would use the same format with the CriticalTags resource:


resource CriticalTags (1)

{

    kImplementationIDSpace,

    {

        kFooImpl,

        kBarImpl,

    }

};

    

It may be that your plug-in will want to use both, if it has preference data with some simple user settings, and (possibly) also objects that are tightly bound to the document. If the user has just set the preference data, there is no alter, but if they have also added new objects to the document, then they would get the critically worded alert.

Member Enumeration Documentation

Priority levels
Enumerator
kIgnore 

Ignore is the lowest priority, and should be used for data which that is not referred to elsewhere, and that doesn't refer to other objects from other plug-ins in the document. Preference data is a good example of data that can be marked ignore. The normal missing plug-in warning will not come up for data that has been marked ignore.

kDefault 

Default is the priority level you get if you don't explicitly declare a priority. Data at default priority will cause the usual missing plug-ins alert to come up at when the document is opened if the plug-in is missing.

kCritical 

Critical is the highest priority level. Data at critical priority will cause the missing plug-ins alert to be more strongly worded to warn the user that editing the document without this plug-in present may corrupt the document.