Text Editing framework interactors

The Text Editing framework uses the interactors shown in this figure to handle keyboard and mouse input:


TTypingInteractor, derived from TInteractor and MKeyEventHandler, implements the general protocol for handling typing input. This typing interactor processes text input incrementally, allowing the view to provide visual feedback as the user types. Two concrete subclasses provide support specifically for typing within component types:

TSelectTextInteractor, derived from TInteractor and MMouseEventHandler, receives mouse events within an editable text display. Based on mouse position, this interactor creates a new selection and resets the current selection for the component.

Text components use an additional class--TCursorKeyFilter--to provide navigation via cursor keys. This class implements an event behavior, intercepting cursor key events and using them to create an insertion point selection and reset the current selection accordingly. TCursorKeyFilter is not related to the interactor classes but provides similar functionality.

These typing and selection interactors were not designed to be extensible. To implement customized input handling for text components, you should derive your own interactors from TInteractor and MKeyEventHandler or MMouseEventHandler. This section describes the CommonPoint text interactors and provides guidelines for creating your own interactors.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker