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

Developer

resources

Text widget

The text widget provides text entry facilities to the widget framework. 

The text widget manages the interaction between the application and services that support text entry, handles the display of the text entry caret, and provides accessor functions for storing and retrieving the entered text. Text widgets are typically implemented in conjunction with a static widget, to provide data entry fields in an application.

Text entry is handled by the text controller, which modifes the text model (ITextModel) tied to both the controller and the text widget. The text widget listens for changes to the text model and updates what the user sees on the display in response to notification of changes in the model. Various properties allow configuration of alignment, font, multi-line support, and colors.

An application can set text input mode for a text widget's text controller by calling IWidget_SetInputModel(). The text input mode specifies text entry mode behavior such as multitap or case modes such as lower case, upper case, or mixed case. For more information on input modes, see AEETextController.bid.

If the text widget is using a BTFE font, the application will also need to set the layout ClassID by calling IWidget_SetTextLayoutClassId() with the AEECLSID_CBTFETextLayout ClassID. If the text widget is using a bitmap font, the default text layout ClassID should be used.

The relationship between the text widget, controller, and text model is illustrated in the following figure, which shows how the keys the user presses go from the user to the display.

The text widget is also attached to a view model, which sends scroll events (EVT_MDL_SCROLL_CHANGE) to other objects registered with the text widget's view.

In the figure below, the text widget is used to input an email message.

For additional information, refer to the http://developer.brewmp.com/reference/api-all.

Required Files

AEECTextWidget.h

AEETextWidget.h

Class IDs

AEECLSID_CTextWidget