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

Public Types | |
| enum | InitializerType { kEarly, kLate } |
Public Member Functions | |
| virtual InitializerType | GetType (void) const =0 |
| virtual void | Open (const PMLocaleId &localeId)=0 |
| virtual void | Close (const PMLocaleId &localeId)=0 |
| virtual void | Register (PluginID plugin, const PMLocaleId &localeId)=0 |
| virtual PMReal | Priority () const =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 IInitializer interface is used for registering resources of a particular type that may appear in multiple plug-ins. Each Initializer handles a single resource type. The application loops through all the plug-ins, calling all the initializers on each plug-in. Each Initializer finds the resources that it cares about, and does whatever processing is necessary. For instance, panels are added using a PanelInitializer, and menus are added using a MenuInitializer.
There are two times when Initializers may be called, either early in
startup, or later. Each Initializer needs to declare when it wants to be called.
| pure virtual |
Close is called before plug-ins are initialized to allow
the initializer to set up and tear down state that is reused across multiple calls to Register. The server will call Open, followed by zero or more Register calls, followed by a Close.
| localeId | The locale we're registering |
| pure virtual |
Return wheter this initializer is an early or late initializer. That is,
is it called before of after the service registry.
| pure virtual |
Open is called before plug-ins are initialized to allow
the initializer to set up state that is reused across multiple calls to Register. The server will call Open, followed by zero or more Register calls, followed by a Close.
| localeId | The locale we're registering |
| pure virtual |
Each initializer is called once for each plug-in, and the priority controls the order in which the initializers are called for each plug-in. Lower numbers means this initializer is run first; higher numbers move initializer to later in the startup sequence.
| pure virtual |
Called by application once for each plug-in, to register the resources supplied by the plug-in. Resource file will already be open.
| plugin | The plug-in we're registering |
| localeId | The locale we're registering |