Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Text controller

The TextController is instantiated by calling ISHELL_CreateInstance() with the AEECLSID_CTextController ClassID.

The TextController is reference counted. When an application is finished using the TextController, it should release its reference. Any controller specific cleanup will be handled for you when all references are released.

The following figure shows how a key press event is handled:

The default text controller handles events as follows:

  1. The user presses the key, which generates an event.
  2. The event is passed to the text widget.
  3. The text widget asks the text controller to handle the event. If the event is not handled by the text controller, then the text widget attempts to process the event internally.
  4. The text controller knows the current mode, so when the key press event is received, the text controller cross-checks with the current mode and inserts an appropriate character in the text model.
  5. The text model sends an event to the text widget through its registered listeners. The text widget (after doing all the internal processing) updates the screen.