Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TTypingInteractor
TInputMethodKeyboardBehavior
TCursorKeyFilter
TDialogView
TMenu
TTextView
Purpose:
MKeyEventHandler is a mixin class that implements the protocol for handling keyboard events.
Instantiation:
Abstract base class; do not allocate.
Deriving Classes:
Classes deriving from MKeyEventHandler override the member functions responsible for handling keyboard events (KeyDown, KeyUp, ModifierKeyDown, and ModifierKeyUp.) You would normally mix this class into a derived class of MEventTarget.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- MKeyEventHandler ()
- MKeyEventHandler (const MKeyEventHandler & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators. This can also be called directly by the deriving classes during construction.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ MKeyEventHandler ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
MKeyEventHandler & operator =(const MKeyEventHandler & assign)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
Returns a const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool KeyDown (TKeyDownEvent & event)
Interface Category:
API.
Purpose:
Handles a key-down event.
Calling Context:
Called when a key is pressed on the keyboard.
Parameters:
Return Value:
Returns false but will be overridden by the deriving classes to return the appropriate value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Classes deriving from MKeyEventHandler should override this function to implement specific key-down handling behavior.
virtual bool KeyUp (TKeyUpEvent & event)
Interface Category:
API.
Purpose:
Handles a key-up event.
Calling Context:
Called when a key is pressed on the keyboard.
Parameters:
Return Value:
Returns false but will be overridden by the deriving classes to return the appropriate value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Classes deriving from MKeyEventHandler should override this function to implement specific key-up handling behavior.
Member Function: MKeyEventHandler::ModifierKeyDown
virtual bool ModifierKeyDown (TModifierKeyDownEvent & event)
Interface Category:
API.
Purpose:
Handles a modifier key-down event.
Calling Context:
Called when a modifier key is pressed on the keyboard.
Parameters:
Return Value:
Returns false but will be overridden by the deriving classes to return the appropriate value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Classes deriving from MKeyEventHandler should override this function to implement specific modifier key-down handling behavior.
virtual bool ModifierKeyUp (TModifierKeyUpEvent & event)
Interface Category:
API.
Purpose:
Handles a key-up event.
Calling Context:
Called when a modifier key is up on the keyboard.
Parameters:
Return Value:
Returns false but will be overridden by the deriving classes to return the appropriate value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Classes deriving from MKeyEventHandler should override this function to implement specific modifier key-up handling behavior.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.