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

#include <ISupportedEventsService.h>

Inheritance diagram for ISupportedEventsService:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISUPPORTEDEVENTSSERVICE }
 

Public Member Functions

virtual bool16 IsEventSupported (IBehaviorEvent *inEvent, IPMUnknown *inBoss) const =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

Interface that declares whether an event is "appropriate" for a boss. This is used by Form Fields and Documents, to declare which events can be in the behavior list, and thus have actions attached to them. For example, a button does not support calculate or format events (it has no value to view or change), but a text field does.

It is also used by behavior bosses, so they can declare what events are appropriate for their actions. For example, a formula action is only appropriate as a response to a calculate event

This is mostly for the benefit of the UI, so that it can build an appropriate list of events and actions when adding behaviors to items (eg form fields).

If any ISupportedEventsService service reports true for an event/boss pair then that event is considered to be supported, this allows for extensibility of events and bosses that support events.

The Behavior plugin implements one service of this type, kStandardSupportedEventsImpl, which queries the IBehaviorEvent SupportsEvent, SupportsEvent then calls the ISupportedEvents interface on inBoss to see if the boss supports the event

This means for all the standard bosses (Form Fields, Documents, Behaviors) that support events, we only need to implement ISupportedEvents, but since ISupportedEvents is called indirectly, we still allow for extensibility of actions, form fields and events...

See Also
StandardSupportedEvents, ISupportedEvents, IBehaviorEvent