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

#include <IEventHandler.h>

Inheritance diagram for IEventHandler:
IPMUnknownCEventHandlerDVHostedWidgetEHCTrackerEventHandlerCusCondTxtIconEventHandlerCusDtLnkUITreeNodeEHCWindowEHHiDPIWidgetEventHandlerPnlTrvNodeEHDVControlEventHandlerDVToolControlEventHandler

Public Types

enum  { kDefaultIID = IID_IEVENTHANDLER }
 

Public Member Functions

virtual bool16 Activate (IEvent *e)=0
 
virtual bool16 Deactivate (IEvent *e)=0
 
virtual bool16 Suspend (IEvent *e)=0
 
virtual bool16 Resume (IEvent *e)=0
 
virtual bool16 MouseMove (IEvent *e)=0
 
virtual bool16 MouseExit (IEvent *e)=0
 
virtual bool16 MouseDrag (IEvent *e)=0
 
virtual bool16 LButtonDn (IEvent *e)=0
 
virtual bool16 RButtonDn (IEvent *e)=0
 
virtual bool16 MButtonDn (IEvent *e)=0
 
virtual bool16 LButtonUp (IEvent *e)=0
 
virtual bool16 RButtonUp (IEvent *e)=0
 
virtual bool16 MButtonUp (IEvent *e)=0
 
virtual bool16 ButtonDblClk (IEvent *e)=0
 
virtual bool16 ButtonTrplClk (IEvent *e)=0
 
virtual bool16 ButtonQuadClk (IEvent *e)=0
 
virtual bool16 ButtonQuintClk (IEvent *e)=0
 
virtual bool16 MouseWheel (IEvent *e)=0
 
virtual bool16 TabletEvent (IEvent *e)=0
 
virtual bool16 GestureEvent (IEvent *e)=0
 
virtual bool16 MultiTouchEvent (IEvent *e)=0
 
virtual bool16 ControlCmd (IEvent *e)=0
 
virtual bool16 KeyDown (IEvent *e)=0
 
virtual bool16 KeyCmd (IEvent *e)=0
 
virtual bool16 KeyUp (IEvent *e)=0
 
virtual void PreGetKeyFocus ()=0
 
virtual void PostGetKeyFocus ()=0
 
virtual void PreGiveUpKeyFocus ()=0
 
virtual void PostGiveUpKeyFocus ()=0
 
virtual bool16 WillingToGiveUpKeyFocus ()=0
 
virtual bool16 SuspendKeyFocus ()=0
 
virtual bool16 ResumeKeyFocus ()=0
 
virtual bool16 CanHaveKeyFocus () const =0
 
virtual bool16 WantsTabKeyFocus () const =0
 
virtual void SetView (IControlView *view)=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

Event handler interface.

Defines an interface for handling events. Events themselves are untyped, but are always handled to a specific event-typed handler. The event handling method returns True if the event has been handled and should not be further dispatched. False means that the event will be passed to the next event handler.

Member Function Documentation

virtual bool16 IEventHandler::Activate (IEvente)
pure virtual

Window has been activated. Traditional response is to activate the controls in the window.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, DVHostedWidgetEH, CEventHandler, and CWindowEH.

virtual bool16 IEventHandler::ButtonDblClk (IEvente)
pure virtual

Double click with any button.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, DVHostedWidgetEH, and CWindowEH.

virtual bool16 IEventHandler::ButtonQuadClk (IEvente)
pure virtual

Quadruple click with any button.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, DVHostedWidgetEH, and MenuPopupEventHandler.

virtual bool16 IEventHandler::ButtonQuintClk (IEvente)
pure virtual

Quintuple click with any button.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, DVHostedWidgetEH, and MenuPopupEventHandler.

virtual bool16 IEventHandler::ButtonTrplClk (IEvente)
pure virtual

Triple click with any button.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, DVHostedWidgetEH, MenuPopupEventHandler, and CWindowEH.

virtual bool16 IEventHandler::CanHaveKeyFocus () const
pure virtual

Determine if this eventhandler can be focus of keyboard event

Returns
kTrue if this eventhandler supports being the focus of keyboard event

Implemented in CEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, DVHostedWidgetEH, C9PointProxyEH, MenuPopupEventHandler, and DVEditBoxEventHandler.

virtual bool16 IEventHandler::ControlCmd (IEvente)
pure virtual

Event for a particular control. Used only on Windows.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, CEventHandler, PnlTrvNodeEH, DVHostedWidgetEH, and CWindowEH.

virtual bool16 IEventHandler::Deactivate (IEvente)
pure virtual

Window has been deactivated. Traditional response is to deactivate the controls in the window.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CTrackerEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, DVHostedWidgetEH, and CWindowEH.

virtual bool16 IEventHandler::KeyCmd (IEvente)
pure virtual

Keyboard key down that generates a character.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, CEventHandler, PnlTrvNodeEH, CTrackerEventHandler, DVHostedWidgetEH, DVToolControlEventHandler, and CWindowEH.

virtual bool16 IEventHandler::KeyDown (IEvente)
pure virtual

Keyboard key down for every key. Normally you want to override KeyCmd, rather than KeyDown.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, CEventHandler, PnlTrvNodeEH, CTrackerEventHandler, DVHostedWidgetEH, C9PointProxyEH, CelPnlEditBoxEventHandler, MenuPopupEventHandler, DVEditBoxEventHandler, and DVToolControlEventHandler.

virtual bool16 IEventHandler::KeyUp (IEvente)
pure virtual

Keyboard key released.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, CEventHandler, PnlTrvNodeEH, CTrackerEventHandler, DVHostedWidgetEH, DVToolControlEventHandler, and CWindowEH.

virtual bool16 IEventHandler::LButtonDn (IEvente)
pure virtual

Left mouse button (or only mouse button) has been pressed.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, C9PointProxyEH, PicIcoPictureWidgetEH, DVHostedWidgetEH, CTrackerEventHandler, DVEditBoxEventHandler, CusCondTxtIconEventHandler, DVToolControlEventHandler, MenuPopupEventHandler, and HiDPIWidgetEventHandler.

virtual bool16 IEventHandler::LButtonUp (IEvente)
pure virtual

Left mouse button released.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, DVHostedWidgetEH, TableCellEventHandler, CTrackerEventHandler, CWindowEH, MenuPopupEventHandler, and DVToolControlEventHandler.

virtual bool16 IEventHandler::MButtonDn (IEvente)
pure virtual

Middle mouse button of a 3 button mouse has been pressed.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::MButtonUp (IEvente)
pure virtual

Middle mouse button released.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::MouseDrag (IEvente)
pure virtual

User is holding down the mouse button and dragging the mouse.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, CTrackerEventHandler, DVHostedWidgetEH, and CWindowEH.

virtual bool16 IEventHandler::MouseExit (IEvente)
pure virtual

Mouse has exited the current control's bounds.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::MouseMove (IEvente)
pure virtual

Mouse has moved outside the sensitive region.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, DVHostedWidgetEH, and CWindowEH.

virtual bool16 IEventHandler::MouseWheel (IEvente)
pure virtual

Mouse wheel moved

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, CTrackerEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::MultiTouchEvent (IEvente)
pure virtual

MultiTouchEvents events New for CC

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CEventHandler, and DVHostedWidgetEH.

virtual void IEventHandler::PostGetKeyFocus ()
pure virtual

Called after getting focus onto the associated widget/window

Parameters
none
Returns
none

Implemented in CEventHandler, C9PointProxyEH, DVHostedWidgetEH, and DVEditBoxEventHandler.

virtual void IEventHandler::PostGiveUpKeyFocus ()
pure virtual

Called after giving up focus onto the associated widget/window

Parameters
none
Returns
none

Implemented in CEventHandler, C9PointProxyEH, DVHostedWidgetEH, and DVEditBoxEventHandler.

virtual void IEventHandler::PreGetKeyFocus ()
pure virtual

Called before getting focus onto the associated widget/window

Parameters
none
Returns
none

Implemented in CusDtLnkUITreeNodeEH, CEventHandler, PnlTrvNodeEH, and DVHostedWidgetEH.

virtual void IEventHandler::PreGiveUpKeyFocus ()
pure virtual

Called before giving up focus onto the associated widget/window

Parameters
none
Returns
none

Implemented in CEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, and DVHostedWidgetEH.

virtual bool16 IEventHandler::RButtonDn (IEvente)
pure virtual

Right mouse button (or second button) has been pressed.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, CTrackerEventHandler, PnlTrvNodeEH, CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::RButtonUp (IEvente)
pure virtual

Right mouse button released.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CTrackerEventHandler, CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::Resume (IEvente)
pure virtual

Application has been resumed. Control is passed back to the application from another application.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::ResumeKeyFocus ()
pure virtual

The keyboard has been handed back.

Returns
kTrue if you really resumed yourself. Otherwise, return kFalse.

Implemented in CEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, and DVHostedWidgetEH.

virtual void IEventHandler::SetView (IControlViewview)
pure virtual
virtual bool16 IEventHandler::Suspend (IEvente)
pure virtual

Application has been suspended. Control is passed to another application.

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CTrackerEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::SuspendKeyFocus ()
pure virtual

The keyboard focus if going to be taken offis temporarily being taken away. Remember enough state to resume where you left off.

Returns
kTrue if you really suspended yourself. If you simply gave up the keyboard, return kFalse.

Implemented in CEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, and DVHostedWidgetEH.

virtual bool16 IEventHandler::TabletEvent (IEvente)
pure virtual

Tablet and Gesture events New for CC, previously these would come through PlatformEvent

Parameters
eevent of interest
Returns
kTrue if event has been handled and should not be further dispatched, kFalse otherwise (pass event to next handler)

Implemented in CEventHandler, and DVHostedWidgetEH.

virtual bool16 IEventHandler::WantsTabKeyFocus () const
pure virtual

Return kTrue if this event handler wants to get keyboard focus while tabbing through widgets. Note: For almost all event handlers CanHaveKeyFocus and WantsTabKeyFocus will return the same value. If WantsTabKeyFocus returns kTrue then CanHaveKeyFocus should also return kTrue for the event handler to actually get keyboard focus. If WantsTabKeyFocus returns kFalse then the event handler is skipped.

Returns
kTrue if event handler wants to get focus during tabbing, kFalse otherwise

Implemented in CEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, DVHostedWidgetEH, and DVEditBoxEventHandler.

virtual bool16 IEventHandler::WillingToGiveUpKeyFocus ()
pure virtual

Typically called before the keyfocus is taken from the widget/window is called. Return kFalse to hold onto the keyboard focus.

Returns
kFalse to hold onto the keyboard focus

Implemented in CEventHandler, CusDtLnkUITreeNodeEH, PnlTrvNodeEH, DVHostedWidgetEH, and DVEditBoxEventHandler.