Brew MP 1.0.2
This function allows objects such as widgets and UI controls to attach a listener to the given
rich text model. The listener includes a callback function that BREW will call whenever the model has
changed state, thereby notifying the owner of the listener that data has changed. This is especially
convenient for text widgets, as a means of receiving notifications from BREW when the text entered
into the control's edit region has been changed. To illustrate, consider a text entry widget into
which the user enters the names of actors and actresses (again, using the "Six Degrees of Kevin
Bacon" as an example). The widget itself is responsible for tracking key events and for displaying
characters as they are entered, while the storage and subsequent notification of changes to the text
would be managed by a text model. The text model would receive updates from the widget's controller,
update the text stored in the text model, then send notifications out to any registered object -- in
this case, the "name entry widget", which had previously registered as a listener for the rich text model
by calling IRichTextModel_AddListener().
Pointer to the IRichTextModel interface object.
Pointer to the ModelListener that will be attached to the object. The ModelListener will
contain the PFNLISTENER callback function BREW will call to notify the registering object
of changes to the value model.
int IRichTextModel_AddListener(IRichTextModel *pif, ModelListener pl);
AEE_SUCCESS - Listener successfully added
AEE_EBADPARM - Invalid argument
ENOMEMORY - Insufficient memory