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

#include <IEventUtils.h>

Inheritance diagram for IEventUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IEVENTUTILS }
 

Public Member Functions

virtual GSysPoint GetGlobalMouseLocation ()=0
 
virtual bool16 IsMouseButtonDown ()=0
 
virtual bool16 IsMouseButtonReleased ()=0
 
virtual bool16 IsUserStartingDrag (IEvent *e, bool16 &isPatientUser, const CursorSpec *patientCursor=nil)=0
 
virtual bool16 IsUserStartingDrag (IEvent *e, bool16 &isPatientUser, const SysRect &startOnExitGRect, const CursorSpec *patientCursor=nil)=0
 
virtual void PMCaptureMouse (IControlView *theView)=0
 
virtual void PMReleaseMouse (void)=0
 
virtual void RemoveNextKeyCmd (IEvent *e)=0
 
virtual bool16 IsDragOrTrackInProgress ()=0
 
virtual int16 GetModifiersFromEvent (const IEvent *e)=0
 
virtual bool16 IsTrackInProgress ()=0
 
virtual bool16 IsUserEventPending (bool16 needPendingKeyEventOnly=kFalse)=0
 
virtual void EmulateAsynModalLoop ()=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

Utils interface which provides methods for working with events. Use like so:


    Utils<IEventUtils>()->BuildAndDispatchUpdateOrActivateEvent(*theEvent);

Member Function Documentation

virtual void IEventUtils::EmulateAsynModalLoop ()
pure virtual

Emulate an Async Model loop, all events will then be posted to this Model Loop. Model loop then posts that event to app's event loop.

virtual GSysPoint IEventUtils::GetGlobalMouseLocation ()
pure virtual

Get the current mouse location. It's much better if you can get this information from an IEvent

Returns
the current position of the mouse.
virtual int16 IEventUtils::GetModifiersFromEvent (const IEvente)
pure virtual

Get the modifiers from an event as bits or'd together.

Parameters
eevent to get the modifiers from
Returns
modifier bits.
See Also
KBSCModifierDefs.h
virtual bool16 IEventUtils::IsDragOrTrackInProgress ()
pure virtual

Check to see if we're currently dragging or tracking the mouse

Returns
kTrue if we're either doing a drag or tracking.
virtual bool16 IEventUtils::IsMouseButtonDown ()
pure virtual

Get the current mouse button state. It's much better if you can get this information from an IEvent

Returns
the current state of the left mouse button.
virtual bool16 IEventUtils::IsMouseButtonReleased ()
pure virtual

Get the current mouse button state. It's much better if you can get this information from an IEvent. Roughly equivilent to calling StillDown() on the mac.

Returns
the current state of the left mouse button.
virtual bool16 IEventUtils::IsTrackInProgress ()
pure virtual

Check to see if we're tracking the mouse

Returns
kTrue if we're tracking.
virtual bool16 IEventUtils::IsUserEventPending (bool16 needPendingKeyEventOnly = kFalse)
pure virtual

Check to see if any user event is pending

Parameters
needPendingKeyEventOnlyIn case there is a need to check only pending key events. Default value for this param is false.
Returns
kTrue if true.
virtual bool16 IEventUtils::IsUserStartingDrag (IEvente,
bool16 & isPatientUser,
const CursorSpecpatientCursor = nil 
)
pure virtual

Check if this event indicates a drag is starting

Parameters
ethe OS event
isPatientUserOUT indicates if this is a patient user drag
patientCursorcursor to use if this is a patient user drag
Returns
kTrue if the user is starting a drag
virtual bool16 IEventUtils::IsUserStartingDrag (IEvente,
bool16 & isPatientUser,
const SysRectstartOnExitGRect,
const CursorSpecpatientCursor = nil 
)
pure virtual

Check if this event indicates a drag is starting

Parameters
ethe OS event
isPatientUserOUT indicates if this is a patient user drag
startOnExitGRecta rectangle indicating an area which is not considered to be starting a drag, i.e. the user has to move outside this rect before a drag is started.
patientCursorcursor to use if this is a patient user drag
Returns
kTrue if the user is starting a drag
virtual void IEventUtils::PMCaptureMouse (IControlViewtheView)
pure virtual

Captures the mouse events for this window. Before capturing the mouse, it will release any other captures also attached to this window. If this method is called without pushing an event handler to the dispatcher, it will have no effect as the captured mouse events will not be properly dispatched. This method is functional for Windows platform only and results in a no-op on the Macintosh platform.

Parameters
theViewpointer to the control view to use, capture will actually occur on theView's top level parent
virtual void IEventUtils::PMReleaseMouse (void )
pure virtual

Releases the previous captured mouse. This method is functional for Windows platform only and results in a no-op on the Macintosh platform.

virtual void IEventUtils::RemoveNextKeyCmd (IEvente)
pure virtual
Called in some circumstances when we handle the KeyDown and want to remove the following KeyCmd event. No op on Macintosh.

Parameters
ethe keydown event