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

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 IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
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.
Priority levels