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

#include <IAlertHandler.h>

Inheritance diagram for IAlertHandler:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IALERTHANDLER }
 

Public Member Functions

virtual bool16 WantToOverrideAlert ()=0
 
virtual void SetOverrideAlert (bool16 override)=0
 
virtual int16 HandleAlert (const PMString &message, const PMString &button1String, const PMString &button2String, const PMString &button3String, int16 defaultButton)=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

Provides the interface to allow clients to suppress the alert dialogs. This interface should be attached to a boss with a service provider interface.

If alerts are set to not show, rather than showing an alert we ask the service registry for a list of IAlertHandlers, and ask them to handle the alert instead. They can then choose which button to press in the alert. Note that this mechanism can't be used to supress startup alerts, since the object model isn't built yet.

Member Function Documentation

virtual int16 IAlertHandler::HandleAlert (const PMStringmessage,
const PMStringbutton1String,
const PMStringbutton2String,
const PMStringbutton3String,
int16 defaultButton 
)
pure virtual

Called to override a specific alert dialog. All of the strings are non-translated strings.

Returns
which button number should be pressed
virtual void IAlertHandler::SetOverrideAlert (bool16 override)
pure virtual

Turn overriding on/off for this handler.

virtual bool16 IAlertHandler::WantToOverrideAlert ()
pure virtual

Does this handler want to override the alert?