Calling your interactors
To get your interactors activated by a text component, override the text view functions that create the typing and selection interactors. Derive a text view from TDocumentTextView or TSimpleTextView as appropriate:
- For typing interactors, override the text view function HandleCreateTypingInteractor. This function is called whenever the view is activated. Your HandleCreateTypingInteractor function should simply instantiate and return the appropriate typing interactor.
The view maintains a pointer to this interactor, which is started by the TTextView::KeyDown function when the view receives a key event. The interactor is stopped when the view receives a mouse-down event or is deactivated.
- For selection interactor, override the text view function HandleCreateSelectTextInteractor. This function is called by TTextView::MouseDown whenever the view receives a mouse-down event. Your HandleCreateSelectTextInteractor function should instantiate and return the selection interactor; MouseDown calls this function and then starts the interactor.
[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