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

#include <IKeyFocusHandler.h>

Inheritance diagram for IKeyFocusHandler:
IPMUnknown

Public Member Functions

virtual IEventHandlerGetFirstTargetEventHandler ()=0
 
virtual IEventHandlerGetNextTargetEventHandler (bool16 forward)=0
 
virtual IEventHandlerGetCurrentTargetEventHandler ()=0
 
virtual bool16 SetCurrentTargetEventHandler (IEventHandler *handler, bool16 validate=kTrue)=0
 
virtual void SetTargetEventHandler (IEventHandler *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

This interface is associated with a window boss to handle keyboard focus function on this particular window.

Member Function Documentation

virtual IEventHandler* IKeyFocusHandler::GetCurrentTargetEventHandler ()
pure virtual

Return the current event handler that is the keyboard target.

Returns
keyboard target or nil if no target
virtual IEventHandler* IKeyFocusHandler::GetFirstTargetEventHandler ()
pure virtual

Return the first control's event handler in the dialog that can be the keyboard target.

Returns
keyboard target or nil if no target
virtual IEventHandler* IKeyFocusHandler::GetNextTargetEventHandler (bool16 forward)
pure virtual

Return the next control's event handler in the dialog that can be the keyboard target. Pass in false to get the previous control. If there's only a single control, the current control's event handler will be returned.

Parameters
forwardsearch direction. kTrue search forward and kFalse search backward
Returns
keyboard target or nil if no target
virtual bool16 IKeyFocusHandler::SetCurrentTargetEventHandler (IEventHandlerhandler,
bool16 validate = kTrue 
)
pure virtual

Set the event handler that will be the keyboard target. Returns kFalse if the function wasn't able to set the event handler as the target. This might happen when the current target won't let go of the keyboard. If you pass kFalse for the "validate" parameter, then validation won't occur for the event handler that currently has the focus.

Parameters
handlerIEventHandler we try to set as keyboard target.
validatekTrue validate current key focus target.
Returns
boolean kTrue if the function was able to set the event handler as the target. kFalse otherwise
virtual void IKeyFocusHandler::SetTargetEventHandler (IEventHandlerview)
pure virtual

For internal use only. Use should call SetCurrentTargetEventHandler instead.