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

#include <IScriptEvent.h>

Inheritance diagram for IScriptEvent:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISCRIPTEVENT }
 
enum  EventPhase { kNotDispatching = 0, kAtTarget = 2, kBubblingPhase = 3, kDoneDispatching = -1 }
 

Public Member Functions

virtual void InitEvent (const PMString &eventType, bool16 bubbles, bool16 cancelable)=0
 
virtual int32 GetID () const =0
 
virtual PMString GetEventType () const =0
 
virtual IScriptQueryTarget () const =0
 
virtual IScriptQueryCurrentTarget () const =0
 
virtual EventPhase GetEventPhase () const =0
 
virtual bool16 GetBubbles () const =0
 
virtual bool16 GetCancelable () const =0
 
virtual IDTime GetTimeStamp () const =0
 
virtual void StopPropagation ()=0
 
virtual bool16 GetPropagationStopped () const =0
 
virtual void PreventDefault ()=0
 
virtual bool16 GetDefaultPrevented () const =0
 
virtual void SetTarget (IScript *target)=0
 
virtual void SetCurrentTarget (IScript *target)=0
 
virtual void SetEventPhase (EventPhase phase)=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

An attachable event for scripting.

Member Enumeration Documentation

Propagation phases of the event. Note: kAtTarget == 2 and kBubble == 3 are defined in the W3C standard

See Also
http://www.w3.org/TR/DOM-Level-2-Events/events.html
Enumerator
kNotDispatching 

Not propagating

kAtTarget 

At target phase

kBubblingPhase 

Bubbling phase

kDoneDispatching 

Done propagating

Member Function Documentation

virtual bool16 IScriptEvent::GetBubbles () const
pure virtual

Returns whether this event supports the bubbling phase

virtual bool16 IScriptEvent::GetCancelable () const
pure virtual

Returns whether this event may be canceled

virtual bool16 IScriptEvent::GetDefaultPrevented () const
pure virtual

Returns whether this event's default action has been canceled

virtual EventPhase IScriptEvent::GetEventPhase () const
pure virtual

Returns the current event propagation phase

virtual PMString IScriptEvent::GetEventType () const
pure virtual

The name of this event

virtual int32 IScriptEvent::GetID () const
pure virtual

The unique id of this event

virtual bool16 IScriptEvent::GetPropagationStopped () const
pure virtual

Returns whether propagation has been stopped

virtual IDTime IScriptEvent::GetTimeStamp () const
pure virtual

Returns when this event was initiated

virtual void IScriptEvent::InitEvent (const PMStringeventType,
bool16 bubbles,
bool16 cancelable 
)
pure virtual

Initialize this ScriptEvent.

Parameters
eventTypethe event name
bubblesif kTrue the event is triggered in ancestors of the target object during the bubbling phase
cancelableif kTrue the event can be canceled
virtual void IScriptEvent::PreventDefault ()
pure virtual

Cancels the default action of this event, if this event is cancelable

virtual IScript* IScriptEvent::QueryCurrentTarget () const
pure virtual

The target object where the currently executing handler is registered. This could be an ancestor of the target object if the handler is invoked during the bubbling phase.

virtual IScript* IScriptEvent::QueryTarget () const
pure virtual

The target object where this event occurred

virtual void IScriptEvent::SetCurrentTarget (IScripttarget)
pure virtual

Set the target object where the currently executing handler is registered

Parameters
targetis the current target
virtual void IScriptEvent::SetEventPhase (EventPhase phase)
pure virtual

Set the current event propagation phase

Parameters
phaseis the current phase
virtual void IScriptEvent::SetTarget (IScripttarget)
pure virtual

Set the target of this event

Parameters
targetis the target
virtual void IScriptEvent::StopPropagation ()
pure virtual

Stops event propagation after executing the current handler